Basic galois field arithmatics required for error control codes

87
GALOIS FIELD ALGEBRA FOR ERROR CONTROL CODES

Transcript of Basic galois field arithmatics required for error control codes

Page 1: Basic galois field arithmatics required for error control codes

GALOIS FIELD ALGEBRA FOR ERROR

CONTROL CODES

Page 2: Basic galois field arithmatics required for error control codes

SETS Collection of objects.

A set with n objects is -- { s1, s2, …., sn}, where s1, s2, etc are set’s elements.

A new set formed using any m elements of n elements of a set is

subset of original set.

Finite sets – finite number of elements.

e.g. set of Decimal digits is { 0 1 2 3 4 5 6 7 8 9}

Binary set { 0 1} is subset of decimal set.

Infinite sets – infinite number of elements.

e.g. non-zero positive integers, {1,2,3,….} Set of real numbers.

Operations between elements within a set can be understood by

higher mathematical structure called “Groups”.

Page 3: Basic galois field arithmatics required for error control codes

GROUPS A set G on which a binary operation * is defined between elements

within the set is called Group if following conditions are satisfied:-

1. The group is closed under operation *. (Closure property) 1. If a and b are elements of set, then c = a * b also belong to the set.

2. The operation * is associative. 1. a * ( b * c ) = ( a * b ) * c

3. There exists a unique identity element e within the set such that for any element a, 1. a * e = e * a = a

4. For any element a, there exists unique inverse a’ within the set such that, 1. a * a’ = a’ * a = e

If a * b = b * a, group is commutative (Abelian Group). It is NOT a necessary condition for a set to be group.

Page 4: Basic galois field arithmatics required for error control codes

GROUP OPERATIONS

Group operation is normally addition or multiplication.

Gives Additive Groups or Multiplicative Groups.

Example: Binary numbers { 0, 1 } in modulo–2 addition operation.

1. Closure property obeyed.

2. It is associative.

3. Identity element is 0.

4. Each element is its own inverse. ( Addition should result in 0.)

5. It also forms a commutative group.

For coding theory, it is an important group.

Page 5: Basic galois field arithmatics required for error control codes

EXAMPLE

Find whether ordinary addition forms a group over

A) { 0,1,2,…} B) {0. ±1, ±2, …}

A) No. Addition over this set fails to generate the group.

1. Set is closed. 3 + 4 = 7, a member.

2. Set is associative. (3 + 4) + 7 = 3 + ( 4 + 7) = 14

3. Identity element is 0. Element unaltered when added to 0.

4. But set does not contain inverse of any element. E.g. inverse of 9 is -9.

B) Yes. Addition over this group forms a commutative group.

1. Set is closed. 3 + 4 = 7, a member.

2. Set is associative. (3 + 4) + 7 = 3 + ( 4 + 7) = 14

3. Identity element is 0. Element unaltered when added to 0.

4. Inverse of each element is within the group. E.g. inverse of 9 is -9.

5. Moreover obeys commutative rule.

Page 6: Basic galois field arithmatics required for error control codes

EXAMPLE

Find whether ordinary multiplication forms a group over

A) { 0,1,2,…} B) {0. ±1, ±2, …}

None form a multiplicative group as group does not contain

multiplicative inverse of the members.

Find whether set of nonzero rational numbers form multiplicative

group?

Yes.

Identity element is 1.

If c = a/b, multiplicative inverse c’ = b/a

Multiplication is closed, associative and commutative too.

Additive group can be created by including 0 element.

Page 7: Basic galois field arithmatics required for error control codes

GROUP OPERATIONS – SUBTRACTION AND DIVISION

Group operation is normally addition or multiplication.

No second group operation definition required within additive

group.

Subtraction can be carried out by replacing element to be

subtracted with its additive inverse.

a – b = a + (-b)

Division can be carried out by multiplicative group by replacing

divisor with its multiplicative inverse.

a / b = a * ( b’)

Associative and commutative properties applies to group elements.

a – b = a + ( - b) = ( - b) + a = - b + a

Page 8: Basic galois field arithmatics required for error control codes

SUB-GROUP

Subset of elements within a group forms a subgroup.

Addition over the set of integers ( a subgroup of rational numbers) form

additive subgroup.

Set of positive integers ( a subset of integers) do not form additive

subgroup. Why?

Set of positive integers do not contain additive inverses.

Page 9: Basic galois field arithmatics required for error control codes

FINITE GROUP

Group having finite number of elements.

Number of members within finite group is called ‘Order” of the group.

A finite group can be constructed by taking integers modulo-m.

n modulo-m is remainder r obtained after dividing n by m.

Written as n = r modulo-m or n modulo-m = r

5 modulo-4 = 1

13 modulo-5 = 3

Page 10: Basic galois field arithmatics required for error control codes

MODULO-M ADDITION

n = r modulo-m or n modulo-m = r

Modulo-m produces m integers 0,1,2,…,m-1.

If n=m, m modulo-m = 0

If n=a x m, (a x m) modulo-m = 0 ( a is an integer)

If a and b are two integers, using modulo-m addition,--

(a + b ) modulo-m = r

Modulo-m addition set {0,1,2,…,m-1} is commutative group as -

Closed,

Associative,

Commutative ,

Each nonzero integer a has an additive inverse m – a

0 is its own inverse.

Page 11: Basic galois field arithmatics required for error control codes

EXAMPLE-1 Construct the additive group of integers modulo-5 over the set

{0,1,2,3,4}.

Need to find remainders when integers are added pair wise.

(1 + 1) modulo-5 = 2

(1 + 2) modulo-5 = 3

(1 + 3) modulo-5 = 4

(1 + 4) modulo-5 = 0

(2 + 2) modulo-5 = 4

(2 + 3) modulo-5 = 0

(2 + 4) modulo-5 = 1

(3 + 3) modulo-5 = 1

(3 + 4) modulo-5 = 2

(4 + 4) modulo-5 = 3

Page 12: Basic galois field arithmatics required for error control codes

EXAMPLE-1 Adding 0 to any element does not alter element.

Remaining pairs are same as commutative equivalent.

Additive Group of Integers Modulo-5 -

Page 13: Basic galois field arithmatics required for error control codes

EXAMPLE-2 Find inverse of each element in Additive Group of integers modulo-

5.

Additive integer of a nonzero integer a is m – a.

When added to a, it should give 0 after given operation modulo-5.

Additive inverse of 1,2,3, and 4 are 4, 3, 2, and 1.

Additive inverse of 0 is 0.

Page 14: Basic galois field arithmatics required for error control codes

MODULO-M MULTIPLICATION

Gives remainder of the product of two integers.

Modulo-m multiplication generates groups for only prime

values of m.

Group is over the set {1,2,3,…m - 1}.

0 element is excluded as it does not have a multiplicative

inverse.

If m is not a prime number, then modulo-m multiplication

over the set {1,2,3,…m - 1} does not produce a set.

Does not give multiplicative inverse.

Hence, two groups can be constructed over the set

{0,1,2,3,…m - 1},

An additive group over all elements,

A multiplicative group over set’s nonzero elements.

Page 15: Basic galois field arithmatics required for error control codes

EXAMPLE-3 Construct the multiplicative group over the set {1,2,3,4}using

modulo-5 multiplication.

Obtain remainders when integers are multiplied pair wise.

2 X 2 = 4 modulo-5

2 X 3 = 1 modulo-5

2 X 4 = 3 modulo-5

3 X 3 = 4 modulo-5

3 X 4 = 2 modulo-5

4 X 4 = 1 modulo-5

Product with 1 keeps integers unaltered.

Remaining pairs are commutative equivalents.

Page 16: Basic galois field arithmatics required for error control codes

EXAMPLE-3 Construct the multiplicative group over the set {1,2,3,4}using

modulo-5 multiplication.

Multiplicative inverse for a is a’ such that a x a’ = 1 modulo-5.

Inverse of 2 is 3. Find other inverses.

Page 17: Basic galois field arithmatics required for error control codes

PROOF Prove 1: The identity element in a group G is unique.

Let there exists two identity elements e and e’ in G. Then e’ = e’ * e = e. This implies that e and e’ are identical. Hence there is one and only one identity element.

Prove 2: The inverse of a group element is unique.

Let there exist two inverses a’ and a’’ for group element a. Then a’ = a’ * e = a’ * (a * a’’) = (a’ * a )* a’’ = e * a’’ = a’’. This implies that a’ and a’’ are identical. Hence there is one and only one inverse for a.

Page 18: Basic galois field arithmatics required for error control codes

FIELDS A set F on which two binary operations, addition and multiplication

are defined between elements within the set is called Field if

following conditions are satisfied:-

1. The Field is a commutative group under addition having

1. Additive identity - zero.

2. Additive inverse.

2. A set of non-zero elements in F is commutative under

multiplication.

1. Having multiplicative identity – unity.

2. Having multiplicative inverse.

3. Multiplication is distributive over addition.

1. a * ( b + c) = a*b + a*c

Page 19: Basic galois field arithmatics required for error control codes

FIELDS Field consists of at least two elements, AI and MI.

Number of elements in a field is called the ORDER of the field.

Types – Finite field and Infinite field.

Subtraction element b from a is by adding AI (–b) to a.

a – b = a + (-b)

Division of a by b is by multiplying a by MI b-1.

a / b = a * b-1

Hence, within a field, all following are possible-

Addition

Subtraction

Multiplication

Division

Page 20: Basic galois field arithmatics required for error control codes

FIELDS - PROPERTIES 1. For every element a in field, a · 0 = 0 · a = 0

2. For any two nonzero elements, a and b in field, a · b ≠ 0 3. a · b = 0 and a ≠ 0 imply that b = 0

4. For any two elements, a and b in field,

- (a · b) = (- a) · b = a · (- b)

5. For a ≠ 0 , a · b = a · c implies that b = c

Page 21: Basic galois field arithmatics required for error control codes

FIELDS – EXAMPLE –

Set of real numbers

Addition and multiplication form commutative groups.

Two operations satisfy distributive rule.

Gives REAL FIELD.

Set of integers -- { 0, ±1, ±2, ±3, …} Addition forms a group.

Multiplication FAILS to form a group.

Product of two integers is an integer BUT Division of integer by

another integer is not an integer.

MI not available in this set.

Called a RING.

Page 22: Basic galois field arithmatics required for error control codes

RING Set of integers -- { 0, ±1, ±2, ±3, …} is a ring. Addition, subtraction and multiplication are possible but division

not possible.

Structure between Group and Field. Why?

Group-- Either addition and subtraction (AG)or Multiplication and

division (MG).

Field – Addition, subtraction, multiplication and division all are

possible.

Page 23: Basic galois field arithmatics required for error control codes

CONSTRUCTION OF FIELDS Fields can be created from modulo-m addition and multiplication.

Modulo-2 arithmetic forms AG over set { 0, 1} and MG over non-

zero elements of { 0, 1}.

Generates binary field GF(2)

Finite fields are called Galois fields.

Important for coding theory.

Widely used in digital computers and digital data transmissions.

modulo-2 addition modulo-2 multiplication

+ 0 1 * 1

0 0 1 1 1

1 1 0

Page 24: Basic galois field arithmatics required for error control codes

EXERCISE: CONSTRUCT THE PRIME FIELD UNDER MODULO-7 ARITHMETIC GF(7). FIND

