Galois Fields, Finite fields, algebra

16
1 西 0 一一级硕士研究生课程作业( ) 课程名称:纠错编码原理与应用 O 一一 --- 0 一二学年第二学期 学号 11042005 信息科学与技术学院 课程编号 D31207 姓名 Jasper Hatilima 任课老师 陈庆春 1. Construct the group under modulo-6 addition and under modulo-3 multiplication. 2. Construct the prime field GF(11) with modulo-11 addition and multiplication. Find all the primitive elements and determine the orders of other elements. 3. Solve the following simultaneous equations of X, Y, Z and W with modulo-2 arithmetic: X+Y+W=1 X+Z+W=0 X+Y+Z+W=1 Y+Z+W=0 4. Show that X 5 +X 3 +1 is irreducible over GF(2). 5. Let f(X) be a polynomial of degree n over GF(2). The reciprocal of f(X) is defined as f*(X)=X n f(1/X). (a). Prove that f*(X) is irreducible over GF(2) if and only if f(X) is irreducible over GF(2). (b). Prove that f*(X) is primitive if and only if f(X) is primitive. 6. Construct a table for GF(2 3 ) based on the primitive polynomial p(X)=1+X+X 3 . Display the power, polynomial, and vector representations of each element. Determine the order of each element. 7. Let be a primitive element in GF(2 4 ). Solve the following simultaneous equations for X, Y and Z: X+ 5 Y+Z= 7 X+Y+ 7 Z= 9 2 X+Y+ 6 Z= GF(2 4 ) using the primitive polynomial h(x)=1+x+x 4 word polynomial in x mod h(x) power of 0000 0 - 0001 1 0 =1 0010 x 0100 x 2 2

Transcript of Galois Fields, Finite fields, algebra

1

西 南 交 通 大 学

二 0 一一级硕士研究生课程作业(一)

课程名称:纠错编码原理与应用

二 O一一 --- 二 0一二学年第二学期

学号 11042005 开 课 系 信息科学与技术学院 课程编号 D31207

姓名 Jasper

Hatilima 任课老师 陈庆春 评 分

1. Construct the group under modulo-6 addition and under modulo-3 multiplication.

2. Construct the prime field GF(11) with modulo-11 addition and multiplication. Find all the primitive elements and determine the orders of other elements.

3. Solve the following simultaneous equations of X, Y, Z and W with modulo-2 arithmetic:

X+Y+W=1

X+Z+W=0

X+Y+Z+W=1

Y+Z+W=0

4. Show that X5+X

3+1 is irreducible over GF(2).

5. Let f(X) be a polynomial of degree n over GF(2). The reciprocal of f(X) is defined as

f*(X)=Xnf(1/X).

(a). Prove that f*(X) is irreducible over GF(2) if and only if f(X) is irreducible over GF(2).

(b). Prove that f*(X) is primitive if and only if f(X) is primitive.

6. Construct a table for GF(23) based on the primitive polynomial p(X)=1+X+X

3. Display

the power, polynomial, and vector representations of each element. Determine the order of each element.

7. Let be a primitive element in GF(24). Solve the following simultaneous equations for

X, Y and Z:

X+5Y+Z=

7

X+Y+7Z=

9

2X+Y+

6Z=

GF(24) using the primitive polynomial h(x)=1+x+x

4

word polynomial in x mod h(x) power of

0000 0 -

0001 1 0=1

0010 x

0100 x2

2

2

1000 x3

3

0011 x+1=x4

4

0110 x2+x=x

5

5

1100 x3+x

2=x

6

6

1011 x3 +x +1=x

7

7

0101 x2+1=x

8

8

1010 x3+x=x

9

9

0111 x2+x + 1

=x

10

10

1110 x3+x

2 +

x

=x

11

11

1111 x3+x

2+x + 1

=x

12

12

1101 x3 +x

2+1=x

13

13

1001 X3 +

1

=x

14

14

8. Given the matrices

show the row space of G is the null space of H, and vice versa.

Notes:

