Goal : To spend the least amount of cash
There are 6 types of groceries to buy in the supermarket (A, B, C, D, E, F).
Each costs $0.15 per item.
A shopper can choose to pay based on individual price, or he can buy vouchers if it's cheaper. There's a limit to how many each vouchers you can buy (each type has different limit).
The available vouchers are:
Propose formula to find :
a) the best combination of vouchers to achieve minimum cost
b) the minimum cost
I've spent the whole evening trying to crack this. Either there's no real solution for it, or i'm just not smart enough. I'm really hoping for the latter... Anyone can point me to the right direction?
There are 6 types of groceries to buy in the supermarket (A, B, C, D, E, F).
Each costs $0.15 per item.
A shopper can choose to pay based on individual price, or he can buy vouchers if it's cheaper. There's a limit to how many each vouchers you can buy (each type has different limit).
The available vouchers are:
Voucher | Eligible grocery type | Voucher price | Grocery quantity per voucher | Max voucher available |
V0 | All 6 | $ 0 | 50 | 1 |
V1 | All 6 | $ 10 | 100 | 5 |
V2 | A, B | $ 10 | Unlimited | 1 |
V3 | A, B, C, D | $ 10 | 500 | 5 |
V4 | A, C, E | $ 10 | 250 | 5 |
Propose formula to find :
a) the best combination of vouchers to achieve minimum cost
b) the minimum cost
I've spent the whole evening trying to crack this. Either there's no real solution for it, or i'm just not smart enough. I'm really hoping for the latter... Anyone can point me to the right direction?
Last edited: