Dynamic Programming Assignment | Homework For You

3. Read the Discrete Knapsack Problem in the handout on Dynamic Programming. A thief wishes to steal n objects having values vi > 0 and weights Wi > 0 (for 1 sis n). His knapsack, which will carry the stolen goods, holds at most a total weight W > 0. Let Xi = 1 if object i is to be taken, and Xi = 0 if object i is not taken (1 Sisn). The thief’s goal is to maximize the total value x1=1 XiVi of the goods stolen, subject to the constraint X1=1 XiW; <W.Homework For You a. Write pseudo-code for a dynamic programming algorithm that solves this problem. Your algorithm should take as input the value and weight arrays v[] and w[], and the weight limit W. It should generate a table V[1 … n; 0 … W] of intermediate results. Each entry V[i, j] will be the maximum value of the objects that can be stolen if the weight limit is j, and if we only include objects in the set {1, …, i}. Your algorithm should return the maximum possible value of the goods which can be stolen from the full set of objects, i.e. the value V [n, W]. (Alternatively you may write your algorithm to return the whole table.)
b. Write an algorithm that, given the filled table generated in part (a), prints out a list of exactly which objects are to be stolen. Get Finance homework help today

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Calculate the price
Make an order in advance and get the best price
Pages (550 words)
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Homework Writing Services
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
paper was not completed by due date
Customer 454371, May 25th, 2020
The writer did a phenomenal job with the Research Report #1: Data Breach Incident Analysis & Report. All expectations were met and exceeded! Thank you for delivering an amazing product and a HUGE thank you to the customer service department for sending me an email to let me know the paper was checked to quality assurance team to ensure the paper was within standards of the instructions.
Customer 452455, February 3rd, 2023
Customer 463813, April 12th, 2023
Customer 452441, April 19th, 2022
English 101
Customer 458101, April 23rd, 2022
English 101
Good response. Next time, properly capitalize headings in the requested style.
Customer 460641, March 30th, 2022
Web Design
Good work. Avoid such revisions.
Customer 452441, April 12th, 2022
Great quality work
Customer 462481, February 17th, 2022
Excellent job
Customer 456821, November 8th, 2022
This task was well written Looking forward to your future contribution.
Customer 463463, November 11th, 2022
Home Repair & Home Maintenance
Well researched paper
Customer 463473, November 4th, 2022
Excellent work.
Customer 463001, June 12th, 2022
Customer reviews in total
Current satisfaction rate
3 pages
Average paper length
Customers referred by a friend
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat