theory and applications of gf(2 p ) cellular automata

58
Theory and Applications of GF(2 p ) Cellular Automata P. Pal Chaudhuri Department of CST Bengal Engineering College (DU) Shibpur, Howrah India

Upload: fruma

Post on 07-Feb-2016

38 views

Category:

Documents


4 download

DESCRIPTION

Theory and Applications of GF(2 p ) Cellular Automata. P. Pal Chaudhuri Department of CST Bengal Engineering College (DU) Shibpur, Howrah India. Review of GF(2) CA. This computation model was introduced by Von Nuemann - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Theory and Applications of  GF(2 p ) Cellular Automata

Theory and Applications of GF(2p) Cellular Automata

P. Pal Chaudhuri

Department of CST

Bengal Engineering College (DU)

Shibpur, Howrah India

Page 2: Theory and Applications of  GF(2 p ) Cellular Automata

Review of GF(2) CA• This computation model was

introduced by Von Nuemann• A CA cell is essentially a

memory element (D Flip flop) with some combinatorial logic {an XOR gate (linear) or XNOR Gate (additive) for our case}

• The cell is updated at every clock cycle

• The state of the cell is dictated by the immediate neighbours of the cell

Page 3: Theory and Applications of  GF(2 p ) Cellular Automata

• SIMPLE STRUCTURE • 2 STATE 3 NEIGHBOURHOOD

Clock

Combinational logic

CLK

D

Flip - Flop Q

From

left neighbour

A typical CA cell

Page 4: Theory and Applications of  GF(2 p ) Cellular Automata

Truth TableNeighboodhood

StateNextState

Next State

000 0 1001 1 0010 0 0011 1 1100 1 0101 0 1110 1 1111 0 1

Rule 90 Rule 150

After Minimization,

XOR Logic XNOR Logic

Rule 60 : qI(t+1) = qI-1(t) qI(t) Rule 195 : qI(t+1) = qI-1(t) qI(t)

Rule 90 : qI(t+1) = qI-1(t) qI+1(t) Rule 165 : qI(t+1) = qI-1(t) qI+1(t)

Rule 102 : qI(t+1) = qI(t) qI-1(t) Rule 153 : qI(t+1) = qI(t) qI-1(t)

Rule 150 : qI(t+1) = qI-1(t) qI(t) qI-1(t) Rule 105 : qI(t+1) = qI-1(t) qI(t) qI-1(t)

Rule 170 : qI(t+1) = qI-1(t) Rule 85 : qI(t+1) = qI-1(t)

Rule 204 : qI(t+1) = qI (t) Rule 51 : qI(t+1) = qI (t)

Rule 240 : qI(t+1) = qI+1(t Rule 240 : qI(t+1) = qI+1(t)

Rule 90 : qI(t+1) = qI-1(t) qI+1(t)

Rule 150 : qI(t+1) = qI-1(t) qI(t) qI-1(t)

CA Rules

Page 5: Theory and Applications of  GF(2 p ) Cellular Automata

Types of CA

• LINEAR Uses only XOR Logic• COMPLEMENT Uses XNOR logic• ADDITIVE Uses Both XOR and XNOR logic• UNIFORM All Cells obey same rule• HYBRID Different rules apply to different cells

X

X

X

X

XX

X

X

X

X

XOR Logic XNOR Logic

Page 6: Theory and Applications of  GF(2 p ) Cellular Automata

Characterization of GF(2) CA

• The CA is characterized by a T matrix which is essentially the dependency matrix

1 0 0 0 0

0 1 1 0 0

T = 0 1 1 1 0

0 0 0 1 1

0 0 0 0 1

• The elements are in GF(2)

• For 3-neighborhood CA, we have a band matrix as shown above

• Null Boundary CA

X

X

X

X

X

Page 7: Theory and Applications of  GF(2 p ) Cellular Automata

Cell 0 1 2 n-3 n-2 n-1Null Boundary

Cell 0 1 2 n-3 n-2 n-1Periodic Boundary

Cell 0 1 2 n-3 n-2 n-1Intermediate Boundary

CA with Different Boundary Conditions

Page 8: Theory and Applications of  GF(2 p ) Cellular Automata

Block Diagram of 2-D CA(5 Neighborhood)

Page 9: Theory and Applications of  GF(2 p ) Cellular Automata

Characterization Of State Transition Behavior

• Group CA All states lie on same Cycle

• Non Group CA Non cyclic and cyclic states

• Complemented CA Employs both XOR/XNOR logic

• The characterization of complemented CA is based on the corresponding non complement (XOR) CA

Page 10: Theory and Applications of  GF(2 p ) Cellular Automata

CHARACTERISTIC POLYNOMIAL X)

