title: Subset sum solution length
body: <p>I'm using the following logic to solve the subset sum problem as described in this question: <a href="https://stackoverflow.com/questions/29512539/total-sum-from-a-set-logic">Total sum from a set (logic)</a>. It is working and it will give me one random solution every time, the problem is that I need only the solutions with an specific amount of items. For example:</p>
  
  <pre><code>[2,3,4,6,3] //Set of values
  SUM = 6
  </code></pre>
  
  <p>The current solutions I can get are:</p>
  
  <pre><code>[4,2]
  [6]
  [3,3]
  </code></pre>
  
  <p>But what if I need this method to randomly return only a solution with (for example) 2 items? </p>