Synchronous Boolean Finite Dynamical Systems on Directed Graphs over XOR Functions

In this paper, we investigate the complexity of a number of computational problems defined on a synchronous boolean finite dynamical system, where update functions are chosen from a template set of exclusive-or and its negation. We first show that the reachability and path-intersection problems are solvable in logarithmic space-uniform AC1 if the objects execute permutations, while the reachability problem is known to be in P and the path-intersection problem to be in UP in general. We also explore the case where the reachability or intersection are tested on a subset of objects, and show that this hardens complexity of the problems: both problems become NP-complete, and even π2p\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}${\Pi }^{p}_{2}$\end{document}-complete if we further require universality of the intersection. We next consider the exact cycle length problem, that is, determining whether there exists an initial configuration that yields a cycle in the configuration space having exactly a given length, and show that this problem is NP-complete. Lastly, we consider the t-predecessor and t-Garden of Eden problem, and prove that these are solvable in polynomial time even if the value of t is also given in binary as part of instance, and the two problems are in logarithmic space-uniform NC2 if the value of t is given in unary as part of instance.


Mathematics Subject Classification (2010) 68Q15 · 68Q25
1 Introduction A discrete dynamical system is a network consisting of objects with states and state update functions assigned to the objects. The state update function of an object receives the states from the objects of the network, including itself, and determines the next state of the object. In a discrete dynamical system, the updates occur in discrete time steps. After receiving initial state values for the objects (called an initial state configuration), the system commences its computation by applying the state update functions to the nodes according to their update schedule, thereby generates an indefinitely long series of state configurations.
A directed graph naturally represents the direct dependencies among objects for state updates, where the edge from an object, u, to another, v, represents that the update function of v is dependent on the state of u. In the case where the dependencies are mutual, all edges are bidirectional, and so an undirected graph offers a simpler representation of the dependencies. These graphs may contain self-loops, since the state update functions may depend on their own values. A variety of discrete dynamical systems exist depending on whether the update schedules are synchronous, whether or not the underlying graph is undirected, the state set (e.g., binary, finite, and infinite), and the types of update functions (e.g., boolean, symmetric, monotone). A synchronous boolean finite dynamical system (synchronous BFDS for short) [6] is one in which each object has just one boolean value as its state, the dependency graph is directed, and the updates are synchronous (see Fig. 1). Because the number of objects is finite, there are finitely many possible configurations in a BFDS (2 n for an n-object system). With synchronicity, a BFDS, in a finite number of steps (within 2 n steps in the case of an n-object system), either converges to a fixed point or enters a nontrivial simple cycle (see Fig. 2). Fig. 1 (a) A synchronous BFDS with six objects, where inputs of an update function of an object are the ones whose outgoing edges connected to the object; and (b) Suppose that every object has the exclusive-or XOR as its update function. Then, a single update for the BFDS with the given configuration depicted in the left panel yields the one in the right panel Fig. 2 Example of a configuration space of a synchronous BFDS, where dots represent configurations, and arrows do transitions through updates. The configuration C is a fixed point. Two series of configurations from C and C do not have a common element, but ones for C and C do. A cycle obtained by starting from an initial configuration C has length five. The configuration C has two predecessors, and one of them is a Garden of Eden An article by Barrett et al. [6] is the first to consider the synchronous BFDS model (they also introduced some other models, which are not the subjects of this paper). A wide stream of research has followed the paper studying the model from the computational complexity perspective. There, the questions have been to pinpoint the computational complexity of predicting the behavior of a model with or without a specific initial configuration. For example, Kosub [10] shows that there is a dichotomy between P and NP-complete regarding the question of whether the system possess a fixed point for any initial configuration. Kosub and Homan extend this to a dichotomy between the function classes FP and #P-complete functions if the concern is for counting the number of initial configurations with a fixed point [11]. Rosenkrantz et al. provide a general framework for analyzing BFDS through subgraph embedding and show that various problems about BFDS are NP-complete, but if the representation graph is undirected with bounded tree-width and the update functions are r-symmetric, the computational complexity drops to P [13].
The stream of research also finds that some problems about a synchronous BFDS offer a rich theory of computational complexity by considering the types of functions permissible for the templates. Specifically, researchers have studied the conjunction AND, disjunction OR, exclusive-or XOR, and the negation of exclusive-or NXOR, and their combinations as the possible types, and asked the following three problems: -The reachability problem. The problem asks whether, given a synchronous BFDS and two specific configurations, the system generates the second of the two from the first. -The path-intersection problem. A variant of the reachability problem, it asks whether the paths of configurations starting from two initial configurations have a common element. -The cycle length problem. The problem asks if the cycle that the system enters with a specific initial configuration has length greater than or equal to a specific value.
Various complexity results exist about the problems. The reachability problem is PSPACE-complete in general, but it is so even if the underlying graph is an undirected bounded-degree graph and the update functions are symmetric [2], the underlying graph is undirected and update functions are threshold functions [1], or the underlying graph is directed and the template set is {AND, OR} [12]. These PSPACEcomplete results contrast well with that the problem is in P if the template set is one of {AND}, {OR} and {XOR, NXOR} [12]. As for the path-intersection and cycle length problems, they are PSPACE-complete too, if the underlying graph is directed and the template set is {AND, OR}. However, the path-intersection problem becomes solvable in UP and the cycle length problem becomes solvable in UP ∩ coUP [12] and in BQP [8], if the template set is one of {AND}, {OR} and {XOR, NXOR}. Testing reversibility has been a popular topic of computational complexity theoretic studies of synchronous BFDS [3][4][5]13]. A predecessor of a given configuration is the one which the system produces from the given configuration. A Garden of Eden of BSDS is a configuration without predecessors. Typical problems in the reversibility of synchronous BSDS are the following two: -The t-predecessor problem, t ≥ 1. The problem asks if a configuration in a synchronous BSDS has a t-th predecessor, i.e., a configuration from which t successive applications of the updates produces the given configuration. -The t-Garden of Eden problem, t ≥ 0. The problem asks if a configuration in a synchronous BSDS has a t-th predecessor that is a Garden of Eden.
Barrett et al. [4] shows that the 1-predecessor problem is in P if the underlying graph is an undirected graph with bounded tree-width and update functions are rsymmetric, but the problem is NP-complete if the underlying graph is an undirected star graph and the update functions are non-symmetric. With the use of incomplete (or degenerate) basis functions as the function types, the computational complexity of the 1-predecessor problem shows a wide variety: the problem is NP-complete if each update function is one of the 3-input OR and the 2-input AND, NL-complete if each update function is one of the 2-input OR and the 2-input AND, is in AC 0 if each update function is either OR only or AND only [9]. As for the case where t = 2, the t-Garden of Eden problem is Σ p 2 -complete if each function is either the 3-input OR or the 2-input AND, while the problem is NP-complete if the functions are either OR only or AND only, and is in AC 0 if the functions are either exclusively 2-input OR or exclusively 2-input AND [9].
In this paper, we investigate the computational complexity of the aforementioned problems where the update functions are all XOR, are all NXOR, or each function is chosen from {XOR, NXOR}. We can view a synchronous BFDS over XOR and NXOR as a linear transformation over Z 2 , and this connection makes the computational complexity problem interesting. We first consider the reachability and path intersection problems. We show that, while the reachability problem is in P and the path-intersection problem is in UP in general, both problems are solvable in logarithmic space-uniform AC 1 if the objects execute permutations (that is, every node in the underlying graph has in-degree 1 and out-degree 1). We then consider a variant of the problems where the update functions are still permutations but the reachability and path-intersection are on some subset of the objects. We show that, with this modification, the problems become NP-complete, and even p 2 -complete if we ask whether the reachability or the path-intersection holds for an arbitrary initialization of some subset of the objets. We next consider a variant of the cycle length problem, which we call the exact cycle length problem, where the question is whether or not there is an initial configuration that produces a simple cycle with a specific length, and we show that this variant is NP-complete. Lastly, we consider the tpredecessor and t-Garden of Eden problems. We prove that the problems are solvable in polynomial time even if the value of t is presented in binary, and the two problems are in logarithmic space-uniform NC 2 if the value either is constant or given in unary.

