GATE / CS ARCHIVE

GATE CSE 1996 / QUESTION 2.12

A divide-and-conquer recurrence

Algorithms · Asymptotic Analysis & Recurrences · Full GATE CSE 1996 paper

GATE 1996, Q2.12 2 marks · MCQ
Report issue

Asymptotic Analysis & Recurrences

Question 2.12, GATE 1996: Solve T(1)=2, T(n)=3T(n/4)+n asymptotically for powers of four.
Question 2.12, GATE 1996: Solve T(1)=2, T(n)=3T(n/4)+n asymptotically for powers of four.
Tap to enlarge
Your answer
Answer & solution

Answer: A: Θ(n) (no official key was published)

At recursion depth j there are 3j subproblems of size n/4j, so the total nonrecursive work is n(3/4)j. Summing these decreasing geometric terms gives O(n), while the root alone costs n and proves Ω(n). More exactly, with k=log₄ n, the leaves contribute 2·3k and internal levels contribute 4n(1−(3/4)k). The total is 4n−2nlog₄3. Therefore the recurrence is linear, not n log n, because each successive level contributes less work than the preceding one.

Original paper, page 5