-1

When Mr. Smith returned from Europe in 1966, he found that he had in his possession 35 British sixpence coins, 55 French ten-centime pieces, and 77 Greek drachmas. Mr. Smith converted each of these coins to its value in American money (rounded off to the nearest cent) and found that the total was worth $5.86. How much was each coin worth in 1966 (to the nearest cent)?

I started by setting up the equation 35B+55F+77G=586, but I was not sure how to solve a three-variable diophantine equation.

  • I don't know more generally how to go about this, but I notice that modulo 10 the RHS is 6. This immediately tells you that 7G = 1 mod 5. G = 3,8,... You can also determine G<8 so G=3. – Kitter Catter Nov 25 '16 at 22:31

2 Answers2

0

This isn't generalized to other Diophantine equations but there is a pretty quick way to solve this: \begin{eqnarray} 35B+55F+77G&=&586\\ 8\cdot77=616&>&586 \rightarrow G < 8\\ 35B+55F+77G \rightarrow 2G&=&1\mod 5\rightarrow G=3\mod5 \\ 35B+55F+77\cdot 3&=&586 \rightarrow 35B+55F=355\\ 7B+11F&=&71\\ 4F&=&1 \mod7\rightarrow F=2\mod7\\ 11\cdot9&>&71\rightarrow F < 9\rightarrow F=2\\ 7B+22=71\rightarrow7B=49\rightarrow B&=&7\\ (B,F,G)&=&(7,2,3) \end{eqnarray}

  • sorry, I am relatively new to number theory. Could you please explain like the first part of how you knew that 2G=1 and then the stuff about how mod 5 -> G=3? – Warnakulasuriya Nov 25 '16 at 23:18
  • @RosaKim He took both sides $\mod 5$ to find $2G\equiv1\mod5$, solved by multiplying both sides by the modular inverse of $2$, which cancles out the two. – AlgorithmsX Nov 25 '16 at 23:31
  • @RosaKim It’s easier to see with $6A+4B+7C=17$ The only way for this to be true if $C$ is an odd number, as no matter what $A$ and $B$ are, $6A+4B$ is always going to be even. – AlgorithmsX Nov 25 '16 at 23:35
  • Thank you. Also, the question asks whether our answer above would necessarily be near the correct coin values if the phrase "rounded off to the nearest cent" were dropped from the problem. Do you know what that is asking? – Warnakulasuriya Nov 25 '16 at 23:43
  • So dropping the rounded off to the nearest cent implies that $B,F,G$ are not necessarily integers. The question is asking that given you don't know that $B,F,G$ are integers are you guaranteed a solution near the one where they were integers. – Kitter Catter Nov 25 '16 at 23:58
0

The other answer is good. I just want to point out that this is a version of the Knapsack Problem, which is NP-Complete, meaning that most of the time, you won't be able to find a solution easily except for small numbers and tricks.

AlgorithmsX
  • 4,560