高级算法 (Fall 2017)/Finite Field Basics: Difference between revisions

From TCS Wiki
Jump to navigation Jump to search
imported>Etone
imported>Etone
Line 57: Line 57:


Because <math>\mathbb{F}[x]</math> is a ring, we cannot do division the way we do it in a field like <math>\mathbb{R}</math>, but we can do division the way we do it in a ring like <math>\mathbb{Z}</math>, leaving a '''remainder'''. The equivalent of the '''integer division''' for <math>\mathbb{Z}</math> is as follows.
Because <math>\mathbb{F}[x]</math> is a ring, we cannot do division the way we do it in a field like <math>\mathbb{R}</math>, but we can do division the way we do it in a ring like <math>\mathbb{Z}</math>, leaving a '''remainder'''. The equivalent of the '''integer division''' for <math>\mathbb{Z}</math> is as follows.
{{Theorem|Division for polynomials|
{{Theorem|Proposition (division for polynomials)|
:Given a polynomial <math>f</math> and a nonzero polynomial <math>g</math> in <math>\mathbb{F}[x]</math>, there are unique polynomials <math>q</math> and <math>r</math> such that <math>f =q\cdot g+r</math> and <math>\mathrm{deg}(r)<\mathrm{deg}(g)</math>.
:Given a polynomial <math>f</math> and a nonzero polynomial <math>g</math> in <math>\mathbb{F}[x]</math>, there are unique polynomials <math>q</math> and <math>r</math> such that <math>f =q\cdot g+r</math> and <math>\mathrm{deg}(r)<\mathrm{deg}(g)</math>.
}}
}}
Line 64: Line 64:
As we turn <math>\mathbb{Z}</math> (a ring) into a finite field <math>\mathbb{Z}_p</math> by taking quotients <math>\bmod p</math>, we can turn a polynomial ring <math>\mathbb{F}[x]</math> into a finite field by taking <math>\mathbb{F}[x]</math> modulo a "prime-like" polynomial, using the division of polynomials above.
As we turn <math>\mathbb{Z}</math> (a ring) into a finite field <math>\mathbb{Z}_p</math> by taking quotients <math>\bmod p</math>, we can turn a polynomial ring <math>\mathbb{F}[x]</math> into a finite field by taking <math>\mathbb{F}[x]</math> modulo a "prime-like" polynomial, using the division of polynomials above.


{{Theorem|Irreducible polynomial|
{{Theorem|Definition (irreducible polynomial)|
:A non-constant polynomial <math>f</math> is an '''irreducible polynomial''', or a '''prime polynomial''', if <math>f</math> ''cannot'' be factored as <math>f=g\cdot h</math> for any non-constant polynomials <math>g</math> and <math>h</math>.
:A non-constant polynomial <math>f</math> is an '''irreducible polynomial''', or a '''prime polynomial''', if <math>f</math> ''cannot'' be factored as <math>f=g\cdot h</math> for any non-constant polynomials <math>g</math> and <math>h</math>.
}}
}}

Revision as of 05:58, 19 September 2017

Field

Let S be a set, closed under two binary operations + (addition) and (multiplication). It gives us the following algebraic structures if the corresponding set of axioms are satisfied.

Structures Axioms Operations
field commutative
ring
ring abelian
group
group monoid semigroup 1. Addition is associative: x,y,zS,(x+y)+z=x+(y+z). +
2. Existence of additive identity 0: xS,x+0=0+x=x.
3. Everyone has an additive inverse: xS,xS, s.t. x+(x)=(x)+x=0.
4. Addition is commutative: x,yS,x+y=y+x.
5. Multiplication distributes over addition: x,y,zS,x(y+z)=xy+xz and (y+z)x=yx+zx. +,
6. Multiplication is associative: x,y,zS,(xy)z=x(yz).
7. Existence of multiplicative identity 1: xS,x1=1x=x.
8. Multiplication is commutative: x,yS,xy=yx.
9. Every non-zero element has a multiplicative inverse: xS{0},x1S, s.t. xx1=x1x=1.

The semigroup, monoid, group and abelian group are given by (S,+), and the ring, commutative ring, and field are given by (S,+,).

Examples:

  • Infinite fields: Q, R, C are fields. The integer set Z is a commutative ring but is not a field.
  • Finite fields: Finite fields are called Galois fields. The number of elements of a finite field is called its order. A finite field of order q, is usually denoted as GF(q) or Fq.
    • Prime field Zp: For any integer n>1, Zn={0,1,,n1} under modulo-p addition + and multiplication forms a commutative ring. It is called quotient ring, and is sometimes denoted as Z/nZ. In particular, for prime p, Zp is a field. This can be verified by Fermat's little theorem.
    • Boolean arithmetics GF(2): The finite field of order 2 GF(2) contains only two elements 0 and 1, with bit-wise XOR as addition and bit-wise AND as multiplication. GF(2n)
    • Other examples: There are other examples of finite fields, for instance {a+bia,bZ3} where I=1. This field is isomorphic to GF(9). In fact, the following theorem holds for finite fields of given order.
Theorem
A finite field of order q exists if and only if q=pk for some prime number p and positive integer k. Moreover, all fields of a given order are isomorphic.

Polynomial over a field

Given a field F, the polynomial ring F[x] consists of all polynomials in the variable x with coefficients in F. Addition and multiplication of polynomials are naturally defined by applying the distributive law and combining like terms. The degree deg(f) of a polynomial fF[x] is the exponent on the leading term, the term with a nonzero coefficient that has the largest exponent.

Because F[x] is a ring, we cannot do division the way we do it in a field like R, but we can do division the way we do it in a ring like Z, leaving a remainder. The equivalent of the integer division for Z is as follows.

Proposition (division for polynomials)
Given a polynomial f and a nonzero polynomial g in F[x], there are unique polynomials q and r such that f=qg+r and deg(r)<deg(g).

The proof of this is by induction on deg(f), with the basis deg(f)<deg(g), in which case the theorem holds trivially by letting q=0 and r=f.

As we turn Z (a ring) into a finite field Zp by taking quotients modp, we can turn a polynomial ring F[x] into a finite field by taking F[x] modulo a "prime-like" polynomial, using the division of polynomials above.

Definition (irreducible polynomial)
A non-constant polynomial f is an irreducible polynomial, or a prime polynomial, if f cannot be factored as f=gh for any non-constant polynomials g and h.