Recurrence Relation: GATE CS Previous Year Questions

Recurrence Relation · Algorithms

24 questions · asked in 15 of 27 years (2000–2026)

MCQ 22 · MSQ 1 · NAT 11-mark 15 · 2-mark 9

2000Questions per year2026

Questions 16–20 of 24

Q16GATE 20082 marksMCQ−0.67 if wrong
Let xnx_{n} denote the number of binary strings of length n that contain no consecutive 0s.

Which of the following recurrences does xnx_{n} satisfy?

Q17GATE 20061 markMCQ−0.33 if wrong
Consider the following recurrence:
T(n)=2T(⌈n⌉\left \lceil \sqrt{n} \right \rceil)+ 1, T(1) = 1
Which one of the following is true?

Q18GATE 20051 markMCQ−0.33 if wrong
Let T(n) be a function defined by the recurrence
T(n)=2T(n/2)+n for n≥2T(n) = 2T(n/2) + \sqrt n \text{ for }n \geq 2 and
T(1)=1T(1) = 1
Which of the following statements is TRUE?

Q19GATE 20051 markMCQ−0.33 if wrong
Suppose T(n)=2T(n/2)+n,T (n) = 2T(n/2) + n, T(0)=T(1)=1
Which one of the following is FALSE?

Q20GATE 20041 markMCQ−0.33 if wrong
Consider a list of recursive algorithms and a list of recurrence relations as shown below. Each recurrence relation corresponds to exactly one algorithm and is used to derive the time complexity of the algorithm.

Recursive Algorithm Recurrence RelationPBinary searchl.T(n)=T(n−k)+T(k)+cnQ.Merge sortll.T(n)=2T(n−1)+1 R.Quick sortlll.T(n)=2T(n/2)+cnS.Tower of HanoilV.T(n)=T(n/2)+1\begin{array}{|l|l|l|l|}\hline \text{} & \textbf{Recursive Algorithm } & \text{} & \textbf{Recurrence Relation} \\\hline \text{P} & \text{Binary search} & \text{l.} & \text{$T(n) = T(n-k) +T(k) +cn$} \\\hline \text{Q.} & \text{Merge sort} &\text{ll.} & \text{$T(n) = 2T(n-1) + 1$ }\\\hline\text{R.} & \text{Quick sort}& \text{lll.} & \text{$T(n) = 2T(n/2) + cn$}\\\hline \text{S.} & \text{Tower of Hanoi} & \text{lV.} & \text{$T(n) = T(n/2) + 1$} \\\hline \end{array}

Which of the following is the correct match between the algorithms and their recurrence relations?

Keep practising

Topics in Algorithms

All CS topics ›