hehma
Nov 18, 2009, 08:31 PM
Here is my question: An absent minded bank teller switched the dollars and cents when he cashed a check for Mr. Spencer, giving him dollars instead of cents, and cents instead of dollars. After buying a 20 cent newspaper, Mr. Spencer discovered that he had left exactly twice as much as his original check. What was the amount of the check?

galactus
Nov 19, 2009, 03:51 AM
This is an old chestnut. That is, very cliche.

If we let d be the dollars and c be the cents of the check he cashed.

Then, by the problem statement, we have

100c+d-20=2(100d+c)

But c=\frac{199d+20}{98}\Rightarrow 98c=199d+5

199d+20 must be an integer for some multiple of 98, not a fraction.

This occurs when d=26.

Therefore, c=53

The check was originally $26.53, but she gave him$53.26 instead.

This should be twice the amount of what is was supposed to be.

2(26.13)=53.26....CHECK.

BTW, this is not theoretical. It is just a fun little math problem.

Unknown008
Nov 19, 2009, 07:29 AM
How did you find d? Is it by trial and error? :confused:

Also, the price of the newspaper is 20c, hence;

98c = 199d + 20

galactus
Nov 19, 2009, 08:16 AM
Yes, one can use trial and error. My bad for the 5 cents instead of 20. Just change it. The problem I have seen like this was a 5 cents paper. This is an oldie.

Unknown008
Nov 19, 2009, 08:18 AM
I just came close with d = 23... Arg!

EDIT: Oh no, I have to look for even numbers... I was testing prime numbers :o

EDIT: Oh, I give up :(

galactus
Nov 19, 2009, 09:16 AM
Fixing my typo/mistake to 20 instead of 5.

C=53 when d=26

He was intended 26.53, but got 53.26. He soent 20 cents and had 26.13.

Twice that is 53.26. CHECK.

We have one equation with two unknowns. Yes, trial and error is OK if one has a calculator. We can find the exact solutions with Diophatine equations/Euclidean algorithms, but that is more tedious than the trial and error. A little modular arithmetic/elementary number theory could also be implemented.

One day when I feel like it, perhaos we'll step through the Euclidean algorithm way of doing it.