Section 2
Running Time and Recurrences
Big-Oh Review
Main ideas:
�
Big-Omega and Big-Theta
Practice
Practice
Worksheet problems
Worksheet problems
Tree Method Example
…
…
…
…
…
Red box represents a problem instance
Blue value represents time spent at that level of recursion
Tree Method Idea
…
…
…
…
…
c
Red box represents a problem instance
Blue value represents time spent at that level of recursion
…
…
…
Asymptotically, these never matter!
Base Case Doesn’t Matter!
…
…
…
…
…
Red box represents a problem instance
Blue value represents time spent at that level of recursion
…
…
Non-Recursive Constants Don’t Matter!
…
…
…
…
…
Red box represents a problem instance
Blue value represents time spent at that level of recursion
…
…
Recursive Constants Do Matter!
…
…
…
…
…
Red box represents a problem instance
Blue value represents time spent at that level of recursion
Solving the Summation
Recursive Constants Do Matter!
…
…
…
…
…
Red box represents a problem instance
Blue value represents time spent at that level of recursion
…
…
Solving the Summation
Recursive Running Times - Guidance