ADDITIVE IDENTITY AND INVERSE AND MULTIPLICATIVE IDENTITY AND INVERSE.

(Prime fields GF(p)– larger fields generated by modulo-m addition and

multiplication over set { 0, 1, …, m-1}, p =m is prime. )

Additive inverse of a– (7 – a)

Additive identity -- 0

Multiplicative inverse of a– a X a* = 1 modulo-m

Multiplicative identity -- 1

Page 25: Basic galois field arithmatics required for error control codes

EXERCISE: EVALUATE ((2 – 3 ) X 3 ) / 4 OVER PRIME FIELD

MODULO-M WHEN

A) M = 5

B) M = 7

A) M = 5

((2 + (-3 ) X 3 ) X (1/ 4)

Additive inverse of 3 is 2 and multiplicative inverse of 4 is 4.

(2 + 2) X 3 X 4

48 modulo-5 = 3 modulo-5

=3

B) M = 7

AI = 4, MI = 2

Ans = 1

Page 26: Basic galois field arithmatics required for error control codes

EXERCISE Solve the equations –

1. 3x + 2y = 2 modulo - 7

4x + 6y = 3

2. 2x + 3y = 1 modulo – 5

x + 2y = 2

Page 27: Basic galois field arithmatics required for error control codes

1. 3X + 2Y = 2 MODULO - 7

4X + 6Y = 3

Eliminating x by multiplying 1 by 6

18x + 12Y = 12 ≈ 4x + 5y = 5

Solving with 2 we get

Y = 3 – 5 = 3 + 2 = 5

Hence-

3x + 10 = 2

3x + 3 = 2

3x = 2 – 3 = 2 + 4 = 6

x = 6/3 = 6 X 5 = 30 modulo-7 = 2

x = 2, y = 5

2. Ans x = 1, y = 3

Page 28: Basic galois field arithmatics required for error control codes

PROOFS

Prove : If a be nonzero element of a finite field GF(q), then

Prove that aq-1

= 1

Let b1, b2, …, bq-1 be the q-1 non-zero elements of GF(q).

Hence q-1 elements a.b1, a.b2, …, a.bq-1 are non-zero and

distinct.

(a.b1) . (a.b2) …(a.bq-1) = b1. b2. … bq-1 (Try multiplying a=2 with all

nonzero elements of GF(7) using mod-7)

aq-1

(b1 . b2 …bq-1) = b1. b2. … bq-1

aq-1

= 1

Page 29: Basic galois field arithmatics required for error control codes

PROOFS

Prove : If a be nonzero element of a finite field GF(q), and n

be the order of a then,

Prove that n divides q-1

Let n does not divide q-1.

Dividing q-1 by n , we obtain q-1 = kn +r where 0 < r < n

Then, aq-1

= akn + r

= akn

. ar= (a

n) k . a

r

Since aq-1

=1 and an =1 as order of a is n—

ar =1

This is impossible as 0 < r < n and n is smallest integer such

that an =1.

Hence assumption is wrong.

n must divide q-1.

Page 30: Basic galois field arithmatics required for error control codes

PRIME FIELDS

For any prime p, there exists a finite field of p elements GF(p).

For any positive integer m, it is possible to extend the prime

field GF(p) to a field of pm

elements called extension field

GF(pm

).

Order of any prime field is the power of the prime.

Page 31: Basic galois field arithmatics required for error control codes

BINARY FIELD ARITHMETIC

Codes can be constructed with symbols from any Galois field

GF(p), where p is either prime or a power of p.

Codes most widely used in data communication use p = 2.

GF(2) or its extension GF(2m)

GF(2) uses binary arithmetic – modulo-2 addition and

multiplication.

1 + 1 = 0, 1 = -1 → Subtraction is same as addition. Binary arithmetic can be used to solve set of equation using

Cramer’s rule. As X + Y = 1

X + Z = 0

X + Y + Z = 1

Page 32: Basic galois field arithmatics required for error control codes

CRAMER’S RULE

Given

which in matrix format is

x, y and z can be found as follows:

Answer—

X Y Z = 0 1 0

Page 33: Basic galois field arithmatics required for error control codes

POLYNOMIAL OVER GF(2) (ONE VARIABLE)

Degree of polynomial is largest power of X with nonzero

coefficient.

Polynomial over GF(2) takes its coefficients from GF(2).

Total of 2n polynomials over GF(2) with degree n.

If n = 1, → X and 1 + X

If n = 2 → X2, 1 + X

2, X + X

2, 1+ X + X

2

Polynomial over GF(2) can be added, subtracted, multiplied and

divided. Using modulo-2 addition and multiplication.

Page 34: Basic galois field arithmatics required for error control codes

POLYNOMIAL OVER GF(2) (ONE VARIABLE)

a(X) = 1 + X + X3 + X

5

b(X) = 1 + X2 + X

3 + X

4 + X

7

a(X) + b(X) = ?

X + X2

+ X4

+ X5

+ X7

Page 35: Basic galois field arithmatics required for error control codes

POLYNOMIAL OVER GF(2) (ONE VARIABLE)

Polynomials can be multiplied over GF(2).

When f(X) is divided by g(X), we get, using Euclid’s division algorithm,

Degree of r(X) is less than that of g(X),

Page 36: Basic galois field arithmatics required for error control codes

POLYNOMIAL OVER GF(2) (ONE VARIABLE)

Polynomial over GF(2) follow following conditions:

Page 37: Basic galois field arithmatics required for error control codes

POLYNOMIAL OVER GF(2) (ONE VARIABLE)

f(X) = 1 + X + X4 + X

5 + X

6

g(X) = 1 + X + X3

Find f(X) · g (X) = ?