1. The homework can be written either in English or in Chinese. 2. Format and print your homework report on 176x250mm A4 white paper, using 10pt

Times New Roman (or 5 号楷体字) for single-spaced text and 16pt Times New Roman

(or 3 号黑体字) for title. The left, right, top and bottom margins should all be set to

20mm. 3. Print out your report according to the required page layout requirement and hand in it

together with this sheet as cover.

Answer Sheets:

3

Answer 1

Group under Modulo-6 Addition

0 1 2 3 4 5

0 0 1 2 3 4 5

1 1 2 3 4 5 0

2 2 3 4 5 0 1

3 3 4 5 0 1 2

4 4 5 0 1 2 3

5 5 0 1 2 3 4

Group under Modulo-3 Multiplication

1 2

1 1 2

2 2 1

Answer 2

The tables for the field GF(11) with modulo-11 addition and multiplication are shown below. There is

then a follow-up on finding the primitive elements and then the orders of the other elements below:

4

Modulo-11 Addition

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

Modulo-11 Multiplication

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

5

To find the primitive elements, we first start by listing all the elements of the GF(11) field:

Let (11)GF , then

1 2 , 2 4 ,

3 8 , 4 5 ,

5 10 , 6 9 ,

7 7 , 8 3 ,

9 6 ,

10 1

If is any primitive root mod p, then the set of all primitive roots mod p is

exactly | gcd( 1, ) 1k p k . From this, the powers of k that satisfy gcd(10, ) 1k

are 1,3,7,9k . The primitive elements are therefore:

1 2 3 8

7 7 9 6

The orders of the other elements are given by ( ) / gcd( , )kORD c c k

where 1 11 1 10c p . The other elements whose orders we want to find are2 4 ,

4 5 , 5 10 ,

6 9 , 8 3 ,

10 1 . Therefore:

2( ) 10 / gcd(10,2) 10 / 2 5ORD

4( ) 10 / gcd(10,4) 10 / 2 5ORD

5( ) 10 / gcd(10,5) 10 / 5 2ORD

6( ) 10 / gcd(10,6) 10 / 2 5ORD

8( ) 10 / gcd(10,8) 10 / 2 5ORD

10( ) 10 / gcd(10,10) 10 /10 1ORD

Answer 3

0 1 (1)

0 0 (2)

1 (3)

0 0 (4)

X Y W

X Z W

X Y Z W

Y Z W

Using equations (3) and (4) and modulo-2 addition,

1

0 0

0 0 0 1

X Y Z W

Y Z W

X

Therefore 1X

6

Using equation (2) and (3) and modulo-2 addition,

0 0

1

0 0 0 1

X Z W

X Y Z W

Y

Therefore 1Y

Using 1X and 1Y in equation (1) gives

0 1

1 1 0 1

1

X Y W

W

W

And using 1X and 1W in equation (2) gives

0 0

1 0 1 0

0

X Z W

Z

Z

Therefore 1X , 1Y , 1W , 0Z

Answer 4

Theorem: Any irreducible polynomial p(X) over GF(2) of degree m exactly divides another

polynomial 2 1( ) 1

m

d X X .

Therefore from the theorem above, 5 3( ) 1p X X X , a polynomial of degree m=5, is

irreducible if it divides 2 1( ) 1

m

d X X = 52 1 311 1X X without any remainder.

So let us divide d(X) by p(X) and see if p(X) is irreducible:

5 3 311 0 0 ... 1X X X

Using the Matlab function “gfdeconv” to do the long division:

We define the polynomials in vector form:

p=[1,0,0,1,0,1]

d=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]

7

We then divide using

[Q,R]=gfdeconv(d,p) which gives the quotient Q and the remainder R

26 24 22 21 20 18 17

13 12 11 10 9 6 5 3 1

Q X X X X X X X

X X X X X X X X

REMAINDER = 0

Since p(X) of degree m completely divides 2 1( ) 1

m

d X X , then it follows that p(X) is

irreducible over GF(2).

ALTERNATIVELY:

We can prove this from the definition of irreducibility:

