coding theory - tu/eruudp/courses/2mmc30/week5-1.coding-theory.pdf · /k coding theory ruud...
TRANSCRIPT
2/26
/k
Introduction
Apart from the minimum Hamming weighta code has other important invariants
We introduce the weight enumerator andthe extended weight enumerator of a code
3/26
/k
Content lecture 5
1. Weight enumerator• Weight enumerator• Average weight enumerator
2. Error probability• Probability of undetected error• Probability of decoding error
3. Weight enumerator• Arrangement of hyperplanes• Weight enumerator of MDS codes
4/26
/k
Weight enumerator
Let C be a code of length nThe weight spectrum, also called the weight distributionis the following set
{(w,Aw) | w = 0, 1, . . . , n}
where Aw denotes the number of codewords in C of weight wThe weight enumerator of C is defined as the polynomial
WC (Z ) =
n∑w=0
AwZw
The homogeneous weight enumerator of C is defined as
WC (X , Y ) =
n∑w=0
AwX n−wYw
5/26
/k
REMARK - 1
WC (Z ) and WC (X , Y ) determine each other uniquely:
WC (Z ) = WC (1, Z )
andWC (X , Y ) = X nWC (X−1Y )
Given the weight enumerator or the homogeneous weight enumeratorthe weight spectrum is determined completely by the coefficients
6/26
/k
REMARK - 2
Clearly, the weight enumerator and homogeneous weight enumeratorcan be written in another form, that is
WC (Z ) =∑c∈C
Zwt(c)
andWC (X , Y ) =
∑c∈C
X n−wt(c)Ywt(c)
7/26
/k
REMARK - 3
Let C be a linear codeThen A0 = 1
The minimum distance d (C ) which is equal to the minimum weightis determined by the weight enumerator as follows:
d (C ) = min{ i | Ai 6= 0, i > 0 }
It also determines the dimension k (C ), since
WC (1, 1) =
n∑w=0
Aw = qk (C )
8/26
/k
Trivial codes
The zero code has one codeword, and its weight is zeroHence the homogeneous weight enumerator of this code is
W{0}(X , Y ) = X n
The number of words of weight w in the trivial code Fnq is
Aw =
(nw
)(q − 1)w
So
WFnq (X , Y ) =
n∑w=0
(nw
)(q − 1)wX n−wYw
= (X + (q − 1)Y )n
9/26
/k
Repetition code
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 codeHence it has homogeneous weight enumerator
WC⊥(X , Y ) =
bn/2c∑t=0
(n2t
)X n−2tY2t
=12
((X + Y )n + (X − Y )n
)
10/26
/k
[7, 4, 3] Hamming code
The nonzero entries of the weight distribution of the [7,4,3] binaryHamming code are given by
A0 = 1, A3 = 7, A4 = 7, A7 = 1
as is seen by inspecting the weights of all 16 codewordsHence its homogeneous weight enumerator is
X7+ 7X4Y3
+ 7X3Y4+ Y7
11/26
/k
Simplex code
The simplex code Sr(q) is a constant weight code with parameters
[(q r− 1)/(q − 1), r, q r−1
]
Hence its homogeneous weight enumerator is
WSr (q)(X , Y ) = X n+ (q r
− 1)X n−q r−1Yq r−1
12/26
/k
Recurrence relation for Hamming code
The Hamming code over Fq of length n = (q r− 1)/(q − 1)
has parameters[n, n − r, 3]
and is perfect with covering radius 1
The following recurrence relation holds(nw
)(q−1)w = Aw−1(n−w+1)(q−1)+Aw(1+w(q−2))+Aw+1(w+1)
13/26
/k
PROOF
Every word y of weight w is at distance at most 1 to a unique codeword cand such a codeword has possible weights w − 1, w or w + 1
If wt(c) = w − 1 then there are n − w + 1 possible positions jin the complement of the support of c where cj = 0 could be changedinto a nonzero element in order to get the word y of weight w
If wt(c) = w then either y = cor there are w possible positions j in the support of cwhere cj could be changed into another nonzero element to get y
If wt(c) = w + 1, then there are w + 1 possible positions jin the support of c where cj could be changed into zero to get y
14/26
/k
The recurrence relation implies that W (Z ) =∑
w AwZw
satisfies the ordinary first order differential equation:
((q−1)Z2−(q−2)Z−1)W ′(Z )−(1+(q−1)nZ )W (Z )+(1+(q−1)Z )n = 0
The corresponding homogeneous differential equation is separableAs a result
W (Z ) =1q r
(1+ (q − 1)Z )n +q r− 1q r
(Z − 1)qr−1
((q − 1)Z + 1)n−qr−1
15/26
/k
REMARK
The computation of the weight enumerator of a given code ismost of the time hard
For the perfect codes such as the Hamming codes andthe binary and ternary Golay codes this is left as exercises to the readerand can be done using recurrence relations between the Aw
The weight distribution of MDS codes will be treatedThe weight enumerator of only a few infinite families of codes is known
On the other hand the average weight enumerator of a class of codesis very often easy to determine
16/26
/k
Average weight enumerator
Let C be a nonempty class of codes over Fq of the same lengthThe average weight enumerator of C is defined asthe average of all WC with C ∈ C
WC(Z ) =1|C|
∑C∈C
WC (Z )
and similarly for thehomogeneous average weight enumerator WC(X , Y ) of this class
17/26
/k
Balanced collection of codes
A class C of [n, k ] codes over Fq is called balancedif there is a number N (C) such that
N (C) = |{ C ∈ C | y ∈ C }|
for every nonzero word y in Fnq
The prime example of a class of balanced codesis the set C[n, k ]q of all [n, k ] codes over Fq
19/26
/k
PROOF
Compute in two ways the number of elements of the set of pairs
{ (y,C ) | y 6= 0, y ∈ C ∈ C }
First by keeping a nonzero y in Fnq fixed
and letting C vary in C such that y ∈ CThis gives the number (qn
− 1)N (C), since C is balanced
Secondly by keeping C in C fixedand letting the nonzero y in C varyThis gives the number |C|(qk
− 1)
20/26
/k
PROPOSITION
Let f be a function on Fnq with values in a complex vector space
Let C be a balanced class of [n, k ] codes over Fq
Then1|C|
∑C∈C
∑c∈C∗
f (c) =qk− 1
qn − 1
∑v∈(Fnq )∗
f (v)
where C ∗ denotes the set of all nonzero elements of C
21/26
/k
PROOF
By interchanging the order of summation we get∑C∈C
∑v∈C∗
f (v) =∑
v∈(Fnq )∗
f (v)∑
v∈C∈C
1
The last summand is constant and equals N (C), by assumptionNow the result follows by the computation of N (C) in the Lemma
22/26
/k
COROLLARY
Let C be a balanced class of [n, k ] codes over Fq
Then
WC(Z ) = 1+qk− 1
qn − 1
n∑w=1
(nw
)(q − 1)wZw
PROOFApply the Proposition to the function f (v) = Zwt(v)
23/26
/k
MacWilliams identity
Although there is no apparent relation between theminimum distances of a code and its dualthe weight enumerators satisfy the MacWilliams identity
Let C be an [n, k ] code over Fq
ThenWC⊥(X , Y ) = q−kWC (X + (q − 1)Y , X − Y )
24/26
/k
Trivial codes
The zero code C has homogeneous weight enumerator
X n
and its dual Fnq has homogeneous weight enumerator
(X + (q − 1)Y )n
which is indeed equal to
q0WC (X + (q − 1)Y , X − Y )
and confirms MacWilliams identity
25/26
/k
Repetition code and its dual - 1
The n-fold repetition code C has homogeneous weight enumerator
X n+ (q − 1)Y n
If q = 2 the homogeneous weight enumerator of its dual code is
12
((X + Y )n + (X − Y )n
)which is equal to
2−1WC (X + Y , X − Y )
confirming the MacWilliams identity for q = 2