I have a total of $1,000. Item A costs 110, item B costs 90, item C costs 70, item D costs 40 and item E costs 45. For every item D that I purchase, I must also buy two of item B. For every item A, I must buy one of item C. For every item E, I must also buy two of item D and one of item B. For every item purchased I earn 1000 points and for every rupee not spent I earn a penalty of 1500 points. My objective is to maximise the points I earn. What is the number of items that I must purchase to maximise my points?
Spoiler: I have solved this on my own getting 2 solutions as follows:
3 sets are possible-
Set 1: Total cost (A, C) = 110 + 70 = 180 Set2: Total cost (D, 2B) = 40 + 180 = 220 Set 3: Total cost (E, 2D, B) = 45 + 80 + 90 = 215
To maximise the points till 980- we can buy 2Set2 and 3Set1 with a total of 12 items.
Or, we can simply buy 13Cs and 1B to reach 1000 with a total of 14 items, no penalty.
The given solution says- 3Set1 + 2Set3 to reach 970 with 14 items!
Please point out where I have made a mistake..(if I have)
If I buy this item-vector $(1,2,7,1,4)$, then the cost is precisely $1000$, so there is no penalty, and I have purchased $15$ items, which is larger than what your solutions show. Your mistake is probably in setting up the constraints for the problem. For example, the sentence "For every item D that I purchase, I must also buy two of item B" ought to be interpreted as $b\geq 2d$ and not $b=2d$, where $b$ is the number of B-items purchased and $d$ - the number of D-items purchased. Similarly, the other two constraints also ought to be interpreted as inequalities.