2. Euclidean Algorithm

Applications To Solvability

Euclidean Algorithm: Applications to Solvability

students, this lesson shows how the Euclidean Algorithm helps answer a very practical number theory question: when does an equation involving whole numbers have a solution? 🎯 This idea appears in puzzles, schedules, coding systems, and even in checking whether some tasks can be divided evenly. The main goal is to use the greatest common divisor, or $\gcd$, to decide solvability and to understand why the answer works.

What does solvability mean?

In number theory, solvability usually means: can we find integers that make a statement true? For example, can we solve an equation like $12x+18y=6$ using whole numbers $x$ and $y$? Or can we find an integer $n$ that satisfies a congruence like $7n\equiv 3\pmod{10}$?

The Euclidean Algorithm is useful because it finds the $\gcd$ of two integers efficiently. That matters because the $\gcd$ controls whether many equations have integer solutions. The key rule is this:

For integers $a$ and $b$, the linear equation $ax+by=c$ has integer solutions if and only if $\gcd(a,b)$ divides $c$.

This is one of the most important applications of the Euclidean Algorithm. It connects computation with proof: first we find the $\gcd$, then we test whether the equation can be solved. ✅

Let’s see why this matters in real life. Suppose a school can only sell snack packs of $12$ granola bars and $18$ fruit bars. If the cafeteria wants exactly $6$ bars using combinations of these pack sizes, the question becomes: can $12x+18y=6$ be solved in integers? The answer is yes, because $\gcd(12,18)=6$, and $6$ divides $6$.

The main theorem behind solvability

The solvability rule above comes from BĂ©zout’s identity, which says that for any integers $a$ and $b$, there exist integers $x$ and $y$ such that

$$

$ax+by=\gcd(a,b).$

$$

This is powerful because it tells us that the greatest common divisor is not just a number we compute. It can actually be written as a combination of the original numbers.

Now suppose we want to solve $ax+by=c$. If we know that $\gcd(a,b)=d$, then BĂ©zout’s identity gives us numbers $u$ and $v$ such that

$$

$au+bv=d.$

$$

If $d$ divides $c$, then $c=kd$ for some integer $k$. Multiplying the equation by $k$ gives

$$

$(au)k+(bv)k=dk=c,$

$$

so

$$

$a(ku)+b(kv)=c.$

$$

That produces a solution. On the other hand, if $ax+by=c$ has a solution, then $d=\gcd(a,b)$ must divide both $ax$ and $by$, so it divides their sum $c$. Therefore $d\mid c$ is necessary.

So the rule is both necessary and sufficient. That means it gives a complete answer. 🔍

How the Euclidean Algorithm helps in practice

The Euclidean Algorithm is the fast method for finding $\gcd(a,b)$. It repeatedly uses division with remainder:

$$

$a=bq+r,$

$$

where $0\le r<b$.

Then we replace the pair $(a,b)$ with $(b,r)$ and keep going until the remainder becomes $0$. The last nonzero remainder is the $\gcd$.

Why is this useful for solvability? Because once we know the $\gcd$, we can test equations quickly.

Example: solve or decide whether $21x+14y=7$ has integer solutions.

Using the Euclidean Algorithm:

$$

$21=14\cdot1+7$

$$

$$

$14=7\cdot2+0$

$$

So $\gcd(21,14)=7$.

Since $7\mid 7$, the equation has integer solutions. One solution can be found by working backward from the Euclidean Algorithm:

$$

$7=21-14.$

$$

So

$$

$21(1)+14(-1)=7.$

$$

Thus $x=1$ and $y=-1$ is a solution.

This backward step is often called the extended Euclidean Algorithm, because it not only finds the $\gcd$ but also finds the coefficients in BĂ©zout’s identity. 🌟

Solvability of linear Diophantine equations

A linear Diophantine equation is an equation of the form

$$

$ax+by=c,$

$$

where $a$, $b$, and $c$ are integers and we want integer solutions.

These equations are central to applications of solvability because many number theory problems can be rewritten in this form.

Example 1: Does $15x+25y=40$ have integer solutions?

First find $\gcd(15,25)$.

