Question:

Which of the following statement is true ?

Show Hint

Optimal Substructure is the "parent" requirement for both. Overlapping Subproblems is the specific "child" requirement that distinguishes DP from simple recursion or greedy.
Updated On: Aug 6, 2026
  • Greedy and dynamic programming both require optimal sub structure
  • Greedy requires overlapping sub problems
  • Dynamic programming does not require optimal sub structure
  • Greedy always gives optimal solution
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Concept:
• Both Greedy algorithms and Dynamic Programming (DP) are strategies used for solving optimization problems.
• They share certain theoretical requirements but differ in how they build solutions.

Step 1:
Identify shared requirements
An optimization problem must exhibit Optimal Substructure to be solved by either method. This means an optimal solution to the problem contains within it optimal solutions to its subproblems.
Therefore, Statement (A) is correct and Statement (C) is false.

Step 2:
Identify differences

Overlapping Subproblems: This is a requirement for DP to be efficient (so results can be memoized). Greedy does not require this; it makes a local choice and never re-visits subproblems. Thus, (B) is false.
Greedy Choice Property: Greedy works only if a local optimal choice leads to a global optimal. Many problems (like 0/1 knapsack) do not satisfy this, so Greedy does NOT always give an optimal solution. Thus, (D) is false.
Was this answer helpful?
0
0

Top CUET PG Data Science A.I Cyber Security and Computer Sci. Questions

View More Questions

Top CUET PG Algorithm Questions

View More Questions