Cryptography Reference
In-Depth Information
Example 4.4
The generator matrix and the parity check matrix of this code, for
k
=1
,
n
=5
, can be the following:
G
=
11111
=
I
1
P
⎡
⎤
11000
10100
10010
10001
⎣
⎦
=
P
T
I
4
H
=
Hamming code
For a Hamming code, the columns of the parity check matrix are the binary
representations of the numbers from 1 to
n
. Each column being made up of
m
=(
n
−
k
)
binary symbols, the parameters of the Hamming code are therefore:
n
=2
m
k
=2
m
−
1
−
m
−
1
The columns of the parity check matrix being made up of all the possible com-
binations of
(
n
0)
,thesumoftwocolumnsis
equal to one column. The minimum number of linearly dependent columns is
3. The minimum distance of a Hamming code is therefore equal to 3, whatever
the value of parameters
n
and
k
.
−
k
)
binary symbols except
(00
···
Example 4.5
Let there be a Hamming code with parameter
m
=3
. The codewords and
the datawords are then made up of
n
=7
and
k
=4
binary symbols respectively.
The parity check matrix can be the following:
⎡
⎤
⎦
=
P
T
1110100
1101010
1011001
I
3
⎣
H
=
and the corresponding generator matrix is equal to:
⎡
⎤
1000111
0100110
0010101
0001011
⎣
⎦
=
I
4
P
G
=