1 + X2 + X

3 + X

8+ X

9 .

Find f(X) / g (X) = ?

1 + X + X2

is remainder and quotient is X2

+ X3 .

Page 38: Basic galois field arithmatics required for error control codes

ROOTS OF POLYNOMIAL OVER GF(2) If a is root of polynomial f(X), f(X) is divisible by (X – a).

If f(X) = 1 + X2 + X

3 + X

4, and X = 1, f(1) = 0

Hence 1 is root and f(X) is divisible by (X + 1).

If a Polynomial over GF(2) has even number of terms, it is divisible by

(X + 1). Why? 1 is root.

Polynomial over GF(2) of degree m is called Irreducible over GF(2), if

it is not divisible by any Polynomial over GF(2) of degree less than m

but greater than zero. (Divisible by only 1 and self.)

If degree m = 2, then

X2, 1 + X

2, and X + X

2 are divisible by X or 1 + X, → roots 0 and 1.

but 1+ X + X2

is not divisible by any polynomial of degree 1

1+ X + X2 is irreducible polynomial of degree 2.

1+ X + X3 is irreducible polynomial of degree 3.

1+ X + X4 is irreducible polynomial of degree 4.

Page 39: Basic galois field arithmatics required for error control codes

PROVE THAT

Expanding above equation repeatedly

Since fi = 0 or 1, f

2

i = f

i

Page 40: Basic galois field arithmatics required for error control codes

CONSTRUCTION OF GALOIS FIELD GF(23)

As seen before, polynomial 1+ X + X3 has no binary (0,1) roots.

Let , not belonging to binary field GF(2) but lying within finite field GF(2

3 ) is one of the roots of above polynomial.

Hence 3+ + 1

= 0

Elements of GF(23

) = ?

0 and 1 form additive and multiplicative identity elements.

+0 = · 1 =

Additive inverse of is itself.

+ = 1 + 1 = (1 + 1) = 0 · = 0

Subtraction and addition of are equivalent

From above = -

Multiplicative inverse of = -1

= 1/ .

The other elements of field GF(23

) can be generated from .

Page 41: Basic galois field arithmatics required for error control codes

FIELD ELEMENTS OF GALOIS FIELD GF(2M)

0 (additive identity)

1 (multiplicative identity)

2

3 = + 1 (

3+ + 1

= 0, - = , 1 = - 1)

4

= ( + 1) = 2+

5

= (2+ ) =

3 +

2 =

2 + + 1

6

= (2+ + 1) =

3 +

2 + =

2 + 1

7

= (2+ 1) =

3 + = 1

8

= 7 =

9

= 2 7

= 2

And so on…

Page 42: Basic galois field arithmatics required for error control codes

FIELD ELEMENTS OF GALOIS FIELD GF(2M)

We can see higher powers as

7

= 1 ( 7 = 0 modulo-7)

8

= ( 8 = 1 modulo-7)

9

= 2

(9 = 2 modulo-7)

And so on…

12

= 5

(12 = 5 modulo-7)

17

= 3

(17 = 3 modulo-7)

GF(23) has 8 basic elements- 0, 1, ,

2,

3,

4,

5, and

6

Degree of polynomial = m = 3

Field’s characteristics = no, of elements in base field = p = 2

Order of the field = q = pm

.

Coefficients of polynomials belong to base field while roots belong to

extension field.

Page 43: Basic galois field arithmatics required for error control codes

FIELD ELEMENTS OF GALOIS FIELD GF(23)

Power Polynomial 3 – tuple

Representation Representation Representation

0 0 0 0 0

1 1 1 0 0

0 1 0

2

2

0 0 1

3 1 1 1 0

4

2

0 1 1

5

1 2

1 1 1

6

1 2 1 0 1

Page 44: Basic galois field arithmatics required for error control codes

ADDITION AND MULTIPLICATION OVER GF(23)

Find 1. 5

+ + 1 2. 6

+ 2 + 1

1. 5

+ + 1 = 2

+ + 1+ + 1 = 2

2. 6

+ 2 + 1 =

2 + 1 +

2 + 1 = 0

Find 1. 5

2. 4 5

3. 5 6 4

1. 5

= 6

2. 4 5

= 9 =

7 2 =

2

3. 5 6 4

= 15

= 7 7

=

Find 1. 2/

5 2. 1

/

3 3.

3/ 4. 1/

1. 2/

5 =

2

-5 =

2

7-5 =

4

2. 1 /

3 =

-3 =

7-3 =

4

3. 3/

=

3 -1 =

3 7-1 =

3 6=

2

4. 1/ =

-1 =

7-1 =

6

Page 45: Basic galois field arithmatics required for error control codes
Page 46: Basic galois field arithmatics required for error control codes

CONSTRUCTION OF GALOIS FIELD GF(24)

As seen before, polynomial 1+ X + X4 has no binary (0,1) roots.

Let , not belonging to binary field GF(2), but lying within finite

field GF(24

) is one of the roots of above polynomial.

Hence 4+ + 1

= 0

The field GF(24

) can be generated from .

0 and 1 form additive and multiplicative identity elements.

+1 = · 1 =

Additive inverse of is itself.

+ = 1 + 1 = (1 + 1) = 0 · = 0

Subtraction and addition of are equivalent

From above = -

Multiplicative inverse of = -1

= 1/ .

Page 47: Basic galois field arithmatics required for error control codes

FIELD ELEMENTS OF GALOIS FIELD GF(24)

0, 1, , 2

, 3

4

= + 1

5=

2+

6=

3 +

2

7=

4 +

3 =

3 + + 1

8 =

2 + 1

9

= 3

+

10

= 2

+ + 1

11

= 3

+ 2

+

12

= 3

+ 2

+ +1

13

= 3

+ 2

+ 1

14

= 3

+ 1

15

= 1 repeats

Total 16 field elements.

Find field elements for GF(25

)

Page 48: Basic galois field arithmatics required for error control codes

ADDITION AND MULTIPLICATION OVER GF(24) , GF(24)

Find for GF(24

)

2+

9

7+

3 +

11

2 9

13 8

7 12 4

13

/2

3

/10

/9

1/

Page 49: Basic galois field arithmatics required for error control codes

PRIMITIVE FIELD ELEMENTS

Field element that can generate all the nonzero elements of the field are primitive elements.

is primitive in GF(23

), GF(24

) and GF(25

).

All elements except 0 and 1 are primitive for GF(23

). e.g…

Show that 2 is primitive in GF(2

3 ).

Let = 2 ,

2 =(

2)2 =

4

3 =(

2)3 =

6

4 =(

2)4 =

8 =

5 =(

2)5 =

10 =

3

6 =(

2)6 =

12 =

5

7 =(

2)7 =

14 = 1

8 =(

2)8 =

16 =

2 And repeats.

Page 50: Basic galois field arithmatics required for error control codes

PRIMITIVE FIELD ELEMENTS

Show that 5 is primitive in GF(2

3 ).

Show that 2 is primitive in GF(2

4 ).

Show that 3 is NOT primitive in GF(2

4 ).

Show that 5 is NOT primitive in GF(2

4 ).

Page 51: Basic galois field arithmatics required for error control codes

ORDER OF THE ELEMENTS

Smallest positive integer n for which n = 1

Determines if is primitive or not.

(Not same as order of the field, which is number of elements

within field.)

In GF(23

), all field elements have same order 7. Show.

In GF(24

), all field elements do not have same order . Show.

Order of an element in GF(2m

) divides 2m

- 1

For GF(24

) determine the order of 12

and 7 . Find if they are

primitive or not. What field elements they generate?

Smallest power of 12

to give unity is 5. Not primitive as 15

elements are required. Elements – 12 9

6

3 1

Smallest power of 7

to give unity is 15. Primitive as 15

elements are required. Elements – all

Page 52: Basic galois field arithmatics required for error control codes

IRREDUCIBLE AND PRIMITIVE POLYNOMIAL

Polynomials, divisible by only 1 and self are called irreducible

polynomials.

Irreducible polynomial having a primitive field element as a root

is called a primitive polynomial.

An irreducible polynomial 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=2m

– 1. (Not any n <2m

– 1)

The irreducible polynomial p(X) = X4 + X + 1, divides (X

15 + 1)

(n=15), but does not divide any Xn + 1 for 1<n<15, hence p(X) is

primitive polynomial.

The polynomial p(X) = X4 + X

3 + X

2 + X + 1 is irreducible but not

primitive as it divides X5 + 1 also.

Page 53: Basic galois field arithmatics required for error control codes

CONJUGATE OF FIELD ELEMENT OVER GF(2M

)

In ordinary algebra, a polynomial may have complex conjugate

roots occurring in pair.

Similarly roots of polynomial with coefficients from GF(2) also

occur In groups or sets of conjugates.

X4 + X

3 + 1 has no roots from GF(2), but has 4 roots from GF(2

4 ).

By substitution, roots are - 7

, 11

, 13

and 14

. Verify

Then (X + 7 )(X +

11 )(X +

13 )(X +

14) = X

4 + X

3 + 1

If one root is known, its other conjugate roots can be found as—

Page 54: Basic galois field arithmatics required for error control codes

CONJUGATE OF FIELD ELEMENT OVER GF(2M

)

If one root is known, its other conjugate roots can be found as—

Theorem- Let f(X) be a polynomial with coefficients from GF(2).

Let β an element in an extension field of GF(2). If β is a root of

f(X), then for any l ≥ 0, β2l is also a root of f(X).

Proof: We have [f(X)] 2l = f(X 2

l )

β is Root --- [f(β)] 2l = f(β2

l )

Since f(β)= 0, f(β2l ) = 0

Hence β2l is also a root of f(X).

The element β2l is called a conjugate of β.

Hence if β from GF(2m

) is a root of f(X) over GF(2), then all