Preliminaries
In this section, we formally define terms and the problems on a synchronous BFDS.

Synchronous Boolean Finite Dynamical Systems
For an integer n ≥ 1, a synchronous boolean finite dynamical system (synchronous BFDS, for short) F of n objects, v 1 , . . . , v n , which respectively hold boolean variables, x 1 , . . . , x n , and synchronously update their variables by evaluating boolean functions f 1 , . . . , f n , respectively, where the inputs to the functions are the values of x 1 , . . . , x n immediately before the update. The values stored in the objects of a synchronous n-object BFDS constitutes a state configuration (or simply a configuration). A configuration can be represented as an n-dimensional boolean (or 0/1) vector. A synchronous BFDS thus can be naturally viewed as a function that maps the set of n-dimensional boolean vectors to itself. A synchronous BFDS commences its computation with a set of values stored in the objects. This initial set of values is called an initial state configuration (or an initial configuration).
Given a configuration C and a variable x (which is stored in some unique object of the system), C[x] is used to represent the value of x in the configuration C. The action of F on a state configuration C is given by F(C) = (f 1 (C), f 2 (C), . . . , f n (C)). In other words, for all i, Given an initial state configuration C ini , the synchronous BFDS generates a sequence of state configurations by iterative applications of F: For all t ≥ 0, the t-th element in the configuration sequence starting from C ini (we count from 0 with 0 representing the "initial") is The update functions of a BFDS can depend only on part of the configurations, and thus, can be expressed as a function of a smaller input dimension. In some literature, each update function, f i , is expected to always depend on x i , but in the present paper, this restriction is removed: f i is allowed not to depend on x i . The dependency among the objects of a BFDS can be represented as a directed graph whose nodes are the objects of the system, and each directed edge (u, v) represents that the function at v is dependent on the value at u.
Let B be a family of boolean functions. We say that a BFDS has template set B if the function of each object comes from the family B. In this paper, we mainly  (a) in time polynomial in n + log t.

