13 - Fractional Knapsack

13 - Fractional Knapsack - Part IV: Greedy Algorithms...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Part IV: Greedy Algorithms Lecture 13: The Fractional Knapsack Problem Lecture 13: The Fractional Knapsack Problem Part IV: Greedy Algorithms
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Objective and Outline Objective : Illustrate greedy algorithms using the knapsack problem. Reference : Section 16.2 of CLRS Outline Introduction The Knapsack problem. A greedy algorithm for the fractional knapsack problem Correctness Lecture 13: The Fractional Knapsack Problem Part IV: Greedy Algorithms
Background image of page 2
Introduction to Greedy Algorithm A greedy algorithm for an optimization problem always makes the choice that looks best at the moment and adds it to the current subsolution. Examples already seen Dijkstra’s shortest path algorithm : Select the node, among all “candidate” nodes, that is closest to the source according to estimation d[u]. Prim/Kruskal’s MST algorithms : Select the edge, among all “candidate” edges, that is the lightest. Greedy algorithms don’t always yield optimal solutions but, when they do, they’re usually the simplest and most efficient algorithms available. Lecture 13: The Fractional Knapsack Problem Part IV: Greedy Algorithms
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Outline Introduction The Knapsack problem. A greedy algorithm for the fractional knapsack problem Correctness Lecture 13: The Fractional Knapsack Problem Part IV: Greedy Algorithms
Background image of page 4
The Knapsack Problem. .. 2pd
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 14

13 - Fractional Knapsack - Part IV: Greedy Algorithms...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online