Differences

This shows you the differences between two versions of the page.

Link to this comparison view

courses:cs211:winter2012:journals:jeanpaul:chaptersixsectionii [2012/03/28 01:28] – created mugabejcourses:cs211:winter2012:journals:jeanpaul:chaptersixsectionii [2012/03/28 01:37] (current) – [Designing the Algorithm] mugabej
Line 12: Line 12:
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Endfor\\ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Endfor\\
 \\ \\
 +===== Analyzing the Algorithm =====
 +\\
 +  * It is easily proved by induction on j that the above algorithm writes OPT(j) in array entry M[j](See previous section in the book for the proof). We can then pass the filled-in array M to Find-Solution(shown in the previous section) and get the optimal solution in addition to its value.
 +  * The running time of Iterative-Compute-OPT is O(n) as it runs for n iterations spending O(1) time on each iteration.\\
 +** Basic outline of Dynamic Programming**
 +\\
 +>>>>>>>>>>>>>>>>> Polynomial number of subproblems\\
 +>>>>>>>>>>>>>>>>> Solution to original problem can be easily computed from solutions to subproblems\\
 +>>>>>>>>>>>>>>>>> Natural ordering of subproblems, easy to compute recurrence\\
 +
 +This section was both short and straightforward. I give it an 8/10
  
courses/cs211/winter2012/journals/jeanpaul/chaptersixsectionii.1332898112.txt.gz · Last modified: 2012/03/28 01:28 by mugabej
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0