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 11–15 of 24

Q11GATE 2014 (Session 3)2 marksNAT
Suppose you want to move from 0 to 100 on the number line. In each step, you either move right by a unit distance or you take a shortcut. A shortcut is simply a pre-specified pair of integers i,j with i<ji \lt j. Given a shortcut i, j if you are at position i on the number line, you may directly move to j. Suppose T(k) denotes the smallest number of steps needed to move from k to 100. suppose further that there is at most 1 shortcut involving any number, and in particular from 9 there is a shortcut to 15. Let y and z be such that T(9) = 1 + min(T(y), T(z)). Then the value of the product yz is_______.

Q12GATE 20121 markMCQ−0.33 if wrong
The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with n discs is

Q13GATE 20092 marksMCQ−0.67 if wrong
The running time of an algorithm is represented by the following recurrence relation:
T(n)={nn≤3T(n3)+cnotherwiseT(n)=\left\{\begin{matrix} n & n\leq 3\\ T(\frac{n}{3})+cn& otherwise \end{matrix}\right.
Which one of the following represents the time complexity of the algorithm?

Q14GATE 20082 marksMCQ−0.67 if wrong
When n=22kn=2^{2 k} for some k⩾0k \geqslant 0, the recurrence relation T(n)=2T(n/2)+n,T(1)=1T(n)=\sqrt{2} T(n / 2)+\sqrt{n}, T(1)=1
evaluates to :

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

The value of x5x_{5} is

Keep practising

Topics in Algorithms

All CS topics ›