Lets say that I have 3 sellers of a particular item. Each seller has different amounts of this items stored. The also have a different price for the item.
This is a Bounded Knapsack
problem. Where you want to optimize(minimize) the cost with the constraints of price and quantity.
Read about 0-1 KnapSack
problem here. Where you have only 1 quantity for given supplier.
Read how to extend the 0-1 KnapSack
problem for given quantity ( called Bounded Knapsack
) here
A more detailed discussion of Bounded KnapSack
is here
These all will be sufficient to come up with an algorithm which requires a bit of tweaking ( i.g. adding 5$ when the quantity is below some given quantity )