title: Creating Max Possible Groups
body: <p>I think there is a logical / mathematical solution to this problem and I am pretty sure someone here knows the answer. :)</p>
  
  <p>This is being written in PHP.</p>
  
  <p>Lets say I have 3 apples, 3 bananas, and 3 oranges.</p>
  
  <p>I need to be able to create the maximum amount of "Fruit Baskets possible" with categories / requirements of:</p>
  
  <hr>
  
  <p>Category A = Any Fruit / 3 Required</p>
  
  <p>Category B = Bananas or Oranges / 2 Required</p>
  
  <p>Category C = Oranges / 1 Required</p>
  
  <p>Category D = Apples or Bananas / 2 Required</p>
  
  <hr>
  
  <p>What are the maximum number of baskets I can make? I need to know how to get the solution, not necessarily what the solution is. I also would like to know what this is called if anyone knows.</p>
  
  <p>Additionally, these numbers can grow into the thousands, so I need to be able to do this without destroying the computer.</p>