Solve linear diophantine equation problem

337 Views Asked by At

I am here again, but this time with a Diophantine equation problem.I (thought) know how to resolve a Diophantine equation, but can't get the equation of this problem

Given a number of sweets we have that if we distribute the sweets to 3 chidren we still have 2 sweets and if we distribute the sweets to 11 children we still have 5 sweets. How many sweets will we have if we distribute the same amount of sweets within 33 children?

Many thanks for your help.

Edit: I need integer solution

2

There are 2 best solutions below

2
On

If each of the $3$ children gets $m$ sweets, and each of the 11 children gets $n$ sweets, then we must have $3m+2=11n+5$. Rearranging the terms shows that $3m-11n=3$, so we might have $m=1$ and $n=0$ for example. In this case the total number of sweets is $5$, so we would have $5$ sweets left if we distribute these $5$ sweets equally among $33$ children.

Are there other possible remainders?

0
On

If $N$ is the number of sweets, then there must exists integers $a$ and $b$ such that $$N = 3a + 2 \quad \text{and} \quad N = 11b + 5$$

So

$$11N = 33a + 22 \quad \text{and} \quad 3N = 33b + 15$$

Then

\begin{align} N &= 12N - 11N \\ &= 4(3N) - 11N \\ &= 4(33b + 15) - (33a + 22) \\ &= 33(4b-a) + 38 \\ &= 33(4b-a+1) + 5\\ &= 33n + 5 \\ \end{align}

So the possible values of $N$ are $5, 38, 71, \dots , 33n+5, \dots$