Вы находитесь на странице: 1из 4

MATH32031: Coding Theory Solutions 4: Dual codes

4.1. Let x F
n
q
be a word of weight e. Now suppose that there is a y x+C with w(y) e.
Then, by the triangle inequality,
d(x, y) d(x, 0) + d(0, y) = w(x) + w(y) 2e < d = w(C).
So w(x y) = d(x, y) < w(C). But, by properties of cosets, x y C. Since the only
codeword of weight less than w(C) is 0, we have x y = 0 and so x = y.
Thus every word of weight e is the unique coset leader of its coset mod C.
Remark: One can also prove that every vector of weight [d/2] is a coset leader of its
coset, but then we lose the uniqueness.
Now assume that C is perfect. Recall that S
e
(0) is the set of words of weight e. By the
work above, x x + C : S
e
(0) F
(n)
/C is an injective mapping. All we have to show
is that it is surjective, and for this it is enough to show that the two sets have the same
size.
Since C is perfect, d = 2e + 1 and we have
q
k
|S
e
(0)| = q
n
.
So |S
e
(0)| = q
nk
. But this is also equal to the number of cosets mod C. Thus the above
mapping must be surjective.
4.2. We have shown in earlier sheets that E
n
has standard-form generator matrix
G =
_

_
1 0 0 1
0 1 0 1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
0 0 1 1
_

_
=
_
I
n1
A
n1

with A
n1
=
_
_
_
1
.
.
.
1
_
_
_
.
Thus, by Theorem 21, there is a parity check matrix of the form
_
A
T
I
1

=
_
1 1 1

.
This then generates E

n
, which can thus only be
_
0 0
1 1
_
.
An alternative approach is the following. E
n
consists exactly of the vectors of even weight,
which is to say that the sum of their coordinates is 0 over F
2
, the eld we are working
over. Thus
x E
n

n

i=1
x
i
= 0 x.
_
1 1
_
= 0 xA
T
n
= 0.
Thus A
n
is a parity check matrix for E
n
, so it is also a generator matrix for E

n
.
1
4.3. C
1
: Since G
1
=
_
I
n
1
1
_
, we see that H
1
=
_
1 1 1
_
. By the Distance Theorem,
the distance is 2, as any column is independent but there are 2 dependent columns.
So question 4.1 is no help, since e = 0.
We need, as always, q
nk
coset leaders, which here is 2
1
= 2. One of them is 0, and
so it is safe to pick any vector of weight 1 which is not a codeword; 100, say.
Table:
leader syndrome
000 0
100 1
C
2
: Since here
G
2
=
_
1 0 1 1 0
0 1 0 1 1
_
=
_
I
2
1 1 0
0 1 1
_
,
We obtain in the same way
H
2
=
_
_
1 0
1 1
0 1
I
52
_
_
=
_
_
1 0 1 0 0
1 1 0 1 0
0 1 0 0 1
_
_
.
We need q
nk
= 2
3
= 8 coset leaders. Let us construct a table of coset leaders by
trial and error: pick a vector of minimum weight not yet seen, nd its syndrome and
check whether the syndrome has appeared before.
vector syndrome leader?
00000 000 yes, a
0
10000 110 yes, a
1
01000 011 yes, a
2
00100 100 yes, a
3
00010 010 yes, a
4
00001 001 yes, a
5
11000 101 yes, a
6
10100 010 no, same syndrome as a
4
10010 100 no, same syndrome as a
3
10001 111 yes, a
7
We only need 8 coset leaders, so now we stop. Our lookup table is simply
leader syndrome
00000 000
10000 110
01000 011
00100 100
00010 010
00001 001
11000 101
10100 010
10010 100
10001 111
4.4. Let y = (y
1
, . . . , y
n
) be a received vector. Let H have columns c
1
, . . . , c
n
. Now by
denition,
S(y) = yH
t
= (y
1
, . . . , y
n
)
_
_
_
c
1
T
.
.
.
c
n
T
_
_
_
=

y
i
c
i
T
=
_

y
i
c
i
_
T
.
2
Let x be the codeword sent; then since x is a codeword, we have S(x) = 0 and so
S(y) = S(x) S(y) = S(x y) =
_

(y
i
x
i
)c
i
_
T
.
Thus S(y) is equal to the transpose of the sum of the columns where the errors actually
did occur.
Now the error vector is assumed to be the coset leader a with the same syndrome as y,
i.e.
S(y) = S(a) =
_

a
i
c
i
_
T
.
Thus S(y) is also equal to the transpose of the sum of the columns where the errors are
assumed to have occurred in y.
4.5. For reasons of space we shall do only
G
3
=
_

_
1 0 0 0 1 1 1
0 1 0 0 1 1 0
0 0 1 0 1 0 1
0 0 0 1 0 1 1
_

_
.
The easiest method here is to observe that this is a Hamming [7, 4, 3]-code. Why is this?
Find the parity-check matrix as usual:
H
3
=
_
_
1 1 1 0 1 0 0
1 1 0 1 0 1 0
1 0 1 1 0 0 1
_
_
,
from transposing the non-identity part (since G
3
was in standard form). Observe that the
columns are all the non-zero vectors of F
(3)
2
, as columns, which is to say all the elements
of P
3
(F
2
). Thus this is the (pedantically, a) Hamming [7, 3]-F
2
code (that is, Ham(3, 2))
, which (being a Hamming code) has distance 3 and is perfect.
Thus, from question 4.1, the 8 vectors in S
1
(0) are its coset leaders. So the syndrome
table just consists of 0 and the columns of H
3
in order:
leader syndrome
0000000 000
1000000 111
0100000 110
0010000 101
0001000 011
0000100 100
0000010 010
0000001 001
Now for the decoding. Recall that the syndrome is just the (transpose of the) sum of the
columns corresponding to non-zero entries in the vector, so we get:
received syndrome assumed error decoded vector
0000011 011 0001000 0001011
1111111 000 0000000 1111111
1100110 111 1000000 0100110
1010101 111 1000000 0010101
(At this point, it is wise to check that your decoded vectors are, in fact, in the code!)
3
If you do not want to use any knowledge of Hamming codes, the above method will still
work once you have shown that the code has distance at least 3. This is easy by applying
the Distance Theorem to H
3
.
4.6. (a) Reduce to standard form:
_
1 1 1 0
2 0 1 1
_
=
_
1 1 1 0
0 1 2 1
_
_
r
2
r
2
+ r
1
_
=
_
1 0 2 2
0 1 2 1
_
_
r
1
r
1
r
2
_
.
This is standard form as required.
(b) From part (a) and the fact that G = [IA] H = [A
T
I], we get
H =
_
1 1 1 0
1 2 0 1
_
,
recalling that 1 = 2 and 2 = 1.
(c) Notice that these columns represent all the lines in F
(2)
3
, so this is Ham(2, 3). As
such, the non-zero syndromes are the columns of the matrix, and the multiples of
them.
received syndrome assumed error decoded vector
2121 22 2000 0121
1201 00 0000 1201
2222 02 0002 2220
Just to check that these corrected words are in the code, they are
0r
1
+ 1r
2
, 1r
1
+ 2r
2
, 2r
1
+ 2r
2
respectively, in terms of the rows of H. (Note that we can just read these coecients
o from the rst two letters of the corrected word, and then check that the addition
yields the right vector.)
4

Вам также может понравиться