This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full 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 InPlace, OutofPlace Count Von Count Worst Case Analysis The worlds easiest lab :) This Time DivideandConquer The MasterTheorem 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
 Spring '07
 Ralphs
 Systems Engineering

Click to edit the document details