Solving Recurrences by Backward Substitution
Substitute, substitute again, notice the pattern, and put it back together.
What this unit covers
Unit 2: Analysis of Recursive Algorithms
- 1 Recurrences from Recursive CodeA recursive function's cost is an equation containing the function itself, and reading it off the code is a four-step recipe ending in an initial condition. · 17 min
- 2 Solving Recurrences by Backward SubstitutionSubstitute, substitute again, notice the pattern, and put it back together. · 18 min
- 3 The Master TheoremThree cases, one comparison, and the answer to most divide-and-conquer recurrences without algebra. · 19 min
- 4 Linear Recurrences and Closed FormsA linear recurrence a·X(n) + b·X(n−1) + c·X(n−2) = 0 is solved by the roots of a·r² + b·r + c = 0, which give a closed form valid for every n. · 18 min