Knapsack problem based questions for practice

PriyadharshiniG41 16 views 5 slides Feb 05, 2025
Slide 1
Slide 1 of 5
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5

About This Presentation

Knapsack problem based questions for practice


Slide Content

Knapsack problem

A cargo plane has a weight limit of 10,000 kg. The following items are available for shipment: Item A: Weight = 2,000 kg, Value = $5,000 Item B: Weight = 5,000 kg, Value = $12,000 Item C: Weight = 3,000 kg, Value = $8,000 Item D: Weight = 4,000 kg, Value = $10,000 Which items should be selected to maximize the shipment value?

In an eCommerce system, you have 5 slots to display products. Each product has a size (slots required) and expected engagement value: Product A: Size = 1, Value = 5 Product B: Size = 2, Value = 10 Product C: Size = 3, Value = 15 Product D: Size = 4, Value = 20 Product E: Size = 5, Value = 25 How would you decide which products to display to maximize engagement?

A data center has a storage limit of 2 TB. The following files are available for storage: File A: Size = 0.5 TB, Value = $200 File B: Size = 1 TB, Value = $300 File C: Size = 0.8 TB, Value = $250 Which files should be selected to maximize value (solve using the Fractional Knapsack Problem)?
Tags