Lecture 3: Big Oh and Growth Rates
Background Material
- Lecture 2
- Geometric and Arithmetic Series
- logarithm, exponential, polynomials
- limits, derivative and L'Hopital's Rule
Reading
- Chapter 3 (all sections) of the text.
Topics
- Finish materials from Lecture 2
- Computing Time
- Analyzing the running time of a program
- Big-Oh, little-oh, and Big-Theta and approximate running time
- Properties of Big-Oh, little-oh, and Big-Theta
- Sums and loops
- computing powers
- gcd
- insertion sort
- Recurrence relations and recursion
- computing powers
- gcd
- insertion sort
- Divide and Conquer
- Divide and conquer recurrence
- Merge Sort
- Karatsuba's algorithm for integer product
Lecture Notes
Programs
- sort.cpp - insertion sort and merge sort
- power.cpp - 4 functions (recursive
and iterative) to compute powers
- gcd.cpp - Euclidean algorithm
- minmax.cpp - recursive function to
simultaneously compute the minimum and maximum elements of a vector.
Resources
Assignments
- Assignment 3 - due by
the beginning of class on Tue. Oct. 19.
Created: Oct. 8, 2004 by jjohnson@cs.drexel.edu