Daniel Sutantyo, Department of Computing, Macquarie University
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
\(i\)
\(p_i\)
1 2 3 4 5 6 7 8 9 10
1 5 8 9 10 17 17 20 24 30
4.2 - Developing a DP Algorithm
\(i\)
\(p_i\)
1 2 3 4 5 6 7 8 9 10
1 5 8 9 10 17 17 20 24 30
$9
$1
$8
$8
$1
$5
$5
$1
$1
$1
$1
$1
$1
$1
$1
$1
$1
$5
$5
$5
4.2 - Developing a DP Algorithm
\(i\)
\(p_i\)
1 2 3 4 5 6 7 8 9 10
1 5 8 9 10 17 17 20 24 30
$20
4.2 - Developing a DP Algorithm
\(i\)
\(p_i\)
1 2 3 4 5 6 7 8 9 10
1 5 8 9 10 17 17 20 24 30
$9
$9
4.2 - Developing a DP Algorithm
\(i\)
\(p_i\)
1 2 3 4 5 6 7 8 9 10
1 5 8 9 10 17 17 20 24 30
$9
$9
4.2 - Developing a DP Algorithm
\(i\)
\(p_i\)
1 2 3 4 5 6 7 8 9 10
1 5 8 9 10 17 17 20 24 30
$9
$9
$17
$5
4.2 - Developing a DP Algorithm
\(i\)
\(p_i\)
1 2 3 4 5 6 7 8 9 10
1 5 8 9 10 17 17 20 24 30
4.2 - Developing a DP Algorithm
\(i\)
\(p_i\)
1 2 3 4 5 6 7 8 9 10
1 5 8 9 10 17 17 20 24 30
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
1
4
6
4
1
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
so where are the overlapping subproblems?
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
\(i\)
\(p_i\)
1 2 3 4 5 6 7 8 9 10
1 5 8 9 10 17 17 20 24 30
\(i\)
optimal
1 2 3 4 5 6 7 8 9 10
1 5 8 10 13 17 ?? ?? ?? ??
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
\(\$x\)
\(\$y\)
\(\$y\)
4.2 - Developing a DP Algorithm
\(<\$y\)
\(<\$y\)
\(<\$y\)
\(\$x\)
\(\$y\)
\(\$y\)
\(<\$y\)
4.2 - Developing a DP Algorithm
\(<\$y\)
\(\$z>\)
\(<\$y\)
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm
4.2 - Developing a DP Algorithm