• Tidak ada hasil yang ditemukan

Weight distribution

Dalam dokumen Discrete Mathematics and Coding Theory (Halaman 84-89)

3.20 Theorem (MacWilliams formula). Let C be a linear q-ary code with distance polynomialWC(X, Y).Then the distance polynomial of the dual code is

1

| C |WC(X+ (q−1)Y, X−Y).

We present a probabilistic proof of Theorem 3.20 by Chang and Wolf [46].

It is motivated by thesymmetric channel without memory. The binary case, the binary symmetric channel, was discussed in Section 1.5.

Probability spaces

As terms like probability and sample space come in naturally in this context, we introduce these basic notions of probability theory.

3.21 Definition. Let Ω be a finite set. For every x∈Ω, let a nonnegative numberp(x)be given such that

X

x∈Ω

p(x) = 1.

We see p as a mapping with domain Ω and real values. Then (Ω, p) is a (finite)probability spaceorsample space, p(x)is the probabilityof x.

Define the probability of a subsetS⊆Ω asp(S) =P

s∈Sp(s).

We have seen special cases of this basic notion in earlier sections. In Sec- tion 1.5 we saw the particularly simple case of a probability space consisting only of 0 and 1, with probabilities p(1) = p and p(0) = 1−p (the proba- bility that the symbol is transmitted correctly). In Section 2.3 we used the probabilities of error patterns (bitstrings) of length n. This turns Fn

2 into a probability space. Each error pattern of weightihas probabilitypi(1−p)n−i. The generalization fromq= 2 to generalqis obvious now: let 06=u∈Fqbe given. There is a fixed (small) probabilityp >0 such that, whenevera∈Fqis sent, the received symbol isa+uwith probabilityp/(q−1).In particular the probability that a symbol is received in error is preciselyp.Interpretx∈Fnq as an error pattern (ifxi= 0,then symbol numberiis transmitted correctly, ifxi6= 0 then a+xi will be received if awas sent). The probability of such a particular error patternxisP(x) = ( p

q−1)wt(x)(1−p)n−wt(x). This turns Fn

q into a probability space. The probability of a subsetS⊆Fn

q is defined as P(S) =P

x∈SP(x).

Back to the weight distribution

In the special caseS=C \ {0}we have that P(S) =P(C)−(1−p)n=

Xn

i=1

Ai(p/(q−1))i(1−p)n−i

is the probability that a codeword is received when a different codeword was sent, in other words, the probability that an undetectable error will happen.

PROOF of Theorem 3.20. We calculateP(C) in two ways: For one thing we certainly have

P(C) = Xn

i=0

Ai(1−p)n−i·( p

q−1)i=WC(1−p, p q−1).

Eventually the dual code and its weight distribution have to come into play.

In order to calculateP(C) in a different way, based on the dual code, compute

at first X

(x,y)

P(x),wherey∈ C, x·y6= 0.

Elements x ∈ C yield no contribution to the sum; each x /∈ C contributes P(x)(qn−k−qn−k−1).The sum is therefore

(1−P(C))qn−k−1(q−1). (3.1)

Now fix a wordy∈ Cof weightw.Its contribution to the sum will depend only onw.We denote it bycw.If we denote byjthe size of the intersection of the supports ofyandx,thencw=Pw

j=1 w

j

(1−p)w−j(p/(q−1))j·f(j),where f(j) is the number of j-tuples with nonzero entries whose sum is nonzero.

Clearly f(1) = q−1, f(j) = (q−1)j−f(j−1). In particularf(2) = (q− 1)2−(q−1) = (q−1)(q−2) andf(3) = (q−1)3−f(2) = q−1q {(q−1)3−1}. By induction,f(j) =q−1q ((q−1)j+ (−1)j−1) (see the exercises). Thus

cw= q−1

q (1−p)w{ Xw

j=1

w j

( p

1−p)j

− Xw

j=1

(−1)j w

j

( p

(1−p)(q−1))j}.

