Chapter 1 Introduction
1.2 Structure of the Dissertation
The remaining chapters of this dissertation are organized as follows. Chapter 2 gives a brief overview of the mathematic background of the binary QR codes. Some improvements and modifications in the ADA given in [16] are described in Chapter 3. Chapter 4 develops the novel TLDA for decoding the binary systematic (47, 24, 11) QR code. Computer
simulation results for the proposed TLDA, LTDA given in [18], and the ADA given in [16]
are shown in Chapter 5. Finally, this dissertation concludes with a brief summary for the proposed decoding scheme in Chapter 6.
Chapter 2
Mathematical Preliminaries of QR Codes
This chapter reviews some of the basic finite field mathematical ideas and notation that will be used throughout this dissertation. The theories of QR codes are derived from the finite field of algebra. A mathematical background of QR codes is provided in this chapter. It would be helpful for readers to understand the relations between the algebraic structure and QR codes.
2.1 The Basic Theory of Galois 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 [30].
Definition 2.1.1 A group is a set of objects G with binary operation “·” which has been defined. The operation must obey the following four requirements for any element a, b, c G:
1. Closure: a·b G.
2. Associativity: (a·b) ·c = a·(b·c).
3. Identity: there is an identity element e G such that a·e = e·a = a for all a G.
4. Inverse: for every a in G there is an unique element a-1 in G such that a·a-1 = a-1·a = e.
A group is said to be commutative (or abelian) 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 “·”, “*”, or “”, and the group is sometimes said to be “multiplicative”.
Definition 2.1.2 The order of a group G, denoted G, is defined to be the cardinality of the group.
Definition 2.1.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.1
Let G be a group of order G = 6 under modulo 7 multiplication; that is, G = {1, 2, 3, 4, 5, 6}. The following tables completely define the group operation and the 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.1.4 A ring is a collection of elements R with two binary operations “+” and “·”
such that the following three properties hold:
1. R forms a commutative group under “+”. The additive identity element is labeled
“0”.
2. The operation · is associative: (a·b)·c = a·(b·c) for all a, b, c R.
3. The operation · distributes over +: a·(b + c) = (a·b) + (a·c).
A ring is said to be a commutative ring if property 4 is satisfied.
4. The operation · commutes (i.e., a·b = b·a).
5. The operation · has an identity element, which is labeled “1”.
A ring that satisfies both property 4 and property 5 is said to be a commutative ring with identity. For example, the set of all polynomials with binary coefficients forms a commutative ring with identity under standard polynomial addition and multiplication. This ring is usually denoted GF(2)[x] or F2[x].
Definition 2.1.5 Let F be a set of objects on which two operations “+” and “·” are defined. F is said to be a field if and only if
1. F forms a commutative group under “+”. The additive identity element is labeled
“0”.
2. F–{0} (the set F with the additive identity removed) forms a commutative group under “·”. The multiplicative identity element is labeled “1”.
3. The operations “+” and “·” distribute: a·(b + c) = (a·b) + (a·c).
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) are 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 modulus operation is very important in finite field.
Definition 2.1.6 Let a, b and m > 1 be integers. We say that a is congruent to b modulo m, written as a b (mod m), if m(a – b); i.e., m divides (a – b).
Example 2.1.2
1. 31 11 mod 20 and -2 19 mod 7.
2. Modulo equality produces an infinite set, so the integers equal to 5 mod 7 are {…, -9, -2, 5, 12, 19, …}.
Theorem 2.1.1 The integers {0, 1,…, p–1}, where p is a prime, form the field GF(p) under modulo p addition and multiplication.
Example 2.1.3
Let F be the set of integer modulo 7, namely F = {0, 1, 2, 3, 4, 5, 6}. Construct GF(7) under modulo 7 addition and multiplication, and list the order of each field element.
+ 0 1 2 3 4 5 6 · 0 1 2 3 4 5 6 0 0 1 2 3 4 5 6 0 0 0 0 0 0 0 0 1 1 2 3 4 5 6 0 1 0 1 2 3 4 5 6 2 2 3 4 5 6 0 1 2 0 2 4 6 1 3 5 3 3 4 5 6 0 1 2 3 0 3 6 2 5 1 4 4 4 5 6 0 1 2 3 4 0 4 1 5 2 6 3 5 5 6 0 1 2 3 4 5 0 5 3 1 6 4 2 6 6 0 1 2 3 4 5 6 0 6 5 4 3 2 1
element order element order
1 1 4 3
2 3 5 6
3 6 6 2
Next, we examine some of the basic properties of Golois fields. The application of Golois fields is very important in 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.1.7 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.1.2 If t = ord() for some GF(q), then t(q–1).
Definition 2.1.8 (The multiplicative structure of Galois field) Consider the Galois field GF(q).
1. If t does not divide (q–1), then there are no elements of order t in GF(q).
2. If t(q–1), then there are (t) elements of order t in GF(q), where the Euler function (t) evaluated at an integer t is the number of integers in the set {1,…, t–1}
that are relatively prime to t (i.e., share no common divisors other than one).
Definition 2.1.9 An element with order (q–1) in GF(q) is called a primitive element in GF(q).
Every finite 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.1.8, 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.1.4
The primitive elements in Example 2.1.3 are 3 and 5. Consider the consecutive powers of 5: 51 = 5, 52 = 4, 53 = 6, 54 = 2, 55 = 3, 56 = 1. All of the nonzero field elements are
accounted for as powers of 5.
Theorem 2.1.3 The order q of a Galois field GF(q) must be a power of a prime.
2.2 Polynomial Arithmetic over Galois Fields
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.2.1 (Irreducible polynomials) A polynomial f(x) is irreducible in GF(q) if f(x) cannot be factored into a product of lower-degree polynomials in GF(q)[x].
Definition 2.2.2 (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.2.1
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.2.1 The roots {1, 2,…, m} of an mth-degree primitive polynomial p(x) GF(p)[x] have order pm – 1.
Example 2.2.2
Primitive polynomials p(x) = x4 + x + 1 GF(2)[x] has 4 roots, say {1, 2, 3, 4}. Let
1 = 2, 2 = 4, 3 = 3, 4 = 5. The order of all roots is 24 – 1 = 15.
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.2.3
Let be a root of primitive polynomials p(x) The representation of the field GF(23), constructed by the p(x) = x3 + x + 1, is shown in Table 2.2.1.
Table 2.2.1 Representation of the elements of GF(23) generated by 3 + + 1 = 0 Exponential representation Polynomial representation
0 = 1
1 =
2 = 2
3 = 3 = + 1
4 = 4 = 2 +
5 = 5 = 3 + 2 = 2 + + 1
6 = 6 = 3 +2 + = + 1 +2 + = 2 + 1
0 = 0
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).
Addition can also be performed using the polynomial representation. For example, computing 4 + 6 = (2 + ) + (2 + 1) = + 1 in GF(23), the polynomials are then summed to obtain a third polynomial and re-expressed as a power of . We can find that the addition is actually an XOR operation and the multiplication is the exponential of the operation.
Moreover, Table 2.2.1 can also be represented as vectors over GF(23) and is shown in Table 2.2.2.
Table 2.2.2 Representation of the elements of vectors over GF(23)
Exponential representation Vector representation Label
210
0 = 001 1
1 = 010 2
2 = 100 4
3 = 011 3
4 = 110 6
5 = 111 7
6 = 101 5
0 = 000 0
Using the labels, we can create the following standard operation “+” and “·”tables
+ 0 1 2 3 4 5 6 7 · 0 1 2 3 4 5 6 7 0 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0 0 1 1 0 3 2 5 4 7 6 1 0 1 2 3 4 5 6 7 2 2 3 0 1 6 7 4 5 2 0 2 4 6 3 1 7 5 3 3 2 1 0 7 6 5 4 3 0 3 6 5 7 4 1 2 4 4 5 6 7 0 1 2 3 4 0 4 3 7 6 2 5 1 5 5 4 7 6 1 0 3 2 5 0 5 1 4 2 7 3 6 6 6 7 4 5 2 3 0 1 6 0 6 7 1 5 3 2 4 7 7 6 5 4 3 2 1 0 7 0 7 5 2 1 6 4 3
Multiplication is easily performed through the use of the exponential representations.
The exponents of the two elements being multiplied together are added together modulo (23 – 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 7 has polynomial representation
(a22 + a1 + a0) (b22 + b1 + b0) modulo (3 + + 1).
A vector space may be represented by a polynomial expression which can be expressed as the form, f(x) f2x2 f1x f0, where x is called an unknown and the coefficients fi
are in GF(q). The polynomail f(x) fn1xn1 f2x2 f1x f0 with the degree n–1 or less can be rewritten as a n-tuple vector (fn-1,…,f1, f0). This correspondence is illustrated as follows.
Example 2.2.4
Two polynomials f(x) and g(x) are over GF(23), which means the coefficients of f(x) and g(x) are in GF(23), and let
f(x) = 5x2 + 3x + 1 = 6x2 + 3x + 0 f = (5, 3, 1), g(x) = 6x2 + x + 2 = 4x2 + 0x + g = (6, 1, 2).
The addition of f(x) and g(x) is f(x) + g(x) = (6 + 4)x2 + (3 + 0)x + (0 + ) = 3x2 +
x + 3 f + g = (5, 3, 1) + (6, 1, 2) = (5+6, 3+1, 1+2) = (3, 2, 3).
The multiplication of f(x) and g(x) is f(x)·g(x) = (6x2 + 3x + 0)(4x2 + 0x + ) = 3x4 + 2x3 + 2x2 + 5x + f·g = (5, 3, 1)·(6, 1, 2) = (3, 4, 4, 7, 2).
Definition 2.2.3 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.2.5
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
2.3 Linear Block Codes
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.3.1 A block code C consists of a set of m codewords {cm-1,…, c1, c0}. Each codeword is of the form c = (cn-1,…, c1, c0). If the individual coordinates take on values from the GF(q), then the code C is said to be q-ary.
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.3.2 Consider a block code C consisting of n-tuples {(cn-1,…, c1, c0)} of symbols from GF(q). C is a q-ary linear code if and only if C forms a vector subspace over GF(q).
Definition 2.3.3 The dimension of a linear code is the dimension of the corresponding vector space.
Definition 2.3.4 The Hamming norm or weight of a binary vector a = (an-1,…, a0) is designated by w(a).
Definition 2.3.5 The Hamming distance or distance between two binary vectors a and b is defined by d(a, b) = w(a + b).
Definition 2.3.6 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 notation of (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.3.1
Create the codewords of the binary systematic (7, 4, 3) Hamming code. The generator
matrix is
1 0 0 0 1 0 1
0 1 0 0 1 1 1
0 0 1 0 1 1 0
0 0 0 1 0 1 1
G .
There are 16 codewords for this linear code and they are listed in the following table.
Table 2.3.1 The codewords of binary systematic Hamming code
Message m Codeword c
0 0000 0000000
1 0001 1010001
2 0010 1110010
3 0011 0100011
4 0100 0110100
5 0101 1100101
6 0110 1000110
7 0111 0010111
8 1000 1101000
9 1001 0111001
10 1010 0011010
11 1011 1001011
12 1100 1011100
13 1101 0001101
14 1110 0101110
15 1111 1111111
Example 2.3.2
The linear combination of any set of codewords in Table 2.3.1 is also a codeword in Table 2.3.1. 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.4 Cyclic Codes
Cyclic codes are an especially useful kind of error-correcting code, and BCH codes, Reed-Solomon codes, and QR codes are especially useful kinds of cyclic codes. A good (n, k, d) cyclic code has small n and large k and d.
2.4.1 General Properties of Cyclic Codes
Definition 2.4.1.1 An (n, k) linear code C is a cyclic code (or linear cyclic code) if the cyclic shift of each codeword c = (cn-1,…, c1, c0) C is also a codeword c’ = (cn-2,…, c0, cn-1) C.
If the codeword c’ is the right (or left) 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.4.1.1)
c(n-1) = (c0,…, c2, c1) c’(x) = c0x n-1 + … + c2x + c1
Theorem 2.4.1.1 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.4.1.1
From example 2.3.2, 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.1, we can obtain another codeword c’ in C. The result is shown in Table 2.4.1.1. Similarly, if the right cyclic n bits of any codeword in Table 2.3.1, then the resulting codeword is itself.
Table 2.4.1.1 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.4.1.2: 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.4.2 Encoding of Cyclic Codes
The codewords can be encoded by vector methods or by polynomial methods. In this section, we will introduce the encoding process based on the two types of methods.
Let m(x)
ik01mixi mk1xk1m1xm0 m = (mk-1,…, m1, m0), from last theorem the codeword is obtained byc(x) = m(x)g(x) = cn-1x n-1 + … + c1x + c0 c = (cn-1,…, c1, c0) (2.4.2.1)
Definition 2.4.2.1 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.
The following example describes the non-systematic encoding for the binary (7, 4, 3) Hamming code.
Example 2.4.2.1
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 of the binary (7, 4, 3) Hamming code are listed below.
Table 2.4.2.1 Non-systematic encoding of the binary (7, 4, 3) Hamming code by using Eq.
(2.4.2.1)
# m(x) c(x)
0 0 0
1 1 x3 + x + 1
2 x x4 + x2 + x
3 x + 1 x4 + x3 + x2 + 1
4 x2 x5 + x3 + x2
5 x2 + 1 x5 + x2 + x + 1 6 x2 + x x5 + x4 + x3 + x 7 x2+ x + 1 x5 + x4 + 1
8 x3 x6 + x4 + x3
9 x3 + 1 x6 + x4 + x + 1 10 x3 + x x6 + x3 + x2 + x 11 x3 + x +1 x6 + x2 + 1 12 x3 + x2 x6 + x5 + x4 + x2 13 x3 + x2 + 1 x6 + x5 + x4 + x3 + x2 + x + 1 14 x3 + x2 + x x6 + x5 + x
15 x3 + x2 + x + 1 x6 + x5 + x3 + 1
The polynomial multiplication in Eq. (2.4.2.1) can be reexpressed below by using matrix multiplication.
c(x) = m(x)g(x) = (mk-1x k-1 + … + m1x + m0)g(x)
= mk-1x k-1g(x) + … + m1xg(x) + m0g(x) (2.4.2.2)
=
) (
) (
) ( ]
[
1
0 1 1
x g
x xg
x g x m m m
k
k
.
Eq. (2.4.2.2) provides a convenient general form of codeword with generator matrix for cyclic codes.
c =
By Eq. (2.4.2.3), we can obtain the convenient general form of codeword with the generator matrix as shown below.
c =
The total 16 codewords of the vector representation for Example 2.4.2.1 are listed below.
Table 2.4.2.2 Non-systematic encoding of the binary (7, 4, 3) Hamming code by using Eq.
(2.4.2.4)
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 the following parity check polynomial
p(x) = m(x)xn-k mod g(x). (2.4.2.5)
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.4.2.6)
Example 2.4.2.3
By using Eq. (2.4.2.6), the total 16 codewords of the binary (7, 4, 3) Hamming code are listed below.
Table 2.4.2.3 Systematic encoding of the binary (7, 4, 3) Hamming code by using Eq.
Using the Gaussian elimination and column reordering in the non-systematic generator matrix given in Eq. (2.4.2.3), it is always possible to obtain a systematic generator matrix as given below. be obtained from
Example 2.4.2.4
Using the Gaussian elimination and column reordering in the non-systematic generator matrix given in Eq. (2.4.2.4), Eq. (2.4.2.7) can be rewritten as
Using Eq. (2.4.2.9), the total 16 codewords of the binary (7, 4, 3) Hamming code are listed below.
Table 2.4.2.4 Systematic encoding of the binary (7, 4, 3) Hamming code by using Eq.
(2.4.2.9)
2.5 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 parameters of binary QR codes with code length less than or equal to 241 are listed in Table 2.5.1.
Table 2.5.1 The parameters of some binary QR codes
l n k d l n k d l n k d
1 7 4 3 10 79 40 15 21 167 84 23
2 17 9 5 11 89 45 17 24 191 96 27
3 23 12 7 12 97 49 15 24 193 97 27
4 31 16 7 13 103 52 19 25 199 100 31
5 41 21 9 14 113 57 15 28 223 112 31
6 47 24 11 16 127 64 19 29 233 117 25
9 71 36 11 17 137 69 21 30 239 120 31
9 73 37 13 19 151 76 19 30 241 121 31
2.5.1 Generator Polynomial
The set Qn of quadratic residues modulo n is the set of nonzero squares modulo n; that is,
}.
46 1
for mod
{ 2
j j x n x
Qn (2.5.1)
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,
2.5.2 Syndrome Computation and Error-Locator Polynomial
A codeword of the (n, k, d) QR code is a binary vector c = (cn-1,…, c1, c0) so that its
The following lemma given in [14] shows that the mapping between the syndromes and error patterns is one-to-one. For a detailed proof, see [14].
Lemma 2.5.1 For a (n, k, d) binary cyclic code with the error-correcting capability t =
(d1)/2
, 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 Si can be written as Si Z1i Zvi, where iQn and Zj lj for
all 1 j v, are called the error locators. Expanding Eq. (2.5.3), we obtain the following a sequence of 2t algebraic syndrome equations in the v unknown error locations.
t
Eq. (2.5.4) 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 S2i Si2, 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.5.6) are the elementary symmetric functions of the error locators. Power-sum symmetric functions Si and elementary symmetric functions σj are related by Newton’s identities [2], which are generally expressed as follows for polynomials over arbitrary fields.
S1 + σ1 = 0
S2 + σ1S1 + 2σ2 = 0 S3 + σ1S2 + σS1 + 3σ3 = 0
…
Sv + σ1Sv-1 + σ2Sv-2 + … + σv-1S1 + vσv = 0 (2.5.7) Sv+1 + σ1Sv + σ2Sv-1 + … + σvS1 = 0
…
S2t + σ1S2t-1 + σ2S2t-2 + … + σvS2t-v = 0
If there is a sufficient number of consecutive known syndromes for a given number of errors, one can directly solve from Newton’s identities for σj, 1 ≤ j ≤ v. However, if there are not enough consecutive syndromes, one first tries to find the unknown syndromes [31] [32], and then to find L(z) from the Newton identities. In either case, once L(z) is found, the error pattern is found by a Chien search method of the roots of L(z) over the set of all the n-th roots of unity. Finally, the error location numbers are the reciprocals of these roots.
Chapter 3
An Improved Algebraic Decoding Algorithm of the Binary (47, 24, 11) QR Code
In this chapter an improved ADA of the binary systematic (47, 24, 11) QR code is proposed. This improved ADA is considerably faster in decoding time than that of the method given in [7].
3.1 Background of the Binary (47, 24, 11) QR Code
To introduce the binary (47, 24, 11) QR code, we first compute the set of quadratic residues, modulo 47, Q47 as follows: unity in GF(223). The generator polynomial g(x) of the binary (47, 24, 11) QR code is defined by
where the degree of g(x) is 23, which is the multiplicative order of the integer 2 modulo the
where the degree of g(x) is 23, which is the multiplicative order of the integer 2 modulo the