Ch15: Dynamic Programming Flashcards

1
Q

Dynamic programming applies when the subproblems…

A

overlap - that is, when they share sub-subproblems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A dynamic programming algorithm solves each subproblem…

A

just once, then saves the answer in a table to avoid recomputing it each time it is needed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

We typically apply dynamic programming to

A

optimization problems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

4 steps of developing a dynamic programming algorithm

A

1) CHARACTERIZE the structure of an optimal solution 2) Recursively DEFINE the value of an optimal solution 3) COMPUTE the value of an optimal solution, typically in a bottom-up fashion 4) CONSTRUCT an optimal solution from computed information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Steps 1-3 of developing a DP algorithm form the basis of…

A

a DP solution to a problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

If we need only the VALUE of an optimal solution and not the solution itself, we can…

A

omit step 4 (construct an optimal solution)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly