Expert answer:Chained Matrix Multiplication

Expert answer:attached is 4 questions to answerChained Matrix Multiplication, Knapsack problem, and true and false questions
hw4.pdf

Unformatted Attachment Preview

CS 331 Design and Analysis of Algorithms
Homework #4
(Due: 11/30/2017)
(Total: 100 points)
1. (25 points)
Given A=[203], B=[310], C=[1030], and D=[30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
Profit pi
2
Weight wi 2
Object 2
3
1
Object 3
6
6
Object 4
3
4
Object 5
4
2
Object 6
5
5
M = 10
3. (26 points)
Consider the 0/1/2 Knapsack Problem. Unlike 0/1 Knapsack problem which restricts xi to
be either 0 or 1, 0/1/2 Knapsack Problem allows xi to be 0 or 1 or 2 (that is, we assume
that 2 copies of each object i are available, for all i).
(a) Obtain the dynamic programming functional equation to solve the 0/1/2 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 Partition is NP-complete. Assume that an O(n711) deterministic
algorithm has been found for the Partition problem, then P = NP.
(c) If a decision problem X is NP-complete, proving that X is reducible to Y, in
polynomial time, is sufficient to show that Y is NP-complete.

Purchase answer to see full
attachment

How it works

  1. Paste your instructions in the instructions box. You can also attach an instructions file
  2. Select the writer category, deadline, education level and review the instructions 
  3. Make a payment for the order to be assignment to a writer
  4.  Download the paper after the writer uploads it 

Will the writer plagiarize my essay?

You will get a plagiarism-free paper and you can get an originality report upon request.

Is this service safe?

All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 20% with the discount code ESSAYHELP