Confused Bank Teller
When Dorothy went to cash in a cheque, the confused bank teller swapped the dollars and cents. He gave her dollars in place of cents, and cents in place of dollars. Dorothy, also equally absent-minded, didn’t notice this. After purchasing a newspaper for 50 cents, she noticed that she was left with exactly three times as much money as the original cheque. What was the amount on the original cheque?
Solution
$18.56.
Let’s represent the original cheque’s dollars and cents as d and c respectively. This places the value of the original cheque at 100d+c.
The amount of money Dorothy got instead is 100c+d. After spending 50 cents, she should have 100c+d−50 left. At this point, since she has 3 times as much as the original, we get the following equation:
3(100d+c)300d+3c299d−97c+50=100c+d−50=100c+d−50=0Normally, we can’t solve this system of 2 variables with only 1 equation by itself, but we have the following constraint: c and d must be non-negative integers less than 100.
From this point, we can guess some values of c and d until we come to the answer of c=56, d=18. Hence the amount on the original cheque is $18.56 and she got $56.18 instead.
Extra Credit: Solving the equation with number theory
Let’s consider the equation in mod 97 to get rid of c:
299d−97c+508d+508d+50+478d≡0(mod97)≡0(mod97)≡0+47(mod97)≡47(mod97)To solve this, we can use the extended Euclidean algorithm to find the multiplicative inverse of 8—that is to say, what number multiplied by 8 gives 1 (mod 97).
8d8d+97y978(−12)+978⋅(−12)8⋅858⋅85⋅478⋅18≡1(mod97)=1 (we now work in the integers)=8(12)+1 (extended Euclidean algorithm)=1≡1(mod97)≡1(mod97)≡1⋅47(mod97)≡47(mod97)Hence,
dd≡18(mod97)=97n+18 for any integer nThis gives us the only solution of d=18, since any other value of n gives a result outside of the range of 0 to 99. Substituting d=18 into the original equation, we get c=56.
Try These Next
Trailing Zeroes in 100!
How many trailing zeros does 100! have?
Average Salaries 1
There’s a global pandemic going on, so everyone is working from home. During this time, 12 employees with similar roles wonder if there are any large salary...
Stack of Coins 1C
You and your friend are really lucky treasure hunters, because you’ve stumbled on another pirate’s treasure: an old chest filled with coins: 149 copper coins...