Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
courses:cs211:winter2018:journals:bairdc:chapter6 [2018/03/27 03:29] – [6.3 – Segmented Least Squares: Multi-way Choices] bairdccourses:cs211:winter2018:journals:bairdc:chapter6 [2018/03/27 03:46] (current) – [6.1 – Weighted Interval Scheduling: A Recursive Procedure] bairdc
Line 24: Line 24:
 M-Compute-Opt(n) M-Compute-Opt(n)
 </code> </code>
 +
 +Overall, I'd give this section a 7/10 on readability and interestingness.
 ===== 6.2 – Principles of Dynamic Programming: Memoization or Iteration over Subproblems ===== ===== 6.2 – Principles of Dynamic Programming: Memoization or Iteration over Subproblems =====
  
Line 32: Line 34:
  
 There is a sort-of chicken and egg relationship between subproblems and recurrences in dynamic programming. It isn't clear that a collection of subproblems will be useful until you find the linking recurrence. However, it can also be difficult thinking about recurrences without their subproblems. There is a sort-of chicken and egg relationship between subproblems and recurrences in dynamic programming. It isn't clear that a collection of subproblems will be useful until you find the linking recurrence. However, it can also be difficult thinking about recurrences without their subproblems.
 +
 +Overall I'd give this section a 10/10 on readability and a 8/10 on interestingness.
 ===== 6.3 – Segmented Least Squares: Multi-way Choices ===== ===== 6.3 – Segmented Least Squares: Multi-way Choices =====
  
-This problem arises from the need to fit a line to some data points to achieve a "best fit."+This problem arises from the need to fit a line to some data points to achieve a "best fit." What needs to be optimized is the fewest number of best fit lines possible to achieve the best fit. There are a lot of repeated checks of each point's error in a naive, brute-force solution. These checks can be memoized. The following implementation in the below two methods incorporate memoization to achieve a dynamic programming solution.
  
 <code> <code>
Line 56: Line 60:
         FindSegments(i-1)         FindSegments(i-1)
 </code> </code>
 +
 +Overall, I'd give this section a 9/10 on readability and interestingness.
courses/cs211/winter2018/journals/bairdc/chapter6.1522121347.txt.gz · Last modified: by bairdc
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0