The sums can be evaluated using the binomial formula. We can start sum- mation at j = 0 in both sums, as this generates a summand +1 in each

which cancels by subtraction. It follows thatcw= q−1q (1−p)w{(1−p1 )w−(1−

p

(1−p)(q−1))w},and finally

cw= q−1

q [1−(1− pq q−1)w].

Summing over ally∈ C and comparing with (3.1), we obtain (1−P(C))qn−k−1(q−1) =X

i

Aici= q−1 q

X

i

Ai[1−(1− pq q−1)i].

Cancelling common factors and usingP

iAi=|C|=qn−k, this yields P(C) = 1

qn−k X

i

Ai(1− pq

q−1)i= 1

|C|·WC(1,1− pq q−1).

We have seen that

WC(1−p, p

q−1) = 1

|C|·WC(1,1− pq q−1).

PuttingX = 1−p, Y = q−1p ,we get the desired formula, whereCand its dual have changed places.

So the weight numbersAiof the dual code arise from a certain substitution applied to the weight numbers Ai of the original code. In fact, expand the right hand side of the MacWilliams identity:

(X+ (q−1)Y)n−i(X−Y)i= Xn

k=0

Kk(i)Xn−kYk. Here the coefficientsKk(i) can be written as follows:

Kk(i) =

Min(k,i)

X

j=0

(−1)j i

j

n−i k−j

(q−1)k−j. We have seen that the weight numbers Ak of the dual code satisfy

Ak= 1

| C | Xn

i=0

AiKk(i).

We interpret the numbersKk(i) as values of a polynomial of degreek.These are theKravchouk polynomials:

3.22 Definition (Kravchouk polynomials). Given integers n and q, define the Kravchouk polynomial of degreek≤n as

Kk(X) = Xk

j=0

(−1)j X

j

n−X k−j

(q−1)k−j.

1. Thedistance distribution of a code records which distances occur between codewords and how often.

It carries more information than the number of codewords and the minimum distance.

2. Theweightof a vector is its number of nonzero coordinates.

3. The distance distribution of a linear code agrees with its weight distribution.

4. Theweight polynomialof a linear code of lengthnis a homo- geneous polynomial of degreenin two variables, with the weight numbers as coefficients.

5. TheMacWilliams formulashows how to calculate the weight distribution (weight polynomial) ofC out of the weight distri- bution ofC.

Exercises 3.5

3.5.1. Determine the weight polynomial of the repetition code [n,1, n]q and of the sum-0 code [n, n−1,2]q.

3.5.2. Let D be a binary linear code with weight distribution(Bi)andC the code obtained by adding a parity check bit.

Express the weight distribution ofC in terms of (Bi).

3.5.3. The Simplex code [7,3,4]2 is a constant weight code. Its weight dis- tribution is A0 = 1, A4 = 7. Use the MacWilliams formula to compute the weight distribution of its dual, the binary Hamming code [7,4,3], and of the extended Hamming code, the [8,4,4]code obtained by adding a parity check bit.

3.5.4. Show that each self-dual (equal to its dual) [8,4,4]2 code has the same weight distribution as the extended Hamming codeA0=A8= 1, A4= 14.

3.5.5. Show that the extended Hamming code is the only self-dual [8,4,4]2 code.

3.5.6. The weight polynomial in one variable is defined as PC(Y) =WC(1, Y) =X

i

AiYi.

Find the MacWilliams formula for the one variable weight polynomial.

3.5.7. Let [n, k, d]q be the parameters of a perfect linear code.

Determine the numberAd of minimum weight codewords.

3.5.8. Show that the weight distribution of a perfect[n, k, d]q code is uniquely determined by n, k, d, q.

3.5.9. Let f(j) be the number of j-tuples with nonzero entries in Fq with nonzero sum. Prove that f(j) =q−1q ((q−1)j+ (−1)j−1).

Dalam dokumen Discrete Mathematics and Coding Theory (Halaman 84-89)