Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. (30 points) Suppose you are given the knapsack problem (having knapsack capacity of 10) below. a) Work out the brute force solution using the

image text in transcribed

1. (30 points) Suppose you are given the knapsack problem (having knapsack capacity of 10) below. a) Work out the brute force solution using the exhaustive-search approach to this problem. Hint: Exhaustive-search leads to generating all the subsets of the set of n items given, computing the total weight of each subset in order to identify feasible subsets (i.e., the ones with the total weight not exceeding the knapsack capacity), and finding a subset of the largest value among them. b) Work out the heuristic solution using the heuristic algorithm discussed in the class. 10 = W = 7 V1 = $42 W2 = 3 V2 = $12 W3 = = 4 V3 = $40 W4 = 5 V4 = $25 = knapsack item 1 item 2 item 3 item 4

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

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

6. Be able to choose and prepare a training site.

Answered: 1 week ago