Problem Set 3 Solutions for ECE 556/CS 577/MATH 579 at UIUC, Fall 2005, Assignments of Electrical and Electronics Engineering

The solutions to problem set 3 for the joint graduate course ece 556/cs 577/math 579 offered at the university of illinois during the fall 2005 semester. The problem set covers topics related to error correction codes, including the properties of codewords, decoding algorithms, and error probabilities.

Typology: Assignments

Pre 2010

Uploaded on 02/24/2010

koofers-user-rlz
koofers-user-rlz 🇺🇸

5

(1)

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
University of Illinois Fall 2005
ECE 556/CS 577/MATH 579: Solutions to Problem Set 3
1. (a)A(1) = A0+A1+· · · +An= 2k, the total number of codewords.
(b)A(1) = A0A1+A2 · · · + (1)nAnis the difference between the number of codewords of even
weight and the number of codewords of odd weight. This is either 2kor 0 depending on whether
the code has vectors of even weight only, or of both odd and even weights.
(c)A0(1) = 0 ·A0+ 1 ·A1+·· · +n·Anis the total number of 1s in all the codewords. This sum is
2k1nsince each coordinate has equal numbers of 1s and 0s.
2. Let µ1s and ν0s be erased where µ+ν2tby assumption. Note that this implies that min{µ, ν} t.
Then R0has µerrors in it and R1has νerrors in it.
(a) Since at least one of R0and R1has at most terrors in it, both decodings cannot end in deco ding
failure.
(b) A decoding failure might occur when the number of errors is greater than t. But, when max{µ, ν}>
tand one decoder fails, the other decoding is guaranteed to produce the correct codeword because
it is correcting min{µ, ν}< t errors.
(c) When max{µ, ν }> t, a successful decoding (resulting in the wrong codeword) is also a possibility.
This decoding will have corrected 2t+ 1 max{µ, ν}>min{µ, ν}errors. The other decoding will
correct min{µ, ν}errors and produce the correct codeword. Thus, we can decide on which of the
two codewords produced is the correct one by checking the number of errors corrected in each
decoding.
If max{µ, ν}< t, both decodings produce the same (correct) codeword.
3. (a) There are k(nk) entries in Pwhich can be chosen to be 0 or 1. Hence, there are 2k(nk)choices
of P. Now, consider all the codes with minimum weight at least 3. A row of Ghas weight 1 or 2
if the corresponding row of Phas weight 0 or 1. Thus, codes of minimum weight 3 cannot have
rows in Pof weight 0 or 1. Now, the sum of irows of Ghas weight at least i. Thus, if Phad two
identical rows, there would be a codeword of weight 2. Hence, a code has minimum distance at
least 3 if the rows of Pare distinct and have minimum weight at least 2. There are N= (nk) +1
binary vectors of length nkof weight less than 2. Thus, we have 2nkNchoices for the first
row of P, 2nkN1 choices for the second, . . . , 2nkN(k1) = 2nknchoices for the
k-th row of P. Hence there are
k1
Y
i=0 2nkn+i2nknk
codes of minimum weight at least 3.
(b) The maximum weight of any row of Gis nk+1 (when the row of Pis 111. . .1). Such a row is a
codeword of weight nk+1, and thus, the minimum weight cannot be any larger than nk+ 1
. . ., in fact, the minimum weight is usually much smaller (for a binary code; Reed-Solomon codes,
which we shall study later, do satisfy the bound with equality).
(c)H= [PT|I] where Iis a (nk)×(nk) identity matrix. We write x= [y,z] where yis the
first kbits in xand zthe last nkbits. Then, HxT=PTyT+zT. Now, if y=0and z6=0,
then HxT=zT6=0and hence xcannot belong to any of the codes in the ensemble. So suppose
that y6=0. The i-th bit in HxTis pi1x1+pi2x2+· · · pikxk+xk+iwhere the pij ’s are entries in
the i-th row of P. Now, remember that xis a fixed vector. We think of this i-th bit in HxTas
a nonzero linear function of the pij’s which change from code to code. This function has value 0
for 2k1choices of the pij’s and value 1 for the other 2k1choices. Since there are nkrows of
Pand we have 2k1choices for each row that force the corresponding syndrome bit to be 0, we
conclude that 2(k1)(nk)of the 2k(nk)codes in the ensemble contain x.
(d) Each nonzero vector of weight i < d can belong to 2(k1)(nk)different codes in the ensemble (it
might not belong to any code too). Hence, the total number of codes that contain a nonzero vector
pf2

Partial preview of the text

Download Problem Set 3 Solutions for ECE 556/CS 577/MATH 579 at UIUC, Fall 2005 and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

University of Illinois Fall 2005

ECE 556/CS 577/MATH 579: Solutions to Problem Set 3

  1. (a) A(1) = A 0 + A 1 + · · · + An = 2k, the total number of codewords. (b) A(1) = A 0 − A 1 + A 2 − · · · + (−1)nAn is the difference between the number of codewords of even weight and the number of codewords of odd weight. This is either 2k^ or 0 depending on whether the code has vectors of even weight only, or of both odd and even weights. (c) A′(1) = 0 · A 0 + 1 · A 1 + · · · + n · An is the total number of 1s in all the codewords. This sum is 2 k−^1 n since each coordinate has equal numbers of 1s and 0s.

  2. Let μ 1s and ν 0s be erased where μ + ν ≤ 2 t by assumption. Note that this implies that min{μ, ν} ≤ t. Then R 0 has μ errors in it and R 1 has ν errors in it.