$$

$25=15\cdot1+10$

$$

$$

$15=10\cdot1+5$

$$

$$

$10=5\cdot2+0$

$$

So $\gcd(15,25)=5$.

Since $5\mid 40$, the equation is solvable.

Example 2: Does $15x+25y=41$ have integer solutions?

The $\gcd$ is still $5$, but $5$ does not divide $41$. So there is no integer solution.

This is a very fast test. Instead of searching through many values of $x$ and $y$, the Euclidean Algorithm tells us whether a solution is possible at all. That saves time and avoids trial-and-error. ⏱

Solving congruences using solvability

Solvability also appears in modular arithmetic. A congruence like

$$

$ax\equiv b\pmod{m}$

$$

means that $m$ divides $ax-b$.

This congruence has a solution if and only if $\gcd(a,m)$ divides $b$.

Why? Because the congruence can be rewritten as a linear equation:

$$

$ax-my=b.$

$$

Now it looks exactly like a Diophantine equation, and the same solvability rule applies.

Example: Does $6x\equiv 8\pmod{14}$ have a solution?

We compute $\gcd(6,14)=2$.

Since $2\mid 8$, the congruence is solvable.

To find a solution, we can simplify by dividing everything by $2$:

$$

$3x\equiv 4\pmod{7}.$

$$

Now we look for an inverse of $3$ modulo $7$. Since $3\cdot5=15\equiv 1\pmod{7}$, multiply both sides by $5$:

$$

$x\equiv 20\equiv 6\pmod{7}.$

$$

So one solution is $x\equiv 6\pmod{7}$, and this gives all solutions modulo $14$.

This shows how solvability is not just about whether an answer exists. It can also lead directly to finding the answer. ✅

Why the condition is exact

students, it is important to understand why the divisibility condition is exact, not just a helpful trick.

If $d=\gcd(a,b)$ and $ax+by=c$, then $d$ divides $ax$ and $by$. Because $d$ divides both terms, it must divide the sum $c$. So if $d\nmid c$, a solution is impossible.

If $d\mid c$, then BĂ©zout’s identity guarantees that we can scale a solution of

$$

$au+bv=d$

$$

up to a solution of

$$

$ax+by=c.$

$$

So the gcd condition captures every possible case.

This is an example of a mathematical theorem that gives both a test and a method. The test tells whether a solution exists. The method shows how to build one when it does. That is why the Euclidean Algorithm is so useful in solving equations over the integers. 📘

Conclusion

The applications of solvability within the Euclidean Algorithm center on one key idea: the $\gcd$ determines whether integer equations can be solved. The Euclidean Algorithm finds the $\gcd$ efficiently, and BĂ©zout’s identity explains why the $\gcd$ controls solutions to equations like $ax+by=c$ and congruences like $ax\equiv b\pmod{m}$.

In practice, students, this means you can:

  • compute a $\gcd$ with the Euclidean Algorithm,
  • check whether the divisor condition holds,
  • decide if a solution exists,
  • and often construct a solution using the extended Euclidean Algorithm.

This makes solvability one of the most important applications of the Euclidean Algorithm in number theory.

Study Notes

  • The Euclidean Algorithm finds $\gcd(a,b)$ by repeated division with remainder.
  • A linear equation $ax+by=c$ has integer solutions if and only if $\gcd(a,b)\mid c$.
  • BĂ©zout’s identity says there are integers $x$ and $y$ such that $ax+by=\gcd(a,b)$.
  • If $\gcd(a,b)\mid c$, then a solution to $ax+by=c$ exists.
  • If $\gcd(a,b)\nmid c$, then no integer solution exists.
  • The extended Euclidean Algorithm can find actual values of $x$ and $y$.
  • A congruence $ax\equiv b\pmod{m}$ has a solution if and only if $\gcd(a,m)\mid b$.
  • Solvability questions often become easier after rewriting them as linear Diophantine equations.
  • The Euclidean Algorithm connects computation, proof, and problem-solving in number theory.

Practice Quiz

5 questions to test your understanding

Applications To Solvability — Number Theory | A-Warded