title: Finding all subsets of a multiset
body: <p>Suppose I have a bag which contains 6 balls (3 white and 3 black). <strong>I want to find all possible subsets of a given length, disregarding the order.</strong> In the case above, there are only 4 combinations of 3 balls I can draw from the bag:</p>
  
  <ul>
  <li>2 white and 1 black</li>
  <li>2 black and 1 white</li>
  <li>3 white</li>
  <li>3 black</li>
  </ul>
  
  <p>I already found a library in my language of choice that does exactly this, but I find it slow for greater numbers. For example, with a bag containing 15 white, 1 black, 1 blue, 1 red, 1 yellow and 1 green, there are only 32 combinations of 10 balls, but it takes 30 seconds to yield the result.</p>
  
  <p>Is there an efficient algorithm which can find all those combinations that I could implement myself? Maybe this problem is not as trivial as I first thought...</p>
  
  <p><em>Note: I'm not even sure of the right technic words to express this, so feel free to correct the title of my post.</em></p>