Finding the Greatest Common
Divisor
We can extend the analogy between polynomial arithmetic over a
field and integer arithmetic by defining the greatest common divisor as follows.
The polynomial c(x) is said to be the greatest common divisor of a(x) and b(x) if
-
c(x) divides both a(x) and b(x);
-
any divisor of a(x) and b(x) is a divisor of c(x).
An equivalent definition is the following: gcd[a(x), b(x)] is the polynomial
of maximum degree that divides both a(x) and b(x).
We can adapt the Euclidean algorithm to compute the greatest
common divisor of two polynomials. The equality in
Equation (4.4) can be rewritten as the
following theorem:
Equation 4-7
[Page 118]
The Euclidean algorithm for polynomials can be stated as
follows. The algorithm assumes that the degree of a(x) is greater than the
degree of b(x).
Then, to find gcd[a(x), b(x)],
EUCLID[a(x), b(x)]
1. A(x) a(x); B(x) b(x)
2. if B(x) = 0 return A(x) = gcd[a(x), b(x)]
3. R(x) = A(x) mod B(x)
4. A(x) B(x)
5. B(x) R(x)
6. goto 2
Find gcd[a(x), b(x)] for a(x) = x6 +
x5 +x4 + x3 + x2 +x + 1 and
b(x) = x4 + x2 + x +
1.
A(x) = a(x); B(x) = b(x)
Summary
We began this section with a discussion of arithmetic with
ordinary polynomials. In ordinary polynomial arithmetic, the variable is not
evaluated; that is, we do not plug a value in for the variable of the
polynomials. Instead, arithmetic operations are performed on polynomials
(addition, subtraction, multiplication, division) using the ordinary rules of
algebra. Polynomial division is not allowed unless the coefficients are elements
of a field.
[Page 119]
Next, we discussed polynomial
arithmetic in which the coefficients are elements of GF( p). In this case, polynomial addition, subtraction,
multiplication, and division are allowed. However, division is not exact; that
is, in general division results in a quotient and a remainder.
Finally, we showed that the Euclidean algorithm can be extended
to find the greatest common divisor of two polynomials whose coefficients are
elements of a field.
All of the material in this section provides a foundation for
the following section, in which polynomials are used to define finite fields of
order pn.
|
No comments:
Post a Comment