(a) Since at least one of R 0 and R 1 has at most t errors in it, both decodings cannot end in decoding failure. (b) A decoding failure might occur when the number of errors is greater than t. But, when max{μ, ν} > t and one decoder fails, the other decoding is guaranteed to produce the correct codeword because it is correcting min{μ, ν} < t errors. (c) When max{μ, ν} > t, a successful decoding (resulting in the wrong codeword) is also a possibility. This decoding will have corrected 2t + 1 − max{μ, ν} > min{μ, ν} errors. The other decoding will correct min{μ, ν} errors and produce the correct codeword. Thus, we can decide on which of the two codewords produced is the correct one by checking the number of errors corrected in each decoding. If max{μ, ν} < t, both decodings produce the same (correct) codeword.

  1. (a) There are k(n − k) entries in P which can be chosen to be 0 or 1. Hence, there are 2k(n−k)^ choices of P. Now, consider all the codes with minimum weight at least 3. A row of G has weight 1 or 2 if the corresponding row of P has weight 0 or 1. Thus, codes of minimum weight 3 cannot have rows in P of weight 0 or 1. Now, the sum of i rows of G has weight at least i. Thus, if P had two identical rows, there would be a codeword of weight 2. Hence, a code has minimum distance at least 3 if the rows of P are distinct and have minimum weight at least 2. There are N = (n−k)+ binary vectors of length n − k of weight less than 2. Thus, we have 2n−k^ − N choices for the first row of P , 2n−k^ − N − 1 choices for the second,... , 2n−k^ − N − (k − 1) = 2n−k^ − n choices for the k-th row of P. Hence there are

k∏− 1

i=

2 n−k^ − n + i

2 n−k^ − n

)k

codes of minimum weight at least 3. (b) The maximum weight of any row of G is n − k + 1 (when the row of P is 111... 1). Such a row is a codeword of weight n − k + 1, and thus, the minimum weight cannot be any larger than n − k + 1

... , in fact, the minimum weight is usually much smaller (for a binary code; Reed-Solomon codes, which we shall study later, do satisfy the bound with equality). (c) H = [P T^ |I] where I is a (n − k) × (n − k) identity matrix. We write x = [y, z] where y is the first k bits in x and z the last n − k bits. Then, HxT^ = P T^ yT^ + zT^. Now, if y = 0 and z 6 = 0 , then HxT^ = zT^6 = 0 and hence x cannot belong to any of the codes in the ensemble. So suppose that y 6 = 0. The i-th bit in HxT^ is pi 1 x 1 + pi 2 x 2 + · · · pikxk + xk+i where the pij ’s are entries in the i-th row of P. Now, remember that x is a fixed vector. We think of this i-th bit in HxT^ as a nonzero linear function of the pij ’s which change from code to code. This function has value 0 for 2k−^1 choices of the pij ’s and value 1 for the other 2k−^1 choices. Since there are n − k rows of P and we have 2k−^1 choices for each row that force the corresponding syndrome bit to be 0, we conclude that 2(k−1)(n−k)^ of the 2k(n−k)^ codes in the ensemble contain x. (d) Each nonzero vector of weight i < d can belong to 2(k−1)(n−k)^ different codes in the ensemble (it might not belong to any code too). Hence, the total number of codes that contain a nonzero vector

of weight < d is no larger than 2(k−1)(n−k)

∑^ d−^1

i=

n i

and if this is less than 2k(n−k), then there

are codes in the ensemble that do not contain any vector of weight < d, that is, have minimum weight (and distance) at least d.

  1. Let Pc, Pe, and Pf respectively denote the probabilities that the decoder output is correct, is in error, or is a failure indication.

(a) If the decoder does error detection only, Pc = Pr{E = 0 } = (1 − )^5 , and Pe = Pr{E = nonzero codeword} = 2(1 − )^2 ^3 + (1 − )^4. Pf can be obtained by brute-force counting, or more simply as

Pf = 1 − Pc − Pe = 1 − (1 − )^5 − [2(1 − )^2 ^3 + (1 − )^4 ]

(b) It is easier to compute the probability of decoding failure as the probability that the error pattern is a vector in the last two rows of the standard array. We get Pf = 4(1 − )^3 ^2 + 4(1 − )^2 ^3. Then,

Pe = 1 − Pc − Pf = 1 − [(1 − )^5 + 5(1 − )^4 ] − [4(1 − )^3 ^2 + 4(1 − )^2 ^3 ]

(c) Pe = 1 − Pr{E = coset leader} = 1 − [(1 − )^5 + 5(1 − )^4  + 2(1 − )^3 ^2 ]. (d) There is an error in the first bit if E is any pattern in the second or fourth columns of the standard array. There is an error in the second bit if E is any pattern in the third or fourth columns of the standard array. Hence,

Pb, 1 = 5(1 − )^3 ^2 + 7(1 − )^2 ^3 + 3(1 − )^4 + ^5 Pb, 2 = 6(1 − )^3 ^2 + 6(1 − )^2 ^3 + 4(1 − )^4

(e) As is typically the case in coded systems, the bit error probabilities are different (note that the leading terms are 5^2 and 6^2 ) and the bit errors are not independent events since the probability of a double bit error is

3(1 − )^3 ^2 + 3(1 − )^2 ^3 + 2(1 − )^4 = 3^2 +... 6 = Pb, 1 Pb, 2 = 30^4 +...