Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the dynamic programming approach, solve the following knapsack problem: The capacity of the knapsack W = 89654. The number of available items = 10.

Using the dynamic programming approach, solve the following knapsack problem: The capacity of the knapsack W = 89654. The number of available items = 10. The weights of the items w = ( 32586 16759 26071 5206 2585 43920 12768 26671 43131 8328 ). The values of the items v = ( 17307 30630 83639 35025 24495 13623 35603 33596 11755 39004 ). Construct the table and use backtracking to answer the following questions:

Was item 1 picked? (write 1 if picked and 0 otherwise) Was item 2 picked? (write 1 if picked and 0 otherwise) Was item 3 picked? (write 1 if picked and 0 otherwise) Was item 4 picked? (write 1 if picked and 0 otherwise) Was item 5 picked? (write 1 if picked and 0 otherwise) Was item 6 picked? (write 1 if picked and 0 otherwise) Was item 7 picked? (write 1 if picked and 0 otherwise) Was item 8 picked? (write 1 if picked and 0 otherwise) Was item 9 picked? (write 1 if picked and 0 otherwise) Was item 10 picked? (write 1 if picked and 0 otherwise) What is the total value of the picked items? What is the total weight of the picked items?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions