• 沒有找到結果。

Organization of the Dissertation

Chapter 1 Introduction

1.2 Organization of the Dissertation

The rest of the dissertation is organized as follows. Chapter 2 gives a brief overview of the mathematic background of the linear block codes and binary QR codes. An improvement of the algebraic decoding of the binary (23, 12, 7) Golay code is described in Chapter 3.

Golay code. Computer simulation results for the proposed SWDA and the ADA given in [7]

are shown in Chapter 5. Finally, a few short remarks and conclusions for the proposed decoding scheme are summarized in Chapter 6.

Chapter 2

Mathematical Preliminaries

The purpose of this chapter is to provide the reader some of the basic concepts of algebra that will be needed for the study of QR codes.

2.1 The Basic Concepts of Finite Fields

Algebraic structure plays an important role in mathematical background of the binary QR codes. First we give the definitions of the commutative group, ring, and field [5].

Definition 2.1 A group G is a set of elements for which an operation is defined and used for the following four axioms. Let a, b and c be elements of the group and let “·” denote the operation in the group operation which can be any of +,  etc, for convenience.

(1) Closure: for any a, c  G, a·c  G.

(2) Associativity: for any a, b, c  G, a·(b·c) = (a·b)·c.

(3) Identity: there is an identity element e  G such that for all a  G, a·e = e·a = a.

(4) Inverse: for any a  G, there exists an inverse a-1  G such that a-1·a = a·a-1 = e.

A group is said to be abelian (or commutative) if it also satisfies (5) Commutative law: a·b = b·a for all a, b  G.

The group operation for a commutative group is usually represented using the symbol

“+”, and the group is sometimes said to be “additive” The group operation for a commutative group is usually represented using the symbol “·”, and the group is sometimes said to be

“multiplicative”.

Definition 2.2 The number of elements in a group G is called the order of the group G, denoted G.

Definition 2.3 Let g be an element in the group G with operation “·”. The order of a group element g is the smallest positive integer ord(g) such that gord(g) is the group identity element.

Example 2.1

A group G of order 6 is G = {1, 2, 3, 4, 5, 6} under modulo 7 multiplication. The following table completely defines the group operation and orders of group elements.

· 1 2 3 4 5 6 1 1 2 3 4 5 6 2 2 4 6 1 3 5 3 3 6 2 5 1 4 4 4 1 5 2 6 3 5 5 3 1 6 4 2 6 6 5 4 3 2 1

element order element order

1 1 4 3

2 3 5 6

3 6 6 2

Definition 2.4 Let S be a subset of the group G. If for all a and b in S, c = a·b-1 is also in S, then S is said to be a subgroup of G.

This means that a subset of G is a subgroup if it exhibits closure and contains the necessary inverses. All other group properties are inherited from G. A subgroup is this itself a group. A subgroup S is said to be a proper subgroup if G if S  G, but S  G.

Definition 2.5 Let S be a subgroup of G with operation “+”. A left coset of S in G is a subset of G whose elements can be expressed as x + S = {x + s, s  S}. A right coset of S in G is a subset of G whose elements can be expressed as S + x = {s + x, s  S}.

If G is commutative, every left coset x + S is identical to every right coset S + x. They will simply be referred to as cosets.

Example 2.2

 The group of integers G under modulo 9 addition contains the proper subgroup S = {0, 3, 6}. The distinct cosets of S in G are {0, 3, 6}, {1, 4, 7}, and {2, 5, 8}.

 The group of integers G under modulo 16 addition contains the proper subgroup S = {0, 4, 8, 12}. The distinct cosets of S in G are {0, 4, 8, 12}, {1, 5, 9, 13}, {2, 6, 10, 14}, and {3, 7, 11, 15}.

Theorem 2.1 The distinct cosets of a subgroup S in a group G are disjoint.

Theorem 2.2 (Lagrange’s Theorem) If S is a subgroup of G, then ord(S)ord(G).

The group, as explained so far, includes only an algebra operation. Considering algebra operations with two operations there are operators such as + and ·.

Definition 2.6 Rings and Fields: If a set R is a ring, it satisfies the statements.

