The codes in details
The code C1
It is a (28,24,5) code over the field with 256 elements.
If
x is a 24 byte word, the code word of
C1 that corresponds to it is the 28 bytes word equal to (
x,
x R1t), where the
matrix R1
of dimension (4,24)
is defined by
R1 = |
|
[
[
[
[
|
a6 |
a192 |
a142 |
a159 |
a99 |
a88 |
a104 |
a144 |
a55 |
a180 |
a174 |
a101 |
a111 |
a118 |
a169 |
a107 |
a132 |
a25 |
a167 |
a239 |
a168 |
a188 |
a111 |
a9 |
a45 |
a108 |
a248 |
a131 |
a64 |
a221 |
a100 |
a235 |
a147 |
a45 |
a198 |
a21 |
a228 |
a186 |
a231 |
a56 |
a68 |
a81 |
a46 |
a32 |
a60 |
a225 |
a134 |
a226 |
a50 |
a52 |
a59 |
a132 |
a186 |
a81 |
a128 |
a126 |
a133 |
a32 |
a213 |
a195 |
a43 |
a198 |
a194 |
a13 |
a167 |
a167 |
a252 |
a61 |
a3 |
a12 |
a66 |
a144 |
a42 |
a136 |
a153 |
a93 |
a82 |
a98 |
a138 |
a49 |
a174 |
a168 |
a95 |
a105 |
a112 |
a163 |
a101 |
a126 |
a19 |
a161 |
a233 |
a162 |
a182 |
a105 |
a3 |
a226 |
|
]
]
]
]
|
|
The code C2
It is a (32,28,5) code over the field with 256 elements.
If
x is a 28 byte word, the code word of
C2 that corresponds to it is the 32 byte word equal to
(
x,
x R2T), where the (4,28) matrix
R2 is :
R2 = (
R1 | R' ) où
R' = |
[
[
[
[
|
|
a232 |
a98 |
a54 |
a174 |
a167 |
a211 |
a180 |
a143 |
a24 |
a41 |
a188 |
a164 |
a92 |
a48 |
a168 |
a67 |
|
|
]
]
]
]
|
Correction of one error in C2
The code
C2 has a minimal distance of 5.
In theory, it can correct up to 2 errors, or detect 4 errors. It can also
correct 1 error and detect 3, which will be used here.
Let set
H2=(
R2|
I), where I is the 4× 4 identity matrix
, and for every vector
v of length 32,
S2(
v) =
H2
vT.
H2 = |
|
|
a6 |
a192 |
a142 |
a159 |
a99 |
a88 |
a104 |
a144 |
a55 |
a180 |
a174 |
a101 |
a111 |
a118 |
a169 |
a107 |
a132 |
a25 |
a167 |
a239 |
a168 |
a188 |
a111 |
a9 |
a232 |
a98 |
a54 |
a174 |
1 |
0 |
0 |
0 |
a45 |
a108 |
a248 |
a131 |
a64 |
a221 |
a100 |
a235 |
a147 |
a45 |
a198 |
a21 |
a228 |
a186 |
a231 |
a56 |
a68 |
a81 |
a46 |
a32 |
a60 |
a225 |
a134 |
a226 |
a167 |
a211 |
a180 |
a143 |
0 |
1 |
0 |
0 |
a50 |
a52 |
a59 |
a132 |
a186 |
a81 |
a128 |
a126 |
a133 |
a32 |
a213 |
a195 |
a43 |
a198 |
a194 |
a13 |
a167 |
a167 |
a252 |
a61 |
a3 |
a12 |
a66 |
a144 |
a24 |
a41 |
a188 |
a164 |
0 |
0 |
1 |
0 |
a42 |
a136 |
a153 |
a93 |
a82 |
a98 |
a138 |
a49 |
a174 |
a168 |
a95 |
a105 |
a112 |
a163 |
a101 |
a126 |
a19 |
a161 |
a233 |
a162 |
a182 |
a105 |
a3 |
a226 |
a92 |
a48 |
a168 |
a67 |
0 |
0 |
0 |
1 |
|
|
|
One easily checks that every code word
y of
C2 satisfies
S2(
y)=0
(remembering that
F256
is a field of characteristic 2). If
y has been modified at one position, for example
z=
y+
e, where
e is a vector of length 32 with only one non zero coordinate. Then
S2(
z)=
S2(
y)+
S2(
e)=
S2(
e). Thus if
S2(
z)
is proportional to the
i-th column of
H2, then the error is located at the
i-th
position and its value is the proportion coefficient with
S2(
z).
For example, if one gets
one can notice that
S2(
z)
is equal to
a times the first column of
R2 (and also of
H2 too). One can deduce that
y=
z+(
a,0,...,0) is in
C2.
Adding
a to the first coordinate of
z, we just fixed one error.
Correction of four erasures in C1
The code
C1 has a minimal distance of 5. If can correct 4 erasures. One erasur is an error which position is known.
H1=(
R1|
I), where
I is the 4× 4 identity matrix
, and for every vector
v of length 28,
S1(
v) =
H1
vtr.
H1 = |
[
[
[
[
|
|
a6 |
a192 |
a142 |
a159 |
a99 |
a88 |
a104 |
a144 |
a55 |
a180 |
a174 |
a101 |
a111 |
a118 |
a169 |
a107 |
a132 |
a25 |
a167 |
a239 |
a168 |
a188 |
a111 |
a9 |
1 |
0 |
0 |
0 |
a45 |
a108 |
a248 |
a131 |
a64 |
a221 |
a100 |
a235 |
a147 |
a45 |
a198 |
a21 |
a228 |
a186 |
a231 |
a56 |
a68 |
a81 |
a46 |
a32 |
a60 |
a225 |
a134 |
a226 |
0 |
1 |
0 |
0 |
a50 |
a52 |
a59 |
a132 |
a186 |
a81 |
a128 |
a126 |
a133 |
a32 |
a213 |
a195 |
a43 |
a198 |
a194 |
a13 |
a167 |
a167 |
a252 |
a61 |
a3 |
a12 |
a66 |
a144 |
0 |
0 |
1 |
0 |
a42 |
a136 |
a153 |
a93 |
a82 |
a98 |
a138 |
a49 |
a174 |
a168 |
a95 |
a105 |
a112 |
a163 |
a101 |
a126 |
a19 |
a161 |
a233 |
a162 |
a182 |
a105 |
a3 |
a226 |
0 |
0 |
0 |
1 |
|
|
]
]
]
]
|
We suppose that we know a vector
z of length 28 with coefficients
3, 8, 16 et 25 (and no other) are possibly erroneous.
We consider the 4× 4 matrix formed by the corresponding columns of
H1
U = |
[
[
[
[
|
|
a159 |
a55 |
a132 |
0 |
a131 |
a147 |
a68 |
1 |
a132 |
a133 |
a167 |
0 |
a93 |
a174 |
a19 |
0 |
|
|
]
]
]
]
|
Let
e=(
e0,
e1,...,
e27)
be the vector of length 28 such that
ei=0
if
iÏ{3,8,16,25} and
|
[
[
[
[
|
|
|
|
]
]
]
]
|
= U-1 S1(z) |
We have
S1(
e)=
S1(
z) and therefore
y=
z+
e is
an element of
C1. We just corrected 4 erasures at the positions 3, 8, 16 et 25.