title: Minimizing the difference between sums
body: <p>Lets say you have a list of 8 prices - for example:</p>
  
  <pre><code>1$
  2$
  3$
  4$
  5$
  6$
  7$
  8$
  </code></pre>
  
  <p>You want to divide the prices into 2 groups of 4 prices each.</p>
  
  <p>Let the total price of a group be the sum of the individual prices of the group. How do you divide the group such that the difference between the two total prices is as small as possible?</p>
  
  <p>The obvious solution is to try all the pairs and see which is the lowest, but is there a more efficient solution that could work if this were extended to more than 8 prices or more than 2 groups?</p>