/k
Arrangements, matroids and codes
first lecture Ruud Pellikaan joint work with Relinde Jurrius ACAGM summer school Leuven Belgium, 18 July 2011
/k References 2/43 1. Codes, arrangements and matroids by Relinde - - PowerPoint PPT Presentation
Arrangements, matroids and codes first lecture Ruud Pellikaan joint work with Relinde Jurrius ACAGM summer school Leuven Belgium, 18 July 2011 /k References 2/43 1. Codes, arrangements and matroids by Relinde Jurrius and Ruud Pellikaan,
first lecture Ruud Pellikaan joint work with Relinde Jurrius ACAGM summer school Leuven Belgium, 18 July 2011
2/43
by Relinde Jurrius and Ruud Pellikaan, in Series on Coding Theory and Cryptology vol. 8 Algebraic geometry modelling in information theory
http://www.win.tue.nl/∼ruudp/paper/57.pdf
by R. Pellikaan, X.-W. Wu and S. Bulygin Book in preparation, February 2011 To be published by Cambridge University Press http://www.win.tue.nl/∼ruudp/courses/2WC11/2WC11-book.pdf
3/43
✫✪ ✬✩ ✫✪ ✬✩ ✫✪ ✬✩
M C A
◮ C = error-correcting codes
(extended) weight enumerator polynomial WC(X, Y), WC(X, Y, T)
◮ M = matroids
generalization of linear algebra and graph theory (di)chromatic polynomial and Tutte polynomial tM(X, Y)
◮ A = arrangements of hyperplanes
topology, combinatorics characteristic polynomial χ(T), coboundary polynomial χ(S, T)
4/43
Weight enumerator
Arrangements and projective systems
Graph theory and colorings
Tutte-Whitney polynomial
Characteristic polynomial
5/43
Shannon, Hamming distance
Generator and parity check matrix, inner product and dual code Hamming and simplex codes
Vandermonde matrices and generalized Reed-Solomon codes
MacWilliams identity and examples
6/43
7/43
source encoding sender noise receiver decoding target
✲
message
✲
001...
✲
011...
✲
message
✻
Shannon’s block diagram of a communication system
8/43
4 message bits: (m1, m2, m3, m4) 3 redundant bits: (r1, r2, r3) Rule: number of ones in every circle is even
✫✪ ✬✩ ✫✪ ✬✩ ✫✪ ✬✩
r1 r2 r3 m4 m3 m2 m1
Venn diagram of the Hamming code
9/43
The message words have a fixed length of k symbols the encoded words have a fixed length of n symbols both from the same alphabet Q Add redundant symbols to the message in a clever way An error-correcting code C of length n over Q is a non-empty subset of Q n The elements of C are called codewords If C contains M codewords, then M is called the size n − logq(M) is called the redundancy R = logq(M)/n is the information rate
9/43
The message words have a fixed length of k symbols the encoded words have a fixed length of n symbols both from the same alphabet Q Add redundant symbols to the message in a clever way An error-correcting code C of length n over Q is a non-empty subset of Q n The elements of C are called codewords If C contains M codewords, then M is called the size n − logq(M) is called the redundancy R = logq(M)/n is the information rate
9/43
The message words have a fixed length of k symbols the encoded words have a fixed length of n symbols both from the same alphabet Q Add redundant symbols to the message in a clever way An error-correcting code C of length n over Q is a non-empty subset of Q n The elements of C are called codewords If C contains M codewords, then M is called the size n − logq(M) is called the redundancy R = logq(M)/n is the information rate
10/43
The Hamming distance d(x, y) on Q n is defined by d(x, y) = |{i : xi = yi}| It is a metric:
x
d(x,y)
❍❍❍❍❍ ❍ ❥
y
❍ ❍ ❍ ❍ ❍ ❍ ❨
d(y,z)
✘✘✘✘✘✘✘✘✘✘✘ ✘ ✿ z ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✾
d(x,z)
10/43
The Hamming distance d(x, y) on Q n is defined by d(x, y) = |{i : xi = yi}| It is a metric:
x
d(x,y)
❍❍❍❍❍ ❍ ❥
y
❍ ❍ ❍ ❍ ❍ ❍ ❨
d(y,z)
✘✘✘✘✘✘✘✘✘✘✘ ✘ ✿ z ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✘ ✾
d(x,z)
11/43
The minimum (Hamming) distance of a code C is defined as d = d(C) = min{d(x, y) : x, y ∈ C, x = y} The main problem of error-correcting codes from Hamming’s point of view is: to construct for a given length and number of codewords a code with the largest possible minimum distance and to find efficient encoding and decoding algorithms
11/43
The minimum (Hamming) distance of a code C is defined as d = d(C) = min{d(x, y) : x, y ∈ C, x = y} The main problem of error-correcting codes from Hamming’s point of view is: to construct for a given length and number of codewords a code with the largest possible minimum distance and to find efficient encoding and decoding algorithms
12/43
The triple repetition binary code has length 3 and 2 codewords its information rate is 1/3 its minimum distance is 3. The binary Hamming code has length 7 and 24 codewords therefore its rate is 4/7 its minimum distance is 3
13/43
14/43
If the alphabet Q is the finite field Fq with q elements then Q n is a vector space Therefore it is natural to look at codes in Q n that are linear subspaces A linear code C is a linear subspace of Fn
q
Its dimension is denoted by k = k(C) and its minimum distance by d = d(C) Then [n, k, d]q or [n, k, d] denote the parameters of the code Size: M = qk Information rate: R = k/n Redundancy: n − k
15/43
The support of x in Fn
q is defined by
supp(x) = {j : xj = 0} The weight of x is defined by wt(x) = |supp(x)| that is the number of nonzero entries of x Let C be an Fq-linear code, then d(C) = min{wt(c) : 0 = c ∈ C}
15/43
The support of x in Fn
q is defined by
supp(x) = {j : xj = 0} The weight of x is defined by wt(x) = |supp(x)| that is the number of nonzero entries of x Let C be an Fq-linear code, then d(C) = min{wt(c) : 0 = c ∈ C}
16/43
C an Fq-linear code of dimension k A k × n matrix G with entries in Fq is called generator matrix of C if C = { xG | x ∈ Fk
q }
A (n − k) × n matrix H with entries in Fq is called a parity check matrix of C if C = { c ∈ Fn
q | cH T = 0 }
16/43
C an Fq-linear code of dimension k A k × n matrix G with entries in Fq is called generator matrix of C if C = { xG | x ∈ Fk
q }
A (n − k) × n matrix H with entries in Fq is called a parity check matrix of C if C = { c ∈ Fn
q | cH T = 0 }
17/43
The binary Hamming code with parameters [7, 4, 3] has generator matrix G: G = 1 1 1 1 1 1 1 1 1 1 1 1 1 and parity check matrix H: H = 1 1 1 1 1 1 1 1 1 1 1 1
17/43
The binary Hamming code with parameters [7, 4, 3] has generator matrix G: G = 1 1 1 1 1 1 1 1 1 1 1 1 1 and parity check matrix H: H = 1 1 1 1 1 1 1 1 1 1 1 1
18/43
Suppose C is a [n, k] code Let Ik be the k × k identity matrix Let P be a k × (n − k) matrix Then (Ik|P) is a generator matrix of C if and only if (−P T|In−k) is a parity check matrix of C
18/43
Suppose C is a [n, k] code Let Ik be the k × k identity matrix Let P be a k × (n − k) matrix Then (Ik|P) is a generator matrix of C if and only if (−P T|In−k) is a parity check matrix of C
19/43
The inner product on Fn
q is defined by
x · y = x1y1 + · · · + xnyn This inner product is bilinear, symmetric and nondegenerate but the notion of positive definite makes no sense over a finite field For an [n, k] code C we define the dual or orthogonal code C ⊥ as C ⊥ = {x ∈ Fn
q : c · x = 0 for all c ∈ C}.
19/43
The inner product on Fn
q is defined by
x · y = x1y1 + · · · + xnyn This inner product is bilinear, symmetric and nondegenerate but the notion of positive definite makes no sense over a finite field For an [n, k] code C we define the dual or orthogonal code C ⊥ as C ⊥ = {x ∈ Fn
q : c · x = 0 for all c ∈ C}.
20/43
Proposition If C has length n, then dim(C) + dim(C ⊥) = n Furthermore G is a generator matrix of C if and only if G is a parity check matrix of C ⊥ H is a parity check matrix of C if and only if H is a generator matrix of C ⊥
20/43
Proposition If C has length n, then dim(C) + dim(C ⊥) = n Furthermore G is a generator matrix of C if and only if G is a parity check matrix of C ⊥ H is a parity check matrix of C if and only if H is a generator matrix of C ⊥
21/43
Proposition Let H be a parity check matrix of a code C Then the minimum distance d of C is the smallest integer d such that d columns of H are linearly dependent Proof H parity check matrix with entries hi,j c a codeword of weight d with nonzero entries cji HcT = 0 · · · cj1 · · · cjd · · · · · · h1,j1 · · · h1,jd · · · · · · . . . · · · . . . · · · · · · h(n−k),j1 · · · h(n−k),jd · · ·
21/43
Proposition Let H be a parity check matrix of a code C Then the minimum distance d of C is the smallest integer d such that d columns of H are linearly dependent Proof H parity check matrix with entries hi,j c a codeword of weight d with nonzero entries cji HcT = 0 · · · cj1 · · · cjd · · · · · · h1,j1 · · · h1,jd · · · · · · . . . · · · . . . · · · · · · h(n−k),j1 · · · h(n−k),jd · · ·
22/43
Let G be a generator matrix of C C is called nondegenerate if for every position j there is codeword c such that cj = 0 The following statements are equivalent:
22/43
Let G be a generator matrix of C C is called nondegenerate if for every position j there is codeword c such that cj = 0 The following statements are equivalent:
23/43
Let n = (qr − 1)/(q − 1) Let Hr(q) be a r × n matrix over Fq such that no two columns are dependent The code Hr(q) with Hr(q) as parity check matrix is called a q-ary Hamming code The code with Hr(q) as generator matrix is called a q-ary simplex code and is denoted by Sr(q) Sr(q) and Hr(q) are dual codes
23/43
Let n = (qr − 1)/(q − 1) Let Hr(q) be a r × n matrix over Fq such that no two columns are dependent The code Hr(q) with Hr(q) as parity check matrix is called a q-ary Hamming code The code with Hr(q) as generator matrix is called a q-ary simplex code and is denoted by Sr(q) Sr(q) and Hr(q) are dual codes
24/43
Let r ≥ 2 The q-ary Hamming code Hr(q) has parameters [(qr − 1)/(q − 1), (qr − 1)/(q − 1) − r, 3] The q-ary simplex code Sr(q) is a constant weight code with parameters [(qr − 1)/(q − 1), r, qr−1]
24/43
Let r ≥ 2 The q-ary Hamming code Hr(q) has parameters [(qr − 1)/(q − 1), (qr − 1)/(q − 1) − r, 3] The q-ary simplex code Sr(q) is a constant weight code with parameters [(qr − 1)/(q − 1), r, qr−1]
25/43
Consider the ternary Hamming code S3(3)
H3(3) = 1 1 1 1 1 1 1 1 1 2 2 2 1 1 1 1 1 1 2 1 2 1 2 1 2 1 1 . The code H3(3) has parameters [13, 10, 3] The code S3(3) has parameters [13, 3, 9] All rows of H3(3) have weight 9 In fact all nonzero codewords have weight 9
25/43
Consider the ternary Hamming code S3(3)
H3(3) = 1 1 1 1 1 1 1 1 1 2 2 2 1 1 1 1 1 1 2 1 2 1 2 1 2 1 1 . The code H3(3) has parameters [13, 10, 3] The code S3(3) has parameters [13, 3, 9] All rows of H3(3) have weight 9 In fact all nonzero codewords have weight 9
26/43
27/43
Theorem If C is an [n, k, d] code, then d ≤ n − k + 1 Proof Let H be a parity check matrix of C This is an (n − k) × n matrix There exist n − k + 1 dependent columns in fact every (n − k + 1)-tuple of columns is dependent Now d(C) is the smallest integer d such that H has d linearly dependent columns So d ≤ n − k + 1
27/43
Theorem If C is an [n, k, d] code, then d ≤ n − k + 1 Proof Let H be a parity check matrix of C This is an (n − k) × n matrix There exist n − k + 1 dependent columns in fact every (n − k + 1)-tuple of columns is dependent Now d(C) is the smallest integer d such that H has d linearly dependent columns So d ≤ n − k + 1
28/43
Definition Let C be a [n, k, n − k + 1] code Then C is called a maximum distance separable (MDS) code From the Singleton bound, an MDS code achieves the maximum possible value for the minimum distance given its length and dimension Examples The minimum distance of the zero code of length n is n + 1, by definition Hence the zero code has parameters [n, 0, n + 1] and is MDS Its dual is the whole space Fn
q with parameters [n, n, 1] and is also MDS
The n-fold repetition code has parameters [n, 1, n] and its dual is an [n, n − 1, 2] code and both are MDS
28/43
Definition Let C be a [n, k, n − k + 1] code Then C is called a maximum distance separable (MDS) code From the Singleton bound, an MDS code achieves the maximum possible value for the minimum distance given its length and dimension Examples The minimum distance of the zero code of length n is n + 1, by definition Hence the zero code has parameters [n, 0, n + 1] and is MDS Its dual is the whole space Fn
q with parameters [n, n, 1] and is also MDS
The n-fold repetition code has parameters [n, 1, n] and its dual is an [n, n − 1, 2] code and both are MDS
28/43
Definition Let C be a [n, k, n − k + 1] code Then C is called a maximum distance separable (MDS) code From the Singleton bound, an MDS code achieves the maximum possible value for the minimum distance given its length and dimension Examples The minimum distance of the zero code of length n is n + 1, by definition Hence the zero code has parameters [n, 0, n + 1] and is MDS Its dual is the whole space Fn
q with parameters [n, n, 1] and is also MDS
The n-fold repetition code has parameters [n, 1, n] and its dual is an [n, n − 1, 2] code and both are MDS
29/43
Proposition Let C be an [n, k, d] code over Fq Then the following statements are equivalent:
independent,
independent. Corollary The dual of an MDS code is again MDS
29/43
Proposition Let C be an [n, k, d] code over Fq Then the following statements are equivalent:
independent,
independent. Corollary The dual of an MDS code is again MDS
30/43
Proposition Let n ≤ q Let a = (a1, . . . , an) be an n-tuple of mutually distinct elements of Fq Let k be an integer such that 0 ≤ k ≤ n Define the matrix Gk(a) by Gk(a) = 1 · · · 1 a1 · · · an . . . ... . . . ak−1
1
· · · ak−1
n
The code with generator matrix Gk(a) is MDS Proof All k × k submatrices are Vandermonde matrices and their determinants are not zero
30/43
Proposition Let n ≤ q Let a = (a1, . . . , an) be an n-tuple of mutually distinct elements of Fq Let k be an integer such that 0 ≤ k ≤ n Define the matrix Gk(a) by Gk(a) = 1 · · · 1 a1 · · · an . . . ... . . . ak−1
1
· · · ak−1
n
The code with generator matrix Gk(a) is MDS Proof All k × k submatrices are Vandermonde matrices and their determinants are not zero
31/43
f(X) = f0 + f1X + · · · + fiX i + · · · + fk−1X k−1 ∈ Fq[X] a1 · · · an f0 1 · · · 1 1 f1 a1 · · · an X . . . . . . ... . . . . . . fi ai
1
· · · ai
n
X i . . . . . . ... . . . . . . fk−1 ak−1
1
· · · ak−1
n
X k−1 f(a1) · · · f(an) f(X) The linear combination of the rows of Gk(a) is equal to the evaluation of f(X) at a1, . . . , an
31/43
f(X) = f0 + f1X + · · · + fiX i + · · · + fk−1X k−1 ∈ Fq[X] a1 · · · an f0 1 · · · 1 1 f1 a1 · · · an X . . . . . . ... . . . . . . fi ai
1
· · · ai
n
X i . . . . . . ... . . . . . . fk−1 ak−1
1
· · · ak−1
n
X k−1 f(a1) · · · f(an) f(X) The linear combination of the rows of Gk(a) is equal to the evaluation of f(X) at a1, . . . , an
32/43
a = (a1, . . . , an) an n-tuple of mutually distinct elements of Fq b = (b1, . . . , bn) an n-tuple of nonzero elements of Fq GRSk(a, b) = { (f(a1)b1, . . . , f(an)bn) | f(X) ∈ Fq[X], deg(f(X)) < k } Generator matrix: Gk(a, b) = b1 · · · bj · · · bn a1b1 · · · ajbj · · · anbn . . . · · · . . . · · · . . . ak−1
1
b1 · · · ak−1
j
bj · · · ak−1
n
bn MDS code with parameters: [n, k, n − k + 1] if k ≤ n
32/43
a = (a1, . . . , an) an n-tuple of mutually distinct elements of Fq b = (b1, . . . , bn) an n-tuple of nonzero elements of Fq GRSk(a, b) = { (f(a1)b1, . . . , f(an)bn) | f(X) ∈ Fq[X], deg(f(X)) < k } Generator matrix: Gk(a, b) = b1 · · · bj · · · bn a1b1 · · · ajbj · · · anbn . . . · · · . . . · · · . . . ak−1
1
b1 · · · ak−1
j
bj · · · ak−1
n
bn MDS code with parameters: [n, k, n − k + 1] if k ≤ n
33/43
34/43
Let C be a code of length n The weight spectrum or weight distribution is the set {(w, Aw) : w = 0, 1, . . . , n} where Aw denotes the number of codewords in C of weight w The weight enumerator is the polynomial: WC(Z) =
n
AwZ w. The homogeneous weight enumerator is: WC(X, Y) =
n
AwX n−wY w.
34/43
Let C be a code of length n The weight spectrum or weight distribution is the set {(w, Aw) : w = 0, 1, . . . , n} where Aw denotes the number of codewords in C of weight w The weight enumerator is the polynomial: WC(Z) =
n
AwZ w. The homogeneous weight enumerator is: WC(X, Y) =
n
AwX n−wY w.
35/43
The zero code has one codeword and its weight is zero Hence W{0}(X, Y) = X n The number of words of weight w in the trivial code Fn
q is
Aw = n w
So WFn
q(X, Y) =
n
n w
35/43
The zero code has one codeword and its weight is zero Hence W{0}(X, Y) = X n The number of words of weight w in the trivial code Fn
q is
Aw = n w
So WFn
q(X, Y) =
n
n w
36/43
The n-fold repetition code C has homogeneous weight enumerator WC(X, Y) = X n + (q − 1)Y n In the binary case its dual is the even weight code Hence it has homogeneous weight enumerator: WC⊥(X, Y) =
⌊n/2⌋
n 2t
2
36/43
The n-fold repetition code C has homogeneous weight enumerator WC(X, Y) = X n + (q − 1)Y n In the binary case its dual is the even weight code Hence it has homogeneous weight enumerator: WC⊥(X, Y) =
⌊n/2⌋
n 2t
2
37/43
The nonzero entries of the weight distribution are A0 = 1, A3 = 7, A4 = 7, A7 = 1 by inspection of all the 16 codewords Hence its homogeneous weight enumerator is X 7 + 7X 4Y 3 + 7X 3Y 4 + Y 7
37/43
The nonzero entries of the weight distribution are A0 = 1, A3 = 7, A4 = 7, A7 = 1 by inspection of all the 16 codewords Hence its homogeneous weight enumerator is X 7 + 7X 4Y 3 + 7X 3Y 4 + Y 7
38/43
This is a constant weight code with parameters [(qr − 1)/(q − 1), r, qr−1] Hence its homogeneous weight enumerator is WSr(q)(X, Y) = X n + (qr − 1)X n−qr−1Y qr−1
38/43
This is a constant weight code with parameters [(qr − 1)/(q − 1), r, qr−1] Hence its homogeneous weight enumerator is WSr(q)(X, Y) = X n + (qr − 1)X n−qr−1Y qr−1
39/43
Theorem Let C be a [n, k] code over Fq Then WC⊥(X, Y) = q−kWC(X + (q − 1)Y, X − Y) Proof Several proofs are known One will be given at the end by means of the Tutte polynomial
39/43
Theorem Let C be a [n, k] code over Fq Then WC⊥(X, Y) = q−kWC(X + (q − 1)Y, X − Y) Proof Several proofs are known One will be given at the end by means of the Tutte polynomial
40/43
The n-fold repetition code C has homogeneous weight enumerator WC(X, Y) = X n + (q − 1)Y n Using MacWilliams identity gives the homogeneous weight enumerator of its dual: WC⊥(X, Y) = q−1WC(X + (q − 1)Y, X − Y) = q−1((X + (q − 1)Y)n + (q − 1)(X − Y)n) =
n
n w (q − 1)w + (q − 1)(−1)w q X n−wY w
40/43
The n-fold repetition code C has homogeneous weight enumerator WC(X, Y) = X n + (q − 1)Y n Using MacWilliams identity gives the homogeneous weight enumerator of its dual: WC⊥(X, Y) = q−1WC(X + (q − 1)Y, X − Y) = q−1((X + (q − 1)Y)n + (q − 1)(X − Y)n) =
n
n w (q − 1)w + (q − 1)(−1)w q X n−wY w
41/43
42/43
and its dual the [7, 3, 4] simplex code.
code and its dual the Simplex S3(3) code. Show that MacWilliams identity holds.
repetition code directly, without using MacWilliams identity. Compare this result as given in the lecture.
Show that its weight enumerator is equal (X 2 + (q − 1)Y 2)k. Show that the code is self dual if and only if q is even. Verify that this code is formally self-dual, that is the code and its dual have the same weight enumerator.
43/43
G = 1 1 1 1 1 1 1 1 1 1 1 1 Determine the finite fields Fq such that the code C contains a word