Professional Documents
Culture Documents
5 Greedy Knapsack
5 Greedy Knapsack
Greedy Algorithm
(Fractional Knapsack Problem)
Dr. D. P. Acharjya
Professor, SCOPE
1/24/2024 Dr. D. P. Acharjya 1
Greedy Approach
A greedy algorithm builds a solution
to a problem in steps
- Each iteration adds a part of the
solution.
A greedy algorithm always makes the
choice that looks best at the moment
- It moves from local optimal solution
to global optimal solution.