Problem with Diophantine equations

59 Views Asked by At

A man purchases an item for 10.08 and instead of paying cash he tendered a cheque which he had with him. the cashier mistook the number of cents for the number of dollars and the number of dollars for the number of cents and gave back 7 times the value of the cheque as balance.

if A is the actual value of the cheque and if D is the actual value of dollars and if c is the actual value of cents

i got these two equations A=D+100c and for the cashiers calculation 100D+c-10.08=7A after solving above two you get 93D-699C=10.08 Using euclids i got D=(-50.4) and C = (-6.72)

What should be done next to find the value of A?

2

There are 2 best solutions below

0
On BEST ANSWER

The correct equations are

$$\begin{align} A&=D+{c\over100}\\ 7A&=c+{D\over100}-10.08 \end{align}$$

This leads to

$$100c+D-1008=700A=700D+7c$$

which simplifies to

$$31c=233D+336$$

Note that $233D+336\equiv16D-5$ mod $31$, so we must have $D\equiv10$ mod $31$. The allowable values of $c$ (which cannot have more than two digits) are of the form

$$0\le c={233(10+31k)+336\over31}\lt100$$

i.e.

$$0\le c=233k+86\lt100$$

so we clearly have $k=0$, which means $D=10$ and $c=86$. This gives $A=\$10.86$ as the actual amount of the cheque.

0
On

There’s an error in your second equation.

You need to either work in cents throughout :

$$ A = D + 100C\\ 100D + C - 1008 = 7A $$

or work in dollars :

$$ A = C + .01D\\ D + .01C - 10.08 = 7A $$

If you carry on from here, you should get a sensible answer.