Recursion trees
Refer Erickson (2019, p. 32)

Consider the recurrence
where , , and is asymptotically positive. is the sum of all values in the recursion tree; evaluating this sum level by level, we obtain
where is the depth of the tree. If we take to be our base case, we have . This means that we have leaves in the recursion tree, and the last term in (E1) is .
Three common cases:
- If the series decays exponentially - every term is a constant factor smaller than the previous term - then it follows from the properties of geometric series that . In this case, the sum is dominated by the value at the root of the tree.
- If all terms in the series are equal, we have .
- If the series grows exponentially - every term is a constant factor larger than the previous term - then . In this case, the sum is dominated by the number of leaves in the recursion tree.
Example 120.1.
For case 1, take
Then, .
Another example:
If is the th term in the sequence, it is clear that . Thus, .
For case 2, consider the recurrence for merge sort:
.
As a more general example, take
for some and .
If , then . If , then . If , then .
Understanding cases 1, 2, and 3 by varying and for a fixed is easy, as seen in ^ddb755. How does varying affect ? Roughly speaking, if grows faster, we gravitate toward case 1, and vice versa. For example, consider the merge sort recurrence again. For , we were in case 2. What happens if we have instead?
so we’re now in case 1, and . What about ?
we’re in case 3, and .
We can make this more precise. Let be the critical exponent. Then,
- If for some , and if for some and all large , then .
- If for some , then .
- If for some , then .
[!Reminder] Ask Vardhan for a proof of this