Master Theorem

Given: Let ,

Case 1

If for

Case 2

If , then:

Case 3

If for , and for some and sufficiently large (regularity condition), then:


Simplified

If for constants , then


Examples

Example 1

Solution:

  • , ,

Compare with :

  • for

Check regularity condition:

for

By Case 3:

Example 2

Solution:

  • , ,

Since

By Case 2:


Substitution Method

Example 1: Solve using Substitution:

Solution:

Guess:

Prove by induction that for some :

if and is sufficiently large.

Therefore,

Example 2: Solve using Substitution:

Solution:

Let , so :

Let :

By Master Theorem (Case 2):

Substituting back:

Therefore,