Review/Outline Review: Basic computations in finite fiels Ree-Solomon coes Hamming coes Bose-Chauhuri-Hocquengham (BCH) coes Testing for irreucibility Frobenius automorphisms Other roots of equations Counting irreucibles Counting primitive polynomials New: Equation satisfie by fiel element 1
Counting irreucibles [0.0.1] Theorem: Let p be prime. Fix a egree. The number of irreucible monic (=leaing coefficient 1) polynomials of egree in F p [x] is p q p/q + q 1,q 2 p/q 1q 2... where q 1, q 2,... are istinct primes iviing. For example, in some simple cases: egree prime: p p = qr with q, r istinct primes: p qr p q p r + p qr = abc with a, b, c istinct primes: p abc p ab p ac p bc + p a + p b + p c p abc [0.0.2] Remark: The number of elements in the fiel, p, i not have to be prime, but only prime-power. 2
In more succinct (but possibly less transparent) notation: the number of irreucible polynomials of egree in F p [x] is i 0 ( 1)i i tuples q 1 <...<q i p /q 1...q i where for each i the i-tuples q 1 <... < q i runs over (istinct) primes iviing. Further examples: for = q 2 with q prime: for = q 3 with q prime: for = q 4 with q prime: p q2 p q q 2 p q3 p q2 q 3 p q4 p q3 q 3 [0.0.3] Remark: It may not be entirely obvious that these are non-negative integer values. 3
[0.0.4] Example: Fin the number of irreucible egree 2 polynomials with coefficients in F 2 : The formula above, in the case of prime egree, says that the number of irreucible egree polynomials with coefficients in F p is p p Here p = 2 an = 2, so the number of such is 2 2 2 2 = 1 Inee, by trial an error we know it s x 2 + x + 1. 4
[0.0.5] Example: Number of irreucible egree 3 polynomials with coefficients in F 2 : The formula above, in the case of prime egree, says that the number of irreucible egree polynomials with coefficients in F p is p p Here p = 2 an = 3, so the number is 2 3 2 3 = 2 Inee, by trial an error we know they re x 3 + x + 1 an x 3 + x 2 + 1. 5
[0.0.6] Example: Irreucible egree 4 polynomials with coefficients in F 2 : The formula above, in the case of egree the square of a prime q, says that the number of irreucible egree polynomials with coefficients in F p is p q2 p q q 2 Here p = 2 an = 4, so q = 2, an the number of such is 2 4 2 2 = 3 4 Again, by trial an error, we know they re x 4 + x + 1 x 4 + x 3 + 1 an x 4 + x 3 + x 2 + x + 1 6
[0.0.7] Example: Number of irreucible egree 5 polynomials with coefficients in F 2 : The formula above, in the case of prime egree, says that the number of irreucible egree polynomials with coefficients in F p is p p Here p = 2 an = 5, so the number is 2 5 2 5 = 6 [0.0.8] Example: Irreucible egree 6 polynomials with coefficients in F 2 : The formula says the number of irreucible egree = qr polynomials with coefficients in F p, with istinct primes q, r, is p qr p q p r + p qr Here p = 2, q = 2, r = 3 so the number is 2 6 2 2 2 3 + 2 6 = 9 7
[0.0.9] Example: Fin the number of irreucible egree 2 polynomials with coefficients in F 3 : The formula above, in the case of prime egree, says that the number of irreucible egree polynomials with coefficients in F p is p p Here p = 3 an = 2, so the number of such is 3 2 3 2 = 3 Inee, by trial an error they re x 2 + 1 x 2 + x + 2 x 2 + 2x + 2 8
[0.0.10] Example: Number of irreucible egree 3 polynomials with coefficients in F 3 : The formula above, in the case of prime egree, says that the number of irreucible egree polynomials with coefficients in F p is p p Here p = 3 an = 3, so the number is 3 3 3 3 = 8 [0.0.11] Example: Irreucible egree 4 polynomials with coefficients in F 3 : in the case of egree the square of a prime q, the number of irreucible egree polynomials with coefficients in F p is p q2 p q q 2 Here p = 3 an = 4, so q = 2, an the number is 3 4 3 2 = 18 4 9
[0.0.12] Example: Fin the number of irreucible egree 7 polynomials with coefficients in F 3 : The formula above, in the case of prime egree, says that the number of irreucible egree polynomials with coefficients in F p is p p Here p = 3 an = 7, so the number of such is 3 7 3 7 = 312 [0.0.13] Example: Fin the number of irreucible egree 6 polynomials with coefficients in F 3 : The formula above, in the case of egree = qr with primes q, r, says that the number of irreucible egree polynomials with coefficients in F p is p qr p q p r + p qr 10
Here p = 3 an = qr with q = 2 an r = 3, so the number of such is 3 6 3 3 3 2 + 3 6 = 116 11
Euler s ϕ-function A convenient counting function is Euler s ϕ- function, or totient function ϕ(n) = no. t with 1 t n an gc(t, n) = 1 For example ϕ(2) = no.{1} = 1 ϕ(3) = no.{1, 2} = 2 ϕ(4) = no.{1, 3} = 2 ϕ(5) = no.{1, 2, 3, 4} = 4 ϕ(6) = no.{1, 5} = 2 ϕ(7) = no.{1, 2, 3, 4, 5, 6} = 6 ϕ(8) = no.{1, 3, 5, 7} = 4 [0.0.14] Remark: Do not compute ϕ(n) this way: o not enumerate the set to be counte. 12
[0.0.15] Theorem: Let n = p e 1 1... pe t t be the factorization of n into primes, with p 1 <... < p t an all e i 1. Then ϕ(n) = (p 1 1)p e 1 1 1... (p t 1)p e t 1 t [0.0.16] Examples: ϕ(10) = ϕ(2 5) = (2 1) (5 1) = 4 ϕ(12) = ϕ(2 2 3) = (2 1)2 (3 1) = 4 ϕ(15) = ϕ(3 5) = (3 1) (5 1) = 8 ϕ(30) = ϕ(2 3 5) = (2 1) (3 1) (5 1) = 8 ϕ(100) = ϕ(2 2 5 2 ) = (2 1)2 (5 1)5 = 40 [0.0.17] Remark: This formula fails if we cannot factor n (presumably ue to n being very large an having no small prime factors). 13
Counting primitives [0.0.18] Theorem: Let q be a prime power. Fix a egree. The number of primitive monic egree polynomials in F q [x] is ϕ(q 1) [0.0.19] Remark: It is completely unclear that the given expression is an integer. [0.0.20] Remark: We i not prove it, but it is true that primitive polynomials are necessarily irreucible: primitivity is a stronger conition than irreucibility. [0.0.21] Example: To count primitive monic egree 2 polynomials in F 2 [x], in the theorem = 2 an q = 2, giving no. prim. quaratics = ϕ(22 1) 2 = ϕ(3) (3 1) = = 1 2 2 using also the formula for Euler s ϕ-function. 14
[0.0.22] Example: To count primitive monic egree 3 polynomials in F 2 [x], in the theorem = 3 an q = 2, giving no. prim. cubics = ϕ(23 1) 3 = ϕ(7) (7 1) = = 2 3 3 using also the formula for Euler s ϕ-function (factoring by trial ivision). There are only two irreucible cubics x 3 + x + 1 an x 3 + x 2 + 1 so they are necessarily primitive. [0.0.23] Example: To count primitive monic egree 4 polynomials in F 2 [x], in the theorem = 4 an q = 2, giving no. prim. quartics = ϕ(24 1) 4 = ϕ(15) (3 1)(5 1) = = 2 4 4 using also the formula for Euler s ϕ-function (factoring by trial ivision). Of the 3 irreucible quartics x 4 + x + 1 an x 4 + x 3 + 1 are primitive. 15
[0.0.24] Example: To count primitive monic egree 5 polynomials in F 2 [x], in the theorem = 5 an q = 2, giving no. prim. quintics = ϕ(25 1) 5 = ϕ(31) 5 = (31 1) 5 = 6 using also the formula for Euler s ϕ-function (31 is prime, by trial ivision). There are (2 5 2)/5 = 6 irreucibles, to every irreucible is primitive. Inee, generally, [0.0.25] Corollary: If q 1 is prime, then every irreucible monic egree polynomial in F q [x] is primitive (otherwise, there will be fewer primitives than irreucibles of a given egree). /// 16
[0.0.26] Example: To count primitive monic egree 6 polynomials in F 2 [x], in the theorem = 6 an q = 2, giving no. prim. sextics = ϕ(26 1) 6 = ϕ(63) 6 = (3 1)3 (7 1) 6 = 6 using the formula for Euler s ϕ-function, factoring 63 by trial ivision. [0.0.27] Example: To count primitive monic egree 7 polynomials in F 2 [x], in the theorem = 7 an q = 2, giving no. prim. sextics = ϕ(27 1) 6 = ϕ(127) 7 = (127 1) 7 = 18 using the formula for Euler s ϕ-function (127 is prime by trial ivision). 17
[0.0.28] Example: To count primitive monic egree 2 polynomials in F 3 [x], in the theorem = 2 an q = 3, giving no. prim. sextics = ϕ(32 1) 2 = ϕ(8) 2 = (2 1)23 1 2 = 2 using the formula for Euler s ϕ-function, factoring 8 by trial ivision. Among the 3 irreucible quaratics x 2 + 1, x 2 +x+2, x 2 +2 here, which is the non-primitive one? For P (x) = x 2 + 2, note that x 2 = (x 2 + 2) + 1 = 1 mo P (x) so x has orer just 2 mo P (x), not the maximal possible, namely 3 2 1 = 8. So x 2 + 2 is the non-primitive one. 18
[0.0.29] Example: To count primitive monic egree 3 polynomials in F 3 [x], in the theorem = 3 an q = 3, giving no. prim. cubics = ϕ(33 1) 3 = ϕ(26) 3 = (2 1) (13 1) 3 = 4 using the formula for Euler s ϕ-function (factoring by trial ivision). [0.0.30] Remark: If we believe the formula, then there really are primitive polynomials of all egrees. 19