x 1 0 01 1+x 1 10 1 x 10 0 1 1+x

T + x [1] = x) = x4 + x +1

PRIMITIVE : SMALLEST INTEGER k FOR WHICH IRREDUCABLE(x) DIVIDES xk + 1, k =2n-1=15

STATE TRANSITION BEHAVIOUR: MAXIMUM LENGTH GROUPCA CYCLIC STRUCTURE:[ 1(1), 1(k) ], k = 2n-1, N CELL CA (EXHAUSIVE CA)

121163 135

12 15 14 4 810 7

90 f t+m (x) = Tm.f1(x)

Page 11: Theory and Applications of  GF(2 p ) Cellular Automata

0 1 0 01 0 1 00 1 0 10 0 1 0

T =

x 1 0 01 x 1 00 1 x 10 0 1 x

T + IX =

1 0 0 00 1 0 00 0 1 00 0 0 (x2 + x +1)

CHARACTERISTIC POLYNOMIAL = MINIMAL POLYNOMIAL= (x2 + x +1)2

GROUP CA

NON MAXIMUM LENGTH GROUP CA < 90, 90, 90, 90 >

(x) =

Page 12: Theory and Applications of  GF(2 p ) Cellular Automata

0

9 15

613

7 12

3 14

11

5

2 8

1 4

10

State Transition Behavior

Page 13: Theory and Applications of  GF(2 p ) Cellular Automata

Non Group CA

N = 4

Characteristic Polynomial = x 2(x+1)2

Minimal Polynomial = x 2(x+1)2

r = rank = 3, depth = 2

No of Predecessors = 2 n-r

Nonreachable states = 2,3,4,5,10,11,12,13

Cyclic states = (0,1,8,9)

Attractors = 0,1,8,9

1- basin = (1,4,11,14)

5

15

10

0

4

14

11

1

2

7

13

8

3

6

12

9

Zero tree

1 1 0 00 1 1 00 1 1 00 0 1 1

T =

Det = 0

Page 14: Theory and Applications of  GF(2 p ) Cellular Automata

2943

1112110

0151413

5678

Complemented CA

Rule Vector < 153,153,153,153>

Page 15: Theory and Applications of  GF(2 p ) Cellular Automata

From the T matrix, we can obtain the following which characterize the given CA

• Group properties (For Group CA)

• Non Group CA properties• Characteristic Polynomial• Minimal Polynomial• Cycle structure

All Results are currently available in Additive Cellular Automata

Theory and Applications Volume 1P Pal Chaudhuri, D Roy Chowdhury, S Nandi and S

ChattopadhyayIEEE Computer Society Press

Book ISBN 0-8186-7717-1

Page 16: Theory and Applications of  GF(2 p ) Cellular Automata

Application Areas

• Pseudo random Pattern Generation• Pseudo Exhaustive Test Pattern Generation• Deterministic Test Pattern Generation • Signature Analysis• Synthesis of testable FSM• CA - Based Cipher System• Low cost Associative memory• Perfect Hashing• 2D CA based Parallel PRPG

Page 17: Theory and Applications of  GF(2 p ) Cellular Automata