(1) R is an abelian group under addition.

(2) R is closed under multiplication.

(3) R is associative under multiplication.

(4) Multiplication is distributive with respect to addition, that is, for any a, b, c  R,

(5) There is multiplicative identity, denotes 1  R, for any a  R, a·1 = 1·a = a.

(6) Commutatively: For any a, b  R, a·b = b·a  R.

(7) Multiplicative inverse: for any a  R, a  0, there exists a-1  R such that a·a-1 = a-1·a

= 1.

A ring R satisfying statement (6) is called commutative ring. A ring R satisfying statement (6) and (7) is called a field.

We usually write a·b as ab. A field can also be defined as a commutative ring with identity in which every element has a multiplicative inverse. Field of finite order (cardinality) is particularly interesting to coding theorists. Finite fields were discovered by Evariste Galois and are thus known as Galois field. A Galois field of order q is usually denoted GF(q). The Galois field is briefly described in next section.

Definition 2.7 Let a, b and n > 1 be integers. We say that a and b are congruent modulo n, written as a  b (mod n), if n(a – b); i.e., n divides a – b.

Example 2.3

1. 23  2 mod 7 and -2  19 mod 7.

2. Integer modulo n groups the infinite set of integers into n distinct equivalence classes, so the equivalence classes of integers under modulo 4 are shown below:

0 = {…, -12, -8, -4, 0, 4, 8, 12, …} 1 = {…, -11, -7, -3, 1, 5, 9, 13, …}

2 = {…, -10, -6, -2, 2, 6, 10, 14, …} 3 = {…, -9, -5, -1, 3, 7, 11, 15, …}.

Theorem 2.3 The integers {0, 1,…, p-1}, where p is a prime, form the field GF(p) under modulo p addition and multiplication.

Example 2.4

Let F be the set of integer modulo 11; that is, F = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.

Construct the finite field GF(11) under modulo 11 addition and multiplication, and list the order for every element of GF(11).

+ 0 1 2 3 4 5 6 7 8 9 10 0 0 1 2 3 4 5 6 7 8 9 10 1 1 2 3 4 5 6 7 8 9 10 0 2 2 3 4 5 6 7 8 9 10 0 1 3 3 4 5 6 7 8 9 10 0 1 2 4 4 5 6 7 8 9 10 0 1 2 3 5 5 6 7 8 9 10 0 1 2 3 4 6 6 7 8 9 10 0 1 2 3 4 5 7 7 8 9 10 0 1 2 3 4 5 6 8 8 9 10 0 1 2 3 4 5 6 7 9 9 10 0 1 2 3 4 5 6 7 8 10 10 0 1 2 3 4 5 6 7 8 9

· 0 1 2 3 4 5 6 7 8 9 10 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 2 3 4 5 6 7 8 9 10 2 0 2 4 6 8 10 1 3 5 7 9 3 0 3 6 9 1 4 7 10 2 5 8 4 0 4 8 1 5 9 2 6 10 3 7 5 0 5 10 4 9 3 8 2 7 1 6 6 0 6 1 7 2 8 3 9 4 10 5 7 0 7 3 10 6 2 9 5 1 8 4 8 0 8 5 2 10 7 4 1 9 6 3 9 0 9 7 5 3 1 10 8 6 4 2 10 0 10 9 8 7 6 5 4 3 2 1

element order element order

1 1 6 10

2 10 7 10

3 5 8 10

4 5 9 5

5 5 10 1

We examine some of the basic properties of Golois fields. The application of Golois fields is very important in the coding system. Finite fields of prime order are quite easy to construct. However, finite fields GF(q) do not exist for all values of q. q must equal pm, where p is a prime positive integer and m is a positive integer. In this dissertation, we restrict p = 2.

Definition 2.8 Let  be an element in GF(q). The order of  (written ord()) is the smallest positive integer m such that m = 1.

This definition is identical to that for the order of an element in a group. It should be noted, however, that for the case of the Galois field element, “order” is defined using the multiplicative operation and not the additive operation. We first note that the order of an arbitrary element  in the Glaois field GF(q) must be a divisor of (q–1).