conjugates of β ( which are elements of GF(2m

),are also roots of

f(X).

Page 55: Basic galois field arithmatics required for error control codes

CONJUGATE OF FIELD ELEMENT OVER GF(2M

)

Example – Let f(X) = 1+ X3 + X

4 + X

5 + X

6 has

4 from GF(2

4), as a

root. Verify. Also find its conjugate roots.

f(4) = 0.

The conjugates of 4 are –

(4

)2 =

8 ,

(4

) 22 =

16 =

(4

) 23 =

32 =

2. Higher powers repeat roots.

Check.

Find other two roots. Are they conjugates?

5

10 . They are conjugates.

Page 56: Basic galois field arithmatics required for error control codes

THEOREM

Theorem2.8- The 2m

- 1 non zero elements of GF(2m

) are all the

roots of (X(2m– 1) + 1).

Proved earlier that -

If β is nonzero element in the field GF(2m

),---- β2m-1 =1

Example – For GF(24) , β15 = 1, for β = 1, 2

3

4

5

6 …… 14

Adding 1 on both sides,

β2m-1 +1 = 0

Hence β is the root of X2m-1 +1 = 0

Hence all 2m

-1 nonzero element are roots of X2m-1 +1 = 0

Prove Corollary 2.8.1– The elements of GF(2m

) form all the roots

of X2m +X

X2m +X = X (X2m-1 +1)

Hence element 0 is also a root.

Page 57: Basic galois field arithmatics required for error control codes

MINIMAL POLYNOMIAL

Let any element β in GF(2m

) is a root of (X(2m– 1) + 1) over GF(2).

β may also be a root of a polynomial over GF(2)with degree < 2m

.

The binary polynomial of smallest degree, of which β is a root, is

called minimal polynomial of β.

Theorem 2.9: Minimal polynomial φ(x) of a field element β is

irreducible.

Suppose φ(x) is NOT irreducible. Then φ(x) = φ1(x) φ2(x)

Both φ1(x) and φ2(x) have degrees > 0 and < degree of φ(x)

As φ(β) = φ1(β) φ2(β) = 0

Either φ1(β) = 0 or φ2(β) = 0

This contradicts the hypothesis that φ(x) is a polynomial of

smallest degree, such that φ(β) = 0.

Therefore φ(x) must be irreducible.

Page 58: Basic galois field arithmatics required for error control codes

MINIMAL POLYNOMIAL

Theorem 2.10: Let f(x) be a polynomial over GF(2). Let φ(x) be the

minimal polynomial of a field element β. If β is the root of f(x),

then f(x) is divisible by φ(x).

Dividing f(x) by φ(x),

f(x) = a(x) φ(x) + r(x)

Degree of r(x) < degree of φ(x).

If x= β ,then f(β) = a(β) φ(β) + r(β)

As f(β) = φ(β) = 0

r(β) = 0

If r(x) ≠ 0, r(x) would have degree < φ(x), which has β as root.

This contradicts fact that φ(x) is a minimal polynomial of β.

Hence r(x) must be zero and φ(x) divides f(x).

Page 59: Basic galois field arithmatics required for error control codes

MINIMAL POLYNOMIAL

Theorem 2.11: Minimal polynomial φ(x) of a field element β in

GF(2m

) divides (X2m + X).

All roots of φ(x) are from GF(2m

).

Theorem 2.8 corollary 2.8.1 says field elements of GF(2m

) are

roots (X2m + X).

β is root of φ(x) as well as (X2m + X).

As φ(x) is minimal polynomial, from theorem 2.10, φ(x) divides

(X2m + X).

Page 60: Basic galois field arithmatics required for error control codes

MINIMAL POLYNOMIAL

Theorem 2.12: Let f(x) be an irreducible polynomial over GF(2).

Let β be an element in GF(2m

). Let φ(x) be the minimal

polynomial of element β. If f(β) = 0 then φ(x) = f(x).

From 2.10, φ(x) divides f(x).

Since φ(x) ≠ 0, and f(x) is irreducible, φ(x) = f(x).

Page 61: Basic galois field arithmatics required for error control codes

MINIMAL POLYNOMIAL

Theorem 2.13: Let β be an element in GF(2m

) and Let e be the

smallest non-negative integer such that β2e = β. Then

f(X) = ∏i=0

e-1 (X + β2i

) is an irreducible polynomial over GF(2).

Page 62: Basic galois field arithmatics required for error control codes

MINIMAL POLYNOMIAL

For 0 ≤ i ≤ e, fi = fi2.

It is possible only when , fi = 0 or 1.

Hence f(x) Has coefficients from GF(2).

Suppose f(X) is NOT irreducible over GF(2) and f(X) = a(X) b(X).

Since f(β) = 0, either a(β) = 0 or b(β) = 0.

Hence

Page 63: Basic galois field arithmatics required for error control codes

MINIMAL POLYNOMIAL

If a(β) = 0, a(X) has , β, β2, …β2e-1 as roots, so

a(X) has degree e and

a(X) = f(X).

Similarly if b(β) = 0, b(X) has , β, β2, …β2e-1 as roots, so

b(X) has degree e and

b(X) = f(X).

This contradicts itself.

Hence f(X) must be irreducible.

Page 64: Basic galois field arithmatics required for error control codes

MINIMAL POLYNOMIAL

Theorem 2.14 : Let ¢(X) be the minimal polynomial of an element

β in GF(2m

). Let e be the smallest integer such that β2e = β. Then

¢(X) = ∏i=0

e-1 (X + β2i

)

From 2.13, f(X) is irreducible.

¢(X) is irreducible minimal polynomial.

Hence ¢(X) = ∏i=0

e-1 (X + β2i

)

Page 65: Basic galois field arithmatics required for error control codes

EXAMPLE

For Galois Field GF(24

), β = 3. Find conjugates of β and the

minimal polynomial of β = 3.

Conjugates are – 6 ,

12 ,

24 =

9 .

Minimal polynomial ¢(X) =(X + 3) (X +

6 )(X +

12 )(X +

9 ).

= 1+ X + X2 + X

3 + X

4

For Galois Field GF(23

), find minimal polynomial of 3.

Page 66: Basic galois field arithmatics required for error control codes

COMPUTATION USING GALOIS FIELD GF(2M

) ARITHMETIC.

Given linear equations over GF(24

) as

X + 7

Y = 2

12

X + 8

Y = 4

Multiply eq2 with 3

and add the two.

X + 7

Y = 2

X + 11

Y = 7

(7

+ 11

) Y= 2 +

7

8

Y= 12

Y = 4

X = 9

Alternately use Cramer’s rule.

Page 67: Basic galois field arithmatics required for error control codes

COMPUTATION USING GALOIS FIELD GF(2M

) ARITHMETIC.

Find roots of X2 +

12 X +

9= 0 for GF(2

4 )

Let β1 ,β2 are required roots.

X2 +

X(β1+β2 ) + β1 β2 = 0

β1+β2 = 12

β1 β2 = 9

Roots that satisfy = 2

, 7

. Check by finding minimal polynomial.

Expand (X + 4)2 in GF(2

3).

=X2 + X

4 + X

4 +

8 = X

2 +

8 = X

2 + .

Expand (X + 3)5 (X +

10) in GF(2

4).

(X + 3)4(X +

3) (X +

10)

(X4 +

12) (X

2 +

12X +

13)

X6 +

12X

5 +

13X

4 +

12X

2 +

9X +

10)

