Next: About this document ...
``Master Theorem'' - Revised Version
Let
where
.
Then
Proof:
If
then
Intuition:
The solution of this recurrence can be thought of in terms
of a tree, where the root contributes
and has
children.
Each child contributes
and has
children.
Each grandchild contributes
and has
children.
Etc.
The tree has height
,
and there are
leaves.

- When the branching factor is high (
),
a major portion of the contribution occurs at the leaves.
This yields
.

- When the branching factor is low (
),
a major portion of the contribution occurs at the root.
This yields
.

- When the branching factor is ``in between'' (
),
each nonleaf level of the tree contributes the same amount.
There are
nonleaf levels each of which contributes
.
The
leaves each contribute
.
The total is
.
Summing solutions:
If
then we can just sum the solutions of each recurrence:
and add in
for the contribution from the leaves.
For example, MergeSort has the following recurrence:
The
term gives a solution of
,
the
term gives a solution of
,
and the leaves contribute
,
so the full solution is
Next: About this document ...
Don Perlis
2002-02-25