07.01.2015 Views

3.13 Hamming Code

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>3.13</strong> <strong>Hamming</strong> <strong>Code</strong><br />

The first class of binary linear block code discovered by R. W.<br />

<strong>Hamming</strong> (1915 – 1998)<br />

R. W. <strong>Hamming</strong>, “Error detecting and error correcting codes”,<br />

Bell System Technical Journal, vol. 29, pp. 147 – 160, 1950.<br />

<br />

For any positive integer m ≥ 3, there exists a <strong>Hamming</strong> code with<br />

the following parameters:<br />

block code length<br />

m<br />

n = 2 - 1<br />

message length<br />

k = 2<br />

m<br />

- 1 -<br />

m<br />

minimum <strong>Hamming</strong> distance d min<br />

= 3<br />

error-correction capability t = 1<br />

Example:(7, 4) <strong>Hamming</strong> code (Example 3.1 & 3.5)<br />

G<br />

⎡1<br />

⎢<br />

0<br />

= ⎢<br />

⎢0<br />

⎢<br />

⎣0<br />

0<br />

1<br />

0<br />

0<br />

0<br />

0<br />

1<br />

0<br />

0<br />

0<br />

0<br />

1<br />

1<br />

1<br />

1<br />

0<br />

0<br />

1<br />

1<br />

1<br />

1⎤<br />

1<br />

⎥<br />

⎥<br />

0⎥<br />

⎥<br />

1⎦<br />

⎡1<br />

H =<br />

⎢<br />

0<br />

⎢<br />

⎢⎣<br />

1<br />

1<br />

1<br />

1<br />

1<br />

1<br />

0<br />

0<br />

1<br />

1<br />

1<br />

0<br />

0<br />

0<br />

1<br />

0<br />

0⎤<br />

0<br />

⎥<br />

⎥<br />

1⎥⎦


For a <strong>Hamming</strong> code of length 2 m - 1 , its parity-check matrix is<br />

a matrix whose columns consist of the entire set of the non-zero<br />

binary m-tuples.<br />

3.14 Golay <strong>Code</strong><br />

<br />

The (23,12) Gloay code is the only known multiple-errorcorrecting<br />

binary perfect code, which is capable of correcting 3<br />

or fewer random errors in a block of 23 digits, d min<br />

= 7 .<br />

(Discovered by Golay in 1949).<br />

<br />

The (23, 12) Gloay code is either generated by<br />

g +<br />

2 4 5 6 10 11<br />

1(<br />

x)<br />

= 1 + x + x + x + x + x x<br />

or by<br />

g +<br />

5 6 7 9 11<br />

2<br />

( x)<br />

= 1 + x + x + x + x + x x<br />

Both g 1<br />

(x)<br />

and g 2<br />

(x)<br />

are factors of x 23 + 1<br />

23<br />

and + 1 = ( 1 + x)<br />

g ( x)<br />

g ( x)<br />

x<br />

1 2


Golay’s paper was published in 1949.<br />

M. J. E. Golay, “Notes on digital coding”, proc. IRE, 37, pp. 567,<br />

June 1949.<br />

<br />

Golay codes have been frequent application in the US space<br />

program, most notably with the Voyager I and II spacecraft,<br />

providing (1979 – 81) clear color pictures of Jupiter and Saturn.<br />

3.15 Reed-Muller <strong>Code</strong> (RM <strong>Code</strong>)<br />

<br />

Reed-Muller codes were discovered by Muller in 1954, and<br />

shortly thereafter a better algebraic representation was provided<br />

by Reed along with an elegant decoding algorithm.<br />

<br />

The first-order RM code of length 32 wasusedin1969forthe<br />

error-control system of the Mariner and Viking deep-space<br />

probes of Mars.


The original r-th order RM codes were binary and noncyclic, and<br />

formed a special subclass of Euclidean geometry (EG) codes.<br />

(Details can also be found in Lin / Costello Book, chap. 8)<br />

The r-th order binary RM code has the following parameters:<br />

m<br />

n = 2<br />

k<br />

⎛m⎞<br />

⎛m⎞<br />

⎛m⎞<br />

= 1 + ⎜ ⎟ + ⎜ ⎟ + L+<br />

⎜ ⎟<br />

⎝ 1 ⎠ ⎝ 2 ⎠ ⎝ r ⎠<br />

n - k<br />

= 2<br />

m<br />

- k<br />

=<br />

m<br />

∑ − r − 1<br />

i=<br />

0<br />

⎛<br />

⎜<br />

⎝<br />

m<br />

i<br />

⎞<br />

⎟<br />

⎠<br />

m-r<br />

d<br />

min<br />

= 2<br />

Where r


Let v0<br />

be a vector whose<br />

m<br />

2 components are all 1s. Then v 0<br />

is called an identity vector.<br />

Let<br />

v L be the rows of a matrix with all possible<br />

1<br />

,v2<br />

, , vm<br />

m-tuples as columns. We call them the basis vectors.<br />

The r-th order RM code is formed by using the basis vectors<br />

v L and all of their vector products r or fewer at a time.<br />

