IAE Academy

GATE 2020 CS Q.2: solution and answer

GATE 2020 · CSQ.2 · 1 mark · MCQ

For parameters and , both of which are , , and .

Then is

  1. (A)

  2. (B)

  3. (C)

  4. (D)

See the question in the paper

Answer and solution

ANSWER

, so the correct option is (A).

Official answer: ASource: Official answer key, GATE 2020 CS (IIT Delhi)

  1. Let , so . We track .

  2. Compute the effect of the recurrence's argument under this substitution: , so . Thus becomes .

  3. The base case corresponds to , i.e. .

  4. Unroll directly: . This reaches the base case when , i.e. . Hence (no need to invoke the Master theorem, which applies to divide-and-conquer recurrences of the form and is not the right tool here; direct unrolling suffices).

  5. Substitute back : , which is option (A).

KEY IDEA

Substituting turns the "take a-th root of the argument" recurrence into the familiar "divide the exponent by " recurrence , whose solution is ; undoing the substitution gives the nested double logarithm .

WATCH OUT FOR

Treating the two parameters and as combinable into a single log base (picking option (B), ) instead of recognizing that controls how many times you must take roots (an outer log) while sets the base at which the argument bottoms out (an inner log) — the two play structurally different roles and cannot be merged into one log base.

From the GATE 2020 CS paper. Every question of this paper · Download the full paper · All 14 Complexity questions, with notes

More Complexity questions