lecture5

lecture5 - Algorithm Analysis Data Structures IE170:...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: Algorithm Analysis Data Structures IE170: Algorithms in Systems Engineering: Lecture 5 Jeff Linderoth Department of Industrial and Systems Engineering Lehigh University January 24, 2007 Jeff Linderoth IE170:Lecture 5 Algorithm Analysis Data Structures Background Correctness and Running Time Taking Stock Last Time In-Place, Out-of-Place Count Von Count Worst Case Analysis The worlds easiest lab :-) This Time Divide-and-Conquer The Master-Theorem Jeff Linderoth IE170:Lecture 5 Algorithm Analysis Data Structures Background Correctness and Running Time Divide and Conquer A Simple Three Part Plan 1 Divide : the problem into a number of subproblems 2 Conquer : the subproblems by solving them recursively. (If subproblems are small enough, you solve them by brute force. (constant time). 3 Combine : the subproblem solutions to give a solution to the original problem Jeff Linderoth IE170:Lecture 5 Algorithm Analysis Data Structures Background Correctness and Running Time The Towers of Hanoi An old famous puzzle mathematical puzzle It consists of three pegs, and a number of disks of different sizes which can slide onto any peg. The puzzle starts with the disks neatly stacked in order of size on one peg, smallest at the top, thus making a conical shape. The objective of the game is to move the entire stack to another peg Jeff Linderoth IE170:Lecture 5 Algorithm Analysis Data Structures Background Correctness and Running Time Thats a Bit Too Easy Three Rules 1 Only one disk may be moved at a time. 2 Each move consists of taking the upper disk from one of the pegs and sliding it onto another peg, on top of the other disks that may already be present on that peg....
View Full Document

Page1 / 5

lecture5 - Algorithm Analysis Data Structures IE170:...

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

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