The Reachability and Path-Intersection Problems of Synchronous Boolean Finite Dynamical Systems
We are concerned with two general properties of synchronous BFDS: the reachability problem between two configurations in BFDS and the path-intersection problem generated from two distinct initial configurations. Definition 1 Let B be a template set. The reachability problem for B asks, given a synchronous BFDS F with template set B, a configuration C ini , and a configuration C fin , whether there exists t ≥ 0 such that F t (C ini ) = C fin . Definition 2 Let B be a template set. The path-intersection problem for B asks, given a synchronous BFDS F with template set B, and configurations C 1 and C 2 , whether there exist s ≥ 0 and t ≥ 0 such that F s ( We consider a variant of the above problems, where the equality between two configurations is tested using a subset of objects. Let F be a synchronous BFDS, and R a subset of objects in F. We say that D is a sub-configuration of C on R if D is obtained from C retaining only those objects in R, and we say that C is a completion of D. We use the notation C| R to mean that this is a vector constructed by selecting only those variables corresponding to R. Definition 3 Let B be a template set. The projection reachability problem for B asks, given a synchronous BFDS F with template set B, a subset R of the objects of F, a configuration C ini , and a configuration C fin , whether there exists t ≥ 0 such that Definition 4 Let B be a template set. The projection path-intersection problem for B asks, given a synchronous BFDS F with template set B, a subset R of the objects of F, and configurations C 1 and C 2 , whether there exist s ≥ 0 and t ≥ 0 such that In addition to the above, we consider the universal projection reachability problem and the universal projection path-intersection problem by considering the question of whether the reachability or the path-intersection property holds for all possible initial value assignments to a specified set of objects.

Definition 5
The universal projection reachability problem is the problem of deciding, given a BFDS F, an initial sub-configuration C of F, a final configuration D, and a projection P , whether for all completions C of C, there exists some t such that F t (C )| P = D| P .

Definition 6
The universal projection path-intersection problem is the problem of deciding, given a BFDS F, two initial sub-configurations C 1 and C 2 of F, projection P , whether for all completions C 1 and C 2 of C 1 and C 2 , there exist s and t such that

The Exact Cycle Length Problem
Given a synchronous BFDS F and a configuration C of F, we say that there exists a cycle of length l starting from C if F k (C) = C for each 1 ≤ k < l and F l (C) = C. We denote by L F (C) the length l of the cycle. We consider a variant of the cycle length problem as follows; Definition 7 Let B be a template set. The exact cycle length problem for B asks, given a synchronous BFDS F with template set B, a sub-configuration D ini , and an integer l, whether there exists a completion E ini of D ini such that L F (E ini ) = l.

The Predecessor Problems
Given a synchronous BFDS F and a final configuration C fin of F, we say that a configuration C is a t-th predecessor of C fin , t ≥ 1, if F t (C) = C fin . Note that if F(C fin ) = C fin , we have F t (C fin ) = C fin for any t ≥ 1. We will omit the word first in the case where t = 1. By convention, we define the 0-th predecessor of C fin to be C fin itself. We say that a configuration C is a Garden of Eden if C has no predecessor. We consider the predecessor and Garden-of-Eden problem defined in the paper [9] as follows: Definition 8 Let B be a template set. The t-PRED Problem for B asks, given a synchronous BFDS F with template set B, a configuration C fin , and an integer t, whether C fin has a t-th predecessor.

Definition 9
Let B be a template set. The t-GOE Problem for B asks, given a synchronous BFDS F with template set B, a configuration C fin , and an integer t, whether C fin has a t-th Garden of Eden, i.e., a t-th predecessor that is a Garden of Eden.
In the paper [9], the computational complexity of t-PRED and t-GOE are extensively studied over various degenerative (i.e., insufficient to express all boolean functions) bases, where t is a fixed constant or appears in unary as part of input. Note that in the above definitions, t is given in binary and so the problems are more flexible than the ones defined by Kawachi et al. [9].

Reachability and Path-Intersection Problems
In this section, we study the complexity of reachability and path-intersection problems of synchronous BFDS. We start with a special case of synchronous BFDS in which the objects execute permutations. In such systems, the nodes in the directed graphs representing the system updates have in-degree 1 and out-degree 1.

Theorem 1 The reachability problem of permutational BFDS can be solved in polynomial time.
Proof Let F be a permutational BFDS with n objects. Let C ini be an initial configuration, and C fin a final configuration. The reachability problem asks whether there exists some integer t ≥ 0 such that F t (C ini ) = C fin . Let M F be the matrix that represents this permutation. The permutation that F executes is decomposed as the disjoint union of independent cycles. Let r, 1 ≤ r ≤ n, be the number of the disjoint Below, we will show a method for testing (*).
The question (*) is equivalent to whether there exists some value for t, 0 ≤ t ≤ G − 1, such that for all k, 1 ≤ k ≤ r, t mod o k is a member of Q k . In other words, whether there is a solution to the system of modular equations: The reason that we use the existential quantifier in (1) is that the cardinality of Q k is not necessarily 0 or 1. Obviously, if Q k has cardinality 0, then (1) has no solution, and so C fin is unreachable from C ini . If Q k has cardinality greater than 1, we can reduce Q k to a smaller set so there is only one element in it as follows: Suppose Q k has more than one element. Let a and b, a < b, be two members of For each k, 1 ≤ k ≤ r, such that Q k has more than one element, let d k be the value of d and a k thus defined; for each k, 1 ≤ k ≤ r, such that Q k has only one element, let d k = o k and a k be the unique element in Q k . Now (1) is equivalent to whether there is a solution to the system of modular equations: Whether this system has a solution or not can be checked by testing whether for each pair (k, k ), the equation for k is consistent with the equation for k . The consistency between k and k holds if and only if for the greatest common divisor s of d k and d k , whether a k ≡ a k (mod s).
Based upon the observation, we develop the following algorithm for testing the reachability. For each k such that Q k has more than one element, compute a k as the smallest number in Q k and d k as the difference between the first and the second smallest If the test passes for all (k, k ), accept; otherwise, reject.
It is easy to see that all these steps can be carried out in time polynomial in n. This proves the theorem.
It is possible to carry out the algorithm stated in the proof in logarithmic space and with logarithmic-space uniform AC 1 . To simplify the computation, instead of counting the number of distinct orbits, r, we will let each index j, 1 ≤ j ≤ n, represent the orbit starting from j . In this manner, an orbit having multiple elements will be represented as many times as there are elements in the orbit. However, for two elements appearing in the same orbit, the sets Q are same, and so the overall solvability of the system of congruences is unchanged.
So, assume that with the possible redundancy, the number of the orbits, r, is equal to n, and for all k, 1 ≤ k ≤ n, O k is the orbit starting from k. Let Q denote the permutation represented by F. For an arbitrary index j, 1 ≤ j ≤ n, consider an index sequence j, Q 1 (j ), Q 2 (j ), . . .. Starting from j , the elements of this sequence can be generated one after another. In the case of logarithmic-space computation, the generation can be carried out by scanning the matrix F. The smallest index m at which Q m (j ) = j is the length of the orbit, o j , and the values that appear as the elements are the members of the orbit. Thus, for each j , the number of elements in the orbit containing j , for each j and for each h, whether h is a member of the orbit containing j , and for each j , for each h, and for each s, whether h is the sth element of the orbit starting from j can be answered in logarithmic space. Since the iterative permutation and the elements of the orbit can be generated iteratively, in logarithmic space it is possible to answer whether a ∈ Q k for each a and for each k. Thus, it is possible to compute, in logarithmic space, a k and d k . For each pair, (k, k ), of indexes, we then compute a k and d k as well as a k and d k in binary, and then compute the greatest common divisor, s, of d k and d k , and check whether a k ≡ a k (mod s). Since the binary numbers have O(log n) bits, the test can be carried out in logarithmic space. Hence, the reachability problem is solvable in logarithmic space.
To show that the circuit complexity of the reachability problem is logarithmic space-uniform AC 1 , first note that the matrix multiplication of the permutation matrix can be computed in AC 0 , and so their powers up to the n-th power can be computed in AC 1 via repeated squaring. Once these permutation matrices have been computed, Step 1 of the algorithm (obtaining the orbits) can be executed by multiplying these matrices by 0/1-vectors with only one 1 appearing in them. The circuit may use an n-bit sequence to represent the membership for each orbit (therefore, n 2 bits). Since these multiplications can be carried out in parallel, this step requires AC 0 . For Step 2, by multiplying the matrices by C ini and comparing the results with C fin on the orbits, Q k can be obtained in parallel. Again, the representation can be an n-bit sequence for each orbit (a total of n 2 bits) and the computation requires AC 0 . After this, if for some k, Q k is empty, then the circuit produces the output of 0; otherwise, a k and d k can be computed by first checking whether Q k has only one element and then if more than one element exists, as the first element and the difference between the second and the first. Again, this can be carried out in AC 0 . Compatibility testing is the final step of the algorithm. We imagine that the circuit is equipped with a module for all possible compatibility tests. There are only O(n 4 ) possible combinations of two residue-modulus pairs. Given two integers d and d represented in binary, their greatest common divisor can be computed in O(log n) space using Euclid's algorithm, and so precomputing the tests for n requires O(log n) space. It is not hard to see that the other components of the circuit can be computed in O(log n) space as well. Hence, the problem is in logarithmic space-uniform AC 1 .
We have thus proven:

Theorem 2
The reachability problem of permutational BFDS belongs to logarithmic space and the logarithmic space-uniform AC 1 .
Since permutations are reversible, the question of whether the paths starting from two initial configurations intersect on a permutational BFDS is equivalent to the question of whether the path starting from one of the two initial configurations reaches the other initial configuration. Thus, we have the following corollary:

Corollary 1
The path-intersection problem of permutational BFDS belongs to P, the logarithmic space, and the logarithmic space-uniform AC 1 .

The Reachability and Path-Intersection Problems with Projection and Universality
In this section, we consider the variants of the reachability and path-intersection problems, and show their hardness.

Theorem 3
The projection reachability problem of synchronous BFDS with XOR as template is NP-complete.
Proof The problem is clearly in NP, since we can guess t, and compute F t (C ini ) in polynomial time by Lemma 1. To prove the NP-hardness, we will establish a polynomial-time reduction from the 3-occurrence 3SAT, the version of 3SAT in which each variable appears at most three times in the clause, positively or negatively. This problem is well-known to be NP-complete [14].
Let φ be an arbitrary instance of the 3-occurrence 3SAT with n input variables x 1 , x 2 , . . . , x n and m clauses C 1 , C 2 , . . . , C m . We can assume that no variable appears as a positive literal three times or as a negative literal three times. The number of appearances of each variable in φ is limited to 3, and thus, a variable that appears in the same form three times necessarily never appears in the opposite form. Such a variable thus can be fixed so that its unique literal form has the value true, and so the clauses in which it appears can be safely removed from φ. We can also assume that no clause contains a positive literal and a negative literal of the same variable, because such a clause will also be satisfied and so can be safely eliminated from the formula. Furthermore, we can assume that all the clauses of φ have at least two literals; if there is a clause with just one literal, each satisfying assignment of φ must satisfy the unique literal in the clause, and so φ can be simplified with the assignment to the literal.
We will below construct a synchronous BFDS, F, that consists of two parts. One part executes permutation and the other part computes some XOR functions. The second part, P , is included in the sub-configuration for the reachability criterion while the first part is not. We will design the system F, the initial configuration C ini , and the target configuration D fin , so that φ is satisfiable if and only if there exists some t such that (F t (C ini ))| P = D fin .
The basic idea of our construction is the following: Suppose we select a truthassignment to φ, assign values to the literals according to the truth-assignment, and then for each clause with exactly two literals satisfied, select exactly one of the two satisfied literals, and turn the value of the selected literal to false. If the initial truthassignment is a satisfying assignment, each clause will be left with either one or three literals that are satisfied, and so each clause has an odd number of literals that are satisfied. If the initial truth-assignment is not a satisfying assignment, there is at least one clause with 0 literals satisfying, and so there is a clause with an even number of literals that are satisfied. By extending this idea, suppose we select a truthassignment to φ, assign values to the literals according to the truth-assignment, and then for each variable, and for each literal of the variable that receives the value of true, select whether or not to turn its value of false. If the initial truth-assignment is a satisfying assignment, then by some selections, each clause will have an odd number of satisfied literals; otherwise, at least one clause has 0 (and thus, an even number of) satisfied literals.
For each variable, the selections made for the variable in the above process can be restated as follows: -Select between turning on the positive literals and turning on the negative literals of the variable. -If turning on the positive (respectively, negative) literals has been selected, set the values of the negative (respectively, positive) literals of the variable to false, and for each positive (respectively, negative) literal of the variable independently of the (possible) other literal of the same form, select the value of the literal.
We will design a mechanism that uses a permutation to make a circular generation of all the possible selections, so that the circle lengths are independent between any distinct variable. To accomplish the independence, let p 1 , p 2 , . . . , p n be the first n primes greater than or equal to 7, presented in increasing order. By the Prime Number Theorem (see, e.g., [7]), p n = O(n log n) = o(n 2 ), and so |p n | = O(log n). Thus, using the trial division, p 1 , . . . , p n can be found in polynomial time.
In our BFDS, each variable, x i , is associated with a set, L i , of p i objects. The p i objects of L i form a cycle as shown in Fig. 3, where the p i values stored in the p i nodes move in one circular direction synchronously. We arbitrarily choose an object in L i and denote by x + i,1 . We then denote by x + i,2 the next object to x + i,1 in the forward direction. We skip one object in the forward direction and denote the next one (which is three steps away from x + i,1 ) by x − i,1 , and the one after that by x − i,2 . In other words, the four objects sit on a five object sequence with the middle one unlabeled. The initial configuration of the objects in L i has all 0's but two consecutive 1's (see, Fig. 3). The initial alignment of the two consecutive 1's on L i can be arbitrary, so let us say there are aligned on x + i,1 and x + i,2 . According to the edges of L i , our system moves these p i − 2 0's and two 1's in a circular manner by one object at each step. Depending on the number of steps from the the values of the two 1's may fall on: Since the cycle lengths of L 1 , . . . , L n are n distinct primes, the seven possibilities occur independently among the variables. In other words, if for each variable, we select one of the seven possibilities independently of the other selections, there will be a step at which that specific combination appears as the configuration of the system (Fig. 4).
Let C j be the j -th clause of φ for some j, 1 ≤ j ≤ m. (The construction can be easily adapted to clauses with exactly two literals.) We denote by l j,1 , l j,2 and l j,3 the three literals in C j . We say that a literal l j,k is the first positive (respectively, the first negative) literal of x i if C 1 , C 2 , . . . , C j −1 contains no positive (respectively, Note that the above proposition holds with OR in place of XOR. Then, by exchanging the role between 0 and 1 in the proof for OR, we obtain that the proof holds for AND. Also, returning to the XOR proof, consider adding two new objects, a and b, whose values are initially 1, whose update functions are NXOR of a and b, and changing all the other update functions of the form XOR(u 1 , . . . , u k ) to NXOR(u 1 , . . . , u k , a), we obtain that the result holds for NXOR.

Corollary 2
The projection reachability problem of BFDS is NP-complete with any of OR, AND, and NXOR as the basis.
As before, the above results hold for path-intersection as well.

Corollary 3
The projection path-intersection problem of synchronous BFDS is NPcomplete with one of XOR, OR, AND, and NXOR as the basis.

Universal Reachability Problem
We next consider the universal projection reachability problem. We prove the following:

Theorem 4
The universal projection reachability problem is Π p 2 -complete with the basis of XOR.
Proof We can easily observe that the problem is contained in Π p 2 : Given a BFDS F, an initial sub-configuration C, a final configuration D and a projection P , we universally guess a completion C of C, existentially guess the number t of iterative applications of F, and then check if F t (C )| P = D| P .
We give a reduction from a canonical Π p 2 -complete problem, Π 2 -SAT, of deciding, given a CNF formula φ over x 1 , x 2 , . . . , x n and y 1 , y 2 , . . . , y n , whether for each truth-assignment to x 1 , . . . , x n , there exists a truth-assignment to y 1 , . . . , y n such that φ(x, y) = 1. We can assume that each instance of this problem is a 3CNF formula with each clause having at most one occurrence of two variables from x 1 , . . . , x n and at most 3 occurrences of each variable as follows: First, if there is a clause with k ≥ 4 literals, we introduce a new variable, substitute the disjunction of the first k −2 literals with this new variable, and add a CNF formula whose satisfying assignment ensures that the value of the new variable is equal to the disjunction of the substituted k − 2 literals. By repeating this reduction as long as there is a clause with at least 4 variables, the formula will eventually become 3CNF formula. The new variables introduce during this conversion process are added to the y-group. Second, if there is a clause without variables form the y-group, there is a truth-assignment that forces the value of the clause to false, so the formula is not a positive instance of the problem. Third, if there is a clause with two occurrences of variables from the x-group, we introduce a new variable in the y-group, substitute one of the two literals with this new variable, and add a 2CNF formula that states that the added variable and the substituted literal have the same values. Finally, as in the case of the 3-occurrence 3SAT problem (see, e.g., [14]), we substitute the occurrences of each variable with distinct variables and add a 2CNF formula stating that those distinct variables have the same values. These additional variables are in the y-group, except when the substituted variable was in the x-group; in that exception case, one of the distinct variables is kept in the x-group and the remaining ones are placed in the y-group. This construction enforces that each variable appearing three times in the formula has at least one positive occurrence and at least one negative occurrence.
Let φ be an instance of this 2 -SAT thus obtained. Let C 1 , C 2 , . . . , C m be the clauses of φ. For each j, 1 ≤ j ≤ m, let l j,1 , l j,2 , l j, 3 be literals in C j as in the proof of Theorem 3.
As in the proof of Theorem 3, we use distinct prime numbers greater than or equal to 7, p 1 , . . . , p n , p 1 , . . . p n . These are the first n + n prime numbers greater than or equal to 7. Again, they can be found in polynomial time using trial division. We introduce a cycle, L i , having length p i for each i, 1 ≤ i ≤ n , and two separate cycles, G i and G i , both having length p i for each i, 1 ≤ i ≤ n . The initial values for the objects in each of the former cycles (i.e., those corresponding to the y-group) are all 0's except for two consecutive 1's (see Fig. 5).
As for the latter groups, they are for the x-group variables. The values in each pair of cycles move synchronously. The initial values of the objects on the two cycles are all 0, except for one position on one cycle, which is variable and thus can be 0 or 1 at the initiation, and the same position on the opposite cycle with the value fixed to 1. The variables from the previous proof, 1 , and x − i,2 , are computed from the values of the two cycles: x + i,1 is obtained by the XOR between the first and the second objects of the first cycle, x + i,2 is obtained by the XOR between the second and the third objects of the first cycle, x − i,1 is obtained by the XOR among the fourth objects and the fifth objects of both cycles, and x − i,2 is obtained by the XOR among the fifth objects and the sixth objects of both cycle, as shown in Fig. 6.
Note that if the variable object in the first cycle has the value of 1, the value pairs of (0, 0), (0, 1), (1, 0), and (1, 1) appear as the values of ( always (0, 0), and if the variable object in the first cycle has the value of 0, the value pairs of (0, 0), (0, 1), (1, 0), and (1, 1) appear as the values of (x − i,1 , x − i,2 ) while the value of (x + i,1 , x + i,2 ) is always (0, 0). Thus, using n variables in the initial configuration, it is possible to try all truth-assignments to the x-variables, and try all possible truth-assignments to the y-variables using the initial configurations to the corresponding cycles.
As before, we introduce objects c 1 , . . . , c m corresponding to C 1 , . . . , C m , which compute the XOR of the values of the objects corresponding to the literals. We then can see that φ is a member of the 2 -3SAT if and only if regardless of the value assignment to the variable nodes in the cycles, the projection of the system with P = {c 1 , · · · , c m } becomes all 1. This proves the theorem. 1 and x − i,2 with p i = 11, and the values in D ini . Only the value for the shaded object g i,1 is not specified As before, the reachability problem can be viewed as a special case of path intersection problem.

Cycle Length Problems
In this section, we show that, while the cycle length problem is known to be in UP ∩ coUP and in BQP, the exact cycle length problem is NP-complete.

Theorem 5 The exact cycle length problem is
Proof We reduce 3-occurrence 3SAT to the problem. Let φ be a given 3CNF formula, where the number of appearances of each variable is limited to three. Suppose φ consists of n variables x 1 , x 2 , . . . , x n and m clauses C 1 , C 2 , . . . C m , each of which has at most three literals (either l j,1 and l j,2 or l j,1 , l j,2 and l j,3 ). We say that a literal l j,k is the first and second positive (resp., negative) literal of x i .
We first construct the desired BFDS F, D ini and integer l such that F has an l-cycle starting from E ini if and only if φ is satisfiable.
[Construction of F, P , D ini and l] For each j ∈ [m], we denote by p j the j th odd prime. By the Prime Number Theorem (see, e.g., [7]), p n = O(n log n) = o(n 2 ), and so |p n | = O(log n). Thus, using the trial division, p 1 , . . . , p n can be found in polynomial time. For j ∈ [m] and k ∈ [3], we construct a BFDS M j,k as follows: M j,k has p j objects x j,k,0 , x j,k,1 . . . , x j,k,p j −1 computing XORs, and compose a cycle (See also Fig. 7): We construct F by combining these M j,k as follows (See Fig. 8). For each i ∈ [n], if there are either two positive literals or two negative literals of x i , denoted by l j,k where each of C 1 , C 2 and C 3 have three literals. In the initial subconfiguration D ini , the values for the shaded objects are not specified, while the other objects are set to zeros Fig. 8 We add y 1 and z 1 to M 1,k , M 2,k , and M 3,k in Fig. 7, where we assume that C 1 and C 2 contains positive literals of x 1 , and C 3 does a negative literal of x 1 . A thick line shows a bundle of lines directed to y 1 or z 1 from all the objects within a circle. Note that y 1 computes XOR, while z 1 computes NXOR and l j ,k , we add an object y i computing XOR such that In addition, for a pair of the first positive literal l j,k of x i and the first negative literal l j ,k of x i , we add an object z i computing NXOR such that This completes the construction of F. We define P as a set of all the objects in F other than x j,k,0 for every 1 ≤ j ≤ m and 1 ≤ k ≤ 3. We set all the values in P to zeros. Thus, for any extension E ini of D ini , it holds that for any j ∈ [m], k ∈ [3] and t ≥ 1, We finally define l = m j =1 p j . Since M j,k s are disjoint cycles and do not interact with each other, we have the following claim.
, where j, j , k, k are the ones specified in (4). Thus, (6) implies that F t (E ini )[y i ] = 1 for odd t while F t (E ini )[y i ] = 0 for even t. Therefore, L F (E ini ) is even. We can similarly verify the claim for the case where . Then (4)- (6) imply and any positive integer t.
[⇐] We here prove that if φ is satisfiable, then there exists an extension E ini of Let α = (α 1 , α 2 , . . . , α n ) ∈ {0, 1} n be a satisfying assignment for φ. We define E ini as follows: For every j ∈ [m], and k ∈ [3], E ini [x j,k,0 ] = 1 if either "l j,k is a positive literal of x i and α i = 1" or "l j,k is a negative literal of x i and α i = 0," and otherwise, E ini [x j,k,0 ] = 0. Equations (4)- (6) , and hence the claim implies that L F (E ini ) = j ∈[m] p j , as desired.
[⇒] We prove that if there exists an extension E ini of D ini such that L F (E ini ) = l then φ is satisfiable.
Since L F (E ini ) = l, the claim implies that S(E ini ) = {p 1 , p 2 , . . . , p m }, and hence, for every j , 1 ≤ j ≤ m, there exists k j , 1 ≤ k j ≤ 3, such that E ini [x j,k j ,0 ] = 1. We thus define α = (α 1 , α 2 , . . . , α n ) ∈ {0, 1} n as follows: For each i, 1 ≤ i ≤ n, Since l is not even, the claim implies that , and hence we can set α i without any confliction. Since α i = 1 if l j,k j is a positive literal, and α i = 0 if l j,k j is a negative literal, α clearly satisfies the literal l j,k j for every j ∈ [m].

Predecessor Problems
In this section, we show that the t-predecessor problem and the t-Garden of Eden problem can be answered in polynomial time. Proof We first describe our algorithms for the two problems where the basis contains only XOR. Suppose we are given a synchronous BFDS F of n objects x 1 , x 2 , . . . x n , a configuration C fin , and an integer t.
We can think of F as an n × n 0/1 incidence matrix M F whose i-th row corresponds to the update function f i in such a manner that the j -th entry of the row is 1 if and only if f i takes x j as one of its inputs. By viewing a configuration as an 0/1 column vector, the application of the system for one step can be viewed as multiplying M F by the vector from right, with the arithmetic carried out in Z 2 . The t-predecessor problem can be restated as the question of whether the linear system of equations: has a solution, where D is a column vector of length n. This needs a bit of explanation. Given a solution D to the system of linear equations, we have that ] is a sequence of configurations that takes D to C fin in t steps, and so D is a t-th predecessor of C fin . Conversely, given a t-th predecessor, E, of C fin , there is a sequence [C fin , E 1 , E 2 , . . . , E t−1 , E] that takes C fin back to E, where applying M F to an element excluding C fin in the sequence produces the element immediately to the left in the sequence. This means that E, after applying M F t times consecutively, becomes C fin , and so E is a solution to the system.
To answer the question of whether the system has a solution, we first compute M t F by the iterative squaring method. The calculation can be done in polynomial time (in the length of the input) even if t is given in binary.
We then check the solvability of the system by converting the system so that the matrix is in a row echelon form; if a row is not all 0, at the position of its leading 0, all the other rows have 0. This conversion can be carried out using the Gaussian Elimination method. By concurrently applying the operation on the vector, we obtain the equivalent system: where H is in a row echelon form. Checking whether this system has a solution is simple: the system has a solution if and only if the column vector C has a 0 for each all-0 row of the matrix H . Since Gaussian Elimination can be carried out in polynomial time, this implies that the t-predecessor problem is solvable in polynomial time.
The t-Garden of Eden problem asks whether there is a solution of (7), S, such that M F x = S does not have a solution. Since (8) is an equivalent system to (7), we can instead ask whether there is a solution, S, of the equivalent system for which M F x = S has no solution. Clearly, t-th Garden of Eden exists only if t-th predecessor exists. Thus, the instance in which (7) has no solution can be outright asserted not have a t-th Garden of Eden. If the equation has a solution, each solution can be described as a vector whose elements are either constants or linear functions as follows: Group 1 If a row r of H has a leading 1 at position i and the remainder of the row is all 0, x i = b i , where b i is the i-th element of the vector C . Group 2 If a row r of H has a leading 1 at position i and the remainder of the row is not all 0, x i = x j 1 + · · · + x j k + b i , where j 1 , . . . , j k are the positions of 1's on row r other than i and b i is the i-th element of the vector C . Group 3 If x i does not receive an assignment through either of the above, i.e., no rows of the echelon form has a leading 1 at position i, then x i remains as an independent variable; i.e., x i = x i .
Let S be the vector thus determined. The vector S can be expressed as the product of an n × (n + 1) 0/1 matrix, Q and an n + 1 dimensional column vector X = (x 1 , . . . , x n , 1) T . More specifically, in Q, the first n columns represent the appearance of x 1 , . . . , x n in the solution in the n rows and the last column represents the value of the constants b i 's. In other words, if x i = x j 1 + · · · + x j k + b i is the solution for x i , then row i of the n × (n + 1) matrix Q has 1 at the positions j 1 , . . . , j k and at the last position if b i is 1. We apply Gaussian Elimination on M F for converting it to a row echelon form and apply the operations concurrently to the matrix Q, to obtain a new equation: As before, a solution to (8) can be configured so that the solution has no predecessor if and only if there is a row index i such that the i-th row in M is all 0 while the i-th row in Q contains a 1. This condition can be tested once the matrix Q has been obtained and the echelon form has been computed. Since Gaussian Elimination can be carried out in polynomial time, we have that the t-Garden of Eden problem can be solved in polynomial time.
For the case where B = {XOR, NXOR}, we consider F as n × (n + 1) matrix M F consisting of M F together with a column vector of length n whose i-th element is one if f i is NXOR; and zero, otherwise. Let C fin be a column vector consisting of C fin followed by a single element one. We then apply the above procedure based on the linear system This proves the theorem.
The problem is solvable even in logarithmic space-uniform NC 2 .

Theorem 7
With the basis {XOR, NXOR}, the t-predecessor problem and the t-Garden of Eden problem are solvable in logarithmic space-uniform NC 2 if t is a constant, t is given in unary, or M t F is given as part of instance.
Proof We first note that the problems of computing the rank and of computing the determinant over the finite field are known to be solvable in logarithmic spaceuniform NC 2 (see [15]). We will show how to use NC circuits to execute the algorithms presented in the proof of Theorem 6. As before, the computation begins by obtaining M t F , if it is not given as part of instance. Repeated squaring is the way to obtain this matrix power. The product of two boolean matrix can be accomplished in NC 1 , and so, if t is given in unary, the repeated squaring for obtaining the t-power requires O(log t) sequential computational steps of products, and thus, obtaining M t F is in NC 2 . After obtaining the matrix power, echelon forms of the power and of M F must be obtained. Let A be one of the two matrices. Obtaining an echelon form of A also includes learning combinations of the rows of A that produce the echelon form. We show that this can be done in NC 2 .
Let r 1 , . . . , r n be the n-dimensional row vectors that form A. Since we can exclude each all-0 rows in A from the computation of the echelon form, let us assume that none of these rows are all 0. For each subsequence, [r i 1 , . . . , r i k ], from the row vectors of A, let mat(r i 1 , . . . , r i k ) denote the sub-matrix generated by the vectors.
Let {i 1 , . . . , i k } be a set of indices such that r i 1 + · · · + r i k is equal to the ndimensional 0-vector (N.B.: Recall that the arithmetic is over Z 2 ), where i 1 < · · · < i k . Suppose this set is minimal, in the sense that for any proper nonempty subset, the equality to the 0-vector does not hold (that is, the vectors in the subset are linearly independent). Given such a minimal set, we think of the largest element, i k , as its representative. Let W be the set of all indices that are representatives of minimal indices with which 0-vectors can be formed. We have that for an arbitrary index j, 1 ≤ j ≤ n, j ∈ W if and only if the row rank of the matrix mat(r 1 , . . . , r j −1 ) and the row rank of mat(r 1 , . . . , r j ) are equal to each other; in other words, r j can be expressed as the sum of some rows with smaller indices if and only if adding r j to the matrix composed of r 1 , . . . , r j −1 preserves the row rank of the matrix mat(r 1 , . . . , r j −1 ). Thus, the set W can be obtained by computing the row rank of the n sub-matrices.
Let V = {i 1 , . . . , i } = [n] − W . Then the matrix mat(r i 1 , . . . , r i ) has row rank , i.e., the row vectors in V are linearly independent; otherwise, vectors in V can form the 0-vector, and so one of them should be placed in W .
We also note that for each j ∈ W , r j can be expressed as the sum of row vectors whose indices are in V . Why? Assume that, for some p ∈ W , r p cannot be expressed as the sum of row vectors whose indices are in V . Select any set, K, of indices less than p such that adding rows whose indices are in K produces r p . Since p ∈ W , there is at least one such K, and by our assumption, each such K contains an element from W . So, for each such K, we can select the largest member from W . We then set toK from all such K's so that the largest member from W thus chosen is the smallest of all -a tie can be broken arbitrarily. Let j be the index of its largest member in W ∩K. Since j ∈ W , r j is equal to the sum of some vectors whose indices are smaller than j . Select one such combination, say R. Construct a new set L from K and R by removing j fromK and then taking the symmetric difference with R; that is, by simultaneously removing j and each element appearing in R fromK and adding each element of R not appearing inK. The new set L gives a set of indices of rows whose sum is equal to r p . In addition, since j has been removed from r j , either L has no element from W or it has an element from W and each such element is smaller than j . Both contradict the assumptions we have made.
We can actually say something stronger: for each j ∈ W , there is only one combination of indices from V with which to form the vector in j ; otherwise, by uniting two distinct combinations with equality (since both of them are equal to r j ), we can construct the 0-vector from vectors with their indices in V . Now, to see whether r i p is needed to form r j such that j ∈ W , we compare the row rank of mat(r i 1 , . . . , r i ) and the row rank of the matrix formed by substituting r i p with r j . If r i p is needed to form r j , then r i p can be constructed from the other rows in the presence of r j , so the ranks are equal to each other; if r i p is not needed to form r j , the presence of r j does not help in substituting r i p , and so the ranks are different. Thus, the linear combinations to form the vectors whose indices are in W can be obtained by executing row rank computation in parallel. This takes care of computing the linear combinations of rows that form all 0 rows in the echelon form to be constructed (i.e., the rows whose indices are in W ).
To compute the other rows of an echelon form (that concurs with our choice of W ) and their accompanying linear combinations, we execute the column rank calculation in a similar manner to the rows specified by V . Using this calculation, we find a maximal set of independent columns of the matrix mat(r i 1 , . . . , r i ). The matrix formed by the selected columns in the row-reduced matrix, say B, is an × matrix. The matrix B has full rank and so the matrix inverse exists for B. We obtain the matrix inverse of this full-rank matrix B using the determinants of its minors; the (i, j ) entry of the inverse is the determinant of the matrix constructed from B by striking out the i-th and the j -th column simultaneously. Usually, the determinant has to be divided by the determinant of B to obtain the inverse, but since the arithmetic is in Z 2 and B is invertible, the denominator should be 1, so we can skip the division. We then expand this inverse to make the row length of the matrix to n by inserting all 0's at the indices that do not appear in V (i.e., the indices that appear in W ). We then multiply A by this matrix gives the echelon form. This expanded matrix gives the choices of the rows that form the echelon form.
From the above discussion, four parallel phases of rank calculation gives the fullrank core of the matrix A, one parallel phase of determinant calculation gives the inverse, and one phase of matrix product calculation gives the echelon as well as the linear combinations to form the 0-vectors. Each phase can be done in logarithmic space-uniform NC 2 . Thus, we have proven the theorem.