Theorem 2.4 If m = ord() for some   GF(q), then m(q–1).

Definition 2.9 (The multiplicative structure of Galois field) Consider the Galois field GF(q).

1. If m does not divide (q–1), then there are no elements of order m in GF(q).

2. If m (q–1), then there are (m) elements of order m in GF(q), where the Euler  function ( m) evaluated at an integer m is the number of integers in the set {1,…, m–1} that are relatively prime to m (i.e., share no common divisors other than one).

Definition 2.10 An element with order (q–1) in GF(q) is called a primitive element in GF(q).

Every field GF(q) thus contains at least one primitive element . Let  be a primitive element in GF(q) and consider the sequence 1, , 2,…, q-2,  q-1,  q,…. By Definition 2.9,

q-1 is the first positive power of  in the sequence to repeat the value 1. Therefore, all nonzero elements in GF(q) can be represented as (q–1) consecutive powers of a primitive element .

Example 2.5

In the Example 2.4, ord(3) = 6 and ord(5) = 6. Thus, field elements 3 and 5 are primitive elements. Consider the consecutive powers of 3: 31 = 3, 32 = 2, 33 = 6, 34 = 4, 35 = 5, 36 = 1.

The powers of 3 generate all the nonzero field elements.

Theorem 2.5 The order q of a Galois field GF(q) must be a power of a prime.

The set of all polynomials with coefficients forms a commutative ring with identity under standard polynomial addition and multiplication. This ring is usually denoted GF(q)[x]

or Fq[x]. The notation GF(q)[x] is used to denote the collection of all polynomials anxn + ··· + a1x +a0 of arbitrary degree with coefficients {ai} in the finite field GF(q). The coefficient operations are performed using the operations for the field from which the coefficients were taken. For example, polynomial with binary coefficients in GF(2),

(x5 + x2) + (x2 + x + 1) = x5 + 2x2 + x + 1 = x5 + x + 1.

Definition 2.11 (Irreducible polynomials) A polynomial f(x) is irreducible if it cannot be expressed as a product of lower degree polynomials. These polynomials are also called prime polynomials.

Example 2.6

All irreducible polynomials of degree 2, 3, and 4 in GF(2)[x] are x2 + x + 1, x3 + x + 1, x3 + x2 + 1, x4 + x + 1, x4 + x3 + 1, and x4 + x3 + x2 + x + 1.

Definition 2.12 (Primitive polynomials) An irreducible polynomial p(x)  GF(p)[x] of degree m is said to be primitive if the smallest positive integer n for which p(x) divides xn – 1 is n = pm – 1; that is, p(x)xpm–1 – 1.

A primitive polynomial p(x)  GF(p)[x] is always irreducible in GF(p)[x], but irreducible polynomial are not always primitive.

Example 2.7

Irreducible polynomials and Primitive polynomials

1. x3 + x + 1 is irreducible in GF(2)[x]. Also, x3 + x + 1 is primitive in GF(2)[x], for the smallest polynomial of the form xn – 1 for which it is a divisor is x7 – 1 (7 = 23 – 1).

2. x4 + x + 1 is irreducible in GF(2)[x]. Also, x4 + x + 1 is primitive in GF(2)[x], for the smallest polynomial of the form xn – 1 for which it is a divisor is x15 – 1 (15 = 24 – 1). x4 + x3 + x2 + x + 1 is irreducible in GF(2)[x], but is a factor of x5 – 1 and thus not primitive in GF(2)[x].

3. x11 + x2 + 1 is irreducible in GF(2)[x]. Also, x11 + x2 + 1 is primitive in GF(2)[x], for the smallest polynomial of the form xn – 1 for which it is a divisor is x2047 – 1 (2047

= 211 – 1).

Theorem 2.6 The roots {j} of an mth-degree primitive polynomial p(x)  GF(p)[x] have order pm – 1.

Primitive polynomials p(x) = x11 + x2 + 1  GF(2)[x] has 11 roots, say {1, 2, 3, 4, 5,

6, 7, 8, 9, 10, 11}. Let 1 = 2, 2 = 4, 3 = 16, 4 = 256, 5 = 160, 6 = 1064, 7 = 1605,