A polynomial p(X) of degree m over GF(2) is irreducible over GF(2) if it is not divisible by

any polynomial over GF(2) of degree less than m but greater than 0.

for 5 3( ) 1p X X X , degree m = 5 is irreducible if it is not divisible by any

polynomial in GF(2) of degree 0 n m .

5 3( ) 1p X X X is not divisible by X or 1X because it does not have a “0” or

a “1” as a root i.e (0) 0p and (1) 0p . Therefore is not divisible by a polynomial of

degree 1.

Since 5 3( ) 1p X X X is not divisible by a polynomial of degree 1 i.e X and X+1,

it follows that it is not divisible by other polynomial of order 2, 3 and 4 since they have

(X+1) as a factor i.e.

22

3 3

4 4

1 ( 1)

1 ( 1)

1 ( 1)

X X

X X

X X

We then test 5 3( ) 1p X X X for divisibility by

2 1X X . After doing the

division, we find that this leaves a remainder of 1X , i.e.

2 5 3

3 2

1 1

... 1

X X X X

X X X REMAINDER X

We can therefore finally conclude that 5 3( ) 1p X X X is irreducible over GF(2).

8

Answer 5

Since we are trying to prove an “if and only if” kind of statement, we will break down the process by

proving the “if” separately from the “only if” part i.e. there will be testing of two hypotheses per

proof.

(a) For the “if” part, we first check if *( )f X is not irreducible over GF(2) if ( )f X is

irreducible over GF(2). Let us begin by formulating a hypothesis:

Null hypothesis, 0H : *( )f X is not irreducible when ( )f X is irreducible.

Alternative hypothesis, aH : *( )f X is irreducible when ( )f X is irreducible.

Test:

Assume that *( )f X is not irreducible such that when we divide it by some polynomial

( )a X or ( )b X of degrees k and m respectively where both k and m are greater than 0,

we have:

*( )f X = ( ) ( )a X b X

Clearly the degrees of ( )a X and ( )b X should add up to the degree of *( )f X i.e

k m n .

Since the reciprocal is defined here as *( ) (1/ )nf X X f X , then the reciprocal of

*( )f X which is ( )f X is given by

( ) *(1/ )nf X X f X (1/ ) (1/ )k mX a X X b X

This therefore shows that ( )f X can still be divided by a polynomial (1/ )kX a X or

(1/ )mX b X of lesser degree (k,m <n) and not leave a remainder. This therefore shows

that ( )f X is NOT irreducible; Since we started out with an assumption that *( )f X is

not irreducible and we have found that ( )f X is also not irreducible, we therefore reject

the null hypothesis and instead go for the alternative hypothesis that:

aH : *( )f X is irreducible when ( )f X is irreducible

We now examine the “only if” part; we check if ( )f X is irreducible over GF(2) when

*( )f X is irreducible over GF(2).

Null hypothesis, 0H : If *( )f X is irreducible over GF(2) then ( )f X should also be

irreducible over GF(2).

Alternative hypothesis, aH : If *( )f X is irreducible over GF(2) then ( )f X may not

be irreducible over GF(2).

Test:

Assume that *( )f X is irreducible over GF(2). The if we divide it by some polynomial

( )a X or ( )b X of degrees k and m respectively where both k and m are greater than 0,

9

we have:

*( ) ( ) ( ) ( )f X a X b X r X where ( )r X is the remainder and has degree p which

is less than k and m but greater or equal to 0 i.e. 0 ,p k m .

Then ( ) *(1/ )nf X X f X yields

( ) (1/ ) (1/ ) (1/ )k m pf X X a X X b X X r X

So if we divide ( )f X of degree n by some polynomial (1/ )kX a X of degree

k n we get:

( ) / (1/ ) (1/ ) (1/ )k m pf X X a X X b X X r X

Which gives a remainder (1/ )pX r X . This shows that ( )f X is also irreducible just as

*( )f X is in our initial assumption. We therefore accept the null hypothesis that:

