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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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