Lecture06 - Greedy Algorithms CSE 421 Algorithms Richard...

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

View Full Document Right Arrow Icon
1 CSE 421 Algorithms Richard Anderson Lecture 7 Greedy Algorithms Greedy Algorithms • Solve problems with the simplest possible algorithm • The hard part: showing that something simple actually works • Pseudo-definition – An algorithm is Greedy if it builds its solution by adding elements one at a time using a simple rule Scheduling Theory • Tasks – Processing requirements, release times, deadlines • Processors • Precedence constraints • Objective function – Jobs scheduled, lateness, total execution time • Tasks occur at fixed times • Single processor • Maximize number of tasks completed • Tasks {1, 2, . . . N} • Start and finish times, s(i), f(i) Interval Scheduling What is the largest solution? Greedy Algorithm for Scheduling Let T be the set of tasks, construct a set of independent tasks I, A is the rule determining the greedy algorithm I = { } While (T is not empty) Select a task t from T by a rule A Add t to I Remove t and all tasks incompatible with t from T
Background image of page 1

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

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

This note was uploaded on 02/25/2012 for the course CSE 421 taught by Professor Richardanderson during the Fall '06 term at University of Washington.

Page1 / 4

Lecture06 - Greedy Algorithms CSE 421 Algorithms Richard...

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

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