maybe good?
This commit is contained in:
@@ -211,3 +211,19 @@ Proof by contradiction
|
||||
- Therefore $"LCS"(n, m) = "LCS"(n-1, m-1)::a_n$
|
||||
|
||||
If $a_n != b_m, "LCS"(n, m) = max("LCS"(n-1,m), "LCS"(n, m-1))$
|
||||
|
||||
|
||||
= Tutorial 6
|
||||
Greedy vs DP
|
||||
|
||||
|
||||
= Lecture 7 Greedy
|
||||
== DP Recap
|
||||
- Express solutions recursively
|
||||
- Small number(polynomial) of subproblems
|
||||
- Huge overlap among subproblems, so recursive may take exponential time
|
||||
- Compute recursive iteratively in bottom up fashion
|
||||
== Greedy
|
||||
Recast the problem so that only 1 subproblem needs to be solved at each step.
|
||||
|
||||
= Lecture 8 Amortized Analysis
|
||||
|
||||
Reference in New Issue
Block a user