Page 68: Basic galois field arithmatics required for error control codes

COMPUTATION USING GALOIS FIELD GF(2M

) ARITHMETIC.

Find inverse of following in GF(24

).

2

13

0

10

7

3

1

14

0

12

5

13

1

14

9

Find inverse of following in GF(24

).

3

5

1

8

12

7

10

Page 69: Basic galois field arithmatics required for error control codes

COMPUTATION USING GALOIS FIELD GF(2M

) ARITHMETIC.

Find solution of following in GF(24 ) using Cramer’s rule.

3

X + Y +Z = 5

2

X + 6

Y +Z = 6

14

X + 7

Y +7Z = 1

X =

Y = 4

Z = 4

Page 70: Basic galois field arithmatics required for error control codes

RELATION WITH CYCLIC CODES

Code word c(x) for an (n,k) cyclic code is c(x) = f(x) g(x)

Nonsystematic CRC – f(x) is data polynomial d(x)

Systematic CRC – f(x) is quotient q(x) after dividing d(x) xn-k

by

g(x)

Root of g(x) is also root of c(x).

Let for (7,4) CRC, g(x) = 1+ X + X3 and c(x) = 1+ X + X

2 + X

5

Roots ,

2 and

4 of g(x) belonging to GF(2

3 ) are roots of c(x).

Polynomials like 1+ X + X3 generate CRC as well as construct

finite field.

Generator polynomial can be obtained by finding minimal

polynomial using all roots and finding LCM to eliminate

common multiples.

Find generator polynomial using ,

2 and

4 in GF(2

3 ) .

Page 71: Basic galois field arithmatics required for error control codes

VECTOR SPACES

Code word belonging to (n.k) block code can be interpreted as

vectors within k-dimensional vector space.

Vector space is defined as collection of objects, called vectors,

together with operations of vector addition and scalar

multiplication satisfying following conditions :-

1. Set of vectors forms additive cumulative group satisfying

closure, associative and commutative property and has

additive inverse and additive identity vector 0.

2. Multiplication of vectors with scalar is defined. Scalar product

is a vector with distributive and associative property and has

multiplicative identity 1.

Page 72: Basic galois field arithmatics required for error control codes

ORDERED SEQUENCES – N-TUPLE

Vector v = (v1, v2, ….vn)

Where vi for i = 1,2,…n, are scalars from a field and are

components of v.

Vector addition is component wise.

If u = (u1, u2, ….un)

w = u +v is

w = (u1 + v1, u2 + v2, … un + vn)

= (w1, w2, ….wn)

Scalar product is also component wise.

au = (au1, au2, …aun)

Page 73: Basic galois field arithmatics required for error control codes

EXAMPLE Given vectors u = (2,7,1) and v = (10,-3,8),

Find

1. u + v

2. 4u

3. 2u – 7v

Answer-

1. (12, 4, 9)

2. (8, 28, 4)

3. (-66, 35, -54)

Page 74: Basic galois field arithmatics required for error control codes

LINEARLY DEPENDENT VECTORS

A set of vectors v1, v2, ….vm are said to be linearly

dependent if there exists m scalars a1, a2, …am, not all

of them zero, such that— a1v1 + a2v2 + ….amvm = 0

Otherwise vectors are said to be linearly independent.

For linearly independent vectors, only scalars that

satisfy above equation are zeros.

Find if following ser of vectors are linearly dependent.

1. u1 = (3, -8, 5), u2 = (-2, 2, 14) and u3 = (-1, 6, -19)

2. v1 = (7, 3, -3), v2 = (16, 2, -1) and v3 = (6, -12, 15)

3. w1 = (-2, 0, 0), w2 = (0, 7, 0) and w3 = (0, 0, 9)

Page 75: Basic galois field arithmatics required for error control codes

ANSWER

1. If a1 = 1, a2 = 1 and a3 = 1

• a1u1 + a2u2 + ….amum = 0

• Linearly dependent

2. If a1 = 1, a2 = 1 and a3 = 1

• a1v1 + a2v2 + ….amvm ≠ 0 • But if a1 = 2, a2 = -1 and a3 = 1/3

• a1u1 + a2u2 + ….amum = 0

• Linearly dependent

3. No combination of scalars satisfy condition.

1. Linearly independent

Page 76: Basic galois field arithmatics required for error control codes

IMPORTANCE OF LINEAR INDEPENDENCE OF VECTORS

Ability to form linear combination and linear independence

simplify construction of vector spaces.

Within a vector space, there exists a set of linearly independent

vectors, from which all other vectors can be generated.

This set is called Basis and these vectors, Basis Vectors.

Each vector in a vector space is unique combination of basis

vectors.

Basis vectors are said to span the vector space.

Number of vectors in a Basis is called Dimension of vector

space.

In m-dimensional vector space, m linearly independent vectors

span the space.

Page 77: Basic galois field arithmatics required for error control codes

EXAMPLE Three dimensional space over the real field.

Basis Vectors are—

i = ( 1 0 0)

j = ( 0 1 0)

k= ( 0 0 1)

Also called Standard Basis because --

All other vectors within space can be expressed using them as

v = vxi + vyj + vzk

v = vx ( 1 0 0) + vy ( 0 1 0) + vz ( 0 0 1)

v = (vx vy vz)

What is Standard Basis for V4?

Page 78: Basic galois field arithmatics required for error control codes

BINARY N-TUPLE

n bit vectors made with 0s and 1s.

A vector space Vn is formed by 2n n-tuples using modulo-2

addition.

