590 likes | 763 Views
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
E N D
Theory and Applications of GF(2p) 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 • 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
SIMPLE STRUCTURE • 2 STATE 3 NEIGHBOURHOOD Clock CLK Q Flip - Flop D Combinational logic From left neighbour A typical CA cell
X X X X X X X X X X Types of CA XOR Logic XNOR Logic • 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 X 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
CA with Different Boundary Conditions Cell 0 1 2 n-3 n-2 n-1 Null Boundary Cell 0 1 2 n-3 n-2 n-1 Periodic Boundary Cell 0 1 2 n-3 n-2 n-1 Intermediate Boundary
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
CHARACTERISTIC POLYNOMIAL Y(X) x 1 0 0 1 1+x 1 1 0 1 x 1 0 0 1 1+x Y(x) = x4 + x +1 T + x [1] = PRIMITIVE : SMALLEST INTEGER k FOR WHICH IRREDUCABLE Y(x) DIVIDES xk + 1, k =2n-1=15 STATE TRANSITION BEHAVIOUR: MAXIMUM LENGTH GROUP CA CYCLIC STRUCTURE: [ 1(1), 1(k) ], k = 2n-1, N CELL CA (EXHAUSIVE CA) 3 6 11 2 5 13 9 f t+m (x) = Tm.f1(x) 0 1 10 12 15 14 4 8 7
GROUP CA NON MAXIMUM LENGTH GROUP CA < 90, 90, 90, 90 > 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 x 1 0 0 1 x 1 0 0 1 x 1 0 0 1 x T + IX = T = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 (x2 + x +1) y(x) = CHARACTERISTIC POLYNOMIAL = MINIMAL POLYNOMIAL = (x2 + x +1)2
5 13 6 2 8 7 12 0 9 15 1 4 3 14 10 11 State Transition Behavior
2 13 3 12 5 10 4 11 7 6 15 14 8 9 0 1 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) Zero tree 1 1 0 0 0 1 1 0 0 1 1 0 0 0 1 1 T = Det = 0 Non Group CA
8 7 6 5 10 1 12 11 13 14 15 0 3 4 9 2 Complemented CA Rule Vector < 153,153,153,153>
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 1 P Pal Chaudhuri, D Roy Chowdhury, S Nandi and S Chattopadhyay IEEE Computer Society Press Book ISBN 0-8186-7717-1
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
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 } 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
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.
0 a 0 a 0 a 0 a 1 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 1 1 1 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 1 T = 3 x 3 N = 3 Neighborhood = 3 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 6 x 6 0 1 1 1 a =
GF(2) GF(2p) 1 1 2 2 p p GF(2p)q 1 2 q • 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) 0/1 0 to 2p-1 k 0 to 2pq -1
Simple Analogy GF(2) Transistor net List GF(2p) Gate Level Net List GF(2p)q RTL Net List
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
Characterization Based on GF(2) : A Finite Field GF (2) CA GF (2p) CA …. 1 2 p D A Cell 0/1 Finite Field Bit String 0 to 2p -1 Its extension Symbol String (Symbol e GF(2p) 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}
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.
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 e GF(2) i e GF(22) n symbols = n bits n symbols = 2n bits
Extension Field GF (2p) is the pth Extension of GF(2) This has elements (0, a, a2…….. a2p-1) Where a is the generator of the field a 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 )
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, a, a2} where a is the root of p(x).
GF(2) elements GF(2p) elements 1 3 …i ...1, i e 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 1 2 i n 1 2 p
Further Extension 1 2 i n Aset 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 j q 1 2 p
Structure of GF (2P) CA 2 I - 1 i i + 1 1 OUT IN OUT OUT ……….. Wi W i-1 W i-1
Structure of GF(2P) CA Q Q Q CELL 2 CELL 0 CELL 1 D D D a 0 0 a a a 1 0 a 0 a 0 a 0 a 1 A State of an n cell GF(2p) CA x1,x2.. Xn, xie GF(2p) Next State = T, Present State(weighted sum) T =
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
Characterization of GF(2P) CA Based 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
Partial Transition Diagram of a 3 Cell GF (22) CA 112 210 033 103 232 321 322 021 101 001 333 010 123 100 330 023 111 310 212 203
T Matrix of the CA 1 1 0 1 is the generator Polynomial Matrix is the T 0 a 0 matrix in GF(2P) T = a 0 a a = 0 a 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.
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
GF (22) 0 2 3 1 0 0 0 0 Generator Polynomial p(x) = x2 + x + 1. Binary Companion Matrix = T = 0 1 1 1 Representation Matrix Vector < 0 1> < 1 1 > < 0 0 > < 0 1 > < 1 1 > < 1 0 > a = a = 0 1 1 1 a 2= 1 1 1 0 a3= 1 0 0 1
The Elements of GF(2p) are { 0,a,a2 ….. a2p -1 } The Matrix Representation of ai = Ti The vector Representation of ai = col1[Ti] i 0 1 1 1 Ti = COL1 i 0 1 1 1 Col1 Ti =
The star Table and Plus Table for GF(22) + 0 1 2 3 0 0 1 2 3 1 1 0 3 2 2 2 3 0 1 3 3 2 1 0 * 0 1 2 3 0 0 0 0 0 1 0 1 2 3 2 0 2 3 1 3 0 3 1 2
Matrix Vector Multiplication 0*2 + 2*2 + 0*2 2*2 + 0*2 + 2*2 0*2 + 2*2 + 1*2 0 2 0 2 0 2 0 2 1 2 2 2 3 3 + 3 3 + 1 Y = TX = = = = 3 0 2
If the Generator Polynomial for all Cells of the GF(2p) CA are same Uniform CAIf we use Multiple Generator Polynomials we obtain Hybrid CA
GF (2P) Results Factorization algorithm in GF(2P) Vector space Theoretic Specification of an Extended Linear Machine
T = 0 aa a 0 a 0 a 1 For the T Matrix Characteristic Polynomial x3 + x2 + a2 = 0 Minimal Polynomial x3 + x2 + a2 = 0 Cycle Structure - [ 1(1), 1(3), 3(5), 3(15)]
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) ]
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 = f(x) = x4 + 13 x3 + 15 x2 + 5 x + 6 = factors Primary Cycle Structure is formed by factors of f(x). F1(x) (x+2) 15 F2 (x) (x+5) 15 F3(x) (x+5) 15 F4 (x) (x+9) 15
GF (2P) Results • F(x) = F1(x)r1F2(x)r2 …………..Fm(x)rn • Primary Cycle Structure • This corresponds to the vector subspace formed by the factors of F(x) • This therefore contributes m such vector Subspaces
Secondary Cycle Structure Formed by taking j terms of the m Vector Subspaces at a time for j = 2 to m f1 f2 = 15*15=225 f2 f3 = 15*15=225 f4f1= 15*15=225 etc f1 f2 f3 = 15*15*15=3375 etc Null 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)
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.
8 10 9 11 13 15 4 7 1 12 14 00 11 01 10 2 6 5 3 0110 0101 0011 0000 MACA 0 4 8 7 10 9 11 1 13 2 12 15 14 6 5 3 0 10 11 01 00 D1 MACA Non Group CA
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)]