 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Dynamic
Programming is different
|
|
|
|
from
Divide & Conquer
|
|
|
|
– |
Dynamic
Programming solves
|
|
|
|
optimization
problems
|
|
|
|
• |
Goal
is to find the best of many
|
|
|
possible
answers
|
|
|
|
– |
Dynamic
Programming is applied
|
|
|
|
when
subproblems are not
|
|
|
|
independent
|
|
|
|
• |
“Not independent” means the same
|
|
|
subproblem
can show up many times
|
|
|
• |
Each
subproblem is computed just
|
|
|
once,
then the answer is saved
|
|