8 = 158, 9 = 380, 10 = 1530, 11 = 1987. The order of all roots is 211 – 1 = 2047.

Given that  is a root of Primitive polynomials p(x) and  has order pm – 1, the pm – 1 consecutive powers of  form a multiplicative group of order pm – 1. The multiplication operation is performed by adding the exponents of the power of  modulo pm – 1. These exponential representations can be reexpressed by reducing the sequence of powers of  modulo the primitive polynomial. The pm – 1 consecutive powers of  can thus be shown to be the nonzero elements of the field GF(pm). The roots of a mth-degree primitive polynomial in GF(p)[x] are primitive elements in GF(pm).

Example 2.9

Let  be a root of primitive polynomials p(x) The representation of the field GF(24), constructed by the p(x) = x4 + x + 1, is shown in Table 2.1.

Table 2.1 Representation of the elements of GF(24) generated by 4 +  + 1 = 0 Exponential representation Polynomial representation

0 = 1

1 = 

2 = 2

3 = 3

4 = 4 =  + 1

5 = 5 = 2 + 

6 = 6 = 3 +2

7 = 7 = 4 + 3 = 3 +  + 1

8 = 8 = 4 + 2 +  = 2 + 1

9 = 9 = 3 + 

10 = 10 = 4 + 2 = 2 +  + 1

11 = 11 = 3 + 2 + 

12 = 12 = 4 +3 + 2 = 3 + 2 +  + 1

13 = 13 =4 + 3 + 2 +  = 3 + 2 + 1

14 = 14 = 4 + 3 +  = 3 + 1

0 = 0

Multiplication is easily performed through the use of the exponential representations.

The exponents of the two elements being multiplied together are added together modulo (24 – 1) to obtain the exponent of the product. Multiplication can also be performed through the polynomial representation. If a + b have the polynomial representations a22 + a1 + a0 and b22 + b1 + b0, respectively, then (a+b) mod 15 has polynomial representation

(a22 + a1 + a0) (b22 + b1 + b0) modulo (4 +  + 1).

Addition can also be performed using the polynomial representation. For example, computing 9 + 3 = (3 + ) + 3 =  in GF(24), the polynomials are then summed to obtain a third polynomial and re-expressed as a power of . One element operated on itself (1+1) is zero. Then multiplication is illustrated as 9·13 = 9+13 = 22 mod 15 = 7. We can find that the addition is actually an XOR operation and the multiplication is the exponential of the operation..

The polynomial representation for a finite field GF(pm) has coefficients in the GF(p).

Clearly, GF(pm) can thus be interpreted as a vector space over GF(p).

Table 2.1 can also represent as vectors over GF(24) and is shown in Table 2.2.

Table 2.2 Representations of the elements of vectors over GF(24)

Exponential representation Vector representation Label

3210

0 = 0001  1

1 = 0010  2

2 = 0100  4

3 = 1000  8

4 = 0011  3

5 = 0110  6

6 = 1100  12

7 = 1011  11

8 = 0101  5

9 = 1010  10

10 = 0111  7

11 = 1110  14

12 = 1111  15

13 = 1101  13

14 = 1001  9

0 = 0000  0

Using the labels, we can create the following standard operation “+” and “·”tables

+ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

1 1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14

2 2 3 0 1 6 7 4 5 10 11 8 9 14 15 12 13

3 3 2 1 0 7 6 5 4 11 10 9 8 15 14 13 12

4 4 5 6 7 0 1 2 3 12 13 14 15 8 9 10 11

5 5 4 7 6 1 0 3 2 13 12 15 14 9 8 11 10

6 6 7 4 5 2 3 0 1 14 15 12 13 10 11 8 9

7 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8

8 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7

9 9 8 11 10 13 12 15 14 1 0 3 2 5 4 7 6

10 10 11 8 9 14 15 12 13 2 3 0 1 6 7 4 5

11 11 10 9 8 15 14 13 12 3 2 1 0 7 6 5 4

12 12 13 14 15 8 9 10 11 4 5 6 7 0 1 2 3