GF (2P) CA

D D D x

This is treated as a single cell of GF(2P) CA

Characteristic Polynomial = f(x)f(x) is a primitive polynomial

X X X X

GF (2P) CA

• P number of GF(2) cells are treated as a unit cell of GF(2P)• The characteristic polynomial of the unit GF(2P) cell is a primitive polynomial in GF(2)• The T matrix is constructed as in the case of GF(2), the elements are in { 0 .. 2P - 1 }

Page 18: Theory and Applications of  GF(2 p ) Cellular Automata

Why GF(2P) CA

• Ability to handle np number of

GF(2) cells using ‘n’ number

GF(2p) cells.

• Based on the theoretical found-

dation of Extension Field.

Page 19: Theory and Applications of  GF(2 p ) Cellular Automata

• Evidently increases the Neighborhood of GF(2) CA.

• If we use 3 Neighborhood GF(2p) CA, we are in effect using

3 p Neighborhood GF(2) CA.

• Extends the computing power of GF(2) CA

0 0 0 0 1

T =

N = 3Neighborhood = 3

0 0 0 1 0 00 0 1 1 0 00 1 0 0 0 11 1 0 0 1 10 0 0 1 1 00 0 1 1 0 1

3 x 3

6 x 6

0 11 1 =

Page 20: Theory and Applications of  GF(2 p ) Cellular Automata

• Provides Abstraction.• Provides hierarchy to look at the Problem from higher levels

• A bit

• A set of p bits

(pixel)

• A set p x q bits

( pixel block)

GF(2)

GF(2p)

GF(2p)q

0/1

1 2 p

0 to 2p-1

1 2 qk

1 2 p

0 to 2pq -1

Page 21: Theory and Applications of  GF(2 p ) Cellular Automata

Simple Analogy

Transistor net List

Gate Level Net List

RTL Net List

GF(2)

GF(2p)

GF(2p)q

Page 22: Theory and Applications of  GF(2 p ) Cellular Automata

Reduced Computation Overhead

• Multiplication and Addition are avoided by Star and Plus

table

• Substituted by Simple Table Lookup

• Size of the Matrices to be handled is Reduced by a factor of

p2 we work in GF(2p) np x np replaced by n x n matrix

• Overall Execution Time of algorithms coded in GF(2P) will

decrease by the order of p2

• The overhead is the memory space to store the Star Table

and Plus Table

Page 23: Theory and Applications of  GF(2 p ) Cellular Automata

….

Characterization Based on GF(2) : A Finite Field

Finite Field

Number of elements in { F } is finite

• Finite Cardinality of { F } is a finite field or

GALOIS FIELD (GF)

• GF(q) means |{ F }| = q

• The Binary Field is denoted by GF(2) = {0,1}

GF (2) CA GF (2p) CA

D 1 2 pA Cell

0/1Finite FieldBit String

0 to 2p -1Its extension

