Example: You have 4 baskets named P,Q,R,S. You have 4 items in those baskets named A,B,C,D.
The composition of baskets are as follows PIC
--A B C D
P 6 4 0 7
Q 6 4 1 1
R 4 6 3 6
S 4 6 2 3
Basket P has 6A, 4B, No C's and 7D.
Suppose you get following requests: You have to give out 10A, 10B, 3C and 8D.
The minimum number of basket required to process the request is 2 (P,R).
How can I reach this algorithmically. What algo should I use, what should be the strategy?