The dataset stores the prices of different stores of each item:
Item | Store1_price | Store2_price | Store3_price |
---|---|---|---|
Apple | 2.00 | 3.23 | 2.48 |
Table Salt | 1.52 | 5.20 | 2.53 |
There will be around 10 stores and an unlimited number of items.
My problem is to find the best combination of stores to buy each item (e.g. buy apple
in store1
, and buy table salt
in store1
) so that both the total price of all items is minimized AND the number of stores is minimized.
If there are 10 possible stores and 100 items, the number of combinations will be 10^100 and it will be highly inefficient if I need to list all the combinations.
Does anyone know how this problem should be tackled?