Non-Abelian Cellular Automata

Report 2 Downloads 191 Views
Non-Abelian Cellular Automata Cristopher Moore

SFI WORKING PAPER: 1995-09-081

SFI Working Papers contain accounts of scientific work of the author(s) and do not necessarily represent the views of the Santa Fe Institute. We accept papers intended for publication in peer-reviewed journals or proceedings volumes, but not papers that have already appeared in print. Except for papers by our external faculty, papers must be based on work done at SFI, inspired by an invited visit to or collaboration at SFI, or funded by an SFI grant. ©NOTICE: This working paper is included by permission of the contributing author(s) as a means to ensure timely distribution of the scholarly and technical work on a non-commercial basis. Copyright and all rights therein are maintained by the author(s). It is understood that all persons copying this information will adhere to the terms and constraints invoked by each author's copyright. These works may be reposted only with the explicit permission of the copyright holder. www.santafe.edu

SANTA FE INSTITUTE

Non-Abelian Cellular Automata Cristopher Moore Santa Fe Institute September 29, 1995 Abstract

We show that a wide variety of non-linear cellular automata can be written as a semidirect product of linear ones, and that these CAs can be predicted in parallel time O(log 2 t). This class includes any CA whose rule, when written as an algebra, is a solvable group. We also show, with an induction on levels of commutators, that CAs based on nilpotent groups can be predicted in parallel time O(log t).

1 Introduction The direct product is a very basic notion in mathematics. Two algebras, dynamical systems, or members of any other category can be paired so that their components act independently of each other. The semidirect product is a notion from group theory, in which the rst component is independent of the second, but not vice-versa. For instance, suppose we take two groups A and B . Then if for each a 2 A there is a function fa on B , we can dene the semidirect product A f B with the following multiplication: (a b)(a  b ) = (aa  fa (b)b ) This is a group if and only if the fa are automorphisms of B , and if fa1 a2 = fa1 fa2 (i.e., f is a homomorphism from A to the automorphism group of B ). Specically, if A and B are subgroups of a group G where their only intersection is the identity, then every element g 2 G can be written uniquely as g = ab where a 2 A and b 2 B . Then if B is a normal subgroup, so that a 1ba 2 B , we have (ab)(a b ) = aa (a 1ba )b and G is a semidirect product A f B with fa (b) = a 1ba. This idea can be extended to dynamical systems, where rather than a direct product where two components evolve independently as in (a b)t+1 = (f (at ) g(bt )), we have a semidirect product of the form (a b)t+1 = (f (at ) ga (bt )) 0

0

0

0

0

;

0

0

0

0;

0

0

;

t

1

Figure 1: By blocking together 2r sites, we can transform any CA into one on a staggered space-time with r = 1=2. We can think of the second component as a non-autonomous dynamical system, which varies with time according to the evolution of the rst component. If a dynamical system can be decomposed in this way, and if we have e cient algorithms to predict both f and the non-autonomous g, then we can predict the system as a whole. Cellular automata (CAs) are dynamical systems which can also be thought of as algebras. A CA is a mapping on sequences, of the form

(a)i = (ai r  : : : ai : : : ai+r ) where r is the radius of the rule. By combining blocks of 2r sites together, as shown in gure 1, we can convert any CA into one with r = 1=2 where each site has only two predecessors in a staggered space-time:

(a)i = (ai 1=2 ai+1=2) We can then think of the CA rule as an algebra, where (a b) = a  b. The light-cone below an initial row becomes a0 a1 a2 a3 a0 a1 a1 a2 a2 a3 (a0a1 )(a1 a2) (a1a2 )(a2 a3) ((a0a1 )(a1 a2)(a1 a2 )(a2 a3)) and so on. With this approach, we can explore how dierent algebraic properties correspond to properties of the CA, such as e cient prediction 1], partial reversibility 2], and periodicity 3]. In general, predicting a cellular automaton is believed to be no easier than simulating it completely to calculate the nal state we have to ll in the entire light-cone above it, which takes O(t2 ) serial computation steps (O(td+1 ) in d dimensions) or O(t) in parallel. This prediction problem is easily shown to be P-complete 4], since CAs exist (e.g. 5]) which can simulate universal Turing machines. Many CAs can be predicted in parallel time O(logk t) for some k, putting them in the complexity class NCk 4]. However, if this could be done for all CAs then all problems that could be solved in polynomial serial time could be solved ;

