Back to the 2023 paper

Module 2: Fundamental Algorithmic Strategies

20232m

What is the primary advantage of dynamic programming over brute-force algorithms?
(i) Dynamic programming guarantees finding the global optimum.
(ii) Dynamic programming reduces the time complexity by avoiding redundant computations.
(iii) Dynamic programming simplifies the problem by dividing it into smaller subproblems.
(iv) Dynamic programming is more intuitive to implement.

Worked SolutionAI Assisted

Answer: (ii) Dynamic programming reduces the time complexity by avoiding redundant computations.

Explanation:

  • Brute-force / naive recursion (e.g., recursive Fibonacci, naive matrix chain) recomputes same subproblems exponentially many times.
  • DP stores results of overlapping subproblems in a table (memoization or tabulation) so each distinct subproblem is solved once → transforms exponential to polynomial (e.g., Fibonacci O(2n)→O(n)O(2^n) \to O(n), LCS O(2m+n)→O(mn)O(2^{m+n}) \to O(mn)).

Why not other options:

  • (i) Both brute-force and DP can find global optimum if they explore whole space; DP does not uniquely guarantee it—correctness comes from optimal substructure.
  • (iii) Both divide-and-conquer and DP divide into subproblems; DP's distinguishing advantage is memoization of overlapping subproblems, not mere division.
  • (iv) DP is often less intuitive due to recurrence and table ordering.

Correct choice: (ii)

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.