Optimal parenthesization of a matrix-chain product

Assignment Help Data Structure & Algorithms
Reference no: EM13807064

Part I:

1. Use the dynamic programming technique to find an optimal parenthesization of a matrix-chain product whose sequence of dimensions is <5, 10, 3, 12, 5, 50, 6>.

      Matrix             Dimension

      A1                   5 * 10

      A2                   10*3

      A3                   3*12

      A4                   12*5

      A5                   5*50

      A6                   50*6

You may do this either by implementing the MATRIX-CHAIN-ORDER   algorithm in the text or by simulating the algorithm by hand. In either case, show    the dynamic programming tables at the end of the computation.

2. We have 5 objects, and the weights and values are

No.      1          2          3          4          5

w         10        20        30        40        50

v          20        30        66        40        60

The knapsack can carry a weight not exceeding 100, find a subset items and give the total weight and value for following algorithms:

1) By using the algorithm of greedy of value for 0-1 knapsack problem? By selecting the highest value first.

2) By using the algorithm of greedy of weight for 0-1 knapsack problem? By selecting lightest item first.

3) By using the algorithm of greedy of density for 0-1 knapsack problem? By selecting the highest density item first.

4) By using the algorithm of greedy of density for fractional knapsack problem?  By selecting the highest density item first.

3. Using Floyd's algorithm, calculate the length of the shortest path between each pair of nodes in the graph by constructing a matrix. Give the each step of the adjacency matrix.

690_Floyd algorithm.png

Program Floyd's algorithm and use the graph of problem 3 in a driver program to test you answer.

Reference no: EM13807064

Questions Cloud

Paper on ethernet networking : Research paper should be on Ethernet Networking related to my specific subject which is Telecommunications and networking
Anth african studies reaction paper : Anth African Studies Reaction Paper.
Screen print of the schedule and gantt chart : Develop your small acquisition project schedule using MS Project (tasks, predecessors, duration, and resources assigned).
Write research paper about on othello by william shakespeare : Write a research paper about On Othello by William Shakespeare. What is the peculiarity of Othello? What is the distinctive impression that it leaves?
Optimal parenthesization of a matrix-chain product : Use the dynamic programming technique to find an optimal parenthesization of a matrix-chain product whose sequence of dimensions is
What are the key terms in a one sample verbal hypothesis tha : What are the key terms in a one sample verbal hypothesis that signify whether you are conducting a one-tailed or two-tailed test? Provide one example each for the use of one-tailed and two-tailed test and also state the Null and the Alternative hypot..
Problems on international air transport association survey : What is the probability that between 133 and 171 of the business travelers say that the reason for their most recent business trip was an internal company visit?
Evaluation and control-mergers and acquisitions : How are evaluation and control different for each stage of the strategic process (planning, implementation, evaluation, and control)? How are they similar? Respond substantively to at least two other students' posts.
Write a presentation paper about selling organs : Write a Presentation paper about "Selling Organs".

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd