Characterizing Dynamic Programming: R. Inkulu
Characterizing Dynamic Programming: R. Inkulu
R. Inkulu
http://www.iitg.ac.in/rinkulu/
1/5
Applicability
Brute-force algorithm is taking exponential time.
2/5
Applicability
Brute-force algorithm is taking exponential time.
Optimal substructure property: Any optimal solution to any subproblem
2/5
Applicability
Brute-force algorithm is taking exponential time.
Optimal substructure property: Any optimal solution to any subproblem
whenever they are really the same subproblem but each occur as a
subproblem of a different problem.
2/5
Applicability
Brute-force algorithm is taking exponential time.
Optimal substructure property: Any optimal solution to any subproblem
whenever they are really the same subproblem but each occur as a
subproblem of a different problem.
Independent subproblems: An optimal solution to a subproblem P can be
2/5
Applicability
Brute-force algorithm is taking exponential time.
Optimal substructure property: Any optimal solution to any subproblem
whenever they are really the same subproblem but each occur as a
subproblem of a different problem.
Independent subproblems: An optimal solution to a subproblem P can be
solved can be ordered from smallest to largest, with respect to their sizes.
2/5
Applicability
Brute-force algorithm is taking exponential time.
Optimal substructure property: Any optimal solution to any subproblem
whenever they are really the same subproblem but each occur as a
subproblem of a different problem.
Independent subproblems: An optimal solution to a subproblem P can be
solved can be ordered from smallest to largest, with respect to their sizes.
The distinct subproblems that require to be solved are
(pseudo-)polynomial in number.
DP is a way of doing exhaustive search for an optimal solution without any
repetition of computations.
(Characterizing Dynamic Programming)
2/5
Applicability (cont)
3/5
Applicability (cont)
divide-and-conquer
3/5
Applicability (cont)
divide-and-conquer
Overlapping subproblems is unique to dynamic programming
3/5
4/5
4/5
4/5
5/5
5/5
5/5
5/5