Академический Документы
Профессиональный Документы
Культура Документы
the Problem.Items are divisible i.e you can take fraction of the item.
Example:
Let us consider that the capacity of the knapsack’ W ’= 60 kg and the list
of provided items are shown in the following table −
Item Weight Profit
A 40 280
B 10 100
C 20 120
D 24 120
Now here the Remaining capacity of the Knapsack after adding item B
and item A is 10.
Next Item to be added according to the sorted order in the Knapsack is ‘C’
having weight 20 with Profit 120.
The Item Weight is greater than the remaining Capacity of the Knapsack
so we cannot take the C as a complete item but we consider only the
fraction of ‘C’ .