Practice free →
HomeGATE CSEcomputerscienceAlgorithms › The generic divide-and-conquer recurrence, with …

The generic divide-and-conquer recurrence, with `a` sub-problems of size `n/b` and divide+combine work `g(n)`, is

A$T(n) = a \cdot T(n/b) + g(n)$
B$T(n) = T(n-1) + a \cdot g(n)$
C$T(n) = a^n + b \cdot g(n)$
D$T(n) = a + b \cdot T(n) + g(n)$
Answer & Solution
Correct answer: A. $T(n) = a \cdot T(n/b) + g(n)$
The textbook D&C template: each level does g(n) divide-and-combine work, then recurses on `a` sub-problems of size n/b. Master Theorem reads off solutions directly from this shape. The other options describe linear recurrences (T(n-1)+g(n) is insertion sort), exponential growth, or are not well-formed.
Solve this in the app — GATE CSE practice & 24k+ MCQs →
Related questions