;

2

in polylogarithmic parallel time, i.e. P = NC. This would be as surprising as, say, if it turned out that P = NP. The CAs that can be predicted in polylogarithmic parallel time, then, seem to occupy a middle position between CAs that are easily predictable, such as elementary rules 90 and 150 6] that are just addition mod 2, and computationally universal CAs that probably have to be simulated explicitly. In 1] we term these CAs quasi-linear non-linear, but relatively easy to predict.

2 Preliminaries

An algebra (A ) is a function from A  A to A, written a  b or simply ab. The order of an algebra is the number of elements in it. The direct product A  B of two algebras is the set of pairs (a b), with (a b)(a  b ) = (aa  bb ). A quasigroup is an algebra whose multiplication table is a Latin square, in which every element of A occurs once in each row and each column. Quasigroups correspond to permutive CAs, in which (a b) is a one-to-one function of each of its inputs (more generally, its leftmost and rightmost inputs) when the other is held xed. An identity is an element 1 such that 1a = a1 = a. An inverse of a is an element a 1 such that a 1a = aa 1 = 1. An algebra is associative if a(bc) = (ab)c for all a b c 2 A. An associative algebra is called a semigroup. An associative quasigroup is a group. Groups have identities and inverses. An algebra is commutative if ab = ba for all a b 2 A. Commutative groups are called Abelian. The cyclic group Zp = f0 1 2 : :: p ; 1g with addition mod p is Abelian. A function f on an algebra is a homomorphism if f (ab) = f (a)f (b). An isomorphism is a one-to-one and onto homomorphism, and an automorphism is an isomorphism from an algebra to itself. Homomorphisms of Abelian groups can be represented as matrices. A subgroup B of a group A is a subset such that bb 2 B for all b b 2 B . We say B is normal if a 1ba 2 B for all b 2 B and all a 2 A. The subgroup of elements generated by a given subset S is written hS i. For any normal subgroup B of A, there is a factor group A=B and a homomorphism from A to A=B that sends all elements of B to 1. Conversely, the image of A under any homomorphism f is A= ker f where ker f = fa 2 Ajf (a) = 1g is a normal subgroup of A. In a non-Abelian group, the commutator of a and b is a b] = a 1 b 1ab, so ab = baa b]. The commutator subgroup G = hG G]i of a group G is the set of all elements that can be written as products of commutators. Then G=G is Abelian. 0

0

;

0

0

;

;

0

0

;

;

;

0

0

3

3 Non-autonomous additive CAs

If we have a state space Zp = 0 1 : : : p ; 1 and a CA rule of the form (a1  a2 : : : a2r+1) = f0 + f1 a1 + f2 a2 +    + f2r+1 a2r+1 (1) (mod p) where the fi>0 are scalar coe cients and f0 is a constant, then with a simple Pascal's Triangle method we can predict the CA in O(t) in serial or O(log t) in parallel 7, 1]. Since any Abelian group is the direct product of cyclic groups Zp , this is also true if r = 1=2 and (a b) = a + b is an Abelian group. More generally, if the fi are (non-commuting) homomorphisms of an Abelian group (A +), we can represent the CA rule as a polynomial 8] P (x) = f1 + f2 x + f3 x2 +    + f2r+1 x2r+1 after separating out the constant f0 . We can think of P t(x) as the tth row of a Green's function for the CA, and by using fast algorithms to raise P (x) to the tth power 9], we can predict the CA in O(t log t) in serial (on a random-access machine) or O(log2 t) in parallel 1]. We now show that a non-autonomous version of (1), where the fi vary in space and time, is still predictable in O(log2 t) parallel time. Denition. NCk is the class of problems that can be solved in parallel time O(logk n) with a polynomial P (n) number of processors, where n is the length of the input. More precisely, there is a family of circuits Cn with P (n) nodes and depth O(logk n), which can be generated by a Turing machine using O(log n) space when given n as input 4]. Since the input for predicting a CA is 2rt + 1 initial sites, we say a CA is in NCk if it can be predicted in O(logk t) parallel time. Lemma 1. A non-autonomous CA of the form (1), where the fi>0 are homomorphisms of an Abelian group (A +) and vary in space and time independent of the CA state, is in NC2 .

