Find an optimal parenthesization of a matrix-chain product

Assignment Help Computer Engineering
Reference no: EM131146818

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

Matrix             Dimension

A1                   8 * 5

A2                   5*10

A3                   10*30

A4                   30*20

A5                   20*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

60

55

The knapsack can carry a weight not exceeding 90, 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 (See Algorithm2 slide 54), 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.

Part II: programming exercise

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

1750_Fig.jpg

Reference no: EM131146818

Questions Cloud

What are some possible preliminary design issues : Continuing to think about the Clifford Anxiety Inventory, what are some possible preliminary design issues that could arise during the development of the Inventory? How could these issues be resolved
How do you fit systems requirements specification : How do you fit Systems Requirements Specification (SRS) documentation into an agile framework - Is it possible to use agile methodologies when the customer is not on site? If so how?
Why cash flow is more important than sales in a business : Describe why a manager needs to understand the characteristics and importance of financial markets including risk and efficiency. Describe why cash flow is more important than sales in a business.
Analyse the discussion between packard and edgerton : Ronald Edgerton, head of Royal Machine Works Ltd.'s valve division, tore open the confidential memorandum. How would you characterise/analyse the discussion between Packard and Edgerton
Find an optimal parenthesization of a matrix-chain product : Find an optimal parenthesization of a matrix-chain product whose sequence of dimensions - show the dynamic programming tables at the end of the computation.
Discuss possible root causes for each of these issues : Additionally, existing customers are starting to complain about slow response times, degradation of services, poor quality, lack of communication, and rising costs. In the past, when a customer made a request, the organization has accommodated for..
How would the following ratios be affected by the accounting : In a period of rising prices, how would the following ratios be affected by the accounting decision to select LIFO, rather than FIFO, for inventory valuation? * Gross Margin * Current Ratio * Asset Turnover * Debt-to-equity ratio * Average tax rate
What is the estimated error in the observed distances : The estimated error for both instrument and target miscentering errors is 3 mm. For the EDM in Problem 6.37, what is the estimated error in the observed distances?
Explain how lifo can result in a higher cost of goods sold : Explain how LIFO can result in a higher cost of goods sold. Would you expect LIFO to result in a greater or lesser valuation of the company's ending inventories? Defend your answer.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Taskproceed according to the following

taskproceed according to the following instructions.1.identify a recent within the last six 6 months moral dilemma or

  Effective communication is a very essential tool in

effective communication is a very essential tool in leading people. describe a time when a leader communicated an

  How to find the number of characters in a string

How to find the number of characters in a string

  Breach of security

A company has the resource XYZ. If there exist a breach of security, company may face a fine of $100,000 and pay other $20,000 in order to clean up the breach.

  What is the best way to write down the value ''7564''

What is the best process to write the value '7564' and make it clear to the reader that the number should be interpreted as a hexadecimal value?

  Build appropriate functions for these classes

A CollegeCourse class includes fields representing department, course number, credit hours, and tuition. Its child, LabCourse, includes one more field that holds a lab fee charged in addition to the tuition.

  What is the instruction format class and why

Explain the operation of the 'MIPS andi ' instruction. Illustrate your answer with an appropriate example. In your answer you must provide details of the andi instruction format and of what each field in that instruction format does and how an and..

  Write an illustration of a nested if structure and build it

write a 200- to 300-word short-answer response to the followinga create an example of a nested if structure and build

  Define the importance of that commandment

Modern relational database management systems have been around for a relatively short period of time. As time goes by, more and more emphasis has been placed on design issues, especially database modeling. What is the reason for this increased emp..

  Questionassume that you set up a data base for a credit

questionassume that you set up a data base for a credit card company and after initial analysis you have come up with

  What subsystems were involved in this problem

Think about the most difficult troubleshooting problem you've encountered in your recent experience- one where the solutions was not straightforward and where the problem was into a simple request for information.

  Recognize and explain at least two forms of fraud

today there are many industries that remain vulnerable to electronic fraud. for this assignment you will need to

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