0H : If *( )f X is irreducible over GF(2) then ( )f X should also be irreducible over

GF(2).

So the two tests of hypotheses prove that:

*( )f X is irreducible over GF(2) if and only if ( )f X is irreducible over GF(2).

(b) For the “if” part, we first check if ( )f X is primitive when *( )f X is not primitive.

We first formulate the set of hypothesis:

Null hypothesis, 0H : ( )f X is primitive when *( )f X is not primitive.

Alternative hypothesis, aH : ( )f X is not primitive when *( )f X is not primitive.

Test: The theorem of irreducibility in question (4) above can be extended to testing

primitivity by adding that a polynomial ( )f X of degree m is primitive if it does not

divide any polynomial 1kX for 2 1mk .

Assuming *( )f X is not primitive, implying that there exists a positive integer

2 1mk such that *( )f X divides 1kX i.e.

1 *( ) ( )kX f X q X where ( )q X is a polynomial of degree less than *( )f X .

Let us now take reciprocals on both sides

( 1)* ( ) *( )kX f X q X

Assume *( )q X has order z,

(1/ 1) ( ) (1/ )

1 ( ) (1/ )

k k z

k z

X X f X X q X

X f X X q X

10

1/ ( ) (1/ )k zX f X X q X

Which shows that ( )f X divides 1kX for 2 1mk . This makes us reject the null

hypothesis that ( )f X is primitive when *( )f X is not primitive. The alternative

hypothesis therefore holds that:

aH : ( )f X is not primitive when *( )f X is not primitive.

We now examine the “only if” part; we check if ( )f X is primitive when *( )f X is

primitive.

Null hypothesis, 0H : If *( )f X is primitive then ( )f X should also be primitive

Alternative hypothesis, aH : If *( )f X is primitive then ( )f X may not be primitive.

Test:

Assume that *( )f X is primitive. Then for 2 1mk ,

1/ *( ) ( )kX f X q X remainder ( )r X

i.e. 1 *( ) ( ) ( )kX f X q X r X assume ( )q X has order z and ( )r X has order

p.

Taking reciprocals:

( 1)* ( ) *( ) *( )kX f X q X r X

(1/ 1) ( ) (1/ ) (1/ )k k z pX X f X X q X X r X

1 ( ) (1/ ) (1/ )k z pX f X X q X X r X

This shows that when 1kX is divided by ( )f X of degree m, there is a remainder

(1/ )pX r X = ( )REM X for all 2 1mk or

1/ ( ) (1/ ) ( )k zX f X X q X REM X

Since we started out with the assumption that *( )f X is primitive and now we have

found that ( )f X is also primitive, we therefore accept the null hypothesis that:

0H : If *( )f X is primitive then ( )f X should also be primitive

So the two tests of hypotheses prove that:

*( )f X is primitive if and only if ( )f X is primitive.

11

Answer 6

The polynomial 3( ) 1p X X X is primitive over GF(2) so we set

3( ) 1 0p

which using modulo-2 addition reduces to 3 1 . We use this to construct the (2)GF .

Since m=3, such that 32 2 8m , the field will have 8 elements and the highest power for the

power representation will be 32 2 2 2 6m i.e.

6 . We now generate the elements:

0

1

2 2

3

4 3 2

5 4 2 2 3 2

6 5 2 2 3 2 2

1

1

(1 )

( ) 1

(1 ) 1 1

Power

Representation

Polynomial Representation 2x

1x 0x

Vector

Representation(3-Turple)

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)

To determine the order of each element, we use the expression:

( ) / gcd( , )kORD c c k where 31 2 1 7c p

1( ) 7 / gcd(7,1) 1ORD

2( ) 7 / gcd(7,2) 1ORD

3( ) 7 / gcd(7,3) 1ORD

12

4( ) 7 / gcd(7,4) 1ORD

5( ) 7 / gcd(7,5) 1ORD

6( ) 7 / gcd(7,6) 1ORD

Answer 7

To solve the system of equations, we first express them as matrices:

5 7

7 9

2 6

1 1

1

1

X