Proof. For simplicity, we will prove this for r = 1=2 a larger radius will simply increase the width of the light-cones, and the computation time, by a constant. Call the states in the light-cone stx with t = 0 at the initial row, and st0 the leftmost state in the tth row as shown in gure 2. Then stx's predecessors are st 1x and st 1x+1, and we write stx = (st 1x st 1x+1) = ftx (st 1x) + gtx(st 1x+1) + htx (where we have replaced f1 , f2 and f0 with f , g, and h for clarity) where ftx and gtx are homomorphisms of an Abelian group (A +), varying with t and x but independent of stx . ;

;

;

;

;

4

;

(0,0)

(0,1)

(1,0)

(0,2)

(0,T)

(1,1)

(1,T-1) (t-1,x)

(t-1,x+1)

(2,0) f

g (t,x)

(T,0)

Figure 2: The labelling scheme used in the text for the light-cone below the initial row. Now if (t  x ) is in the light-cone below (t x), dene ct x of stx in st x . Then we have 0

0

0

0

0j

tx

as the coe cient

0

ct x tx =  (x ; x) if t = t ct x tx = ft x ct 1x tx + gt x ct 1x +1 tx if t 6= t Then it is straightforward to show inductively that the state sT0 at the bottom of a light-cone T steps high, with initial row s0x for 0  x  T , is 0

0

0

0j

sT0 =

0

T X x=0

0

0j

0;

0

0

0j

cT0 0x(s0x ) + j

0

0;

T T ;t X X t=1 x=0

0

j

0

cT0 tx(htx )

(2)

j

Since we are given the htx, we can add all (T + 1)(T + 2)=2 of these terms together in parallel time O(log T ) (since n objects can be added in time O(log n) in parallel) but we have to calculate the cT0 tx rst. In fact, we can calculate any ct x tx in parallel time proportional to O(log2 (t ; t)) in the following way. The inuence of stx on st x has to go through the intervening sites so for any t where t < t < t , we can write j

0

0

0j

0

00

00

min(xx +t;t ) X 0

ct x 0

tx

0j

=

0

0

00

ct x 0

x00 =max(x;t00+tx0 )

c

(3)

t x00 t00x00 jtx

0 j 00

as shown in gure 3. We can then use induction on increasing time intervals. Assume that the ct x t x and ct x tx are known then we can calculate ct x tx in time 0

0 j 00

00

00

00 j

0

5

0j

(t,x)

t

(t,x)

t’’

=

(t’’,x’’)

t’ (t’,x‘)

(t’,x‘)

Figure 3: The divide-and-conquer strategy of equation 3. O(log(t ; t)) since the sum in (3) has at most (t ; t)=2 + 1 terms and the 0

0

multiplications can be done simultaneously in constant time. In particular, if t = b(t ; t)=2c, we can simultaneously calculate all the ct x tx where t ; t = 1, then for all with t ; t = 2, and so on, doubling each time until we have reached the desired time interval (a divide-and-conquer strategy). This takes time 00

0

0

0

0j

0

log1 + log2 + log4 +    + log(t ; t)=2 = O(log2 (t ; t)) 0

0

So in parallel, we can calculate all the cT0 tx for all t x in the light-cone in time O(log2 T ) and add the sum in (2) in time O(log T ), nally arriving at the nal state sT0 . We can generalize this further in two ways. First, for these sums to work, (A +) simply needs to be commutative and associative i.e., it can be a commutative semigroup rather than a group. Secondly, this algorithm works in any number of dimensions the number of sites at t between t and t is proportional to (t ; t)d , so each step of the divide-and-conquer strategy takes time O(log(t ; t)d ) = O(log(t ; t)). So in full generality we can state the following theorem: j

00

0

0

0

0

Theorem 1. In any number of dimensions, suppose a CA is of the form

