title: Find all subsets that sum to a particular value and then pick the most valuable combination of those subsets
body: <p>Im trying to create a simple dice game. To calculate the score i have to find all subsets that sum to a particular value and then pick the most valuable combination. All numbers can only be picked once. Probably easiest to describe with an example:</p>
  
  <pre><code>Values =  {1, 1, 1, 2, 4, 4}
  
  Target value = 5
  
  Possible subsets = {1, 1, 1, 2} and {1, 4}
  </code></pre>
  
  <p>Now its possible to either choose:</p>
  
  <pre><code>{1, 1, 1, 2} (= worth 5)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>{1, 4} {1, 4} (= worth 10)
  </code></pre>
  
  <p>So in this example I would like the algorithm to return <code>10</code> and not <code>5</code>.</p>
  
  <p>I have managed to solve the 'finding possible subsets' part but im struggling to find the most valuable combination of the found subsets. Can anyone help me? :(</p>