Substitution Method

We make a guess for the solution and then we use mathematical induction to prove the guess is correct or incorrect. 

For example consider the recurrence T(n) = 2T(n/2) + n

We guess the solution as T(n) = O(nLogn). Now we use induction to prove our guess.

We need to prove that T(n) <= cnLogn. We can assume that it is true for values smaller than n.

T(n) = 2T(n/2) + n
     <= 2cn/2Log(n/2) + n
       =  cnLogn – cnLog2 + n
       =  cnLogn – cn + n
    <= cnLogn

Recurrence Relations Notes for GATE Exam [2024]Advanced master theorem for divide and conquer recurrences:

Recurrence relations are the mathematical backbone of algorithmic analysis, providing a systematic way to express the time complexity of recursive algorithms. As GATE Exam 2024 approaches, a profound understanding of recurrence relations becomes imperative for tackling questions that demand a deep comprehension of algorithmic efficiency. These notes aim to present a concise and illuminating guide to recurrence relations, covering key concepts and techniques that are likely to be assessed in the GATE examination.

Table of Content

  • What is Recurrence Relations?
  • What is Linear Recurrence Relation?
  • How to Solve Recurrence Relations?
  • 1. Substitution Method: 
  • 2. Recurrence Tree Method:
  • 3. Master Method: 
  • Different types of recurrence relations and their solutions:
  • Previously Asked GATE Questions on Recurrence Relations:


Similar Reads

What is Recurrence Relations?

A recurrence relation is a mathematical expression that defines a sequence in terms of its previous terms. In the context of algorithmic analysis, it is often used to model the time complexity of recursive algorithms....

What is Linear Recurrence Relation?

In a linear recurrence relation, each term in the sequence is a linear combination of previous terms....

How to Solve Recurrence Relations?

The analysis of the complexity of a recurrence relation involves finding the asymptotic upper bound on the running time of a recursive algorithm. This is usually done by finding a closed-form expression for the number of operations performed by the algorithm as a function of the input size, and then determining the order of growth of the expression as the input size becomes large....

1. Substitution Method:

We make a guess for the solution and then we use mathematical induction to prove the guess is correct or incorrect....

2. Recurrence Tree Method:

In this method, we draw a recurrence tree and calculate the time taken by every level of the tree. Finally, we sum the work done at all levels. To draw the recurrence tree, we start from the given recurrence and keep drawing till we find a pattern among levels. The pattern is typically arithmetic or geometric series....

3. Master Method:

Master Method is a direct way to get the solution. The master method works only for the following type of recurrences or for recurrences that can be transformed into the following type....

Different types of recurrence relations and their solutions:

Type 1: Divide and conquer recurrence relations...

Previously Asked GATE Questions on Recurrence Relations:

Que – 1. What is the time complexity of Tower of Hanoi problem?(A) T(n) = O(sqrt(n))(D) T(n) = O(n^2)(C) T(n) = O(2^n)(D) None...