title: Algorithm to Minimize Number of Shipments from Multiple Warehouses
body: <p>I have 10 warehouses across the US. Each of them may or may not have product A, B, C, D, E in stock. Someone orders all five items from my website.</p>
  
  <p>I want to minimize the number of shipments I'm sending. How do I identify which items to ship from which warehouses?</p>
  
  <p>For example, someone orders A, B, C, D and E. </p>
  
  <ul>
  <li>I have A and B (but no others) in New York.  </li>
  <li>I have A and B and C
  (but no others) in Boston.  </li>
  <li>I have D and E (but no others) in
  Chicago.</li>
  </ul>
  
  <p>I'm trying to develop an algorithm that will create a shipment of three items from Boston and a shipment of 2 items from Chicago.  </p>
  
  <p>I don't want 2 items from New York, 1 from Boston and 2 from Chicago.</p>
  
  <p>All the items are in one central database.</p>