Math 342 Homework Assignment #2 (Due Thursday, February 4, in class)

advertisement
Math 342
Homework Assignment #2 (Due Thursday, February 4, in class)
All numbered problems are worth the same value.
1. Let C be a code with minimum distance d(C) = 5.
(a) Show that the following hybrid decoder is guaranteed to correct 1 error and detect
2 errors and detect 3 errors:
Let x be the received word and c be a codeword which is a nearest neighbour to
x.
If d(x, c) ≤ 1, decode x to c.
If d(x, c) ≥ 2, declare an error.
(note that this is the same hybrid decoder that we described for d(C) = 4).
(b) Let C be the binary 5-repetition code. For each of the received words x =
00000, 10000, 11000, 11100, 11110, 11111, say what each of the following decoders
will return (i.e., which codeword it will decode to or if it will declare an error)
i. An incomplete nearest neighbour decoder which corrects up to 2 errors.
ii. A decoder which detects up to 4 errors.
iii. The hybrid decoder described in part a.
(c) Does there exist a hybrid decoder for the 5-repetition code that is guaranteed to
correct 1 error and detect 2 errors and detect 3 errors and detect 4 errors. Why
or why not?
Solution:
a. Let c0 be the transmitted codeword.
Note: apologies for reversing the roles of the notations c0 and c, compared to lecture
notes.
If 1 error is made, then d(x, c0 ) ≤ 1. Thus, d(x, c) ≤ 1. Then by the triangle inequality
d(c, c0 ) ≤ 2. Since the minimum distance is 5, we must have c = c0 and thus the decoder
corrects the error (correctly).
If 2 or 3 errors are made, then 2 ≤ d(x, c0 ) ≤ 3. The only way that the decoder can fail
to declare an error is if d(x, c) ≤ 1. But then d(c, c0 ) ≤ 4. Again, since the minimum
distance is 5, we must have c = c0 . But this is impossible since d(x, c) ≤ 1 < 2 ≤
d(x, c0 ).
b.
received word
00000
10000
11000
11100
11110
11111
incomplete NND
00000
00000
00000
11111
11111
11111
1
error detector
00000
?
?
?
?
11111
hybrid
00000
00000
?
?
11111
11111
c, No. If 00001 were received, there is no way to tell if 00000 was transmited and 1
error was made or 11111 was transmitted and 4 errors were made.
2. Which of the following pairs of codes are equivalent? For each pair, say why or why
not?
(a) K1 = {00000, 11111}, K2 = {10100, 01011},
(b) K1 = {000, 011, 101, 110}, K2 = {000, 011, 101, 100}.
(c) K1 = {000, 100, 010}, K2 = {000, 100, 111}.
Solution:
a. Yes. Permute 0 and 1 in the 2nd and 4th positions.
b. No. By inspection, d(K1 ) = 2 and d(K2 ) = 1. Since equivalent codes must have
the same minimum distance, these codes cannot be equivalent.
c. No: even though the two codes have the same (n, M, d) parameters, K2 has a pair
of codewords with distance = 3, and K1 does not.
3. Prove the following lower bound:
Aq (n, d) ≥ d Pd−1
m=0
qn
e.
n
m
(q
−
1)
m
Hints:
(a) Let C be a code which achieves Aq (n, d). Show that for every word x ∈ Fqn , there
is a codeword c ∈ C such that d(x, c) < d.
(b) Show that Fqn = ∪x∈C Bd−1 (x).
Solution:
a. If not, then the larger code C ∪ {x} has length n and minimum distance d. This
contradicts the assumption that C is a code which achieves Aq (n, d).
b. If y ∈ Fqn , then by part (a), there is a codeword x ∈ C such that y ∈ Bd−1 (x).
Thus, Fqn ⊆ ∪x∈C Bd−1 (x). And the reverse inclusion is clearly true.
Now, the asserted lower bound on Aq (n, d) is a consequence of part (b):
n
q =
|Fqn |
= | ∪x∈C
d−1 X
n
Bd−1 (x)| ≤ |C||Bd−1 (x)| = Aq (n, d)(
(q − 1)m ).
m
m=0
This lower bound is called the Gilbert-Varshamov bound.
4. Do there exist codes with the following parameters? Why or why not?
Hint: You may want to use the Singleton bound, Hamming bound and the bound in
problem 3.
2
(a) q = 2, (17, 800, 3)
(b) q = 2, (17, 8000, 3)
(c) q = 8, (5, 600, 3)
(d) q = 8, (5, 60, 3)
Solution:
a. Yes. By the lower bound in Problem 3,
A2 (17, 3) ≥ d P2
217
m=0
e = 852.
17
m
Thus, there exists a (17, M, 3) binary code with M ≥ 852. By deleting any M − 800
of the M codewords, but making sure to keep two words with distance 3, one obtains
a (17, 800, 3) binary code.
b. No. By the Hamming bound,
A2 (17, 3) ≤ b P1
217
m=0
c = 7281 < 8000.
17
m
c. No. By the Singleton bound,
A8 (5, 3) ≤ 85−3+1 = 83 = 512 < 600.
d. Yes. By the lower bound in Problem 3,
A2 (8, 3) ≥ d P2
28
8
m=0 m
e = 63
7m
Now, argue as in part a.
5. Which of the following subsets H of the integers Z, with the usual addition as group
operation, is a subgroup of Z? Why or why not?
(a) H = {x ∈ Z : x is a multiple of 11}
(b) H = {x ∈ Z : x is a multiple of 22 and 33}
(c) H = {x ∈ Z : x − 6 is divisible by 11}
Solution: To verify that a given subset is a subgroup, we need only check closure and
inverses.
We use the “mod” notation in the solutions.
a. This is a subgroup:
Closed under addition: If x = 0 mod 11 and y = 0 mod 11, then x + y = 0 mod 11
3
Closed under inverses: If x = 0 mod 11, then −x = −0 mod 11 = 0 mod 11.
b. This is a subgroup:
H is the set of all multiples of 66. Apply the same reasoning as in part (a).
c. This is not a subgroup since 0 6∈ H (every subgroup must contain the identity since
subgroups are closed under addition and inverses).
6. Which of the following subsets H of Z23 , with coordinate-wise addition in the group Z3
as group operation, is a subgroup of Z23 ? Why or why not?
(a) {(x, y) ∈ Z23 : x + 2y ≡ 0 mod 3}
(b) {(x, y) ∈ Z23 : x + 2y ≡ 1 mod 3}
(c) {(x, y) ∈ Z23 : x + 2y ≡ 0 mod 3 AND x + y ≡ 0 mod 3}
(d) {(x, y) ∈ Z23 : x + 2y ≡ 0 mod 3 OR x + y ≡ 0 mod 3}
Note: a ≡ b mod c means that c divides a − b.
Solution:
a. This is a subgroup.
Closed under addition: If x + 2y ≡ 0 mod 3 and x0 + 2y 0 ≡ 0 mod 3, then (x + x0 ) +
2(y + y 0 ) ≡ 0 mod 3.
Closed under inverses: If x + 2y ≡ 0 mod 3, then −x + 2(−y) + 3(−z) ≡= −(x + 2y) ≡
0 mod 3.
b. This is not a subgroup since the identity element (0, 0) is not an element.
c. In part (a), we showed that {(x, y) ∈ Z32 : x + 2y ≡ 0 mod 3} is a subgroup. Using
the same reasoning {(x, y) ∈ Z32 : x + y ≡ 0 mod 3} is a subgroup.
Now, the intersection of two subgroups is a subgroup because all four of the group
axioms are preserved under intersection. It follows that the set in part (c) is a subgroup.
d. This is not a subgroup:
(1, 1) is in this set since it satisfies the first equation. And (1, 2) is in this set since it
satisfies the second equation. But their sum is (2, 0) which satisfies neither equation.
So, the set is not closed under addition and therefore not a subgroup.
Note that the union of two subgroups need not be a subgroup.
7. Let G = Z52 and H = C3 (the code given on page 4 of the text). Find all the cosets of
H in G.
Solution:
By Lagrange’s Theorem, there are |Z52 |/|C3 | = 25 /4 = 8 cosets. By a proposition in
class (first proposition on Lecture 9, Feb 2), it suffices find eight words of length 5,
such that no difference of a pair of these words belongs to H; for then these words all
belong to different cosets.
4
Consider the words of weight 0 or 1:
S := {00000, 10000, 01000, 00100, 00010, 00001}
The Hamming distance of the difference (equivalently the sum since addition and
subtraction are the same in Z2 ) between any pair of these words is of weight at most
2. Since d(H) = 3, none of these differences can be in H. By some experimentation
with words of weight = 2, we find that if we append {11000, 10001} to S we get eight
words, and the difference between all pairs of these words do not belong to H. Thus,
the set of cosets is:
{00000+H, 10000+H, 01000+H, 00100+H, 00010+H, 00001+H, 11000+H, 10001+H}
There are many other ways to represent the eight cosets. But some choices of words
with weight = 2 will not work. For instance, 10100 − 00010 = 10110 ∈ H.
8. For each of the following sets S, verify that S is a subgroup and calculate the number
of cosets.
(a) S = the code {000000, 110110, 011011, 101101}, as a subgroup of Z62 , with coordinatewise addition.
(b) S = {00, 12, 21}, as a subgroup of Z23 , with coordinate-wise addition.
Solution:
a. Let a = 000000, b = 110110, c = 011011, d = 101101. The addition table for this set
in Z26 is:
+ a b c d
a a b c d
b b a d c
c c d a b
d d c b a
Thus, this set is closed under addition. It is closed under inverses since the inverse of
an element in Z2n is itself. So, this set is a subgroup. Its size is M = 4 and |Z26 | = 64.
By Lagrange’s Theorem, the number of cosets is 64/4 = 16.
b. The addition table for this set in Z32 is:
+
00
12
21
00
00
12
21
12
12
21
00
21
21
00
12
Thus, this set is closed under addition. It is closed under inverses since −00 =
00, −12 = 21 and −21 = 12. So, this set is a subgroup. Its size is 3 and |Z32 | = 9. By
Lagrange’s Theorem, the number of cosets is 9/3 = 3.
5
Download