13 13 12 15 14 9 8 11 10 5 4 7 6 1 0 3 2

14 14 15 12 13 10 11 8 9 6 7 4 5 2 3 0 1

· 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

2 0 2 4 6 8 10 12 14 3 1 7 5 11 9 15 13

3 0 3 6 5 12 15 10 9 11 8 13 14 7 4 1 2

4 0 4 8 12 3 7 11 15 6 2 14 10 5 1 13 9

5 0 5 10 15 7 2 13 8 14 11 4 1 9 12 3 6

6 0 6 12 10 11 13 7 1 5 3 9 15 14 8 2 4

7 0 7 14 9 15 8 1 6 13 10 3 4 2 5 12 11

8 0 8 3 11 6 14 5 13 12 4 15 7 10 2 9 1

9 0 9 1 8 2 11 3 10 4 13 5 12 6 15 7 14

10 0 10 7 13 14 4 9 3 15 5 8 2 1 11 6 12

11 0 11 5 14 10 1 15 4 7 12 2 9 13 6 8 3

12 0 12 11 7 5 9 14 2 10 6 1 12 15 3 4 8

13 0 13 9 4 1 12 8 5 2 15 11 6 3 14 10 7

14 0 14 15 1 13 3 2 12 9 7 6 8 4 10 11 5

15 0 15 13 2 9 6 4 11 1 14 12 3 8 7 5 10

A vector space may be represented by a polynomial which can be expressed as

0 1 2

) 2