1<br />

,v2<br />

, , vm<br />

<br />

The generator matrix of the r-th order RM code is defined as<br />

⎡ v0<br />

⎢<br />

v<br />

⎢<br />

1<br />

⎢ M<br />

⎢<br />

⎢<br />

vm<br />

⎢ v1v2<br />

⎢<br />

⎢ v1v3<br />

⎢ M<br />

⎢<br />

G = ⎢ vm-1vm<br />

⎢ v1v2v3<br />

⎢<br />

⎢ M<br />

⎢ vm-2vm-1vm<br />

⎢<br />

⎢ M<br />

⎢<br />

v<br />

⎢<br />

1v2<br />

Lvr<br />

⎢ M<br />

⎢<br />

⎣vm-r<br />

1Lv<br />

v<br />

⎤<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎦<br />

or<br />

⎡<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎢<br />

⎣v<br />

m-1<br />

m-2<br />

+ m-1 m<br />

m m-1 m-r+<br />

1<br />

where v = v ,v , L,<br />

v )<br />

i<br />

(<br />

i,0 i,1 i,n-1<br />

v<br />

v<br />

m<br />

v<br />

v<br />

v<br />

v<br />

m<br />

m<br />

v<br />

v<br />

v<br />

m-1<br />

v<br />

v<br />

v<br />

2<br />

0<br />

m<br />

M<br />

M<br />

1<br />

m-1<br />

m-2<br />

v<br />

M<br />

M<br />

1<br />

v<br />

Lv<br />

⎤<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />


Example:<br />

Consider the 2 nd -order RM code for m=4,<br />

n = 2<br />

4 =<br />

16<br />

⎛4⎞<br />

⎛4⎞<br />

k = 1 + ⎜ ⎟ + ⎜ ⎟ = 11<br />

⎝ 1⎠<br />

⎝ 2⎠<br />

n - k = 16 - 11 = 5<br />

d<br />

= 2<br />

2<br />

min<br />

=<br />

4<br />

This is a (16, 11) linear code.<br />

The generator matrix is given by<br />

G<br />

R(<br />

2, 4)<br />

⎡ v0<br />

⎢<br />

v<br />

⎢<br />

4<br />

⎢ v3<br />

⎢<br />

⎢<br />

v2<br />

⎢ v1<br />

⎢<br />

= ⎢v4v<br />

⎢v4v<br />

⎢<br />

⎢v4v<br />

⎢v3v<br />

⎢<br />

⎢v3v<br />

⎢<br />

⎣v2v<br />

3<br />

2<br />

1<br />

2<br />

1<br />

1<br />

⎤<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />

⎥<br />


where<br />

v 0<br />

= ( 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 )<br />

v 4<br />

= ( 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 )<br />

v 3<br />

= ( 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 )<br />

v 2<br />

= ( 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 )<br />

v 1<br />

= ( 0 10 1 0 10 1 0 10 1 0 10 1 )<br />

v 4<br />

v 3<br />

= ( 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 )<br />

v 4<br />

v 2<br />

= ( 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 )<br />

v 4<br />

v 1<br />

= ( 0 0 0 0 0 0 0 0 0 10 1 0 10 1 )<br />

v 3<br />

v 2<br />

= ( 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 )<br />

v 3<br />

v 1<br />

= ( 0 0 0 0 0 10 1 0 0 0 0 0 10 1 )<br />

v 2<br />

v 1<br />

= ( 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 )<br />

⎛ m⎞<br />

⎛m⎞<br />

⎛m⎞<br />

⎛ m⎞<br />

Since k = ⎜ ⎟ + ⎜ ⎟ + ⎜ ⎟ + L+<br />

⎜ ⎟<br />

⎝ 0 ⎠ ⎝ 1 ⎠ ⎝ 2 ⎠ ⎝ r ⎠<br />

gives the number of information bits of the r-th order RM code of<br />

length<br />

m<br />

2 , the information vector is generally expressed as<br />

d<br />

0 m m-1 1 m,m-1 m,m-2<br />

dm,m-1,<br />

,m-r+<br />

= ( d d d<br />

L<br />

Ld<br />

d d L<br />

1)<br />

For example, r=2, m=4, k=11<br />

We have d = d d d d d d d d d d )<br />

(<br />

0 4 3 2 1 43 42 41 32 31<br />

d21


The codewords are given by<br />

c<br />

= d ⋅G<br />

Example: r=1, m=3<br />

c = ( c c1<br />

Lc7<br />

) = ( d0<br />

d3<br />

d2<br />

d1<br />

0<br />

)<br />

⎡1<br />

⎢<br />

0<br />

⎢<br />

⎢0<br />

⎢<br />

⎣0<br />

1<br />

0<br />

0<br />

1<br />

1<br />

0<br />

1<br />

0<br />

1<br />

0<br />

1<br />

1<br />

1<br />

1<br />

0<br />

0<br />

1<br />

1<br />

0<br />

1<br />

1⎤<br />

1<br />

⎥<br />

⎥<br />

1⎥<br />

⎥<br />

0⎦

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!