Symbol String (Symbol GF(2p)

Page 24: Theory and Applications of  GF(2 p ) Cellular Automata

Field is a set {F} with the following properties

• F is an abelian group under addition.

• F is closed under multiplication.

• F is associative under multiplication.

• There is a multiplicative Identity.

• There is a multiplicative inverse.

Page 25: Theory and Applications of  GF(2 p ) Cellular Automata

Extension Field

GF(2) : { 0,1 } GF(22) :{00,01,10,11} {0,1,2,3}

n Cell machine, each Cell handling

GF(2) elements GF(22) elements

…… … ….. ….

1 0 1 …… i …. 1 M/C State 3 2 0 ….. I …. 1

i GF(2) i GF(22)

n symbols = n bits n symbols = 2n bits

Page 26: Theory and Applications of  GF(2 p ) Cellular Automata

Extension Field

GF (2p) is the pth Extension of GF(2)

• This has elements (0, , 2…….. 2p

-1)

• Where is the generator of the field

• is the root of the Irreducible Polynomial f(x)

• f(x) is called Generator Polynomial

• For GF(2p) CA design - Primitive Polynomial as generator

( a n degree irreducible polynomial is primitive if minimum

value of k for which it divides xk+1 where k = 2n -1 )

Page 27: Theory and Applications of  GF(2 p ) Cellular Automata

Extension Field Theory

Generator Polynomial Primitive polynomial

p(x) = x2 + x + 1, coefficients over GF(2)

Set of Polynomial modulo p(x) is a field denoted

GF(22) = { 0, 1, x, x+1 } = { 0, 1, , 2}

where is the root of p(x).

Page 28: Theory and Applications of  GF(2 p ) Cellular Automata

GF(2) elements GF(2p) elements1 3 …i ...1, i GF(2p)n symbols = pn bits

….. ….. …. …

…..

A Set of p bits form a cluster that is viewed as a symbol at higher level What is the Utility? - Abstraction & Hierarchy

Transistor - Gate Level - RTL Level

p21

ni21

Page 29: Theory and Applications of  GF(2 p ) Cellular Automata

Further Extension

• A set of p bits form a symbol in GF(2p).

• A set of q symbols form a (super symbol in GF(2p)

q

field properties are valid) .

• N cell GF(2p)

q machine.

…. …. npq bits

… …. pq bits

……… p bits

• Formalism of a hierarchical structure

np cell GF (2) CA n cell GF(2p) CA

1 2 i n

1 2 j q

1 2 p

Page 30: Theory and Applications of  GF(2 p ) Cellular Automata

Structure of GF (2P) CA

OUTIN OUT OUT………..

1 2 I - 1 i i + 1

W i-1

Wi

W i-1

Page 31: Theory and Applications of  GF(2 p ) Cellular Automata

Structure of GF(2P) CA

CELL 0 CELL 1 CELL 2

D

Q Q

D

Q

D

0

0

1

T =0 0 0 0 1

A State of an n cell GF(2p) CA x1,x2..

Xn, xi GF(2p)Next State = T, Present State(weighted sum)

Page 32: Theory and Applications of  GF(2 p ) Cellular Automata

GF (2P) CA

• Use of Extension Field Theory to extend the basic

Structure of CA• Each Cell No Longer Stores 0/1

• It Stores any of (0 - 2p -1) Values

• Essentially n Cell GF(2P) CA np Cell GF(2) CA

Page 33: Theory and Applications of  GF(2 p ) Cellular Automata

Characterization of GF(2P) CABased on the extension field theory, we have

characterized GF(2p) CA using the T matrix.

Till date, we have identified methods to evaluate

• Determinant

• Characteristic Polynomial

• Cycle structure

• Group Properties of Group CA

• Properties of Non - Group CA

Page 34: Theory and Applications of  GF(2 p ) Cellular Automata

Partial Transition Diagram of a 3 Cell GF (22) CA

103

112

210

232

033

023

203212

100

010001

021322

321

333

123

111

330

101

310

Page 35: Theory and Applications of  GF(2 p ) Cellular Automata

T Matrix of the CA

• Matrix is the T 0 0

matrix in GF(2P) T = 0 0 1

0 0 1 1 0 0

• Matrix is in 0 0 0 1 0 0

GF(2) T = 1 1 0 0 1 1

0 1 0 0 0 1

0 0 1 1 1 0

0 0 0 1 0 1

• Both have Equivalent representations for implementation.

1 10 1

is the generatorPolynomial

Page 36: Theory and Applications of  GF(2 p ) Cellular Automata

For every p(x) as Generator Polynomial

We have an Equivalent Binary Companion Matrix T whose Characteristic Polynomial is p(x).

T =

Characteristic Polynomial = x2 + x + 1

0 1 1 1

Page 37: Theory and Applications of  GF(2 p ) Cellular Automata

GF (22)

Generator Polynomial p(x) = x2 + x + 1.

Binary Companion Matrix = T = 0 1

1 1Representation

Matrix Vector

< 0 1>

< 1 1 > =

=

3=

0 11 1

1 11 0

1 00 1

< 0 0 >

< 0 1 >

< 1 1 >

< 1 0 >

0

2

3

1

0 0 0 0 =

Page 38: Theory and Applications of  GF(2 p ) Cellular Automata

The Elements of GF(2p) are { 0,,2 ….. 2

p -1 }

The Matrix Representation of i = Ti

The vector Representation of i = col1[Ti]

0 11 1

i

Ti =

Col1 Ti = COL1

0 11 1

i

Page 39: Theory and Applications of  GF(2 p ) Cellular Automata

The star Table and Plus Table for GF(22)

+ 0 1 2 30 0 1 2 31 1 0 3 22 2 3 0 13 3 2 1 0

* 0 1 2 30 0 0 0 01 0 1 2 32 0 2 3 13 0 3 1 2

Page 40: Theory and Applications of  GF(2 p ) Cellular Automata

Matrix Vector Multiplication

Y = TX

= =

= =

0 2 02 0 20 2 1

222

0*2 + 2*2 + 0*22*2 + 0*2 + 2*20*2 + 2*2 + 1*2

3 3 + 3 3 + 1

302

Page 41: Theory and Applications of  GF(2 p ) Cellular Automata

If the Generator Polynomial for all Cells of the GF(2p) CA are same

Uniform CA

If we use Multiple Generator Polynomials we obtain

Hybrid CA

Page 42: Theory and Applications of  GF(2 p ) Cellular Automata

GF (2P) Results

• Factorization algorithm in GF(2P)

• Vector space Theoretic Specification of an Extended

Linear Machine

Page 43: Theory and Applications of  GF(2 p ) Cellular Automata

• For the T Matrix

• Characteristic Polynomial

x3 + x2 + 2 = 0• Minimal Polynomial

x3 + x2 + 2 = 0• Cycle Structure

- [ 1(1), 1(3), 3(5), 3(15)]

T = 0 0 0 1

Page 44: Theory and Applications of  GF(2 p ) Cellular Automata

Group CA 4 Cell GF (24) CA

5 2 0 0

T = 0 1 3 0

0 4 8 2

0 0 9 6

• All non zero lie in some cycle

• det T = 0

• Characteristic Polynomial x4 + 13 x3 + 15 x2 + 5 x + 6

• Factors (x+2)(x+5)(x+8)(x+9)

• Cycle Structure [ 1(1), 4369(15) ]

Page 45: Theory and Applications of  GF(2 p ) Cellular Automata

Group CA 4 Cell GF(24) CA

5 2 0 0

T = 0 1 3 0

0 4 8 2

0 0 9 6

Characteristic Polynomial = (x) = x4 + 13 x3 + 15 x2 + 5 x + 6

= factors

Primary Cycle Structure is formed by factors of (x).

1(x) (x+2) 15

2 (x) (x+5) 15

3(x) (x+5) 15

4 (x) (x+9) 15

Page 46: Theory and Applications of  GF(2 p ) Cellular Automata

GF (2P) Results

• (x) = 1(x)r1 2(x)r2 …………..m(x)rn

• Primary Cycle Structure

• This corresponds to the vector subspace

formed by the factors of (x)

• This therefore contributes m such vector Subspaces

Page 47: Theory and Applications of  GF(2 p ) Cellular Automata

Secondary Cycle StructureFormed by taking j terms of the m Vector Subspaces at a time for j = 2 to m

15*15=225

15*15=225

15*15=225 etc

15*15*15=3375 etc

ull Space (NS) of each (Tki + I) gives the No. of components,

NS(T15 + I) = 65535

NS(T225 + I) = 65535

NS(T3375 + 1) = 65535

Cycle structure = 1(1) 4369(15)

Page 48: Theory and Applications of  GF(2 p ) Cellular Automata

GF (2P) Results

• Secondary Cycle Structure.

• This Vector subspace is formed by taking j terms of the

m vector subspaces at a time for j = 2 to m.

• Null Space of each (Tk + I) for all possible cycle lengths

gives the number of component subspaces.

Page 49: Theory and Applications of  GF(2 p ) Cellular Automata

Non Group CA

9 711

5

8 410

6

13 115

3

12 214

0

D1 MACA

MACA

8 10

4

6

9 11

7

5 01100101

1110

12 14

2

0

13 15

1

30000 0011

00 01

11100100

Page 50: Theory and Applications of  GF(2 p ) Cellular Automata

Non Group CA

2 3 0

T = 3 3 2

2 2 1

• det T = 0• Rank = 2 Height = 1 Depth = 21

• Predecessors of Reachable States = 2 2(3-2) = 22 = 4• Characteristic Polynomial x(x+1)2

• Cycle Structure [4(1),6(2)]

Page 51: Theory and Applications of  GF(2 p ) Cellular Automata

Non Group CA

• Characteristic Polynomial : xkf(x)• Minimal Polynomial : xdg(x)• Height = d• No of Predecessors of reachable states = 2 p(n-r)

where r = rank of matrix• p = extension• No of Attractors : 2 p(n-d)

Page 52: Theory and Applications of  GF(2 p ) Cellular Automata

Complemented CA

Individual cells use XNOR / XOR Logic

X t+1 = TXt + F where F is Inversion Vector

X t+p = [ I + T + T2 +……….. T P-1] F + TP X

If cycle structure of XOR CA is (k)

Page 53: Theory and Applications of  GF(2 p ) Cellular Automata

XNOR CA

T =

F =

1111

Cycle Structure of XOR CA = 4(1) 20(3) 32(6)Cycle Structure of XNOR CA = 4(1) 20(3) 32(6)

2 1 0 0 0 3 2 0 0 0 3 1 0 0 0 1

X

X

X

X2

12

3

1

3 2

1 1 1 1

Page 54: Theory and Applications of  GF(2 p ) Cellular Automata

XNOR CA configured with all Permutations of Rule 60,

102, 204 and all weights give cycle Lengths which are of

even length - The only Constraint is that atleast one Row

of the T Matrix must contain a single one

Page 55: Theory and Applications of  GF(2 p ) Cellular Automata

Cycle Structure of XOR CA = 0(1) 1(k1) (k3)….. n(kn)

[1 + T + T2 + T3 + ………..+ Tri ][F] = 0 CASE I

= 0 CASE II

CASE I

XNOR CA Cycle Structure 0(1) 1(k1) (k3)….. n(kn)

CASE II

XNOR CA Cycle Structure 0(2kn)

Page 56: Theory and Applications of  GF(2 p ) Cellular Automata

1 2 0 0 0 00 3 0 0 0 00 0 3 2 0 00 0 2 0 0 00 0 0 0 1 20 0 0 0 0 3

T =

1 2 0 00 2 3 00 0 3 10 0 0 1

T =

0121

F =

XOR CA Cycle Structure 4(1) 6(2) 20(3) 30(6)XNOR CA Cycle Structure 4(1) 6(2) 20(3) 30(6)

XOR CA 4(1) 340(3) 512(6)XNOR CA 2(2) 512(6)(1 + T + T2) F 0(1 + T + T2 + T3 + T4 + T5) F = 0

Page 57: Theory and Applications of  GF(2 p ) Cellular Automata

Image Compression

Image Sizes 352 x 240

Each Pixel 8 bits wide in GF(28)

8 x 8 blocks comprise 64 cell GF(28) CA

Instead of handling 512 bits (8 x 8 x 8)

we work with 64 GF(28) Symbols

Page 58: Theory and Applications of  GF(2 p ) Cellular Automata

Thanks