i am unsure if i have even identified the problem correctly, but reading up on Knapsack problem seems the closest to what i am trying to solve:
A cook has several ingredients of varying quantities. for example:
8 eggs 3 sausages 500 mL milk 12 strawberries
There is a finite list of recipes, each consisting varying ingredients of varying quantities. The universe of ingredients is finite, as is the quantity of each ingredient in all recipes.
Each recipe may or may not contain any of the ingredients the cook has.
The cook wants to use up all his ingredients as much as possible to minimize waste on 1 recipe.
There is a case where the cook wants to use all his ingredients on 2 or 3 different recipes, with minimal leftovers.
What is his optimized solution?
EDIT: My question is a more complex version of the following knapsack problem http://www.g12.cs.mu.oz.au/wiki/doku.php?id=simple_knapsack