Question: The mixed knapsack problem. In class, we talked about the knapsack problems. There were two pure versions of the knapsack problem, the fractional knapsack problem

 The mixed knapsack problem. In class, we talked about the knapsack

The mixed knapsack problem. In class, we talked about the knapsack problems. There were two "pure" versions of the knapsack problem, the fractional knapsack problem (dealing with items that are infinitely divisible) and the 0-1 knapsack problem (dealing with items where you must take either all or none of an item). 2 Consider a hybrid knapsack problem, in which some of the items are indivisible (as in the 0-1 knapsack problem) and others are "infinitely" finely divisible (as in the fractional knapsack problem). Our objective here is to maximize the value of the goods in the knapsack subject to the maximum weight W (in grams, for instance) that the knapsack can hold. Assume that there is enough of each item that you could fill up the knapsack with it and it alone. There are two types of items: "Infinitely divisible items": f1,f2,fm. Each of these has a value per unit weight of u2,u2,,um. For each of these you can put as much or as little of the item as you wish into the knapsack. These correspond to the inputs of the fractional knapsack problem All-or-nothing items: Items g1g2,g0. These have values per unit weight of v2,v2,,v0. The weight of one individual item is w1w2,w0, and you must put an integer number of items into the knapsack. These correspond to the inputs of the 01 knapsack problem. The question is on the next page. (But you don't necessarily need a lot of space to give the answer. Part A: Propose an algorithm for solving the mixed knapsack problem with unlimited repetition (or at least the amount of every item). Please describe your algorithm generally and carefully

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!