7. Review Time
Try all subsets? Brute Force
23 41 11 19 45 12 15 18 25
GreedyChoose the most tempting option.
8. Review Time
Try all subsets? Brute Force
23 41 11 19 45 12 15 18 25
GreedyChoose the most tempting option.
1 4 5 4
9. Review Time
Try all subsets? Brute Force
23 41 11 19 45 12 15 18 25
GreedyChoose the most tempting option.
1 4 5 4
10. Review Time
Try all subsets? Brute Force
23 41 11 19 45 12 15 18 25
GreedyChoose the most tempting option.
11. Try all subsets?
Review Time
Brute Force
Greedy
23 41 11 19 45 12 15 18 25
Choose the most tempting option.
12. Try all subsets?
Review Time
Brute Force
Greedy
23 41 11 19 45 12 15 18 25
Choose the most tempting option.
Split things up? Divide and Conquer
13. Try all subsets?
Review Time
Brute Force
Greedy
23 41 11 19 45 12 15 18 25
Choose the most tempting option.
Split things up? Divide and Conquer
1 4 5 4
14. Try all subsets?
Review Time
Brute Force
Greedy
23 41 11 19 45 12 15 18 25
Choose the most tempting option.
Split things up? Divide and Conquer
1 4 5 4
15. Try all subsets?
Review Time
Brute Force
Greedy
23 41 11 19 45 12 15 18 25
Choose the most tempting option.
Split things up? Divide and Conquer
16. Try all subsets?
Review Time
Brute Force
Greedy
23 41 11 19 45 12 15 18 25
Choose the most tempting option.
Split things up? Divide and Conquer
17. Try all subsets?
Review Time
Brute Force
Greedy
23 41 11 19 45 12 15 18 25
Choose the most tempting option.
Split things up? Divide and Conquer
Try Gv versus GN(v)? Recursion
33. 1. Decide what to store.
2. Figure out how to compute it based on what you store.
34. A[i] stores the size of the maximum WIS
of the sub-path on the first i vertices.
1. Decide what to store.
2. Figure out how to compute it based on what you store.
35. A[i] stores the size of the maximum WIS
of the sub-path on the first i vertices.
A[i] = max(A(i-1), A[i-2] + w(vn))
1. Decide what to store.
2. Figure out how to compute it based on what you store.
36. A[i] stores the size of the maximum WIS
of the sub-path on the first i vertices.
A[i] = max(A(i-1), A[i-2] + w(vn))
1. Decide what to store.
2. Figure out how to compute it based on what you store.