GateAI
Asymptotic Analysis

GATE CSE 2021 Set 2 · Q39

MCQ2 marksEasy

Time

For constants a≥1a \ge 1 and b>1b > 1, consider the following recurrence defined on the non-negative integers: T(n)=a⋅T(nb)+f(n)T(n) = a \cdot T\left(\frac{n}{b}\right) + f(n) Which one of the following options is correct about the recurrence T(n)T(n)?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) If f(n) is O(nlogb(a)- ) for some > 0, then T(n) is (nlogb(a)).

Asymptotic Analysis

According to the Master Theorem for divide-and-conquer recurrences of the form T(n)=aT(n/b)+f(n)T(n) = a T(n/b) + f(n) where a≥1a \ge 1 and b>1b > 1:

  1. Case 1: If f(n)=O(nlog⁡ba−ϵ)f(n) = O(n^{\log_b a - \epsilon}) for some constant ϵ>0\epsilon > 0, then:

    T(n)=Θ(nlog⁡ba)T(n) = \Theta(n^{\log_b a})
  2. Case 2: If f(n)=Θ(nlog⁡ba)f(n) = \Theta(n^{\log_b a}), then:

    T(n)=Θ(nlog⁡balog⁡n)T(n) = \Theta(n^{\log_b a} \log n)
  3. Case 3: If f(n)=Ω(nlog⁡ba+ϵ)f(n) = \Omega(n^{\log_b a + \epsilon}) for some constant ϵ>0\epsilon > 0, and if af(n/b)≤cf(n)a f(n/b) \le c f(n) for some constant c<1c < 1 and sufficiently large nn, then:

    T(n)=Θ(f(n))T(n) = \Theta(f(n))

Evaluating the given choices:

  • Option (A) & (B): Incorrect because the solution depends on the values of aa and bb, which are unspecified constants.

  • Option (C): Correct, as it is a direct statement of Case 1 of the Master Theorem.

  • Option (D): Incorrect because when f(n)=Θ(nlog⁡ba)f(n) = \Theta(n^{\log_b a}), the solution is T(n)=Θ(nlog⁡balog⁡n)T(n) = \Theta(n^{\log_b a} \log n), not Θ(nlog⁡ba)\Theta(n^{\log_b a}).

Thus, (C) is the correct option.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Asymptotic Analysis previous year question is Q39 of the GATE CSE 2021 Set 2 paper. Find more GATE CSE PYQs on Asymptotic Analysis in Algorithms, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Asymptotic Analysis PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Asymptotic Analysis in GATE CSE

Asymptotic Analysis has 31 GATE CSE PYQs across 19 papers from 2011 to 2026. 12 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2021 Set 2.

How GATE tests Asymptotic Analysis

More from GATE CSE 2021 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2021 Set 2 · Q39 · MCQ

For constants a ≥ 1 and b > 1, consider the following recurrence defined on the non-negative integers: T(n) = a · T ((n)/(b) ) + f(n) Which one of the following options is correct about the recurrence T(n)?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.