Lecture 025

Linear Diophantine Equations (in 2 unknowns)

We know

• Diophantine: integer solution

• Bezout's Lemma: $ax+by = c \iff gcd(a, b) | c$

• We want to find all x, y that satisfy the equation

• $gcd(a, b) | c \implies \text{there are infinitely many integral solution to ax+by = c}$

• $\exists (x_0, y_0) \implies \text{is one solution to the equation} \implies \{(x_0 + m(b/d), y_0 - m(a/d) | m\in \mathbb{Z}, d = gcd(a, b))\} \text{is all solution}$ TODO: proof

Example

Task: find all solution to 9x + 15y = 6 Solution:

• $(\exists y \in \mathbb{Z})(9x + 15y = 6)$

• $9x \equiv 6 (\text{mod} 15)$

• $3x \equiv 2 (\text{mod} 15)$

• $x \equiv 4 (\text{mod} 15)$

• $(\exists k \in \mathbb{Z})(x = 4+5k)$ fix such k

• substitute x into original equation, solve for y

• $9(4+5k) + 15y = 6 \implies 15y=-30-45k \implies y = -2-3k$

• Solution $\{(4+5k, -2-3k) | k \in \mathbb{Z}\}$

The Chinese Remainder Theorem (CRT)

Let $m_1, m_2, ..., m_r \in \mathbb{Z}$ be pairwise relative prime, let $a_1, a_2, ..., a_r \in \mathbb{Z}$ The system of linear has a unique solution up to $M = m_1m_2...m_r$

There will be a unique solution up to the multiple of all congruence m.