Example - vector space V4 is formed by 16 binary 4-tuples.

From (0 0 0 0) to (1 1 1 1)

(0 0 0 0) is identity element and each vector is its own inverse.

Scalars are 0 and 1.

Vector addition and scalar multiplication obey required

associative, distributive and commutative laws.

Page 79: Basic galois field arithmatics required for error control codes

VECTOR SUBSPACE

Subset of vectors, existing within a vector space, having all the

characteristics of vector space under vector addition and scalar

multiplication.

example – following four vectors under V4.

(0 0 0 0), (0 1 1 1), (1 0 1 0), (1 1 0 1)

The subset follows closure, commutative, associative and

distributive property under vector addition and scalar

multiplication .

Has additive identity and inverse.

Hence forms subspace of V4.

One more subspace of V4:-

(0 0 0 0), (0 1 1 0), (0 0 1 0), (0 1 0 0)

Standard Basis of Vn can not be a basis for a subspace. Why?

Page 80: Basic galois field arithmatics required for error control codes

CREATION OF VECTOR SPACE FROM MATRICES

Given n X m matrix as-

a1,1

a1,2

….. v1

a2,1

a2,2

…. v2

an,1

an,2

… vn where a

i,j = 0 or 1.

Let v1, v

2, …v

n are row vectors ( or row spaces) of matrix, then

set of all linear combinations of row vectors forms vector space.

Interchanging rows and columns also give same vector space.

Example :- Let matrix A =

1 0 0 1 1

0 1 0 1 0

0 0 1 0 1

Find row spaces and vectors in vector spaces.

Row spaces v1 = 1 0 0 1 1 , v

2 = 0 1 0 1 0 v

3 = 0 0 1 0 1

Page 81: Basic galois field arithmatics required for error control codes

CREATION OF VECTOR SPACE FROM MATRICES

Row spaces v1 = 1 0 0 1 1 , v

2 = 0 1 0 1 0 v

3 = 0 0 1 0 1

Taking 23 linear combinations of v

1, v

2, v

3vector space created.

0. v1+ 0.v

2+0.v

3 = 0 0 0 0 0

0. v1+ 0.v

2+1.v

3 = 0 0 1 0 1

0. v1+ 1.v

2+0v

3 = 0 1 0 1 0

0. v1+ 1.v

2+1v

3 = 0 1 1 1 1

1. v1+ 0.v

2+0v

3 = 1 0 0 1 1

1. v1+ 0.v

2+1v

3 = 1 0 1 1 0

1. v1+ 1.v

2+0v

3 = 1 1 0 0 1

1. v1+ 1.v

2+1v

3 = 1 1 1 0 0

Page 82: Basic galois field arithmatics required for error control codes

CREATION OF VECTOR SPACE FROM MATRICES

Exercise:- Form matrix B from A by adding row 3 to row 1 and

then interchanging rows 2 and 3.

Find row spaces and vectors in vector spaces. Show that they

are same as for A.

Page 83: Basic galois field arithmatics required for error control codes

LINEARITY OF CODES BASED ON VECTOR SPACES

For (n,k) code, two sets of words are defined.

SET I : 2n n-bit words,

form vector space Vn,

its elements form commutative group

Vector addition and scalar multiplication satisfy associative,

commutative and distributive conditions.

SET II: smaller set Ck formed by 2kcode words.

LINEARITY requirement:-

Code words Ck forms subspace over vector space Vn.

Subspace over vector space is also a vector space.

There exist at least one set of k linearly independent basis

vectors which span the vector space such that vectors in V

can be formed by linear combinations of basis vectors.

Page 84: Basic galois field arithmatics required for error control codes

LINEARITY OF CODES BASED ON VECTOR SPACES

For a linear code, rows of generator matrix G form a set of basis

vectors for the code.

Taking all combinations of rows of G code words can be

generated.

Page 85: Basic galois field arithmatics required for error control codes

LINEARITY OF CODES BASED ON VECTOR SPACES

Example: The (6,3) code has generator matrix

1 0 0 0 1 1

0 1 0 1 0 1 = G

0 0 1 1 1 0

Show that the codewords can be generated by taking their linear combinations of the rows.

Row 1 = (1 0 0 0 1 1)

Row 2 = (0 1 0 1 0 1)

Row 3 = (0 0 1 1 1 0)

Row 1+ Row 2= (1 1 0 1 1 0)

Row 1+ Row 3= (1 0 1 1 0 1)

Row 2+ Row 3= (0 1 1 0 1 1)

Row 1 +Row 2 +Row 3 = (1 1 1 0 0 0 )

Along with 0 0 0 0 0 0) , 8 codewords.

Page 86: Basic galois field arithmatics required for error control codes

CODES BASED ON VECTOR SPACES

Example: The (6,3) code has generator matrix

g1 =1 0 0 0 1 1

g2 = 0 1 0 1 0 1 = G

g3 = 0 0 1 1 1 0

Show that row vectors of G are linearly independent

Check all 8 combinations of g1 ,g

2 ,g

3 to find for which

condition, following is satisfied.

a1 g

1 + a

2 g

2 + a

3 g

3=0

Page 87: Basic galois field arithmatics required for error control codes

CODES BASED ON VECTOR SPACES

Codeword for information word d = d1d2d3d4 is expressed as

c = dG = d1 g

1 + d

2 g

2 + d

3 g

3+ d

4 g

4

Equivalent to adding those rows of G for which dk = 1

Same example – d = 1101

Code can be obtained by multiplying matrix d with G

Or by adding rows 1,2 and 4.

Check.

Example:

1 0 0 0 1 0 1

0 1 0 0 1 1 1 = G

0 0 1 0 1 1 0

0 0 0 1 0 1 1

Find code words by adding rows and check.