title: Create multiple combinations summing to 100
body: <p>I would like to be able to create multiple combinations that sum to 100%, given a defined number of "buckets" with a defined 'difference factor'. In the below example, the difference is a factor of 20 to make it simple, but I will probably reduce it to 1 in the final solution.</p>
  
  <p>For example, with 3 "buckets" A, B, C you could have:  </p>
  
  <pre><code>A     100     80      80      60      60  ...   0
  B     0       20      0       20      40  ...   0
  C     0       0       20      20      0   ...   100
  </code></pre>
  
  <p>Each column is one combination (summing to 100) that I would like to store and do further calculations on.</p>
  
  <p>This is a business problem and not homework.</p>
  
  <p>Please help me come up with a solution. A brute force way would be to create a multi-dimension array for every possible combination, e.g. 100x100x100 and then go through each 1 million combination to see which ones sum to 100. However this looks like it will be way too inefficient.</p>
  
  <p>Much appreciated. I hope I have explained clearly enough.</p>