(x f x f x f

f     , where x is called an unknown and the coefficients fi are in GF(q).

The polynomail f(x) fn1xn1  f2x2f1xf0 with the degree n–1 or less can rewrite as an n-tuple vector (fn-1,…,f1, f0). This correspondence is illustrated as follows.

Example 2.10

Two polynomials f(x) and g(x) are over GF(24), which means the coefficients of f(x) and g(x) are in GF(24), and let.

f(x) = 9x2 + 6x + 1 = 14x2 + 5x + 0  f = (9, 6, 1), g(x) = 11x2 + 8x + 2 = 7x2 + 3x +   g = (11, 8, 2).

Then, f(x) + g(x) = (14 + 7)x2 + (5 + 3)x + (0 + ) = x2 + 11x + 3  f + g = (9, 6, 1) + (11, 8, 2) = (9+11, 6+8, 1+2) = (2, 14, 3),

and f(x)·g(x) = (14x2 + 5x + 0)(7x2 + 3x + ) = 6x4 + 7x3 + 3x2 + 2x +   f·g

= (9, 6, 1)·(11, 8, 2) = (12, 11, 8, 4, 2).

Definition 2.13 Let be an element in GF(pm). We call the monic polynomial of smallest degree, which has coefficients in GF(p) and  as a root, the minimal polynomial of .

Example 2.11

We will find the minimal polynomials of all the elements of GF(23). First of all, the elements 0 and 1 will have minimal polynomials x and x + 1 respectively. We construct GF(23) using the primitive polynomial x3 + x + 1 which has the primitive element  as a root. There are 4 monic 2nd degree polynomials over GF(23), x2, x2 + 1, x2 + x, and x2 + x + 1. The first three polynomials can be factored and so have roots in GF(2), but these elements have already been taken care of. The last quadratic has no roots in GF(23) which we can determine by substituting the elements into this polynomial. Consequently, any other minimal polynomials will have to have degree at least 3. The minimal polynomial of  is therefore the primitive polynomial x3 + x + 1. This polynomial also has two other roots, 2 and 4 (which we can determine by substitution of the field elements). The three elements 3, 6 and 5 all satisfy the cubic x3 + x2 + 1, so it must be the minimal polynomial for these elements.

Element Minimal Polynomial

0 x

1 x + 1

, 2, 4 x3 + x + 1

3, 6, 5 x3 + x2 + 1

Theorem 2.7 Let a(x) be the minimal polynomial of an element in GF(pm). Then:

(i) a(x) is irreducible.

(ii) if  is a root of a polynomial f(x) with coefficients in GF(p), then a(x) divides f(x);

that is, a(x)f(x).

(iii) a(x) divides xpm – x.

(iv) if a(x) is primitive, then its degree is m. In any case, the degree of a(x) is equal or less to m; that is, deg{a(x)}  m.

2.2 The Structure of Linear Block Codes

Cyclic code is a kind of linear block bode. Linear block codes are the most easily implemented and therefore most widely used of the block codes. By definition they form vector subspaces over finite fields and they have a lot of interesting properties.

Definition 2.14 An (n, k) block code C uniquely maps a block of information symbols of length k, i.e., m = (mk-1,…, m1, m0) to a codeword of length n, i.e., c = (cn-1,…, c1, c0). The number of redundancy symbols is n – k. The ratio R = k/n is the code rate.

The encoding process consists of breaking up the data stream into blocks, and mapping these blocks onto codewords in C. This mapping is usually one-to-one, ensuring that the encoding process can be reversed at the receiver and the original data block recovered. If the symbols in the data stream can take on any value in GF(q), then the collection of all possible k-tuples m = (mk-1,…, m1, m0) forms a vector space over GF(q). That is, there are qk codewords in C, and all-zero vector is a codeword.

Definition 2.15 Let a and b are codewords in a block code C. If C is a linear code, then any linear combination of a and b are codewords in C.

Definition 2.16 The dimension of a linear code is the dimension of the corresponding vector space.

Definition 2.17 The Hamming norm or weight of a binary vector a = (an-1,…, a0) is designated by w(a).

Definition 2.18 The Hamming distance or distance between two binary vectors a and b is defined by d(a, b) = w(a + b).

Definition 2.19 The minimum distance d of a code C is the minimum distance between any two different codewords, i.e., d min {d(a,b)}

b C,a a,b

 .

Since C is a vector subspace over GF(q), the linear combination of any set of codewords is a codeword. The minimum distance of linear code is equal to the weight of the lowest weight nonzero codeword.

The (n, k, d) is used to denote a linear code C such that

 n is the length of the codewords.

 k is the number of data symbols in a codeword.

 d is the minimum distance in C.

Example 2.12

Create the codewords of the binary systematic (7, 4, 3) Hamming code. The generator matrix is



There are 16 codewords for this linear code and they are shown as below.

Table 2.3 The codewords of binary systematic Hamming code

Message m Codeword c

The linear combination of any set of codewords in Table 2.3 is also a codeword in Table 2.3. Let c1 + c2 + c3 + c4 = c4, then the resulting codeword c4 is also a codeword. Let c10 + c12, then the resulting codeword c6 is also a codeword.

2.3 The General Theory of Cyclic Codes

Cyclic codes are a special class of error correcting codes. Within the family of cyclic codes there are certain special families of codes that are extremely powerful. These include the QR, BCH, and Reed-Solomon codes.

2.3.1 The Properties of Cyclic Codes

Definition 2.20 A q-ary (n, k) linear code C is called a cyclic code if every cyclic shift of a code vector c = (cn-1, cn-2,…, c1, c0) in C is also a code vector c’ = (cn-2, cn-3,…, c0, cn-1) in C.

If the codeword c’ is the right cyclic shift of the codeword c  C, then c’(x) = x·c(x) mod (xn – 1)  C. This can be seen as follows.

x·c(x)  x·(cn-1x n-1 + cn-2xn-2 + … + c1x + c0) mod (xn – 1)

 (cn-1x n + cn-2xn-1 + … + c1x2 + c0x) mod (xn – 1)

 (cn-2x n-1 + cn-3xn-2 + … + c0x + c n-1) mod (xn – 1)

 c’(x) mod (xn – 1)

In a similar manner, the cyclic shifts of c and the associated polynomials is represented as follows.

c = (cn-1,…, c1, c0)  c(x) = cn-1x n-1 + … + c1x + c0

c’ = (cn-2,…, c0, cn-1)  c’(x) = cn-2x n-1 + … + c0x + cn-1

c’’ = (cn-3,…, cn-1, cn-2)  c’(x) = cn-3x n-1 + … + cn-1x + cn-2 (2.1)

c(n-1) = (c0,…, c2, c1)  c’(x) = c0x n-1 + … + c2x + c1

Theorem 2.8 C is a q-ary linear cyclic code of length n if and only if the code polynomials in C form an ideal in GF(q)[x]/(xn – 1).

Let a(x) = an-1x n-1 + … + a1x + a0 be an arbitrary polynomial in GF(q)[x]/(xn – 1). The product a(x)c(x) is a linear combination of cyclic shifts of c. Since C forms a vector space, a(x)c(x) must be a valid code polynomial.

a(x)c(x)  C for all a(x)  GF(q)[x]/(xn – 1), c(x)  C.

Example 2.14

From example 2.13, the binary (7, 4, 3) Hamming code is a linear code. The right cyclic shift one bit of every codeword c in Table 2.3, we can obtain another codeword c’ in C. The result is shown in Table 2.4. Similarly, if the right cyclic n bits of any codeword in Table 2.3, then the resulting codeword is itself.

Table 2.4 Hamming code is a cyclic code

Codeword c Codeword c’

0 0000000 0000000

1 1010001 1101000

2 1110010 0111001

3 0100011 1010001

4 0110100 0011010

5 1100101 1110010

6 1000110 0100011

7 0010111 1001011

8 1101000 0110100

9 0111001 1011100

10 0011010 0001101

11 1001011 1100101

12 1011100 0101110

13 0001101 1000110

14 0101110 0010111

15 1111111 1111111

Theorem 2.9 Let C be a q-ary (n, k) linear cyclic code.

1. Within the set of code polynomials in C there is a unique monic polynomial

0 1 0

)

