The recurrence equation T(n) = T(n/2) + T(n/3) + n represents the time…

2025

The recurrence equation T(n) = T(n/2) + T(n/3) + n represents the time complexity of which algorithmic paradigm?

Answer: A. Divide and ConquerConcept: A divide-and-conquer algorithm splits a problem of size n into one or more independent subproblems, each of some smaller size that is a fraction of…

  1. A.

    Divide and Conquer

  2. B.

    Dynamic Programming

  3. C.

    Greedy Algorithms

  4. D.

    Backtracking

Attempted by 5 students.

Show answer & explanation

Correct answer: A

Concept: A divide-and-conquer algorithm splits a problem of size n into one or more independent subproblems, each of some smaller size that is a fraction of n, solves each subproblem recursively, and then combines the subproblem results using extra non-recursive work. In recurrence form this is written as T(n) = a1*T(b1*n) + a2*T(b2*n) + ... + g(n), where each bi is strictly between 0 and 1 and g(n) is the cost of the combine step.

Application: For T(n) = T(n/2) + T(n/3) + n, the problem is split into two independent subproblems of sizes n/2 and n/3 (a1 = 1, b1 = 1/2 and a2 = 1, b2 = 1/3), and the extra term n is the linear-time work needed to combine the two subproblem solutions. This matches the divide-and-conquer template exactly. The subproblem sizes do not need to be equal - an uneven split such as n/2 and n/3 is still divide-and-conquer; it simply falls outside the standard Master Theorem's single-ratio form and is instead analyzed with a recursion tree or the change-of-variable technique.

Cross-check - contrast with the other paradigms' recurrence signatures:

  • Dynamic Programming recurrences model overlapping subproblems solved once and reused via a table or memo, for example T(n) = T(n-1) + T(n-2) for Fibonacci-style overlap, or a table indexed by state. This item's T(n/2) and T(n/3) terms are disjoint slices of the input rather than overlapping states, so it does not fit the dynamic-programming signature.

  • Greedy Algorithms build a solution through repeated locally-optimal choices in a single pass, without recursively re-solving smaller instances of the same problem - their cost is usually a plain loop or sort bound such as O(n) or O(n log n), not a recursive T(n) expression at all. The stem's recurrence has no such single-pass signature.

  • Backtracking recurrences reflect branching into several recursive calls at each level while exploring and undoing choices, typically of the form T(n) = k*T(n-1) + O(1) for some branching factor k, often yielding exponential growth. The stem's recurrence instead has a fixed split into strictly smaller fractional sizes (n/2, n/3), not a branching-choice structure.

So the recurrence's split-then-combine structure over independent subproblems identifies it as a divide-and-conquer recurrence.

Explore the full course: Bihar Stet Paper Ii Computer Science

Loading lesson…