4

When Mr. Smith cashed a check for x dollars and y cents, he received instead y dollars and x cents and found that he had two cents more than twice the proper amount. For how much was the check written?.

Approach

so he received $100y+x$ cents and found out that is $2(100x+y)+2$,so

$$100y+x=2(100x+y)+2$$ $$-199x+98y=2$$

I tried to solve that and it doesn't give the solution I expected so it looks like it's wrong.

Jyrki Lahtonen
  • 133,153
TheMathNoob
  • 2,011

2 Answers2

3

Credits to https://answers.yahoo.com/question/index?qid=20100919162532AA8RPQF

Since $98y-199x = 2$, then necessarily $98y-199x \equiv 2 $ $(\textrm{mod}\ 98) $.

But since $98y - 199x \equiv -199x \equiv -199x + 2*98 x \equiv -3x$ $(\textrm{mod}\ 98)$,
we have $-3x \equiv 2 \equiv 2-98 \equiv -96$ $(\textrm{mod 98})$.

Dividing by $-3$, we get $x \equiv 32$ $\textrm{(mod 98)}$. So $x = 32 + 98k$ for some $k \in \mathbb{Z}$.
Substituting the expression for $x$ into $98y-199x = 2$, we get that $98y -199(32+98k)=2$, which becomes $y=65+100k$ after simplifying.

Since $0\leq y <100 $, $k=0$, which means $y=65$ and $x=32$.

Hence, the check was written for 32 dollars and 65 cents.

railgun
  • 145
1

First find the solution for the equation when the RHS is 1, which is possible as $(199,98) = 1$. And then multiply both sides by 2. You can obtain a solution for the linear diophantine equation from the Extended Euclidean Algorithm.

Stefan4024
  • 35,843
  • I did it and you have to do it with (-199,98) so you can get the - in the equation. I got x=68t+98t and y=-138+199t – TheMathNoob Jun 23 '16 at 09:39
  • @TheMathNoob The minus sign doesn't matter at all in your calculations, as you can substitute $x=-u$ and substitute back later. Anyway you seem to make some mistakes in you calculations, as $x= 98t - 66$ and $y=199t-134$. So the only solutions is $x=32$ and $y=65$. Actually there are infinitely many solutions, but otherwise we will get integers bigger than $100$, but I assume $y<100$. – Stefan4024 Jun 23 '16 at 09:47
  • why did you assume $y<100$. It confuses me a lot because in my equation y is just number. It doesn't have to be dollars or cents. – TheMathNoob Jun 23 '16 at 09:51
  • @TheMathNoob I guess you can deduce that from the context of the problem. I mean if you want to take $134.56$ dollars out of your bank account, you are going to write $134.56$ on the check, instead of $133$ dollars + $156$ cents, right? – Stefan4024 Jun 23 '16 at 09:53
  • I don't understand how that equation works.what is x and what is y? – TheMathNoob Jun 23 '16 at 09:57
  • @TheMathNoob According to the text of the problem $x$ is the amount of dollars Mr. Smith wrote on the check, while $y$ is the amount of cents he wrote. So after solving it, one can conclude that he wrote $32.65 on the check. – Stefan4024 Jun 23 '16 at 09:59