Cash-back offer from April 23rd to 27th, 2024: Get a flat 10% cash-back credited to your account for a minimum transaction of $50.Post Your Questions Today!

Question DetailsNormal
$ 40.00

CS 331 Design and Analysis of Algorithms Homework #4 | Complete Solution

Question posted by
Online Tutor Profile
request

CS 331 Design and Analysis of Algorithms Homework #4


(Total: 100 points)
1. (25 points) Given A=[252], B=[220], C=[2010], and D=[105]. Compute the C(i,j)'s defined in the class for all i < j and give the solution (i.e. the multiplication order) for this instance of Chained Matrix Multiplication.


2. (25 points) Given the following input instance for the 0/1 Knapsack problem. Show how the algorithm given in the class works on this input instance. Complete the whole (M+1)(n+1) table, and give the answer for the optimal solution, where M is the capacity of the knapsack and n is the number of objects. Object 1 Object 2 Object 3 Object 4 Object 5 Object 6
Profit pi 3 3 5 5 1 4
Weight wi 2 4 5 3 2 5
M = 10


3. (26 points) Consider the 0/1/2/3 Knapsack Problem. Unlike 0/1 Knapsack problem which restricts xi to be either 0 or 1, 0/1/2/3 Knapsack Problem allows xi to be either 0 or 1 or 2 or 3 (that is, we assume that 3 copies of each object i are available, for all i). (a) Obtain the dynamic programming functional equation to solve the 0/1/2/3 Knapsack
Problem.
(b) Give an algorithm to implement your functional equation.
(c) What is the complexity of your algorithm?


4. (24 points) Decide True or False for each of the followings. You MUST briefly justify your answer.
(a) If P = NP, then all problems in NP can be solved in polynomial time deterministically.
(b) It is known that 3SAT is NP-complete. Assume that an O(n7413) deterministic
algorithm has been found for the 3SAT problem, then P = NP.
(c) If a decision problem A is NP-complete, proving that A is reducible to B, in
polynomial time, is sufficient to show that B is NP-complete.

Available Answer
$ 40.00

[Solved] CS 331 Design and Analysis of Algorithms Homework #4 | Complete Solution

  • This solution is not purchased yet.
  • Submitted On 13 Mar, 2015 12:35:52
Answer posted by
Online Tutor Profile
solution

This Tutorial is rated A+ previously,if...

Buy now to view the complete solution
Other Similar Questions
User Profile
Homew...

CS 331 Design and Analysis of Algorithms | Homework 2 | Complete Solution

This Tutorial is rated A+ previously,if you have any questions regarding this tutorial than you can contact me.

...
User Profile
AceTu...

CS 331 Design and Analysis of Algorithms Homework #4 | Complete Solution

This Tutorial is rated A+ previously,if you have any questions regarding this tutorial then you can contact me.

http://www.coursemerit.com/user/AceTutor

...
User Profile
AceTu...

CS 331 Design and Analysis of Algorithms Project #1 | Complete Solution

This Tutorial is rated A+ previously,if you have any questions regarding this tutorial then you can contact me.

...

The benefits of buying study notes from CourseMerits

homeworkhelptime
Assurance Of Timely Delivery
We value your patience, and to ensure you always receive your homework help within the promised time, our dedicated team of tutors begins their work as soon as the request arrives.
tutoring
Best Price In The Market
All the services that are available on our page cost only a nominal amount of money. In fact, the prices are lower than the industry standards. You can always expect value for money from us.
tutorsupport
Uninterrupted 24/7 Support
Our customer support wing remains online 24x7 to provide you seamless assistance. Also, when you post a query or a request here, you can expect an immediate response from our side.
closebutton

$ 629.35