Section 4.4 Bézout’s Identity
The values and from Theorem 4.25 are called the cofactors of and To find and for any and we would use repeated substitutions on the results of the Euclidean Algorithm (Algorithm 4.17). This works because the algorithm connects and to the by a series of related equations.
When we can easily find the values of and from Theorem 4.25. In this course we limit our computations to this case. We demonstrate this in the following examples.
Example 4.26. Bézout’s identity for .
First, we compute the using the Euclidean Algorithm (Algorithm 4.17). In the table we give the values of the variables at the end of step (1) in each iteration of the loop.
step | |||
---|---|---|---|
Input | |||
(1) | |||
(1) | |||
Output | 4 |
- the remainder from the first iteration of the loop
and - the quotient
We write in slightly more complicated way, namely as Solving for we get To bring this into the desired form we write as and obtain
Problem 4.27. Bézout’s identity for .
Solution.
Although it is easy to see that the greatest common divisor of 5 and 2 is 1, we need some of the intermediate result from the Euclidean algorithm to find and Following the Euclidean algorithm (Algorithm 4.17) for the input values and we get:
step | |||
---|---|---|---|
Input | |||
(1) | |||
(1) | |||
Output | 1 |
We have confirmed that Since the Euclidean algorithm terminated after 2 iterations we can use the same trick as in Example 4.26. We get
and
Plugging these into the formula
we get
We read of the values and Note that
In Checkpoint 4.28 work through a similar example.
Checkpoint 4.28. Find the cofactors.
Let and
Follow these step to compute the greatest common divisor of and and the integers and such that
First we compute using the Euclidean algorithm.
In addition to the remainder we also compute the quotient.
Let and let and let
Let = and let
We have computed .
Now write
Rearranging the values, write :
Read off the values of and Recall that
With and we have
The pattern observed in the solution of the problem and Checkpoint 4.28 can be generalized. We obtain the following theorem.
Theorem 4.29.
The condition in Theorem 4.29 means that in the Euclidean algorithm the instructions in the repeat until loop are only executed twice.
We apply Theorem 4.29 in the solution of a problem.
Problem 4.30. Find and such that .
Solution.
We find the greatest common divisor of 63 and 14 using the Euclidean Algorithm.
So the Euclidean Algorithm ends after running through the loop twice and returns By Theorem 4.29. we have and
We check whether the result is correct:
Checkpoint 4.31. Find the cofactors.
Compute the greatest common divisor of and and the integers and such that
We have . Now find the numbers and whose existence is guaranteed by Bezout’s identity.
With and we have
In the video in Figure 4.32 we summarize the results from above and give some additional examples.