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 1–5 of 24
Consider the following recurrence relations:
For all ,
Assume that for all and .
Which one of the following options is correct?
For all ,
Assume that for all and .
Which one of the following options is correct?
Answer: (A)
Start by solving .
The values are , so we get . Now grows slower than by a polynomial factor, since . So by the Master theorem (Case 1):
.
Next, solve .
The values are , so we get . The extra term is . It grows slower than by a polynomial factor, because .
So by Master theorem Case 1: .
Answer:
The values are , so we get . Now grows slower than by a polynomial factor, since . So by the Master theorem (Case 1):
.
Next, solve .
The values are , so we get . The extra term is . It grows slower than by a polynomial factor, because .
So by Master theorem Case 1: .
Answer:
Which of the following can be recurrence relation(s) corresponding to an algorithm with time complexity ?
One or more options are correct.
Answer: (A), (B)
Solve each recurrence and check whether it gives :
- : unrolling it gives . It matches.
- : use the Master theorem. Here , so . Since is polynomially smaller than , Case 1 applies and gives . It matches.
- : this is the well-known merge-sort recurrence. Here exactly (Case 2), so the result is . This is not .
- : unrolling it gives . This is not .
Answer: T(n)=T(n-1)+1 and T(n)=2T(n/2)+1 both match algorithms with Θ(n) time.
- : unrolling it gives . It matches.
- : use the Master theorem. Here , so . Since is polynomially smaller than , Case 1 applies and gives . It matches.
- : this is the well-known merge-sort recurrence. Here exactly (Case 2), so the result is . This is not .
- : unrolling it gives . This is not .
Answer: T(n)=T(n-1)+1 and T(n)=2T(n/2)+1 both match algorithms with Θ(n) time.
Consider the following recurrence relation:
Which ONE of the following options is CORRECT?
Which ONE of the following options is CORRECT?
Answer: (A)
Start with the recurrence .
Put in and we get:
Now divide both sides by and we get .
Expand this simple recurrence step by step: .
So we get .
Answer:
Put in and we get:
Now divide both sides by and we get .
Expand this simple recurrence step by step: .
So we get .
Answer:
Consider the following recurrence relation:
Which one of the following options is CORRECT?
Which one of the following options is CORRECT?
Answer: (A)
The paper writes "for " for the recursive case as well. Since is the base case, read the recursive case as .
Start by dividing both sides by . This gives .
Now put . The relation becomes .
Keep taking the square root: . The value becomes a constant after steps, and each step adds 1. So .
Now we get
Answer:
Start by dividing both sides by . This gives .
Now put . The relation becomes .
Keep taking the square root: . The value becomes a constant after steps, and each step adds 1. So .
Now we get
Answer:
Let be the recurrence relation defined as follows:
Which one of the following statements is TRUE?
Which one of the following statements is TRUE?
Answer: (A)
Characteristic equation: .
General form of the solution:
Use the first starting value:
Use the second starting value:
Solving both gives , and so (check: , True).
Answer:
General form of the solution:
Use the first starting value:
Use the second starting value:
Solving both gives , and so (check: , True).
Answer:
Keep practising