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

  The decades to include various methodologies

The System Development Life Cycle has developed over the decades to include a variety of Methodologies. Each of these Methodologies utilizes the same methods in a different way. define the primary SDLC Methodologies, their advantages and disadvant..

  Design a program that calculates the total ticket sales

The manager of a football stadium wants you to write down a program that calculates the total ticket sales after each game. There are four types of tickets box, sidelline, premium and general admission.

  Describe the difference between accepting a payment online

discuss the difference between accepting a payment online versus in person and describe some of the problems associated

  Disadvantages of using mobile computing technology

Analyze the advantages and disadvantages of using mobile computing technology to monitor patients. Assess the security concerns with regard to the transmission of personal medical information over wireless networks

  What will be the values of h1 and h2

Consider two cache organizations both of them are using 32KB cache,32 bit physical address and 32B blocks. The 1st one is 2-way set associative cache, 2nd one is direct mapped cache.

  Functional specifications for the software at workplace

what are two of the most important methods to examine and why.

  What is tcp hijacking

What is TCP hijacking and how is it done? What are some defenses against it.

  Define the advantages and disadvantages of these metrics

Research at least one possible metric (Business or Technology) that you will use in a project plan for a "Customer Relationship Management Software Development. define the advantages and disadvantages of these metrics

  Organizational decision roles to technology innovation

What competitive advantage does technology give to business? How does aging hardware affect this advantage? What is the importance of organizational decision roles to technology innovation

  What is a small computer program stored on a world wide web

What is the mathod of changing data before, during, or after it is entered into a computer system called?

  Which would create a better product

Which would create a better product

  Research for a voip solution

In the future, Klamath’s separate the voice network will be dismantled. All the voice, data, and video traffic will traverse Metro Ethernet network.

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