A man exchanges 9763 yen for USD and CAD. 99 yen = 1USD, 86yen = 1CAD how much of each currency did he exchange?

151 Views Asked by At

So I did Euclidean algorithm to find the GCD of 86 and 99 cause there's a theorem that if their GCD divides 9763 then there are infinitely many solutions of combination $99x+86y=9763$. Here is my process below. $$99=86+13$$ $$86=13(6)+8$$ $$13=8+5$$ $$8=5+3$$ $$5=3+2$$ $$3=2+1$$ $$2=1(2)$$ So $(99,86)=1$ which does divide 9763. Then I noticed that $13|9763=751$. We can see from the first line above I can do. $$99-86=13$$ $$99(751)+86(-751)=9763$$ So using linear Diophantine equations if I put the equation into the format $86x+99y=9763$ then I can find infinitely many $x$ and $y$s using this initial solution $99(751)+86(-751)=9763$. So by linear Diophantine eq $x=x_0+(b/d)t$, $y=y_0-(a/d)t$, where d is the GCD(a,b) and a and b come from $ax+by=c$ so a=86 and b=99 in this case. So $x=-751+(99)t$, $y=751-(86)t$. But this ended up being wrong. What did I do wrong?

2

There are 2 best solutions below

2
On

You may have made an error because you are not consistent with your equation (you switched between $99x+86y=9763$ and $86x+99y=9763$).

Using the equation $99x+86y=9763$, and the initial solution $(751,-751)$ you will have $a=99$ and $b=86$. So $x=751+86t$ and $y=-751-99t$.

1
On

You pretty much have everything, except that you need a value of $t$ such that both $x=-751+99t$ and $y=751-86t$ are positive. With $t=8$, we get $x=41$ and $y=63$. Thus $$99(63)+86(41)=9763$$