Applications of Propositional Logic to Cellular Automata

download Applications of Propositional Logic to Cellular Automata

of 25

Transcript of Applications of Propositional Logic to Cellular Automata

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    1/25

    Some Applications of Propositional Logic to

    Cellular Automata

    S. Cavagnetto

    Abstract

    In this paper we give a new proof of Richardsons theorem [31]: aglobal functionGA of a cellular automatonA is injective if and only ifthe inverse ofGA is a global function of a cellular automaton. More-over, we show a way how to construct the inverse cellular automatonusing the method of feasible interpolation from [20]. We also solvetwo problems regarding complexity of cellular automata formulated byDurand [12].

    1 IntroductionCellular automata are dynamical systems that have been extensively studiedas discrete models for natural systems. They can be described as large collec-tions of simple objects locally interacting with each other. A d-dimensionalcellular automaton consists of an infinite d-dimensional array of identicalcells. Each cell is always in one state from a finite state set. The cells changetheir states synchronously in discrete time steps according to a local rule.The rule gives the new state of each cell as a function of the old states ofsome finitely many nearby cells, its neighbours. The automaton is homoge-neous so that all its cells operate under the same local rule. The states of the

    cells in the array are described by a configuration. A configuration can beconsidered as the state of the whole array. The local rule of the automatoninduces a global function that tells how each configuration is changed in one

    Supported by Grants #A1019401, AVOZ10190503, Institute of Mathematics,Academy of Sciences of Czech Republic.

    1

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    2/25

    time step. 1 In literature cellular automata take various names according to

    the way they are used. They can be employed as computation models [11] ormodels of natural phenomena [35], but also as tessellations structures, itera-tive circuits [6], or iterative arrays [7]. The study of this computation modelwas initiated by von Neumann in the 40s [25], [26]. He introduced cellularautomata as possible universal computing devices capable of mechanicallyreproducing themselves. Since that time cellular automata have also aquiredsome popularity as models for massively parallel computations.

    The main reason why cellular automata have been extensively studiedas discrete models for natural system is that they have several basic prop-erties of the physical world: they are massively parallel, homogeneous and

    all interactions are local. Other physical properties such as reversibility andconservation laws can be programmed by selecting the local rule suitably.The main point is that cellular automata provide very simple models of com-plex natural systems encountered in physics and biology. As natural systemsthey consists of large numbers of very simple basic components that togetherproduce the complex behaviour of the system. Then, in some sense, it isnot surprising that several physical systems (spin systems, crystal growthprocess, lattice gasses, . . . ) have been modelled using these devices, see [35].

    Probably the most popular of these automata is Life (or Game of Life),created by Conway in 1970, [2]. This cellular automaton operates on an infi-nite two-dimensional grid. Each cell is in one of two possible states, alive ordead, and interacts with its neighbours, which are the cells that are directlyhorizontally, vertically and diagonally adjacent. The eight neighbours formthe so called Moore neighborhood [23] (see Figure 1 where two other neigh-borhoods widely used in literature are considered: the von Neumann [27]and the Smith neighborhood [33]). At every time step, each cell can changeits state in a parallel and synchronous way according to the following localrules: (1) A cell that is dead at time t becomes alive at time t + 1 if andonly if three of its neighbours were alive at time t; (2) A cell that was aliveat time t will remain alive if and only if it had just two or three neighboursalive at time t; (3) A cell that is alive at time t and has four or more of its

    eight neighbours alive at t will be dead by time t +1; (4) A cell that has onlyone alive neighbour, or none at all, at time t, will be dead at time t + 1.2

    1For surveys on cellular automata the interested reader can see [16], [17].2As a game it can be seen as a zero-player game, i.e. a game whose evolution is

    determined by its initial state, needing no input from players.

    2

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    3/25

    Figure 1: The Moore neighborhood of the cell c, the von Neumann neigh-borhood of the cell c

    and the Smith neighborhood of the cell c

    .

    In this paper we show how the study of propositional proof complexityand some of its techniques can be exploited in order to investigate cellular

    automata and their properties. The paper is organized as follows. First (Sec-tion 2) we recall a basic result from mathematical logic, Craigs interpolationtheorem, and we introduce the concept of feasible interpolation that playsan important role in many results of proof complexity. Second, in Section3 we present a formal definition of cellular automaton. In the same sectionwe recall some of the most important results regarding cellular automata. InSection 4 we give a new proof of Richardsons theorem [31] using compactnessof propositional logic and Craigs interpolation theorem. In the same sectionwe show how to apply feasible interpolation to find description of inverse cel-lular automata. In Section 5 we solve two open problems formulated in [12].

    The first can be stated as follows: consider finite bounded configurations anda reversible cellular automaton that is given by a simple algorithm. Is theinverse automaton given by a simple algorithm too? The second problemis the following: the injectivity problem of cellular automata on bounded sizeis coN P-complete, [12]; does the result still hold if we consider instead of thesize of the transition table, the smallest program (circuit) which computes

    3

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    4/25

    its transition table?

    2 Propositional Logic preliminaries: interpo-lation and feasible interpolation

    The Craig interpolation theorem is a basic result in mathematical logic [9].The theorem says that whenever an implication A B is valid then thereexists a formula I, called an interpolant, which contains only those symbolsof the language occurring in both A and B and such that the two implica-tions A I and I B are both valid formulas. The theorem holds for

    propositional logic as well as for first order logic.3

    The problem of finding an interpolant for the implication is quite relevantto computational complexity theory. To see this, it is enough to observe thefollowing due to Mundici [24]. Let U and V be two disjointsN P-sets, subsetsof{0, 1}. By the proof of the N P-completeness of satisfiability [8] there aresequences of propositional formulas An(p1, . . . , pn, q1, . . . , qt(n)) and Bn(p1, . . . ,pn, r1, . . . , rs(n)) such that the size of An and Bn is n

    O(1) and such that

    Un := U {0, 1}n = {(1, . . . , n) {0, 1}

    n|1, . . . , tnAn(, ) holds}

    and

    Vn := V {0, 1}n = {(1, . . . , n) {0, 1}

    n|1, . . . , snAn(, ) holds}.

    The assumption that the sets U and V are disjoint sets is equivalent to thestatement that the implications An Bn are all tautologies. By Craigsinterpolation theorem there is a formula In(p) constructed only using atomsp only such that

    An In

    andIn Bn

    are both tautologies. Thus the set

    W :=

    n{ {0, 1}n|In() holds}

    3Throughout this paper by Craigs interpolation theorem we mean the propositionalversion of it.

    4

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    5/25

    defined by the interpolant In separates U from V: U W and W V = .

    Hence an estimate of the complexity of propositional interpolation formulasin terms of the size of an implication yields an estimate to the computa-tional complexity of a set separating U from V. In particular, a lower boundto a complexity of interpolating formulas gives also a lower bound on thecomplexity of sets separating disjoint N P-sets. Of course, we cannot reallyexpect to polynomially bound the size of a formula or a circuit defining asuitable W from the lenght of the implication An Bn. This is because,as remarked by Mundici [24], it would imply that N P coNP P/poly.In fact, for U NP coN P we can take V to be the complement ofU andhence it must hold that W = U.

    Krajcek formulated in [20] the method of feasible interpolation. Theidea is as follows. For a given propositional proof system, try to estimatethe circuit-size of an interpolant of an implication in terms of the size of theshortest proof of the implication. In other words, for a given propositionalproof system establish an upper bound on the computational complexity ofan interpolant of An and Bn in terms of the size of a proof of the validityof An Bn. Then any pair An and Bn which is hard to interpolateyields a formula which must have large proofs of validity. This fact can beexploited in proving lower bounds, and indeed many lower bounds came outfrom its application, see [21], [29]. The idea has been also applied fruitfullyin other areas such as bounded arithmetic in proving independence results[30], on establishing links between proof complexity and cryptography, andin automatizability of proof search. The reader interested in some overviewscan see [19] and [28].

    The literature of mathematical logic contains a very wide variety of propo-sitional proof systems. Among these Resolution R is probably one of the mostinvestigated and perhaps the best known. This calculus is popularly creditedto Robinson [32] but it was already contained in Blakes thesis [5] and is alsoan immediate consequence of Davis and Putnam work [10].

    We briefly recall some basics about R. Resolution is a refutation system

    for formulas in conjunctive normal form. A literal is either a variable por its negation p. The basic object is a clause, that is a finite or emptyset of literals, C = {1, . . . , n}, and is interpreted as the disjunction

    ni=1 i.

    A truth assignment : {p1, p2, . . . } {0, 1} satisfies a clause C if andonly if it satisfies at least one literal li in C. It follows that no assignmentsatisfies the empty clause, which it is usually denoted by {}. A formula

    5

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    6/25

    in conjunctive normal form is written as the collection C = {C1, . . . , Cm} of

    clauses, where each Ci corresponds to a conjunct of . The only inferencerule is the resolution rule, which allows us to derive a new clause C D fromtwo clauses C {p} and D {p}

    C {p} D {p}

    C D

    where p is a propositional variable. C does not contain p (it may contain p)and D does not contain p (it may contain p). The resolution rule is sound:if a truth assignment : {p1, p2, . . . } {0, 1} satisfies both upper clauses ofthe rule then it also satisfies the lower clause.

    A resolution refutation of is a sequence of clauses = D1, . . . ,Dk whereeach Di is either a clause from or is inferred from earlier clauses Du, Dv, u,v < i by the resolution rule and the last clause Dk = {}. Resolution is soundand complete refutation system; this means that a refutation does exist ifand only if the formula is unsatisfiable.

    A resolution refutation = D1, . . . ,Dk can be represented as a directedacyclic graph (dag-like) in which the clauses are the vertices, and if twoclauses C {p} and D {p} are resolved by the resolution rule, then thereexists a direct edge going from each of the two clauses to the resolvent C D.

    We conclude this section by stating a theorem about R. We shall use it

    later on in the paper.

    Theorem 2.1 (Krajcek [21]) Assume that the set of clauses

    {A1,...,Am, B1,...,Bl}

    where

    1. Ai {p1, p1,...,pn, pn, q1, q1,...,qt, qt}, all i m

    2. Bj {p1, p1,...,pn, pn, r1, r1,...,rs, rs}, all j l

    has a resolution refutation with k clauses.Then the implication im

    (

    Ai) il

    (

    Bj)

    has an interpolant whose circuit-size is knO(1).

    6

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    7/25

    Moreover, the interpolant can be computed by a polynomial time algo-

    rithm having an access to the resolution refutation. Notice that the structureof a resolution proof allows one to easily decide which clauses cause unsatis-fiability under a particular assignment and this is the key point in the proofof the previous theorem.

    3 Cellular Automata: definitions and somebasic results

    Formally a cellular automaton is an infinite lattice of finite automata, called

    cells. The cells are located at the integer lattice points of the d-dimensionalEuclidean space. In general one can allow any Abelian group G in place ofZd. In particular, we may consider (Z/m)d, a toroidal space, where Z/m isthe additive group of integers modulo m. In Zd we identify the cells by theircoordinates. This means that the cells are adressed by the elements ofZd.

    Definition 3.1 LetS be a finite set of states and S = . A configuration ofthe cellular automaton is a functionc : Zd S. The set of all configurationsis denoted by C.

    The cells change their states synchronously at discrete time steps. Simply

    the next state of each cell depends on the current states of the neighboringcells according to an update rule. All the cells use the same rule, and therule is applied to all cells in the same time. The neighboring cells may bethe nearest cells surrounding the cell, but more general neighborhoods canbe specified by giving the relative offsets of the neighbors.

    Definition 3.2 Let N = ( x1,..., xn) be a vector of n elements ofZd. Then

    the neighbors of a cell at location x Zd are the n cells at locations x + xi,for i = 1,...,n.

    The local transformation rule (transition function) is a function f : Sn S where n is the size of the neighborhood. State f(a1,...,an) is the new stateof a cell at time t + 1 whose n neighbours were at states a1,...,an at time t.

    Definition 3.3 A local transition function defines a global function G : C C as follows,

    G(c)(x) := f(c(x + x1), . . . , c(x + xn)).

    7

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    8/25

    The cellular automataton evolves from a starting configuration c0 (at time

    0), where the configuration ct+1 at time (t + 1) is determined by ct (at timet) by,

    ct+1 := G(ct).

    Thus, cellular automata are dynamical systems that are updated locallyand are homogeneous and discrete in time and space. Most frequently inliterature cellular automata are specified by a quadruple

    A = (d,S,N,f),

    where d is a positive integer, S is the set of states (finite), N (Zd)n is the

    neighborhood vector, and f : Sn S is the local transformation rule.

    Definition 3.4 A cellular automatonA is said to be injective if and only ifits global function GA is one-to-one. A cellular automatonA is said to besurjective if and only if its global function GA is onto. A cellular automatonA is bijective if its global function GA is one-to-one and onto.

    Let A and B be cellular automata. Let GA and GB the two global func-tions. Suppose that d is the same for A and B and that they have in commonalso S. We may compose A with B as follows: first run A and then run B.Denoting the resulting cellular automaton by B A we have

    GBA = GB GA.

    This composition can be formed effectively. If NA and NB are neighbor-hoods ofA and B, and GA and GB the global functions, then a neighborhoodof GB GA consists of vectors x + y for all x NA and y NB.

    To establish if two given cellular automata A and B, with GA and GB, areequivalent is decidable. In fact, if NA = NB then the local transformationrules, fA and fB, are identical. IfNA = NB then one can take NA NB andto test whether A and B agree on the expanded neighborhood.

    The shift functions translate the configurations one cell down in one ofthe coordinate direction. Formally, for each dimension i = 1,...,d there is acorresponding shift function i whose neighborhood contains only the unitcoordinate vector ei whose rule is the identity function id.

    4 Translations arecompositions of shift functions.

    4The one-dimensional shift function is the left shift = 1

    8

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    9/25

    Often a particular state q S is specified as a quiescent state (simulating

    empty cells). The state must be stable, i.e. f(q,q,...,q) = q. A configurationc is said to be quiescent if all its cells are quiescient, c(x) = q.

    Definition 3.5 A configuration c SZd

    is finite if only a finite number ofcells are non-quiescent, i.e. the set 5,

    {x Zd| c(x) = q}

    is finite.

    Let CF be the subset of C that contains only the finite configurations.

    Finite configurations remain finite in the evolution of the cellular automaton,because of the stability of q, hence the restriction GF of G on the finiteconfigurations is a function GF : CF CF.

    Definition 3.6 A spatially periodic configuration is a configuration that isinvariant under d linearly independent translations.

    This is equivalent to the existence ofd positive integers t1,...,td such thatc = tii (c) for every i = 1,...,d. We denote the set of periodic configurationsby CP. The restriction of G

    P of G on the periodic configurations is hence a

    function GP

    : CP CP.Very often finite and periodic configurations are used in effective sim-ulations of cellular automata on computers. Periodic configuarations arereferred to as the periodic boundary conditions on a finite cellular array. Forinstance, when d = 2, is equivalent to running the cellular automaton on atorus that is obtained by joining together the opposite sides of a rectangle.The relevant group is (Z/t1) (Z/t2). This can be visualized as taping theleft and right edges of the rectangle to form a tube, then taping the top andbottom edges of the tube to form a torus (doughnut shape), see Figure 2.

    Definition 3.7 LetA be a cellular automaton. A configuration c is called

    a Garden of Eden configuration of A, if c is not in the range of the globalfunction GA.

    5Usually this set in literature is called the support.

    9

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    10/25

    Figure 2: A toroidal arrangement.

    A basic property of the class of finite sets is the following: a function froma finite set into itself is injective if and only if the function is surjective. Sur-prisingly, when we deal with cellular automata this is also partially true, even

    if only in one direction: an injective cellular automaton is always surjective,but the converse does not hold. When we consider finite configurations thebehaviour is more analogous to finite sets. The following theorem, a combi-nation of two results proved by Moore [23] and by Myhill [22] respectively,points out exaclty this fact.

    Definition 3.8 A pattern is a function : P S, where P Zd is afinite set. Pattern agrees with a configuration c if and only if c(x) = (x) for allx P.

    Theorem 3.9 (Moore [23], Myhill [22]) LetA be a cellular automaton.

    Then G

    F

    A is injective if and only if G

    F

    A has the property that for any givenpattern there exists a configuration c in the range of GFA

    such that agreeswith c.

    The proof of the theorem is combinatorial and holds for any dimensiond. The following theorem summarizes the situation regarding the injectivityand the surjectivity of cellular automata.

    10

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    11/25

    Theorem 3.10 (Richardson [31]) LetA be a cellular a automaton. Let

    GA be its global function and GFA be GA restricted to the finite configurations.Then the following implications hold:

    1. If GA is one-to-one then GFA

    is onto.

    2. If GFA

    is onto then GFA

    is one-to-one.

    3. GFA

    is one-to-one if and only if GA is onto.

    Definition 3.11 A cellular automatonA with global function GA is invert-ible if there exists a cellular automatonB with global function GB, such thatGB GA = id, where id is the identity function on C.

    It is decidable whether two given cellular automata A and B are inversesof each other. This follows easily from the effectiveness of the compositionand the decidability of the equivalence.

    In 1972 Richardson proved6 the following quite remarkable and importanttheorem about cellular automata:7

    Theorem 3.12 (Hedlund [13], Richardson [31]) LetA be an injectivecellular automaton. ThenA is bijective and the inverse of GA, G

    1A

    , is theglobal function of a cellular automaton.

    In the next section we provide a new proof of Richardsons statement.The same year of Richardsons result Amoroso and Patt proved that:

    Theorem 3.13 (Amoroso and Patt [1]) Letd = 1. Then there exists analgorithm that determines, given a cellular automatonA = (1, S , N , f ), ifAis invertible or not.

    In the same paper they also provided an algorithm to determine if a givencellular automaton is surjective.8 In higher spaces the problem of showing ifa given cellular automaton is surjective or not, has been shown undecidableby Kari [15]. In the same paper Kari proved that the reversibility of cellularautomata is undecidable too,

    6As remarked by the referee this result was already proved in 1969 by Hedlund [13],however it is known in the field as Richardsons theorem or lemma.

    7Recall that on finite configurations the global function may be onto and one-to-oneeven if the cellular automaton is not reversible.

    8Later Sutner designed elegant decision algorithms based on de Bruijn graphs, see [34].

    11

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    12/25

    Theorem 3.14 (Kari [15]) Letd > 1. Then there is no an algorithm that

    determines, givenA = (d > 1, S , N , f ), ifA is invertible or not.

    The proof of Theorem 3.14 is based on the transformation of the tilingproblem, which has been shown undecidable by Berger [4], into the invert-ibility problem on a suitable class of cellular automata.

    4 A proof of the Richardson theorem via propo-sitional logic

    Richardson proved Theorem 3.12 by a topological argument plus the Gar-den of Eden theorem. Richardsons proof was non-constructive (it usedcompactness of a certain topological space) and our new proof is formallynon-constructive too (we use compactness of propositional logic). This non-constructivity is unavoidable by Theorem 3.14. Nevertheless our proof offersa technical simplification: only basic logic is involved requiring straightfor-ward formalism, and it allows us to apply an interpolation theorem. Thecompactness can be eliminated, and the proof made fully constructive, if weconsider periodic configurations; considering d = 2 the working space be-comes a torus. We will discuss this point below, after the proof of Theorem4.1.

    We shall concentrate on dimension d = 2 only and on the binary alpha-bet. This simplifies the notation but displays the idea of the proof in fullgenerality.

    Theorem 4.1 Let A be a cellular automata over Z2 (with 0,1 alphabet)whose global function GA is injective. Then there is a cellular automataB (with 0,1 alphabet) with global function GB such that GB GA = id.

    Proof. For an n-tuple ofZ2-points N = ((u1, v1),...,(un, vn)) defining theneighborhood ofA denote by

    (i, j) + N

    the n-tuple (i + u1, j + v1), . . . , (i + un, j + vn). For each i, j let pi,j be apropositional variable. Denote by p(i,j)+N the n-tuple of variables

    pi+u1,j+v1, . . . , pi+un,j+vn.

    12

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    13/25

    Then the transformation function ofA is a boolean function of n-variables

    pt+1(i,j) = f(pt(i,j)+N)

    where the superscript t and t + 1 denote the discrete time. An array

    (r(i,j))(i,j)Z2

    (we shall skip the indices and write simply r) of 0 and 1 describes the con-figurations obtained by GA from an array

    (p(i,j))(i,j)Z2

    if and only if conditionsr(i,j) = f(p(i,j)+N),

    for all (i, j) are satisfied.Denote the infinite set of all these conditions TA(p, r). We can define

    f by a CN F (or DN F) formula; hence we can think of TA(p, r) as of apropositional theory consisting of clauses.

    A basic observation is that the injectivity of GA is equivalent to the factthat the theory

    T(p, r) T(q, r)

    (where p, q and r are disjoints arrays of variables) logically implies all equiv-alences

    p(i,j) q(i,j)

    for all (i, j) Z2. As the theory remains unchanged if we replace all indices(i, j), by (i, j) + (i0, j0), (any fixed (i0, j0) Z2) this is equivalent to the factthat

    T(p, r) T(q, r)

    implies thatp(0,0) q(0,0).

    This can be restated as follows:

    T(p, r) {p(0,0)} T(q, r) {q(0,0)}

    is unsatisfiable.

    13

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    14/25

    Now we can use the compactness theorem for propositional logic to deduce

    that there are finite theories

    T0(p, r) T(p, r)

    andT0(q, r) T(q, r)

    such thatT0(p, r) {p(0,0)} T0(q, r) {q(0,0)}

    is unsatisfiable. (We may assume w.l.o.g. that these finite parts are identicalup to renaming ps to qs.) By Craigs interpolation theorem there is a

    formula I(r), such that:

    T0(p, r) p(0,0) I(r)

    andI(r) T0(q, r) q(0,0).

    Although we write the whole array r in I(r), the formula obviously containsonly finitely many r variables (at most those appearing in T0(p, r)).

    Using deduction theorem four times we obtain

    T0(p, r) p(0,0) I(r)

    andT0(q, r) I(r) q(0,0).

    Renaming q to p the second fact gives

    T0(p, r) I(r) p(0,0)

    i.e. togetherT0(p, r) I(r) p(0,0).

    In other words, the interpolant I(r) computes the symbol of cell (0,0) inthe configuration prior to r, i.e. it defines the inverse to A.

    Let M Z2 be the finite set of (s, t) Z2 such that r(s,t) appears in I(r).Define the cellular automaton B as follows:

    1. Alphabet is 0,1;

    14

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    15/25

    2. The neighborhood is M;

    3. The transition function is given by I(r), i.e.

    pt+1(i,j) = I(pt(i,j)+M).

    This concludes the proof.

    Below we add some remarks about the previous proof.

    1. The construction of the cellular automaton B has two key steps: (a) theuse of the compactness theorem for propositional logic and (b) the ap-plication of Craigs interpolation. Compactness leads to a non-recusriveprocedure while interpolation can be quite effective (see below).

    2. The construction guarantees that

    GB(GA(p)) = p

    but it does not - a priori - imply that also

    GA(GB(r)) = r.

    That follows from the Garden of Eden theorem.

    3. If the interpolant I(r) contains M variables (i.e. the neighborood ofBhas size |M|) then the size ofB (as defined in [12], see Definition 5.1below) is O(2|M|). This also bounds the size |I| of any formulas definingthe interpolant, but I could be in principle defined by a substantiallysmaller formula (e.g. of size O(|M|)).

    The same argument works for the version of the previous theorem with(Z/m)2 in place ofZ2. In this case, already the starting theory T(p, r) isfinite: of size O(m2 2n) where m2 is the size of (Z/m)2 and O(2n) bound thesizes of CN Fs/DN Fs formulas for the transition function ofA. Hence wedo not need to use the compactness theorem and we can apply the interpo-lation immediately. The interpolant may, in principle, be defined on all m2

    15

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    16/25

    r-variables. Of course, an injective cellular automaton on a finite space (here

    (Z/m)2

    ) is necessarily bijective and hence the global function has an inverse.This inverse, as a finite function, is expressible by a boolean formula. How-ever, what, we wish to stress by the remark above is that the same argumentapplies to both, infinite and finite, cases and so does the construction below.

    Given the finite subtheory T0(p, r) a method to find constructively theinterpolant I(r) is described below; hence we also give the description of theinverse cellular automaton B. The construction is as follows:

    1. Apply one of the usual automated theorem provers to verify that

    T0(p, r) {p(0,0)} T0(q, r) {q(0,0)} ()is unsatisfiable;

    2. Extract from the run of the algorithm a resolution refutation ofclauses (). This can be done in p-time [3];

    3. Apply Theorem 2.1 to get a p-time algorithm W(r, ) that computesthe interpolant I(r).

    Hence the circuit size of I(r) is polynomial in the run-time of the algorithmfrom 1. Of course, we expect that in the worst case this is exponential in the

    size of (), but it may, in principle, be better than the exhaustive search.

    5 Some complexity results

    Durand [12] proved the first complexity results concernig a global propertyof cellular automata of dimension 2 (see Theorem 5.2). By Karis result[14] the reversibility of a cellular automaton with d 2 is not decidable.This implies that the inverse of a given cellular automaton cannot be foundby an algorithm: its size can be greater than any computable function ofthe size of the reversible cellular automaton. Durands result shows that

    even if we restrain the field of action of cellular automata (with d = 2) tofinite configuration bounded in size, it is still very difficult to prove that thecellular automaton is invertible or not: the set of cellular automata invertibleon finite configurations is coN P-complete (see below). In [12] it is assumedthat the size of a cellular automaton corresponds to the size of the table ofits local function and of the size of its neighborhood. More precisely:

    16

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    17/25

    Definition 5.1 If s is the number of states of a cellular automatonA and

    N = (x1,...,xn) then the size of a string necessary to code the table of thelocal function plus the vector N ofA is sn log s + o(sn log s).

    Durand [12] proved that the decision problem concerning invertibility ofcellular automata of dimension 2 belongs to the class ofcoN P-hard problemsor to the class of coN P-complete problems if some bound is introduced onthe size of the finite configurations considered. For the coN P-completenesswe assume that the size of the neighborhood is lower than the size of thetransition table of the cellular automaton, i.e. x N, |x| sn. Now,consider the following problem:

    PROBLEM (CA-FINITE-INJECTIVE):Instance: A 2-dimensional cellular automaton A with von Neumann neigh-borhood. Two integers p and q lower than the size ofA.Question: Is A injective when restricted to all finite configurations p q?

    The theorem below is the main result in [12],

    Theorem 5.2 (Durand [12]) CA-FINITE-INJECTIVE is coN P-complete.

    If one let drop the restriction on the bound of the size of the neighborhoodthen a proof of the coN P-hardness of CA-INFINITE-INJECTIVE can beobtained; for more details on this the reader can see [12].

    What it is assumed in the previous result is basically that the size of therepresentation of a cellular automaton corresponds to the size of its transitiontable. Durand [12] asked if the coN P-completeness result can be true alsoif we define the size of a cellular automaton as the lenght of the smallestprogram (circuit) which computes its transition table. A second questionformulated in [12] is the following: suppose that we have an invertible cellularautomaton given by a simple algorithm and that we restrict ourself to finitebounded configurations. Then is the inverse given by a simple algorithm too?

    In this section we give answers to both questions. We start with the latterproblem first.

    For succinctness we do it on Z1; it is fairly simple to get similar examplesfor Z2 or (Z/m)2. Notice that our construction produces an automaton whichis injective in the set of all configurations but we formulate the theorem only

    17

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    18/25

    for finite configurations in order to relate to the original formulation of the

    problem in [12].Assume we have a boolean function f : {0, 1}n {0, 1}n having the

    following properties:

    1. f is a permutation;

    2. f is computed by a polynomial size circuit.

    3. The inverse function f1 requires an exponential size circuit, exp((n)).

    For example, if f were a one-way permutation (e.g. conjecturally based onfactoring or discrete logarithm) then it has the properties. Now define acellular automaton Af as follows:

    1. Alphabet: 0, 1, #.

    2. Neighborhood of i Z:

    N = i n, i n + 1, . . . , i , i + 1, . . . , i + n

    i.e. |N| = 2n + 1.

    3. Transition function:

    (i) pti = # pt+1i = #

    (ii) If pti {0, 1} and there are j, k such that:

    (a) j < i < k and k j = n + 1;

    (b) ptj = ptk = #

    (c) ptr {0, 1} for r = j + 1, j + 2,. . . ,i, . . . , k 1

    definept+1i = (f(p

    tj+1, . . . , p

    tk1))i

    where (f(ptj+1, . . . , ptk1))i is the i-th bit of f(p

    tj+1, . . . , p

    tk1).

    (iii) If pti {0, 1} and there are no j, k satisfying (ii) then put

    pt+1i = pti.

    18

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    19/25

    The informal description of the automaton Af can be summarized as

    follows: every 01 segment between two consecutives #s that does not havethe lenght exactly n is left unchanged. Segments of length n are trasformedaccording to the permutation f.

    The inverse automaton B is defined analogously using f1 in place of f(B = Af1).

    Theorem 5.3 Assume that f : 2n 2n is a permutation computable bya size poly(n) circuit such that any circuit computing the inverse functionf1 must have size at least exp(n(1)). Then the cellular automatonAf isinvertible but has an exponentially smaller circuit-size than its inverse cellular

    automaton.

    Proof. By the construction the inverse cellular automaton is B = Ag whereg = f1. That is, the transition table ofB essentially defines the booleanfunction f1. Hence by hypothesis its circuit-size is exponential in n, whileAf has circuit-size poly(n).

    Remark: The hypothesis of Theorem 5.3 follows from the existence of

    cryptographic one-way functions. In particular, it follows from the exponen-tial hardness of factoring or of discrete logarithm.Theorem 5.3 solves negatively one of the open problem formulated by

    Durand [12] that we have described above: a very simple algorithm givinga reversible cellular automaton (even if restricted to finite configurations)can have an inverse which is given by an algorithm which is exponentiallybigger and then not simple.9

    Now we answer the other open problem formulated in [12]. The problemasks about coN P-completeness of the injectivity of cellular automata whenit is represented by a program (circuit) rather than by a transition table. As

    pointed out by the referee the coN P-hardness follows from Durands originalresult for dimension > 1 because the representation of the transition tableis at most the size of the table of the function. Our construction does, how-ever, work also for d = 1 for which the coN P-hardness does not follow from

    9Where simple algorithm means a polynomial time algorithm.

    19

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    20/25

    Durand [12]. We shall concentrate on that case only. Consider the following

    problem:

    PROBLEM (P1):Input: A circuit C(x1,...,xn) defining the transition table function of 0 1cellular automaton AC with a neighborhood N of size |N| = n.Question: Is AC injective on Z

    1?

    Theorem 5.4 Problem (P1) is coN P-hard.

    Proof. We shall describe a polynomial reduction from TAUT to (P1). Let(x1,...,xn) be a propositional formula. Let the alphabet be 0,1 and theneighborhood N be 0,...,n. Now define the cellular automatonA as follows:

    pt+1i :=

    pti, if (p

    ti+1,...,p

    ti+n)

    0, otherwise.

    Clearly the circuit defining A is

    pti (pti+1,...,p

    ti+n)

    and has size O(||). This means that the map A is polynomial time.

    If TAUT then always pt+1i = p

    ti. In this case A is a cellular automa-

    ton doing nothing, i.e. its global map is the identity and, in particular, it isinvertible. Assume / TAUT. We need to construct two different config-urations mapped by A to the same configuration. Let i0 1 be minimal i0such that there is a truth assignment a = (a1,...,an) {0, 1}n satisfying:

    (i) (a);(ii) ai0 = . . . = an = 0;(iii) either i0 = 1 or ai01 = 1.

    Informally, a has the longest segment of 0s on the right hand side that ispossible for assignments falsifying . Define two configurations (see Fig. 3):

    C0 : ..., 0, 0, 0, a1,...,an, 0, 0,...

    andC1 : ..., 0, 0, 1, a1,...,an, 0, 0,....

    The two configurations differ only in the position 0. Easily the theoremfollows from the following lemma.

    20

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    21/25

    Figure 3: The configurations C0 and C1.

    Lemma 5.5 The two configurations C0 and C1 are both mapped byA to C0.

    Proof. By the definition ofA, all 0s in C0, C1 stay 0. Also a remains the

    same: either it is 0 or also the n-string to the right side from a square i = 1,..., n, i.e. qi+1, ..., qi+n contains more zeros on the right side than a does:this would contradict the definition of a.

    Finally, the 1 in the 0-square of C1 changes to 0, as (a). This provesthe lemma.

    Hence Theorem 5.4 follows.

    Note that, as pointed out by the referee, the result shows that separatingone-dimensional injective cellular automata from non-surjective cellular au-tomata is coN P-hard (under the circuit model). Even separating the identityfunction from non-surjective cellular automaton is coN P-hard. This followsfrom the fact that the construction yields the identity cellular automata if

    21

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    22/25

    the given formula is a tautology, and a non-surjective cellular automata if it

    is not a tautology.

    Now, consider a finite modification of the problem (P1):

    PROBLEM (P2):Input:

    1. AC as in (P1);

    2. 1(m), such that m > n. (Notice that this condition implies that AC is

    well-defined on (Z/m) tori.)

    Question: Is AC injective on (Z/m)?

    Theorem 5.6 (P2) is coN P-complete.

    Proof. That (P2) is in coN P is obvious. The coN P-hardness of (P2) isshown exactly as of (P1).

    Acknowledgements: I thank Jan Krajcek for discussions and suggestions.I thank the anonymous referee for several important suggestions and com-ments that helped to improve the paper, in particular the observations con-cerning Theorem 5.4.

    References

    [1] S. Amoroso and Y.N. Patt, Decision procedures for surjectivity andinjectivity of parallel maps for tasselation structures, Jour. Comput.System Scie., 6, (1972), 448-464.

    [2] E. Berlekamp, J. Conway, R. Elwyn and R. Guy, Winning way for yourmathematical plays, vol. 2, Academic Press, (1982).

    22

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    23/25

    [3] P. Beame, H. Kautz and A. Sabharwal, Towards Understanding and

    Harnessing the Potential of Clause Learning, Journal of Artificial Intel-ligence Reasearch (JAIR), 22, (2004), pp. 319-351.

    [4] R. Berger, The undecidability of the domino problem, Mem. Amer.Math. Soc., 66, (1966), pp. 1-72.

    [5] A. Blake, Canonical expression in boolean Algebra, Ph.D Thesis, (1937),University of Chicago.

    [6] E. Burks, Theory of Self-reproduction, University of Illinois Press,Chicago, (1966).

    [7] S. Cole, Real-time computation by n-dimensional iterative arrays offinite-state machine, IEEE Trans. Comput, C(18), (1969), pp. 349-365.

    [8] S.A Cook, The complexity of theorem-proving procedures, in Proc. 3rdAnn. ACM Symp. on Theory of Computing, (1971), pp. 151-158.

    [9] W. Craig, Three uses of the Herbrand-Gentzen theorem in relatingmodel theory and proof theory, Journal of Symbolic Logic, 22(3),(1957), pp. 269-285.

    [10] M. Davis and H. Putnam, A computing procedure for quantification

    theory, Journal of the ACM, 7(3), pp. 210-215.

    [11] M. Delorme and J. Mazoyer, editors, Cellular Automata: a parallelmodel, Mathematics and its Application, Springer, (1998).

    [12] B. Durand, Inversion of 2D cellular automata: some complexity results,Theoretical Computer Science, 134, (1994), pp.387-401.

    [13] G. A. Hedlung, Endomorphisms and automorphisms of shift dynamicalsystems, Mathematical Systems Theory, 3, (1969), pp. 320-375.

    [14] J. Kari, Reversibility of 2D cellular automata undecidable, Physica,D(45), (1990), 379-385.

    [15] J. Kari, Reversibility and surjectivity problems of cellular automata,Jour. Comput. System Scie., 48, (1994), pp. 149-182.

    23

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    24/25

    [16] J. Kari, Reversible Cellular Automata, Proceedings of DLT 2005, Devel-

    opments in Language Theory, Lecture Notes in Computer Science,3572,pp. 57-68, Springer-Verlag, (2005).

    [17] J. Kari, Theory of cellular automata: A survey, Theoretical ComputerScience, 334, (2005), pp. 3-33.

    [18] J. Krajcek, Bounded arithmetic, propositional logic, and complexity the-ory, Encyclopedia of Mathematics and Its Applications, 60, CambridgeUniversity Press, (1995).

    [19] J. Krajcek, Propositional proof complexity I., Lecture notes, available

    at http://www.math.cas.cz/krajicek/biblio.html.[20] J. Krajcek, Lower bounds to the size of constant-depth propositional

    proofs, Journal of Symbolic Logic, 59(1), (1994), pp.73-86.

    [21] J. Krajcek, Interpolation theorems, lower bounds for proof systems, andindipendence results for bounded arithmetic, Journal of Symbolic Logic,62(2), (1997), pp. 457-486.

    [22] J. Myhill, The converse to Moores garden-of-Eden theorem, Proc.Amer. Math. Soc., 14, (1963), pp.685-686.

    [23] E.F. Moore, Machine models of self-reproduction, Proc. Symp. Appl.Math. Soc., 14, (1962), pp. 13-33.

    [24] D. Mundici, NP and Craigs interpolation theorem, Proc. Logic Collo-quium 1982,North-Holland, (1984), pp. 345-358.

    [25] J. von Neumann, The General and Logical Theory of Automata, inCollected Works, vol. 5, Pergamon Press, New York, (1963), 288-328.

    [26] J. von Neumann, Theory of Self-reproducting automata, ed. W. Burks,University of Illinois Press, Chicago, (1966).

    [27] J. von Neumann, Theory of automata: construction, reproduction andhomogeneity, unfinished manuscript edited for pubblication by W.Burks, see [6] pp. 89-250.

    [28] P. Pudlak, The Lenghts of Proofs, in Handbook of Proof Theory, ed. S.Buss, Elsevier, (1998), ch. 8, pp. 547-637.

    24

  • 8/14/2019 Applications of Propositional Logic to Cellular Automata

    25/25

    [29] P. Pudlak, Lower bounds for resolution and cutting plane proofs and

    monotone computations, Journal of Symbolic Logic, (1997), pp. 981-998.

    [30] A. A. Razborov, Unprovability of lower bounds on the circuits size in cer-tain fragments of bounded arithmetic, Izvestiya of the R. A. N., 59(1),(1995), pp. 201-224.

    [31] D. Richardson, Tesselations with local transformations, Jour. Comput.System Scie., 6,(1972), pp. 373-388.

    [32] J. A. Robinson, A machine-oriented logic based on the resolution prin-

    ciple, Journal of the ACM, 12(1), pp. 23-41.

    [33] A. Smith III, A Simple computatio-universal spaces, Journal of ACM,(1971), 18, pp. 339-353.

    [34] K. Sutner, De Bruijn graphs and linear cellular automata, Complex Sys-tems, 5, (1991), 19-31.

    [35] T. Toffoli and N. Margolus, Cellular Automata Machines, MIT Press,Cambridge MA, (1987).

    INSTITUTE OF MATHEMATICSAcademy of Sciences of Czech RepublicZitna 25, 11567 Prague 1CZECH REPUBLICE-mail: [email protected]

    25