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

  Program demonstrates simple symmetric-key encryption

This program demonstrates simple Symmetric-key Encryption using the XOR instruction with a multi-byte key entered by the user. Use this key to encrypt and decrypt the plain text

  Write down an e-mail explaining the five elements of

imagine you have been hired by a small well-funded startup company to help with their it-enabled business strategy.

  Explain real-world examples of attenuation and white noise

compare the four items related to channel capacity data rate bandwidth noise and error rate. determine the most

  Given an operating system that supports a one - to -one

given an operating system that supports a one - to -one relationship between user-level threads and kernel - level

  Define the types of the expressions

Using no other objects besides those already declared, how may you alter ptrPtr so that is points to a pointer to b without directly touching ptr?

  Give us your insights on why packet switched networks are

give us your insights on why packet switched networks are the future of telecommunications? what applicationsuses will

  Prepare a schedule showing the annual depreciation

Prepare a schedule showing the annual depreciation and end of year accumulated depreciation for the first three years of the assets life under the straight line method, the sum of the years digits method and the double declining balance method.

  How is this discipline organized or divided

What is the object(s) of study? What is this discipline about?

  Compare productivity based solutions

Microsoft has expended a lot of effort into developing productivity tools for the Web, particularly with the .NET strategy. though, there are many other tools for creating Web solutions.

  Local v/s network printers

Write down a paper explaining the Windows Printer Model for Server 2008. Explain the local v/s network printers and how to decide which printers to deploy.

  How to handle the customervalidator''s servervalidate event

Write down a method that handles the CustomerValidator's ServerValidate event. In addition, write a JavaScript function for the CustomValidator's CustomValidationFunction property.

  Make a view called v_no_cost

Using the ITD410_P1 database you created for the Independent Project in Unit 1, write scripts in a file known  ITD410_P3.SQL to create the following views. Remember to include a uses clause at the top of your script file to use the ITD410_P1 datab..

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