(x g x g x g x g

g

ink i i n k n k

  

  with minimal degree (n–k) < n and g0  0, g(x) is called the generator polynomial of C.

2. Every code polynomial c(x) in C can be expressed uniquely as c(x) = m(x)g(x), where g(x) is the generator polynomial of C and m(x) is a polynomial of degree less than k in GF(q)[x].

3. The generator polynomial g(x) of C is a factor of xn – 1 in GF(q)[x].

2.3.2 Encoding and Examples

The encoding of the cyclic codes is very important in FEC. In general, there are two kinds of encoding methods to generate codewords. In this section, we briefly describe two encoding processes of cyclic codes.

Let m(x)

ik01miximk1xk1m1xm0  m = (mk-1,…, m1, m0), from the last theorem the codeword is obtained by

c(x) = m(x)g(x) = cn-1x n-1 + … + c1x + c0  c = (cn-1,…, c1, c0) (2.2)

Definition 2.21 An encoder for a block code is systematic if the first k bits of every codeword are the same k bits of the message words; otherwise, it is called non-systematic.

Example 2.15

Let g(x) = x3 + x + 1 be the generator polynomial of the binary (7, 4, 3) Hamming code.

Let m(x) = 1 be a message polynomial. Then, the corresponding codeword is obtained by c(x)

= m(x)g(x) = 1(x3 + x + 1) = x3 + x + 1. The total 16 codewords are listed below.

The polynomial multiplication in Eq. (2.2) can be reexpressed below by using matrix multiplication.

Eq. (2.3) provides a convenient general form of codeword with generator matrix for cyclic codes.

c =

By Eq. (2.4), we can obtain the convenient general form of codeword with the generator matrix as shown below.

c =

The total codewords of the vector representation for Example 2.15 are listed below.

Table 2.6 Encoding by using Eq. (2.5)

# m c

The encoding method described above is called non-systematic encoding because the original message does not appear in the codeword. Linear codes may be systematic or non-systematic. For a systematic linear code, the original message appears unaltered in the codeword.

In a systematic code, every codeword consists of the original k message digits along with n – k additional parity check digits. Retrieving the original k message bits from the codeword is trivial in a systematic code. Non-systematic codes have codewords that bare no resemblance to the original unencoded information. Building good linear codes and designing efficient decoding algorithms forms the basis for most of the work in error control codes. Systematic codes are often preferred over the non-systematic codes because they allow quick look.

The parity check digits of a systematic code can be obtained by parity check polynomial

p(x) = m(x)xn-k mod g(x). (2.6)

Thus, the representation of the systematic codeword with parity check digits in the higher n – k positions is shown below.

c(x)= xk(m(x)xn-k mod g(x)) + m(x). (2.7)

Example 2.17

By using Eq. (2.7), the total 16 codewords of systematic (7, 4, 3) Hamming code are listed in Table 2.7.

Table 2.7 Encoding by using Eq. (2.7)

Using the Gaussian elimination and column reordering in the non-systematic generator matrix given in (2.4), it is always possible to obtain a systematic generator matrix as given below.

Example 2.18

Using the Gaussian elimination and column reordering in the non-systematic generator matrix given in Eq. (2.5), Eq. (2.8) can be rewritten as



Using Eq. (2.10), the total 16 codewords of systematic (7, 4, 3) Hamming code are listed in Table 2.8.

Table 2.8 Encoding by using Eq. (2.10)

# m c

2.4 The Basic Properties of QR Codes

Let (n, (n + 1) / 2, d) denote a binary QR code with generator polynomial g(x) over a ground field GF(2) and let n be a prime number of the form n = 8l ± 1, where l is an arbitrary positive integer and m be the smallest positive integer such that n divides 2m – 1. The set Qn of quadratic residues modulo n is the set of nonzero squares modulo n; that is,

}.

