# Recurrence Relation

 Question 1
For constants $a\geq 1$ and $b \gt 1$, consider the following recurrence defined on the non-negative integers:

$T(n) = a \cdot T \left(\dfrac{n}{b} \right) + f(n)$

Which one of the following options is correct about the recurrence $T(n)$?
 A if $f(n)$ is $n \log_2(n)$, then $T(n)$ is $\Theta(n \log_2(n))$. B if $f(n)$ is $\dfrac{n}{\log_2(n)}$, then $T(n)$ is $\Theta(\log_2(n))$. C if $f(n)$ is $O(n^{\log_b(a)-\epsilon})$ for some $\epsilon \gt 0$, then $T(n)$ is $\Theta(n ^{\log_b(a)})$. D if $f(n)$ is $\Theta(n ^{\log_b(a)})$, then $T(n)$ is $\Theta(n ^{\log_b(a)})$.
GATE CSE 2021 SET-2   Algorithm
Question 1 Explanation:
 Question 2
Consider the following recurrence relation.
$T\left ( n \right )=\left\{\begin{array} {lcl} T(n/2)+T(2n/5)+7n & \text{if} \; n > 0\\1 & \text{if}\; n=0 \end{array}\right.$
Which one of the following options is correct?
 A $T(n)=\Theta (n^{5/2})$ B $T(n)=\Theta (n \log n)$ C $T(n)=\Theta (n)$ D $T(n)=\Theta ((\log n)^{5/2})$
GATE CSE 2021 SET-1   Algorithm
Question 2 Explanation:
 Question 3
The master theorem
 A assumes the subproblems are unequal sizes B can be used if the subproblems are of equal size C cannot be used for divide and conquer algorithms D cannot be used for asymptotic complexity analysis
ISRO CSE 2020   Algorithm
Question 3 Explanation:
 Question 4
For parameters a and b, both of which are $\omega(1) , T(n)=T(n^{1/a})+1$, and $T(b)=1$. Then $T(n)$ is
 A $\Theta (\log _a \log_b n)$ B $\Theta (\log _{ab} n)$ C $\Theta (\log _b \log_a n)$ D $\Theta (\log _2 \log_2 n)$
GATE CSE 2020   Algorithm
Question 4 Explanation:
 Question 5
The running time of an algorithm is given by:
$T(n)=\left\{\begin{matrix} T(n-1)+T(n-2)-T(n-3), &\text { if } n>3\\ n, &\text{ otherwise}\end{matrix}\right.$
Then what should be the relation between $T(1),T(2),T(3)$, so that the order of the algorithm is constant?
 A T(1) = T(2) = T(3) B T(1) + T(3) = 2T(2) C T(1) - T(3) = T(2) D T(1) + T(2) = T(3)
ISRO CSE 2018   Algorithm
Question 5 Explanation:
 Question 6
The recurrence relation that arises in relation with the complexity of binary search is:
 A $T(n)=2 T\left(\frac{n}{2}\right)+k, \mathrm{k} \text { is a constant }$ B $T(n)=T\left(\frac{n}{2}\right)+k, \mathrm{k} \text { is a constant }$ C $T(n)=T\left(\frac{n}{2}\right)+\log n$ D $T(n)=T\left(\frac{n}{2}\right)+n$
ISRO CSE 2017   Algorithm
Question 6 Explanation:
 Question 7
Consider the recurrence function
$T(n)=\left\{\begin{matrix} 2T(\sqrt{n})+1, & n \gt 2\\ 2,& 0 \lt n\leq 2 \end{matrix}\right.$
Then T(n) in terms of $\theta$ notation is
 A $\theta (log log n)$ B $\theta (logn)$ C $\theta (\sqrt{n})$ D $\theta (n)$
GATE CSE 2017 SET-2   Algorithm
Question 7 Explanation:
 Question 8
Consider the following recurrence:
$T(n)=2T\left ( \sqrt{n}\right )+1, T(1)=1$
Which one of the following is true?
 A $T(n)=\Theta (\log\log n)$ B $T(n)=\Theta (\log n)$ C $T(n)=\Theta (\sqrt{n})$ D $T(n)=\Theta (n)$
ISRO CSE 2016   Algorithm
Question 8 Explanation:
 Question 9
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 \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_______.
 A 100 B 150 C 50 D 200
GATE CSE 2014 SET-3   Algorithm
Question 9 Explanation:
 Question 10
Which one of the following correctly determines the solution of the recurrence relation with T(1) = 1?
$T(n)=2T(\frac{n}{2})+logn$
 A $\theta (n)$ B $\theta (n logn)$ C $\theta (n^{2})$ D $\theta (log n)$
GATE CSE 2014 SET-2   Algorithm
Question 10 Explanation:
There are 10 questions to complete.

### 6 thoughts on “Recurrence Relation”

1. Question 19 has typo. please correct it.

• can you please specify the exact typo you have identified?

• T(n)=2T(n/2)+n
in qus 19 there is no “2” multiplied

• Thank You Ramananda Samantaray,
We have updated the question

2. Question 24 of Recurrence relation
opt B – (3^(k+1) – 1) / 2
please remove the extra -1 that is there in the option.

•  