0

I know this question has been asked before, but the answer to the previously posted question does not address my question about the problem. I will restate the problem:
A man cashes a check for $d$ dollars and $c$ cents, but the teller gives him $c$ dollars and $d$ cents instead. The man doesn't notice the mistake until he has spent 23 cents, at which point he has $2d$ dollars and $2c$ cents. What was the original amount of the check?
As in the previously posed question, I come up with the linear equation:
$98c-199d=23$
However, the posted answer to this question uses congruences, which haven't been introduced yet in the elementary number theory book I am using. So, I have been trying to solve it with what amounts to a brute-force method. I know that $c<100$, but since the teller gives the man $d$ cents, it must be that $d<100$ also. I solved the linear equation for c:
$c=23/98+(199/98)*d$
This means I must find a multiple of 199 less 23 that is evenly divisible by 98, while also satisfying the other conditions. Without knowing congruences, this was a trial-and-error process. I found that $d=25$ and $c=51$ satisfies the equation and answers the problem, but I was dissatisfied with this process. Do I just need to read on in my book? Or is there another approach?

Bill Dubuque
  • 282,220
  • I suggest: link to the duplicate question. Also...here, instead of "congruence" you could just use "remainder". I doubt any subtle properties of congruence are involved here...sure, the Chinese Remainder Theorem guarantees a solution (if certain tests are passed) but you still have to find it and that often comes down to a search. – lulu Jun 18 '24 at 19:56
  • $$\begin{align} 98\mid!!! \overbrace{199}^{\color{#c00}3+2(98)}!!!d+23!\iff! 98\mid \color{#c00}3d&+!!!\overbrace{23}^{98\color{#0af}{-75}}!!!!\iff! 98\mid \overbrace{3d!\color{#0af}{-75}}^{3(d-25)}!\iff! 98\mid d-\color{darkorange}{25}\ {\rm i.e.}\ \ \ \bmod 98!:\ {-}\color{#c00}3d &\equiv 23!\iff! d \equiv \dfrac{-23}3 \equiv \dfrac{\color{#0af}{75^{\phantom{|}}}}3 \equiv \color{darkorange}{25}\end{align}\qquad\qquad$$ – Bill Dubuque Jun 18 '24 at 20:46
  • We made the quotient $-23/3,$ exact by computing a $\rm\color{#0af}{multiple}$ of $,3,$ that is $\equiv -23\pmod{!98},,$
    i.e. $,3\mid -23!+!98k = 1!-!k + 3(-8!+!33k)\iff 3\mid \color{#0a0}{1!-!k},$ so $,3\mid -23!+!98(\color{#0a0}1)= \color{#0af}{75},,$ see twiddling / inverse reciprocity, and other methods there - including the general extended Euclidean algorithm. Such calculations become much clearer once you learn congruences (modular arithmetic).
    – Bill Dubuque Jun 18 '24 at 20:46
  • The above method is essentially an optimization of the extended Euclidean algorithm for the case when it terminates in two steps. – Bill Dubuque Jun 18 '24 at 21:01
  • How would you solve the problem by purely intuitive methods? With $~(c,d) = (2,1),~$ you end up with $~98c - 199d = -3.~$ So, if $~(c,d) = (N \times 2, N \times 1),~$ you end up with $~98c - 199d = -3N.~$ Then, when you add one further $~98~$ term, you end up with $~98 - 3N,~$ which you want to equal $~23.~$ This implies that $~3N = 75,~$ which implies that $~N = 25.~$ So, you end up with $$(c,d) = (51,25) \implies 98c - 199d = 23.$$ – user2661923 Jun 19 '24 at 01:27
  • When doing the substitutions above in Bill's equations, I see that $3+2(98)=199$, and $98-75=23$, but what allows us to "drop" the $2(98)$ and the 98 in the $98-75$? Is it because we are not in an equation anymore, but rather looking at 98 dividing into an expression? So any term that is clearly a multiple of 98 can be removed from consideration? I can see how the congruence relation is much more straightforward. – k endres Jun 20 '24 at 03:00
  • It's because $,d\mid a!+!nd!\iff! d\mid a;,$ equivalently if $,a\equiv \bar a\pmod{!d},$ then $,d\mid a\iff d\mid \bar a,,$ see divisibility mod reduction. $\ \ $ – Bill Dubuque Jun 20 '24 at 21:30
  • Please don't significantly change your questions. If you have a different question you should ask it in a new question. – Bill Dubuque Jun 20 '24 at 21:33

0 Answers0