1 1

for mod

{  2   

j j x n x n

Qn (2.11)

Let m be the smallest positive integer such that n divides 2m – 1 and let  be a generator of the multiplicative group of all nonzero elements in GF(2m). Then the element  = u in GF(2m), where u = (2m – 1)/n, is a primitive n-th root of unity in GF(2m). A binary (n, k, d) QR code is a cyclic code with the generator polynomial g(x) of the form,

Qn

i

x i

x

g( ) (  ). (2.12)

A codeword of the (n, k, d) QR code is a binary vector c = (cn-1,…, c1, c0) so that its associated polynomial c(x) = cn-1x n-1 + … + c1x + c0 is a multiple of g(x). If the codeword c is transmitted through a noisy channel, and if the vector r = (rn-1,…, r1, r0) is received, then the polynomial r(x) = rn-1x n-1 + … + r1x + r0 corresponding to r can be expressed as a sum of the code polynomial c(x) and the error (or error pattern) polynomial e(x) = en-1x n-1 + … + e1x + e0, namely r(x) = c(x) + e(x). The set of known syndromes is obtained by evaluating r(x) at the roots of g(x), i.e.,

n

The following lemma given in [16] shows that the mapping between the syndromes and error patterns is one-to-one. For a detailed proof, see [16].

Lemma 2.1 For a (n, k, d) binary cyclic code with the error-correcting capability

( 1)/2

 d

t , the mapping between the syndromes of a code and the error patterns e of weight ≤ t is one-to-one.

If, during the data transmission, v errors occur in the received vector r, then the error polynomial has v nonzero terms, namely, e(x)xl1 xlv, where 0  l1 <…< lv  n–1.

And the syndrome S can be written as i SiZ1i Zvi, where iQn and Zj lj for all 1  j  v, are called the error locators. Expanding Eq. (2.13), we obtain the following a sequence of 2t algebraic syndrome equations in the v unknown error locations.

t

Eq. (2.14) is called Power-sum symmetric functions. Since they form s system of nonlinear algebraic equations in multiple variables, they are somewhat difficult to solve in a direct manner. For any binary QR codes, there is an obvious relation among syndromes, namely S2iSi2, with sub-index modulo n if necessary. Assume that v errors occur: One

defines the error-locator polynomial L(x) to be the polynomial of degree v

where the coefficients of L(x) are

v

The expressions in Eq. (2.16) are the elementary symmetric functions of the error locators. In order to develop the algebraic decoding algorithm, it is well known that the power sums Si and the elementary symmetric functions σj are related by the following Newton identities. For the detailed proof, see [2].

The expressions in Eq. (2.16) are the elementary symmetric functions of the error locators. In order to develop the algebraic decoding algorithm, it is well known that the power sums Si and the elementary symmetric functions σj are related by the following Newton identities. For the detailed proof, see [2].

相關文件