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:winter2012:journals:mike:home [2012/03/28 03:35] – [Least Squares] whitem12courses:cs211:winter2012:journals:mike:home [2012/03/28 04:00] (current) – [Adding a variable] whitem12
Line 100: Line 100:
 This total adds up to O(n^2) This total adds up to O(n^2)
  
 +==== Adding a variable ====
 +The subset sums problem is where each event has a value and a weight.  There is a limit on the weight you can take on, so you want to optimize the sum of the values given a maximum weight W.  There is no greedy algorithm to find this solution, so we look for dynamic programming.  We build a 2D table (matrix) of optimal solutions to find the overall optimal solution for all w's less than W.  This way it can be computed quickly, though large amounts of memory may be required.
  
 +
 +The knapsack problem is one where each element has a value and a weight.  You want to maximize the sum of the values while keeping the weight below a certain amount.  This is solved the same was as the scheduling problem.  
courses/cs211/winter2012/journals/mike/home.1332905745.txt.gz · Last modified: 2012/03/28 03:35 by whitem12
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0