Docsity

Other Cyclic Codes - Coding Theory and Practice in Communication | ECE 7670, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
ECE 7670
Lecture 8 – Other cyclic codes
Objective: To examine some other common families of cyclic codes
Reading:
•Chapter 6.
In this chapter we will introduce some other cyclic codes which are of both
historical and practical significance. To get started, we will need some more matrix
and number theory background.
1 Hadamard matrices
Consider the following:
H1=1H2=1 1
1−H4=H2H2
H2−H2=
1 1 1 1
1−1−
1 1 − −
1− − 1
These are examples of Hadamard matrices, which have the property that they are
±1 matrices such that
HnHT
n=nI.
Hadamard matrices exist of orders 1,2, 4, or a multiple of 4. Hadamard matrices are
of interest because we can define codes based on the rows of the Hadamard matrix.
There are two known ways of making Hadamard matrices. One way is as follows:
H2n=HnHn
Hn−Hn
This is the Sylvester construction. The second construction, the Paley construc-
tion, is somewhat more subtle. We begin with a discussion of quadratic residues.
Suppose we wanted (for some strange reason) to know for which values of xthe
following quadratic equation has a solution:
y2≡x(mod p)
where pis prime. For example, let p= 5. Then we have
12≡1
22≡4
32≡4
42≡1
In this example, only x= 1 and x= 4 have a solution to the quadratic equation.
Those values mod pthat are perfect squares are called the quadratic residues
modulo p.
Example 1 When p= 7 we have
12=equiv1
22=equiv4
32=equiv2
42=equiv2
52=equiv4
62=equiv1
pf3
pf4

Partial preview of the text

Download Other Cyclic Codes - Coding Theory and Practice in Communication | ECE 7670 and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

ECE 7670

Lecture 8 – Other cyclic codes

Objective: To examine some other common families of cyclic codes

Reading:

  • Chapter 6. In this chapter we will introduce some other cyclic codes which are of both historical and practical significance. To get started, we will need some more matrix and number theory background.

1 Hadamard matrices

Consider the following:

H 1 =

[

]

H 2 =

[

]

H 4 =

[

H 2 H 2

H 2 −H 2

]

These are examples of Hadamard matrices, which have the property that they are ±1 matrices such that

HnHTn = nI.

Hadamard matrices exist of orders 1,2, 4, or a multiple of 4. Hadamard matrices are of interest because we can define codes based on the rows of the Hadamard matrix. There are two known ways of making Hadamard matrices. One way is as follows:

H 2 n =

[

Hn Hn Hn −Hn

]

This is the Sylvester construction. The second construction, the Paley construc- tion, is somewhat more subtle. We begin with a discussion of quadratic residues. Suppose we wanted (for some strange reason) to know for which values of x the following quadratic equation has a solution:

y^2 ≡ x (mod p)

where p is prime. For example, let p = 5. Then we have

12 ≡ 1 22 ≡ 4 32 ≡ 4 42 ≡ 1

In this example, only x = 1 and x = 4 have a solution to the quadratic equation. Those values mod p that are perfect squares are called the quadratic residues modulo p. Example 1 When p = 7 we have 12 = equiv 1 22 = equiv 4 32 = equiv 2 42 = equiv 2 52 = equiv 4 62 = equiv 1

So the quadratic residues (perfect squares) mod 7 are 1, 2 , 4. 2 We observe:

  1. We only need to check the first half, since (p − x)^2 ≡ x^2 (mod p).
  2. There are (p − 1)/2 quadratic residues mod p.
  3. R · R = R and R · N = N.

Definition 1 We define the Legendre symbol χ(x) (in the context of a given prime p) to be

χ(x) =

0 if x is a multiple of p 1 if x is a quadratic residue of p − 1 if x is not a quadratic residue of p

2 Now define a p × p matrix Q with elements (indexed starting from zero) of

qij = χ(j − i).

For example, let p = 5. Then the quadratic residues are 1, 4, so we would have Q of the form

Q =

Such a matrix is called a Jacobsthal matrix. Now we form (without proof) the matrix

Hn =

[

1 T^ Qn− 1 − In− 1

]

For certain orders n this is a Hadamard matrix. A Hadamard matrix is normalized if the left column is all equal to one.

1.1 Codes over Hadamard matrices

Take a Hadamard matrix Hn, and convert: 1 → 0 and − 1 → 1. Call the resulting matrix An. We can make codes three different ways:

  1. The rows of Hn are orthogonal, so that the rows of An differ in n/2 places. These give us n code words of length n. We may delete the left column without affecting the distance to obtain a length n − 1 code with minimum distance n/2. This code is known as the An code; it is also called a simplex code.
  2. Take An and complement each word. The resulting code is called B and has 2 n codewords of length n − 1 and minimum distance n/ 2 − 1.

If n is not a power of two, then the code is nonlinear (our first example this quarter). Every code resulting from a Paley-constructed matrix of order n > 8 gives rise to a nonlinear code. If we take a nonlinear code, and adjoin all linear combinations of codewords we obtain a linear code. This is the quadratic residue code we will talk about later. (Overhead)

is in GF (s)[x], and we can also write

xp^ − 1 = (x − 1)q(x)n(x).

The quadratic residue codes Q, Q, N , and N , are generated by (respectively)

q(x), (x − 1)q(x), n(x), (x − 1)n(x).

QR codes have pretty good rates and pretty good distance properties: d^2 ≥ p.

3 Golay codes

Let us take p = 23 and form the QR code. The binary Golay G 23 is the (23,12,7) code thus formed. Properties:

  1. Every codeword with even weight has weight divisible by 4.
  2. The min. distance is 7 (triple-error correcting)
  3. Perfect code:

V 2 (23, 3) =

= 2^11.

(It is said that this code was found by playing around with Pascal’s triangle.)

We can add an overall parity check bit to obtain the (24, 12 , 8) code. Good decoding algorithms exist for the binary Golay codes; we will not go into them.