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: IE170: Algorithms in Systems Engineering: Lecture 3 Jeff Linderoth Department of Industrial and Systems Engineering Lehigh University January 19, 2007 Jeff Linderoth IE170:Lecture 3 Taking Stock Last Time Lots of funky math Playing with summations: Formulae and Bounds Sets A brief introduction to our friend This Time Questions on Homework? , O and Recursion Analyzing Recurrences Jeff Linderoth IE170:Lecture 3 Comparing Algorithms Consider algorithm A with running time given by f and algorithm B with running time given by g . We are interested in knowing L = lim n f ( n ) g ( n ) What are the four possibilities? L = 0 : g grows faster than f L = : f grows faster than g L = c : f and g grow at the same rate. The limit doesnt exist. Jeff Linderoth IE170:Lecture 3 Notation We now define the set ( g ) = { f : c 1 ,c 2 ,n > 0 such that c 1 g ( n ) f ( n ) c 2 g ( n ) n n } If f ( g ) , then we say that f and g grow at the same rate or that they are of the same order . Note that f ( g ) g ( f ) We also know that if lim n f ( n ) g ( n ) = c for some constant c , then f ( g ) . Jeff Linderoth IE170:Lecture 3 Big O Notation O ( g ) = { f  constants c,n > 0 s.t. f ( n ) cg ( n ) n n } If f O ( g ) , then we say that f is bigO of g or that g grows at least as fast as f If we say 2 n 2 + 3 n + 1 = 2 n 2 + O ( n ) this means that 2 n 2 + 3 n + 1 = 2 n 2 + f ( n ) for some f O ( n ) (e.g. f ( n ) = 3 n + 1 ). Jeff Linderoth IE170:Lecture 3 Big Notation ( g ) = { f  constants c,n > s.t. cg ( n ) f ( n ) n n } f ( g ) means that g is an asymptotic lower bound on f f grows faster than g Note f ( g ) f O ( g ) and f ( g ) . f ( g ) g O ( f ) . Jeff Linderoth IE170:Lecture 3 Strict Asymptotic Bounds. Little oh f o ( g ) lim n f ( n ) g ( n ) = 0 f ( g ) g o ( f ) lim n f ( n ) g ( n ) = Note f o ( g ) f O ( g ) \ ( g ) ....
View
Full
Document
This note was uploaded on 08/06/2008 for the course IE 170 taught by Professor Ralphs during the Spring '07 term at Lehigh University .
 Spring '07
 Ralphs
 Systems Engineering

Click to edit the document details