Although solving by substitution is one great way of solving a recurrence equation/relation problem, the master theorem provides an easier alternative to solve a general class of a problem.
The following is a general form of recurrences which commonly arise in divide-and-conquer algorithms. (a,b,c,d and β are constants determined by the specific algorithm, and n=bk for some integer k.)
T(n){a⋅T(bn)+c⋅nβ,d,n>1n=1
The term T(bn) represents the time for solving each subproblem.
And the term cnβ represents the additional work for "combining" the solutions of the subproblems to find the overall solution.
Solutions.
Let h=logba. The solution has the following general forms and bounds. (A and B are some constants for each case.)