0% found this document useful (0 votes)
8 views

ECCWorksheet2SelectedSolutions

Uploaded by

asa peter pan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

ECCWorksheet2SelectedSolutions

Uploaded by

asa peter pan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

National High School in Mathematics Algebra and Coding.

2024-2025.

Worksheet 2
Selected solutions
Notation : d is the minimum distance of a code C
k is the length of words to be coded.
n is the length of codewords.

Exercice 1 The (s, 1) repetition code is de ned by


µ ¶
(x1 ) ! x1 , ..., x1
Ãs!

1. Is this code a linear code ?

2. What is the minimum distance of this code ?

Solution

1. Denote by Crep the repetition code obtained from Ak by applying the


process described in 1 to all elements of Ak .
Consider any two codewords x, y 2 Crep of length n = ks with s repe-
tition we have then
0 1 0 1
x + y = @x1 , ...x1 , ...xk , ...xk A + @y1 , ...y1 , ...yk , ...yk A
| {z } | {z } | {z } | {z }
s s s s
0 1
= @x1 + y1 , ...x1 + y1 , ...xk + yk , ...xk + yk A 2 Crep
| {z } | {z }
s s

For any codeword x 2 Crep and α 2 A we have


0 1 0 1
αx = α @x1 , ...x1 , ...xk , ...xk A = @αx1 , ...αx1 , ...αxk , ...αxk A 2 Crep
| {z } | {z } | {z } | {z }
s s s s

1
2. As the code is linear it is enough to nd the minimum weight.
The minimal weight codeword is induced by the minimal weight code-
word from Ak which is 1.
Hence the minimal weight codeword is s.

3. Rewritten interesting question from a student.


What happen if we apply the repetition process to an existing non
linear code of minimal distance d.
Is this still a linear code ? What is it’s minimal distance ?

Exercice 2 Suppose C is a linear (n, k, d) code.

1. The projection code denoted C i is obtained from C by removing the


ith coordinate of each codeword. Show that C i is a linear code. What
are its parameters ?

2. The shortened code Ci is ©formed as follows,


ª let C 0 be the intersection
of C with the hyperplane x 2 Fqn : xi = 0
Ci is then formed by applying projection of C 0 at position i. Show that
Ci is a linear code What are its parameters ?
¡ ¢ ?
3. Show that C ? i = (C i ) .

Solution

1. Note that C i = Im (C) by the projection map π :

π : C ! Fqn¡1
(x1 , ..., xn ) 7! (x1 , ..., xi¡1 , xi+1 , .., xn )

The length of C i is n ¡ 1.
If there is a codeword of C of weight d with a 1 at position i the
minimum distance of C i is d ¡ 1, otherwise the minimum distance is d.

2. Similarily to above, we have Ci is the image of the projection of the


subspace C 0 on Fqn¡1 and thus a subspace of Fqn¡1 .
The length of Ci is n ¡ 1.
Since C 0 is a subcode of C its minimum distance is at least d.
All codewords of C 0 have a zero at position i, so that the minimum
distance of Ci is at least d.

2
3. On one and if a length (n ¡ 1) vector (y1 , ..., yi¡1 , yi+1 , ..., yn ) belongs to
?
(C i ) P then by de nition for each x = (x1 , ..., xi¡1 , xi+1 , ..., xn ) in C i we
have xj yj = 0 which implies that the length n vector (y1 , ..., yi¡1 , 0, yi+1 , ..., yn )
j6=i
¡ ¢
belongs to (C)? so that (y1 , ..., yi¡1 , 0, yi+1 , ..., yn ) 2 C ? i .
¡ ?¢
On the other and if (y1 , ..., yi¡1 , yi+1 , ..., yn ) 2 C i then (y1 , ..., yi¡1 , yi+1 , ..., yn )
¡ ?¢
is the punctured version of a vector P (y 1 , ..., y i¡1 , 0, yi+1 , ..., yn ) in C
tat is a vector which satis tes xj yj = 0 and yi = 0. This implies that
P ?
xj yj = 0 i.e that (y1 , ..., yi¡1 , yi+1 , ..., yn ) 2 (C i )
j6=i

Exercice 3 The International Standard Book Number (ISBN) is a numeric


book identi er used for the ease of handling books particularly by booksellers
and libraries.
According to the 2001 standard, a unique 10-digit identi er is assigned to
each book (based on the language of the publishing country, publisher, and
the title) and a check digit is then a¢xed to the identi er. The aim of the
checksum is to facilitate detection of two common typing errors made in book
handling: Typing a wrong digit and interchanging two subsequent digits.
Taking the check digit into account, a valid ISBN can be regarded as a vector
x = (x1 , ..., x10 )
where x2 , ..., x10 2 f0, ..., 9g and x1 2 f0, ..., 9, 10g is the checksum, computed
according to the rule :
P10
ixi = 0 mod 11
i=1

1. Show that the ISBN code can detect a single error.


2. Show that it can detect transposition of any digit with an adjacent digit.
3. What is the minimum distance of this code?
4. If we used the simpler rule
P
10
ixi = 0 mod 10
i=1

instead of the one above, could the code still detect errors? What about trans-
positions ?

Solution

3
1. Suppose that x = (x1 , ..., x10 ) is a codeword and an error occurs at
position i.
Denote by x0 which is identical to x except at position i :
P
10 P
10
ix0i = ix0i + i (x0i ¡ xi ) 6= 0 mod 11
i=1 i=1

2. Suppose that the codeword is transposed at positions i and i + 1 and


again denote the corrupted word by x0 . Then
P
10 P
10
ix0i = ixi ¡ixi ¡(i + 1) xi+1 +(i + 1) xi +ixi+1 = xi ¡xi+1 mod 11
i=1 i=1

which is zero i¤ xi = xi+1 in which case no error has occurred.

3. The distance is at least two by the fact that the code can detect a single
error.
Notice that the zero vector and (1, 0, 0, 0, 0, 0, 0, 0, 1) are codewords
thus the minimun distance is exactly two.

4. The code could still detect a single error by the same argument but not
any transpositions because the new rule is symmetric with respect to
all coordinate positions.

You might also like