+0

A Money Problem

0
912
2
Melody says that things have gone quiet so I am taking the opportunity to share a problem.
I first encountered it as a twelve year old and have just rediscovered it in an old notebook.
I remember that it took me (seemingly) an age to come up with a solution that didn't just
involve trial and error, and I'm wondering now if there are any other methods of solution
different to the one I found.

A man receives a cheque and goes to his local bank to cash it.
The cashier at the bank is having an exceedingly bad day and mistakenly mixes up the
dollars and cents, (pounds and pence in England), giving the man y dollars and x cents
rather than x dollars and y cents. The man doesn't notice the mistake and returns home,
on the way spending 5 cents of the money. (He had no other money with him when he left home.)
Only when he gets home does he check, and he finds that he now has exactly double
the amount on the cheque.
The question is how much was the cheque for ?
Apr 5, 2014

#1
0
Bertie:

Melody says that things have gone quiet so I am taking the opportunity to share a problem.
I first encountered it as a twelve year old and have just rediscovered it in an old notebook.
I remember that it took me (seemingly) an age to come up with a solution that didn't just
involve trial and error, and I'm wondering now if there are any other methods of solution
different to the one I found.

A man receives a cheque and goes to his local bank to cash it.
The cashier at the bank is having an exceedingly bad day and mistakenly mixes up the
dollars and cents, (pounds and pence in England), giving the man y dollars and x cents
rather than x dollars and y cents. The man doesn't notice the mistake and returns home,
on the way spending 5 cents of the money. (He had no other money with him when he left home.)
Only when he gets home does he check, and he finds that he now has exactly double
the amount on the cheque.
The question is how much was the cheque for ?

Took me a while to figure out, but I've found a way without guessing.

First, let's start by making an equation which suits the problem.

y+1/100x - 5/100 is the amount the man has left at the end of the day.
This is twice the amount of the check and we know the check had a value of x+1/100y
Therefore;

2(x+1/100y) = y + 1/100x - 5/100

We can rewrite this to;

98y-199x= 5

Define x' = -x

then we have

98y+199x' = 5

What we have here is called a linear diophantine equation (since both x and y are integers) and lucky for us it is solvable.

What we want to do is apply the euclidean algorithm which seeks the greatest common divisor.

This iterates into;

199= 98 * 2 + 3
98 = 3 * 32 + 2
3 = 2*1 + 1
2 = 1*2 + 0

where the red number indicated the GCD.

Sadly though, we won't need the GCD :

We do need the steps we made to get there. Pay attention, this is where it is all about to unfold

we rewrite the 3th equation into

1 = 3-2*1

using the second equation we can rewrite this to

1 = 3-1*(98-32*3)

This can be rewritten to

1 = 33*3-98

We can rewrite this using the first equation into

1 = 33*(199-2*98) - 98

Which can be rewritten to

1 = 33* 199 - 66 * 98 - 98

or

1= 33*199 - 67 * 98

so,

5 = 165*199 - 335*98

So a solution to our problem would be (x',y) = (165,-335)

However, since we're looking for values of x' and y within the bounds -100<x'<0 and 0<y<100 (since x'= -x) we want to alter this equation to show values (if they exist) within our bounds.

I can do this in the following way;

5 = (165-98)*199-(335-199)*98

5 = 67*199-136*98

Since i basically add and substract 98*199 the equation is still correct.

Doing this again gives

5 = (67-98)*199-(136-199)*98

And now we have

5 = (-31)*199 +63*98

We therefore know that (x',y) = (-31,63)

Since I defined x' = -x, (x,y) = (31,63)

Hence the amount on the check was \$31,63, the man received \$63,31 and found out he had \$63,26.

Since \$63,26 = 2*\$31,63, he does indeed have twice the amount on the check after spending 5 cents.

http://mathworld.wolfram.com/DiophantineEquation.html for more information on the algorithm
Apr 5, 2014
#2
0
Bertie:

...

A man receives a cheque and goes to his local bank to cash it.
The cashier at the bank is having an exceedingly bad day and mistakenly mixes up the
dollars and cents, (pounds and pence in England), giving the man y dollars and x cents
rather than x dollars and y cents. The man doesn't notice the mistake and returns home,
on the way spending 5 cents of the money. (He had no other money with him when he left home.)
Only when he gets home does he check, and he finds that he now has exactly double
the amount on the cheque.
The question is how much was the cheque for ?

Here's my reasoning.

The cheque is worth 100x + y cents, where y must be an integer between 1 and 99 inclusive.
The man is given 100y + x cents, where x is clearly also an integer between1 and 99 inclusive.
When he gets home the man has 100y + x - 5 cents and we are told that this is twice the original value of the cheque, so we must have 100y + x - 5 = 2*(100x + y).

Collecting terms, we can write this as 98y - 5 = 199x ...(1)

Clearly, y must be bigger than x or the two sides will never match!
Suppose y is twice the size of x. 98*(2x) - 5 is 196x - 5 which is smaller than 199x, so y must be more than twice the size of x.

Let y = 2x + n ...(2) where n is another integer.

Put (2) into (1) to get 98*(2x+n) - 5 = 199x or, 196x + 98n - 5 = 199x. This simplifies to: 98n - 5 = 3x ...(3)

Now x must be bigger than n.
Let's try x = 31n in (3) (trying to get close to, but a little below 98n) .
Putting this in (3) we get 98n - 5 = 93n, which simplifies to 5n - 5 = 0.
This gives n = 1, which in turn gives x = 31, and putting these values for n and x into (2) we have y = 2*31+1 or y = 63.

(Note: we could have tried x = 32n in (3) to get us closer to 98n, but we would have found that it was too close and there was no positive integer value of n that would satisfy the resulting equation for n.)

So the original cheque is worth 100*31+63 cents: i.e. 3163 cents or 31 dollars and 63 cents.
Apr 5, 2014