Question: Problem 3 Fractional Knapsack 5 p t s . Consider a fractional Knapsack problem with n divisible itcms, where v i and w i are

Problem 3 Fractional Knapsack
5pts.
Consider a fractional Knapsack problem with n divisible itcms, where vi and wi are the value and weight of the ith item respectively. Assume the size of the Knapsack is W.
(a) Design an optimal greedy algorithm, i.c. model the fractional Knapsack as a multi-stage decision problem (clearly define the state, decision, outcome and reward variables, and the greedy decision philosophy based on a myopic score used to optimize at each stage.)(3 pts)
(b) Prove the correctness of your greedy algorithm for the fractional Knapsack problem. (2 pts)
Solution 3(a)
Multi-Stage Decision Problem Model: At the Klh stage, we have
State sK :
Decision xK :
Outcome yK :
Reward uK :
Mypoic (Greedy) Decision:
Pseudocode:
GreedyFracknapsack (items) :
Problem 3 Fractional Knapsack 5 p t s . Consider

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 Programming Questions!