Skip to content

Commit 5617b11

Browse files
authored
linear-diophantine: move identity
1 parent 0e9d69b commit 5617b11

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/algebra/linear-diophantine-equation.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ In this article, we consider several classical problems on these equations:
2323

2424
A degenerate case that need to be taken care of is when $a = b = 0$. It is easy to see that we either have no solutions or infinitely many solutions, depending on whether $c = 0$ or not. In the rest of this article, we will ignore this case.
2525

26-
## Bézout's lemma
27-
28-
Bézout's lemma (also called Bézout's identity) is a useful result that can be used to understand and prove the following analytic solution.
29-
30-
> Let $g = \gcd(a,b)$. Then there exist integers $x,y$ such that $ax + by = g$.
31-
>
32-
> Moreover, $g$ is the least such positive integer that can be written as $ax + by$; all integers of the form $ax + by$ are multiples of $g$.
33-
3426
## Analytic solution
3527

3628
When $a \neq 0$ and $b \neq 0$, the equation $ax+by=c$ can be equivalently treated as either of the following:
@@ -59,6 +51,12 @@ y = \frac{c-ax}{b}.
5951

6052
## Algorithmic solution
6153

54+
**Bézout's lemma** (also called Bézout's identity) is a useful result that can be used to understand and prove the following solution.
55+
56+
> Let $g = \gcd(a,b)$. Then there exist integers $x,y$ such that $ax + by = g$.
57+
>
58+
> Moreover, $g$ is the least such positive integer that can be written as $ax + by$; all integers of the form $ax + by$ are multiples of $g$.
59+
6260
To find one solution of the Diophantine equation with 2 unknowns, you can use the [Extended Euclidean algorithm](extended-euclid-algorithm.md). First, assume that $a$ and $b$ are non-negative. When we apply Extended Euclidean algorithm for $a$ and $b$, we can find their greatest common divisor $g$ and 2 numbers $x_g$ and $y_g$ such that:
6361

6462
$$a x_g + b y_g = g$$

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy