As a reward for a week of good behavior, Tommy was given 7 dollars to spend at the canteen. By the time Tommy got to the canteen, there were only chocolate bars, meat pies and pizza pieces left. The prices of a chocolate bar, a meat pie and a pizza piece were 0.75, 1.05 dollars and 1.65 dollars respectively. What is the largest amount Tommy could spend?
I attempted this problem by simply trial and error. So, I said that I he will use 2 x 1.65, 2 x 1.05 and 2 x 0.75. This adds up to be 6.90 dollars. Which was my answer.
I was wondering whether there is a more efficient strategy to do such problems (maybe Diophantine equations).
Help would be appreciated.
Thank you :)
the maximum common divisor of the coins is $15$ cents so the best you can strive for is $15\cdot46$ cents which is actually $6.90$ dollars. You already proved it is possible.
In general this is a hard problem, look up the frobenius coin problem in google.