Solving a multiple variable system of congruences using the Chinese Remainder theorem

chinese remainder theoremelementary-number-theorymodular arithmeticnumber theory

I've tried to solve the following system:

$2x+7y\equiv17\mod35\\3x+8y\equiv18\mod35$

My idea was using the Chinese Remainder theorem, so firstly, I've found that

$3\cdot 5 – 2\cdot 7 = 1$

And that $15$ is $1\mod7$, $\space -14\equiv 1\mod5$.

I'm not sure how to proceed from this point, and I'd like to receive a little help.

Thank you!

Best Answer

Subtracting the first congruence from the second gives

$$ x+y \equiv 1\pmod{35}. $$

Using this in the first congruence gives

$$ 17 \equiv 2(x+y) + 5y \equiv 2+5y \pmod{35}, $$

so that $35 \mid 5(y-3)$, or $7 \mid (y-3)$. From $y \equiv 3\pmod{7}$ and $x+y \equiv 1\pmod{7}$ we get $x \equiv 5\pmod{7}$.

The two congruences are identical modulo $5$; they both give $x+y \equiv 1\pmod{5}$. Thus, there are five pairs $(x\bmod{5},y\bmod{5})$ from the two congruences, as opposed to the unique $(x\bmod{7},y\bmod{7})=(5,3)$ for congruences modulo $7$. Therefore, we have following five solutions $(x\bmod{35},y\bmod{35})$.

Set $x=7a+5$, $y=7b+3$, $a,b \in \{0,1,2,3,4\}$. Then $5 \mid (x+y-1)$ reduces to $5 \mid 7(a+b+1)$, and hence to $5 \mid (a+b+1)$ since $\gcd(5,7)=1$. This yields the following pairs $(a,b)$:

$$ (0,4), \quad (1,3), \quad (2,2), \quad (3,1), \quad (4,0). $$

The corresponding pairs $(x\bmod{35},y\bmod{35})$ are

$$ (5,31), \quad (12,24), \quad (19,17), \quad (26,10), \quad (33,3). $$

Related Question