Y

Z

We use Crammer’s rule to solve for the unknowns. We start by obtaining the determinant D of the

coefficient matrix:

7 5 5

2

6 6 7

1 11 1

1 1D

6 7 6 5 2 7 5( 1) ( ) 11 14 30 1

3 11 141

0001 1000 1110 1001

1110

11

Determinants for the variables are:

7 5

7 5 5

9 7 7 9

6 6 7

6

11 1

1 11

XD

7 6 7 9 5 6 5 7( ) ( 1) ( )

13 2 5 9

1101 0100 0110 1010

0101

8

13

7

9 7 7 7

9 7 2

6 6 9 7

2 6

1 11 1

1 1 1YD

9 6 7 7 6 2 7 7 91( ) 1( ) ( )

8 13 111

0001 0101 1101 1110

0111

10

5 7

9 5 7 5 7

9 2

9

2

1

1 1 11 1

1

ZD

9 5 7 2 9 5 71( ) 1( ) ( )

2 6 7 9 10

0010 0100 1100 1011 1010 0111

1100

6

The solutions are therefore:

8 11 8 11/ / (1/ )XX D D

But 151 therefore the above becomes

8 15 11 8 4 12( / )

10 11 10 4 14/ /YY D D

6 11 6 4 10/ /ZZ D D

In all

12

14

10

X

Y

Z

14

Answer 8

We denote the row space of a matrix G as ( )R G and its column space as ( )C G .

The relationship between row space and column is such that

( ) ( )TR G C G where TG is the transpose of the matrix G.

So to get the required row space of G, we first get the column space of TG . Evaluating the transpose

of G i.e. TG , we get

1 1 0

1 1 1

0 1 1

1 0 1

1 0 0

0 1 0

0 0 1

TG

To get the column space of TG , we reduce it to the reduced row echelon form so that we can

identify the pivot elements and then use them to identify the columns of TG that span its column

space.

We subtract the sixth row of TG from the first row to form the new first row. We then subtract the

fourth row from the second row to form the new second row. Then the sixth row is subtracted from

the third row to form the new third row. The fifth row and the seventh rows are subtracted from the

fourth row to form the new fourth row. This makes it to have all zeros. Then multiplication is carried

out between the all zero fourth row and the fifth, sixth and the seventh rows to form the RREF matrix

below:

1 0 0

0 1 0

0 0 1

( ) 0 0 0

0 0 0

0 0 0

0 0 0

Trref G

Notice that the 3 pivot elements in ( )Trref G show that all the 3 columns of TG span the column

space of ( )TC G i.e.

15

( )R G =

1 1 0

1 1 1

0 1 1

( ) , ,1 0 1

1 0 0

0 1 0

0 0 1

TC G span

(1)

The null space of H is such that ( ) | 0nN H x H x

1

2

3

4

5

6

7

1 0 0 0 1 1 0

0 1 0 0 1 1 10 0

0 0 1 0 0 1 1

0 0 0 1 1 0 1

x

x

x

H x H x

x

x

x

Since H is already reduced row echelon form (rref) with pivot elements at 1x , 2x , 3x and

4x ;the free elements are 5x , 6x and 7x . We will therefore express all the elements in terms of

the free as elements as shown below:

1 5 6

2 75 6

3 76

4 75

5 5

6 6

7 7

0

0

0

00

00

0 0

x x x

x xx x

x xx

x xx

x x

x x

x x

5 6 7

1 1 0

1 1 1

0 1 1

1 0 1

1 0 0

0 1 0

0 0 1

x x x

The above shows that the null space of H will be span by three column vectors i.e.

16

1 1 0

1 1 1

0 1 1

( ) , ,1 0 1

1 0 0

0 1 0

0 0 1

N H span

(2)

Equation (1) and (2) above show that the row space of G, ( )R G , and the null space of

H, ( )N H ,are the same i.e.

1 1 0

1 1 1

0 1 1

( ) , , ( )1 0 1

1 0 0

0 1 0

0 0 1

N H span R G

Hence shown.