C = (((C0 f1 C1) f2 C2)   ) f Cn where C0 is in NC2 and the Ci>0 are non-autonomous additive CAs of the form i(a1  a2 : : : ak) = fi0 + fi1 (a1) + fi2 (a2 ) +    + fik (ak ) n

6

where the fij>0 are homomorphisms of the commutative semigroup (Ai  +). Then C is in NC2, i.e. it can be predicted in parallel time O(log2 t).

Proof. Since C0 is in NC2, we can calculate its state, not just at the nal site, but everywhere in the light-cone (isn't parallel time wonderful?) with t2 times as many processors. This and Lemma 1 tells us how to calculate C1 everywhere in the light-cone, and so on. Iterate n times. Example 1. If A = f0 1g with addition mod 2, the homomorphisms of A are zero and the identity. Then the functions expressible as f (a) + g(b) + h are 0 1 a a b b a  b and a  b. So any semidirect product C f A where the states of C select among these eight functions on A is in NC2 if C is. Example 2. If A = Z3 = f0 1 2g with addition mod 3, the automorphisms of A are f (a) = a. All quasigroups of 3 elements can be expressed as a  b + h. Therefore, any permutive CA which is a semidirect product C f A, where A has three elements, is in NC2 if C is. Example 3. Any CA of the form ((a1 a2 : : : ak ) (b1 b2 : : : bk)) = (P1(a1  b1) P2(a1 a2 b1 b2) : : : Pk (a1 : : : ak  b1 : : : bk)) where each Pi is a polynomial linear in ai and bi , is in NC2 .

4 Solvable group CAs

One interesting class of CAs are those for which (a b) = a  b is a non-Abelian group. Because of their non-commutativity these CAs do not obey a principle of superposition, so Green's function techniques don't work. In 1] we show an O(log t) algorithm for one such group, the Quaternions Q8, but other nonAbelian groups such as the permutations of three elements S3 are left as an open problem. We can now show that a large class of nite groups have CAs in NC2. First:

Lemma 2. The set of algebras whose CAs can be predicted in a given amount of serial or parallel time (up to a multiplicative constant) is closed under nite direct products, subgroups, and homomorphisms. Proof. For nite direct products G1  G2    , simply predict each of the

Gi, either sequentially or in parallel. For subgroups, clearly an algorithm that predicts an algebra also predicts any of its subgroups. For a factor group or homomorphic image H = f (G) = G= ker f , take a pre-image f 1 (h) for each element h 2 H in the initial conditions, use the algorithm for G, and then apply f to return to H  this works since f is a homomorphism, e.g. for one time-step h1h2 = f (f 1 (h1 )f 1 (h2 )). In the language of universal algebra, this makes the set of CAs in a given complexity class an !-variety. Now recall the following denitions from group theory 10]: ;

;

;

7

Denition The derived series of a group G is the series of normal subgroups G G G : : : where G = hG G]i is the derived subgroup of G, G is the derived subgroup of G , and so on. A group is solvable if the derived series ends in f1g. For instance, the derived series of S4 , the group of permutations of 4 objects, is S4 A4 Z22 f1g where A4 is the set of even permutations and Z22 is generated by the permutations (12)(34), (13)(24) and (14)(23). 0

00

0

00

0

Theorem 2. Any CA based on a solvable group is in NC2 . Proof. This follows immediately from a standard theorem. Recall 10] that

the wreath product A o B of two groups is a semidirect product B  AB where AB is the set of functions from B to A and elements of B permute their components. In other words, (b f )(b  f ) = (bb  b f  f ) where b f (b) = f (b b) 0

0

0

0

0

0

0

Moreover, the wreath product is associative, i.e. A o (B o C ) and (A o B ) o C are isomorphic for any three groups A B C . Then 11] any solvable group with derived series G = G0 G1    Gk = f1g is a subgroup of the wreath product Hr o Hr 1 o  o H1 where Hi = Gi 1=Gi are the Abelian factor groups. This is a semidirect product of Abelian groups, so by Lemma 2 a CA with a solvable group as its algebra is in NC2 . For instance, the Quaternions have the derived series Q8 Z2 f1g (since a b] = 1 for any a b) so H1 = Z22 and H2 = Z2 . Then Q8 is a subgroup of Z2 o Z22 , which is a semidirect product Z22  Z24 of order 64. Now this algorithm can be inconvenient, since a group of order n can result in an exponentially larger wreath product if n = 2k and Hi = Z2 , the wreath product has order 2n 1. The number of processors required to calculate products in a group of this size is O(log 2n 1) = O(n), however, so the number of processors is still polynomially bounded in the size of the original group. This means that we actually have an NC algorithm that can take any group as input, along with the initial conditions, and predict that group's CA. But in any case, most small groups don't require embedding in such large wreath products. Many small groups are already semidirect products of Abelian groups, including the dihedral groups, groups of order p3 for p an odd prime, any group of square-free order, all groups of order p2q where p and q are primes, and so on 10, 12]. If we call a semidirect product of Abelian groups polyabelian, all groups of order less than 32 are polyabelian except the dicyclic or generalized quaternion groups, which are factor groups of polyabelian groups twice their size, and the binary tetrahedral group of order 24, which is a subgroup of a polyabelian group of order 12288 = 3  212 14]. The smallest non-solvable group is A5 , the simple group of order 60 (also called the icosahedral group). Since polyabelian groups are easily shown to be solvable (since if G = ((A0 A1 )A2 )A3 : : : then G (A1 A2 )A3 : : :), and since subgroups and factors of solvable groups are also solvable, this group's CA ;

;

;

;

0

8

can not be predicted by these methods. This leaves us with the following open question: is there an algorithm in NC2 , or NCk for some other k, for predicting CAs based on arbitrary nite groups?

5 Nilpotent group CAs

We now show that a subset of the solvable groups have CAs in NC1 , i.e. which can be predicted in parallel time O(log t). Recall the following from 10, 11]: Denition. The lower central series of a group G is the series of normal subgroups G = 1 G 2 G    where i+1 = h i G G]i. In other words,

2 G = G , 3 G is the subgroup generated by 3-element commutators a b] c], and so on. If the lower central series ends in f1g, we say that G is nilpotent if k+1 G = f1g, then G is nilpotent of class k and all commutators with more than k elements are 1. The nilpotent groups form a proper subset of the set of solvable groups. For instance, a nilpotent group of class 1 is simply an Abelian group. A nilpotent group of class 2 has commutators which commute with everything, i.e. a b] c] = 1 (for instance, the Quaternions, where a b] = 1). And so on. We now show that 0

Theorem 3. CAs based on nilpotent groups are in NC1 . Prof. First, consider a nilpotent group of class 2. If its initial conditions

are a0 a1 : : : at, the leftmost two columns of its light-cone are a0 a1 a0a1 a1 a2 a0a21 a2 a1a22 a3 3 3 2 a0 a1a2 a3  a2 a1] a1 a2a23 a4  a3 a2]

The commutator arises since a2a1 = a1 a2a2  a1], so (a0 a21a2 )(a1 a22a3 ) = a0 a31 a2a2 a1]a22a3 . Since commutators commute with everything we can move it to the right, leaving the ai in sorted order. Continuing in this way we get a0 a41a62 a43a4  a3 a1] a2 a1]4a3 a2]4 10a5 a5  a4 a1] a3 a1]5a4 a2 ]5 a2 a1]10a3 a2 ]24a4 a3]10 a0 a51a10 a 2 3 4 20 15 6 a0 a61a15 2 a3 a4 a5 a6  a5 a1] a4 a1]6a5 a2]6 a3 a1]15a4 a2]35a5 a3]15 a2 a1]20a3  a2]84a4 a3]84a5 a4]20 So each; site stx in a light-cone consists of a product of an \Abelian part" Qt i=0 ax+i times powers of commutators; aj ai] where i < j . Since stx is 1 the product of s , which contains a , and st 1x+1, which contains t 1 x j ; 1     1 ai , we get jt 1x i t x 1 1 factors of aj  ai ] when we pass these powers of ai and aj through each other. Then these commutators down to the nal t i

t; j ;x

;

t; i;x;

;

; ;

;

;

;

9

site sT0 in

sT0 =



T

;

x

t



ways, so

;T 

Y

0iT

ai

Y

i

0