<<

Descriptive Complexity: A Logician’s Approach to Computation N. Immerman

basic issue in computer science is there are exponentially many possibilities, the complexity of problems. If one is but in this case no known is faster doing a calculation once on a than exponential time. medium-sized input, the simplest al- Computational complexity measures how gorithm may be the best method to much time and/or memory space is needed as Ause, even if it is not the fastest. However, when a function of the input size. Let TIME[t(n)] be the one has a subproblem that will have to be solved of problems that can be solved by millions of times, optimization is important. A that perform at most O(t(n)) steps for inputs of fundamental issue in theoretical computer sci- size n. The polynomial time (P) ence is the computational complexity of prob- is the set of problems that are solvable in time lems. How much time and how much memory at most some polynomial in n. space is needed to solve a particular problem? ∞ Here are a few examples of such problems: P= TIME[nk] 1. : Given a directed graph and k[=1 two specified points s,t, determine if there Even though the class TIME[t(n)] is sensitive is a path from s to t. A simple, linear-time to the exact machine model used in the com- algorithm marks s and then continues to putations, the class P is quite robust. The prob- mark every vertex at the head of an edge lems Reachability and Min-triangulation are el- whose tail is marked. When no more vertices ements of P. can be marked, t is reachable from s iff it Some important computational problems ap- has been marked. pear to require more than polynomial time. An 2. Min-triangulation: Given a polygon in the interesting class of such problems is contained plane and a length , determine if there is in nondeterministic polynomial time (NP). A a triangulation of the polygon of total length nondeterministic computation is one that may less than or equal to L. Even though there make arbitrary choices as it works. If any of are exponentially many possible triangula- these choices leads to an accept state, then we tions, a dynamic programming algorithm say the input is accepted. As an example, let us can find an optimal one in O(n3) steps. consider the three-colorability problem. A non- 3. Three-Colorability: Given an undirected deterministic algorithm traverses the input graph, determine whether its vertices can be graph, arbitrarily assigning to each vertex a colored using three colors with no two ad- color: red, yellow, or blue. Then it checks whether jacent vertices having the same color. Again each edge joins vertices of different colors. If , N. Immerman is professor in the Department of Com- it accepts. puter Science, University of Massachusetts at Amherst. A nondeterministic computation can be mod- His e-mail address is [email protected]. eled as a whose root is the starting config-

OCTOBER 1995 NOTICES OF THE AMS 1127 uration. Every choice forms a branching node. Complexity theory typically considers yes/no The computation accepts if any of the leaves is problems: this is the examination of the difficulty an accepting configuration. The nondeterministic of computing a particular bit of the desired out- time of this computation is the length of the path put. Yes/no problems are properties of the input: from root to accepting leaf, not the exponentially the set of inputs to which the answer is yes larger size of the tree of all possible choices. have the property in question. Rather than ask- Continuing the example, given a graph G with ing the complexity of checking if a certain input v vertices, the nondeterministic three-col- has a property T, in descriptive complexity we orability algorithm defines a computation tree ask how hard it is to express the property T in that has 3v branches, one for each possible col- a formal language. It is plausible that properties oring of the vertices. Each such branch ends in that are harder to check might be harder to ex- an accepting leaf if and only if the correspond- press. What is surprising is how closely math- ing coloring is a valid three coloring. It follows ematics mimics the physical world: when we that there exists an accepting leaf just if G is use first-order logic, descriptive complexity ex- three-colorable. Thus, three-colorability can be actly captures the important complexity classes. checked in nondeterministic O(n) time—where In descriptive complexity we view inputs as n is the number of vertices plus edges. Three- finite logical structures, e.g., a binary string colorability is in NP. w = w1w2 . . . w w is coded as The three-colorability problem as well as hun- | | w dreds of other well-known combinatorial prob- w = 1, 2, . . . , w , S , A h{ | |} ≤i lems are NP complete. (See [8] for a survey of consisting of a universe U = 1, 2, . . . , w of many of these.) This means that not only are they { | |} in NP, but they are the “hardest problems” in NP: the bit positions in the string, the monadic - w w th all problems in NP are reducible to each NP- lation S defined so that S (i) holds iff the i bit of w is one, and , the usual total ordering complete problem. (A reduction from problem ≤ A to problem B is a polynomial-time mapping on U. from any input to A to an input to B that has A graph is a logical structure G the same answer. It follows that if A is reducible G = 1,2,... ,v ,E whose universe is the A h{ } i G to B and B is in P, then A is in P.) At present, set of vertices and where E is the binary edge the fastest known algorithm for any of these . A graph problem is a set of finite struc- problems is exponential. An efficient algorithm tures whose vocabulary consists of a single bi- for any one of these problems would translate nary relation. Similarly, we may think of any problem T in some complexity class as a set to an efficient algorithm for all of them. C The P= NP question is an example of our in- of structures of some fixed vocabulary. ability to determine what can or cannot be com- Recall that in first-order logic we can quan- puted in a certain amount of computational re- tify over the universe. We can say, for example, source: time, space, parallel time, etc. The only that a string ends in a one. The following sen- truly effective tool that we currently have for this tence does this by asserting the existence of a is Cantor’s diagonalization argument. This is string position x that is the last position and by very useful for proving hierarchy theorems, i.e., asserting S(x), i.e., the bit at that position is a that more of a given computational resource en- one: ables us to compute more. ( x)( y)(y x S(x)) ∃ ∀ ≤ ∧ " 2 " 2 TIME[n] TIME[n ]; NTIME[n] NTIME[n ]; As another example we can say that there are SPACE[n] " SPACE[n2] exactly two edges leaving every vertex: However, there are no known techniques for ( x)( yz)( w)(y = z E(x, y) E(x, z) comparing different types of resources, e.g., ∀ ∃ ∀ 6 ∧ ∧ (E(x, w) w = y w = z)) time versus nondeterministic time, time versus ∧ → ∨ space, etc. For any structure , we use the notation = ϕ These notions of complexity might not seem to mean that ϕ isA true in . A | fundamental, but rather tied to the sort of ma- In second-order logic weA also have variables chine that the algorithm will be performed on. Xi that range over relations over the universe. On the contrary, the notions of time, space, par- These variables may be quantified. allel time, and even nondeterministic time are A second-order existential formula (SO ) be- fundamental and have many equivalent formu- gins with second-order existential quantifiers∃ lations. One such formulation which I will now and is followed by a first-order formula. As an describe involves no machines at all but relies example, the following second-order existential instead on classic notions from mathematical sentence 3 says that the graph in question is logic. three-colorable. It does this by asserting that Ψ

1128 NOTICES OF THE AMS VOLUME 42, NUMBER 10 there are three unary relations—Red (), Yellow clude a symbol “ ” denoting a (Y), and Blue (B)—defined on the universe of ver- total ordering on the universe. With≤ this proviso, tices. It goes on to say that every vertex has we can relate computational complexity to first- some color and no two adjacent vertices have the order descriptive complexity. same color. Let FO-SIZE[s(n)] be the set of properties ex- pressible by uniform sequences of first-order for- 3 ( R)( Y )( B)( x) th ≡ ∃ ∃ ∃ ∀ mulas ϕi i Z+ such that the n formula has [(R(x) Y (x) B(x)) ( y) (E(x, y) O(s(n)){symbols} ∈ and expresses the property in Ψ ∨ ∨ ∧ ∀ → (R(x) R(y)) (Y (x) Y (y)) question for structures of size n. (Uniform means ¬ ∧ ∧ ¬ ∧ that the map n ϕn has very low complexity, (B(x) B(y)))] 7→ ∧ ¬ ∧ e.g., SPACE[log n]. Later we will see that purely syntactic uniformity condi- Descriptive complexity tions suffice.) began with the following the- The following theorem orem of Ronald Fagin. Fagin’s shows that FO-SIZE is a good theorem says that NP is equal measure of space. In the fol- to the set of problems de- lowing, NSPACE is the non- scribable in second-order, ex- A fundamental deterministic version of space istential logic. Observe that in which again we allow algo- Fagin’s theorem character- issue in rithms to make arbitrary izes the complexity class NP theoretical choices and we only count the purely by logic, with no men- amount of space used in an tion of machines or time. computer accepting path. In 1970, Wal- Theorem 1 [1]. A set of struc- ter Savitch proved that tures T is in NP iff there ex- science is the NSPACE[s(n)] is contained in ists a second-order existential computational SPACE[s(n)2], a result that is formula, such that not obvious [20]. It is not T = = . known whether Savitch’s the- {A|A | } complexity of Φ orem is optimal, nor is it To capture complexity Φ problems. How known whether SPACE[s(n)] classes P and below, first- is equal to NSPACE[s(n)]. The order logic is more appro- much time and following theorem closely re- priate. Since first-order logic lates the descriptive measure is weaker than second-order, how much FO-SIZE to space by fitting it it is natural to let formulas within the bounds of Savitch’s grow with the size of inputs. memory space is theorem: For example, one can ask, “How long a first-order for- needed to solve Theorem 2 [10]. For mula is needed to express s(n) logn, any problem in ≥ graph connectivity?” A graph a particular nondeterministic space s(n) G is connected iff problem? can be expressed by first-order G = ( xy)P(x,y) where formulas of size (s(n))2/ log n. P(x|,y∀) means that there is a Any problem so expressible is path from x to y. We are in- in deterministic space (s(n))2. terested in paths of length In symbols, less than n = VG . First- order formulas |of size| O(log n) are both neces- NSPACE[s(n)] FO-SIZE[(s(n))2/ log n] sary and sufficient to express connectivity. ⊆ SPACE[(s(n))2] In order to characterize complexity classes as ⊆ in Fagin’s theorem but via first-order logics, one must look at the coding of inputs. A graph or One way to increase the power of first-order other structure is given to a computer in some logic is by allowing inductive definitions. This is order, e.g., vertices v1, v2, . . . , vn . Furthermore, formalized via a least fixed point operator (LFP). algorithms may use the ordering, e.g., searching As an example, suppose that we want to de- through each vertex in turn. To simulate the fine the transitive of the edge relation machine, the logical languages need access to the of a graph. This would be useful if we were given ordering. (This was also necessary for Fagin’s the- a directed graph G = (VG,EG,s,t), and we orem, but in SO we may existentially quantify wanted to assert that there is a path from s to a total ordering ∃on the universe.) From now on, t. Let E? be the reflexive, of we will assume that all first-order languages in- the edge relation E. Given E?, we can describe

OCTOBER 1995 NOTICES OF THE AMS 1129 the reachability property as simply “E?(s, t)”. We follow that every second-order formula would can define E? inductively as follows: be equivalent to a second-order existential one.)

E?(x, y) x = y E(x, y) Corollary 4. P is equal to NP iff every second- (1) ≡ ∨ order expressible property over finite, ordered ( z)(E?(x, z) E?(z, y)) ∨ ∃ ∧ structures is already expressible in first-order Equation 1 asserts that E? is a fixed point of logic using inductive definitions. In symbols, the following map R ϕ(R) of binary relations: 7→ (P = NP) (FO + LFP) = SO ϕ(R, x, y) E(x, y) ( z)(R(x, z) R(z, y)) ⇔ ≡ ∨ ∃ ∧ We mention two other natural operators that Since R appears only positively, that is, with- let us capture important complexity classes. Let out any negation signs, in ϕ, this operator has ϕ(x1, . . . , xk, x10 , . . . xk0 ) be a formula with 2k free a least fixed point which we take as the mean- variables. We can think of ϕ as representing an ing of the inductive definition 1. Thus, we can edge relation over a vertex set V = Uk consist- write ing of all k-tuples from the original universe. De- ? fine the transitive closure operator, writing E (LFPR,x,y ϕ) ≡ (TC¯x,x0 ϕ) to denote the reflexive, transitive clo- In fact, if we consider the sequence sure of the binary relation ϕ. NSPACE[log n] is ϕ( ) ϕ(ϕ( )) ϕ(ϕ(ϕ( ))) , then an important complexity class that includes ∅ ⊆ ∅ ⊆ ∅ ⊆ ··· LFP(ϕ) is the union of this sequence. Since the most path problems. (The Reachability problem sequence is monotone and there are at most nk mentioned at the beginning of this article is tuples in a k-ary relation, LFP is in fact a poly- complete for NSPACE[log n].) The following the- nomial iterator of formulas. Thus LFP is a par- orem says that this complexity class is captured ticularly natural way to iterate first-order for- by (FO + TC). (Note that transitive closures are mulas, letting their size grow while the number a special kind of inductive definition; see Equa- of variables they use remains constant.1 The fol- tion 1. Every time we reapply the inductive equa- lowing theorem says that if we add to first-order tion, the paths considered double in length. That logic the power to define new relations by in- is why (FO + TC) FO[log n].) duction, then we can express exactly the prop- ⊆ erties that are checkable in polynomial time. Theorem 5 [13, 14]. The complexity class non- This is exciting because a very natural descrip- deterministic logarithmic space is equal to the set tive class—first-order logic plus inductive defi- of problems describable in first-order logic with nitions—captures a natural and important com- the addition of a transitive closure operator. This plexity class. Polynomial time is characterized is a subclass of the set of problems describable using only basic logical notions and no mention by first-order formulas iterated log n times. In of computation. symbols,

Theorem 3 [11, 12, 22]. A problem is in polyno- NSPACE[log n] = (FO + TC) FO[log n] mial time iff it is describable in first-order logic ⊆ with the addition of the least fixed point opera- Suppose we are given a first-order formula tor. This is equivalent to being expressible by a ϕ(R, x , . . . x ), where R is a new relation vari- first-order formula iterated polynomially many 1 k able, but in which R need not occur only posi- times. In symbols, tively. Then the least fixed point of ϕ may not exist. However, we may describe its “partial fixed P = (FO + LFP) = FO[nO(1)]. point” (PFP) which is equal to the first fixed point in the sequence ϕ( ), ϕ2( ), . . ., or if Theorems 1 and 3 cast the P = NP question ∅ ∅ ∅ in a different light. (In the following we are using there is no such fixed point. Since this sequence nk the fact that if P were equal to NP, then NP would must repeat after at most 2 steps, PFP may be be closed under complementation. It would then thought of as an exponential iterator. The following theorem shows that the arbi- 1 We write FO[t(n)] to denote those properties ex- trary iteration of first-order formulas—which is pressible for structures of size n by formulas that con- the same as iterating them exponentially—allows sist of a block of restricted quantifiers repeated t(n) the description of exactly all properties com- times. What can be expressed with a bounded number putable using a polynomial amount of space. of variables is exactly what can be computed with poly- nomially much “hardware”, i.e., polynomial-space and Theorem 6 [10, 11, 22]. A problem is in polyno- polynomially many processors. The depth of nesting of mial space iff it is describable in first-order logic quantifiers needed to express a property is precisely the with the addition of the partial fixed point oper- parallel time needed to check it. See [15] for a more de- ator. This is equivalent to being expressible by tailed survey of these results. first-order formulas of polynomial size and also

1130 NOTICES OF THE AMS VOLUME 42, NUMBER 10 equivalent to being expressible by a first-order for- A related question could be asked about a pro- mula iterated exponentially. In symbols, posed hierarchy of (FO + TC). In fact the transi- tive closure “hierarchy” also collapses to its first- PSPACE = (FO + PFP) level. O(1) = FO-SIZE[nO(1)] = FO[2n ] Theorem 8 [14]. Every formula in first-order logic with the addition of the transitive closure op- Complementation erator is equivalent to a single application of One of the early successes of descriptive com- transitive closure to a first-order formula. plexity was in response to questions concerning Deterministic complexity classes are closed database query languages. A very popular model under complementation. It had been long be- of databases is the relational model. In this lieved in the computer science community that model, databases are exactly finite logical struc- nondeterministic space is a “one-sided” class, not tures. Furthermore, query languages are based closed under complementation. In particular, it on first-order logic. was believed that the complement of the Reach- As an example, suppose that we have an air- ability problem, that is, the set of graphs line database. One of its relations might be G = (V,E,s,t) such that there is no path from s FLIGHTS, with arguments: flight number, origin, to t, was not recognizable in NSPACE[log n]. It departure time, destination, arrival time. The was conjectured that SPACE[log n] is strictly query “What are the direct flights from JFK to contained in NSPACE[log n], and the most likely LAX leaving in the morning?” could be phrased way to prove that appeared to be via showing that as: NSPACE[log n] is not closed under complemen-

( td, ta)(td < 12 FLIGHTS(x, JFK, td, LAX, ta)) tation [17]. Thus the following corollary of The- ∃ ∧ orem 8 was quite surprising. Note that this query has one free variable, x. The response to the query should be the set of x’s Corollary 9 [14, 21]. For s(n) logn, ≥ such that x is the flight number of a direct flight NSPACE[s(n)] is closed under complementation. from JFK to LAX that leaves before noon. Coincidently, Corollary 9, which had been Of course, not all queries that we might want open since 1964, was proved independently by to express are first-order. For example, the reach- Róbert Szelepcsényi at almost exactly the same ability query—is there a route, with no fixed time, but using different methods. limit on the number of hops, taking me from s to t?—is not first-order. For this and related Lower Bounds and Ordering reasons, Chandra and Harel proposed a hierar- One tantalizing feature of Theorems 1, 2, 3, 5, chy of query languages above first-order logic and 6 is that they hold out the prospect that we based on alternating applications of quantifica- can settle questions such as P = NP via logical tion, negation, and the least fixed point opera- methods. In particular, there are quantifier games tor [3]. It was known that for infinite structures due to Ehrenfeucht and Fraïssé that character- this gave a strict hierarchy [18]; the same was ize the expressive power of logical languages. conjectured for finite structures. Ehrenfeucht-Fraïssé games are played on a pair There is a big difference between infinite and of structures, , . There are two players, the finite structures. Over an infinite structure, a Spoiler and theA Duplicator.B At each move, the least fixed point might never reach a stage of the Spoiler chooses some element of the universe of induction at which it has completed. Over a fi- one of the structures, and the Duplicator must nite structure, there is a finite stage where the respond with an element from the other struc- fixed point is realized. Furthermore, one can ture. If at the end of the game the map from the verify within the induction that this stage has elements chosen from to those chosen from been reached. Thus, by saying that we have is an isomorphism ofA the induced substruc- ¯ reached the final stage and that tuple t is not tures,B then the Duplicator wins; otherwise the present, we can express the negation of Spoiler wins. For most logical languages there ¯ (LFPϕ)(t). It follows that the “hierarchy” pro- is a corresponding game G with the followingL posed by Chandra and Harel is not a hierarchy fundamental property. WriteL to mean at all. Every formula in (FO + LFP) is expressible that for all ϕ , = ϕ iff A ≡=LϕB. as a single fixed point of a first-order formula. ∈ L A | B | We say that the “hierarchy” collapses to its first (Duplicator has a winning strategy level. (2) for game G ( , )) Theorem 7 [12]. Every formula in first-order L A B ⇔ A ≡L B logic with the addition of the least fixed point op- We use Ehrenfeucht-Fraïssé games to prove erator is equivalent to a single application of that certain properties are not expressible in least fixed point to a first-order formula. certain logics. If and disagree on property A B

OCTOBER 1995 NOTICES OF THE AMS 1131 S and yet we can construct a winning strategy ordering. Once a language has this strength, two for the Duplicator on G ( , ), then we have structures will be equivalent iff they are identi- proved that S is not expressibleL A B in . cal. (If we can assert about a graph G that ver- SO (monadic) is a subset of SO inL which the tex 17 has an edge to vertex 289, then any graph only second-order∃ variables are relations∃ that that agrees on all such sentences is identical to take one argument. We can thus assert the ex- G.) istence of colorings of the vertices. Fagin used On the other hand, if we just remove the or- Ehrenfeucht-Fraïssé games to prove that dering, then Theorems 2, 3, 5, and 6 all fail. For example, it is easy to show that without an or- Theorem 10 [7]. Graph connectivity is not de- dering we cannot count. In fact, if EVEN repre- scribable by a second-order existential formula sents the query, “The size of the universe is in which all relational variables are monadic. even,” then: However, nonconnectivity is in SO (monadic). Theorem 12 [3]. In the absence of the ordering The following formula says that there∃ exists a relation, first-order logic with the addition of the set C of vertices that is not empty and not the fixed point operator cannot describe the problem whole universe that is closed under edge con- EVEN. nections. Thus Theorem 10 implies that SO (monadic) is not closed under complementation.∃ All the graph properties that we want to ex- press are order independent. Thus, it would be Not-Connected ( C)( xy)(C(x) ≡ ∃ ∃ very nice to have a language that captures all C(y) ( xy)(C(x) E(x, y)) C(y)) polynomial-time computable order-independent ∧ ¬ ∧ ∀ ∧ → properties. This would be analogous to Theorem Proving lower bounds on SO when relational ∃ 3, which says that (FO + LFP) captures polyno- variables need not be monadic appears hard. mial time for ordered structures. Lower bounds for first-order logic may be more Before 1989, examples involving the counting tractable. A lower bound corresponding to The- of large, unstructured sets were the only prob- orem 2 was presented for the AGAP problem. lems known to be in order-independent P but AGAP is a generalization of the graph Reacha- not in (FO(wo ) + LFP). Consider the language bility problem to and/or graphs and is complete (FO(wo ) + LF≤P + COUNT) in which structures for P. The following theorem proves a lower are two-sorted:≤ their universe is partitioned into bound on the size of first-order formulas needed an unordered domain D = d1, d2, . . . , dn and to express the AGAP property. a separate number domain N{ = 1, 2, . . . , n} . We { } Theorem 11 [3]. The AGAP property is describ- have the database predicates defined on D and able by linear-size first-order formulas that do not the standard ordering defined on N. The two include the ordering relation. However, it is not sorts are combined via counting quantifiers: describable by such formulas of size less than √log n ( ix)ϕ(x) 2 . ∃ The relationship between space and time is meaning that there exist at least i elements x not well understood. We do know that such that ϕ(x). Here i is a number variable and ∞ x is a domain variable. NSPACE[log n] P SPACE[nk] ⊆ ⊆ For quite a while it was an open question k[=1 whether the language (FO(wo ) + LFP+ COUNT) From Theorem 2 we know that was equal to order independent≤ P. NSPACE[logn] FO-SIZE[logn]. Theorem 11 is Instead, in [2] it was proved that ⊆ a lower bound on languages without ordering. (FO(wo )+LFP+COUNT) is strictly contained If Theorem 11 could be shown with ordering, it in order-independent≤ P. In the following lower would follow that AGAP is not in FO-SIZE[log n] bound, the graphs are “almost ordered”. They and thus that P strictly contains NSPACE[log n].2 consist of n/4 groups of 4 vertices each and The Ehrenfeucht-Fraïssé games become much there is a given total ordering on the groups. less useful as a proof technique when working with ordered graphs. This is because in a fairly Theorem 13 [2]. There is an order-independent weak ordered language we can express the prop- property of graphs T that is very easy to com- th pute—in a complexity class well below P—but, in erty of a vertex vi that it is the i vertex in the the absence of ordering, is not expressible in first- 2 In fact, it would follow that no P-complete problem is order logic with the addition of the fixed point op- in SPACE[(log n)k] for any k. From this, we could con- erator and counting quantifiers. clude that P-complete problems do not admit the kind of extensive speed- via parallelism that problems Most important complexity classes below P such as reachability, matrix multiplication, and matrix have had their languages without ordering, or inversion do [15]. with some partial orderings, separated [10, 11,

1132 NOTICES OF THE AMS VOLUME 42, NUMBER 10 9, 5, 4]. No such separation has been proved for all the properties describable by first-order the languages (FO(wo )+LFP) and logic plus the partial fixed point operator. (FO(wo )+PFP). In 1991 Abiteboul≤ and Vianu 3. P = PSPACE. explained≤ why by proving Theorem 14 is proved by showing that if two structures G and H are (FO(wo ) + LFP)-equiv- Theorem 14 [1]. The following conditions are alent, then they are (FO(wo ) + ≤PFP)-equivalent equivalent: as well. Thus, ordering is not≤ the problem, but 1. In the absence of ordering, first-order logic Ehrenfeucht-Fraïssé games will not help separate plus the least fixed point operator describes P from PSPACE. all the properties describable by first-order Descriptive complexity reveals a simple but logic plus the partial fixed point operator. elegant view of computation. Nonetheless, the 2. In the presence of ordering, first-order logic basic problems of how to compare different plus the least fixed point operator describes computational resources remain mysterious.

References [12] ———, Relational queries computable in polyno- [1] S. Abiteboul and V. Vianu, Generic computation mial time, Information and Control, 68 (1986), and its complexity, 23rd ACM STOC (1991) 209- 86–104. A preliminary version of this paper ap- 219. peared in 14th ACM STOC Symp. (1982), 147–152. [2] J. Cai, M. Fürer, and N. Immerman, An optimal [13] ———, Languages that capture complexity classes, lower bound on the number of variables for graph SIAM J. Comput. 16, (1987), 760–778. A prelimi- identification, Combinatorica, 12:4 (1992), nary version of this paper appeared in 15th ACM 389–410. STOC Symp. (1983), 347–354. [3] A. Chandra and D. Harel, Structure and com- [14] ———, Nondeterministic space is closed under com- plexity of relational queries, 21st Symp. on Foun- plementation, SIAM J. Comput. 17, (1988), 935–938. dations of Computer Science, 1980, . 333-347. Also appeared in Third Structure in Complexity Also appeared in a revised form in JCSS 25 (1982), Theory Conf. (1988), 112–115. 99–128. [15] ———, Descriptive and computational complexity, [4] K. Etessami and N. Immerman, Tree canonization in Computational Complexity Theory (ed. J. Hart- and transitive closure, IEEE Symp. Logic In Com- manis), Proc. Symp. in Applied Math., vol. 38, put. Sci. (1995), 331–341. Amer. Math. Soc., Providence, RI, 1989, 75–91. [16] , DSPACE[nk] = VAR[k + 1], Sixth IEEE Struc- [5] ———, Reachability and the power of local order- ——— ing, Eleventh Symp. Theoretical Aspects Comp. Sci. ture in Complexity Theory Symp. (1991), 334–340. (1994), 123–135. [17] S. Y. Kuroda, Classes of languages and linear- [6] R. Fagin, Generalized first-order spectra and poly- bounded automata, Information and Control 7 nomial-time recognizable sets, Complexity of Com- (1964), 207–233. putation, (ed. R. Karp), SIAM-AMS Proc. vol. 7, [18] Yiannis N. Moschovakis, Elementary induction on 1974, pp. 27–41. abstract structures, North Holland, 1974. [19] S. Patnaik and N. Immerman, Dyn-FO: A parallel, [7] ———, Monadic generalized spectra, Zeitschr. f. math. Logik und Grundlagen d. Math. 21 (1975), dynamic complexity class, ACM Symp. Principles 89–96. Database Systems (1994), 210–221. [8] M. R. Garey and D. S. Johnson, Computers and [20] W. J. Savitch, Relationships between nondeter- intractability, Freeman, 1979. ministic and deterministic tape complexities, J. [9] E. GrÄdel and G. McColm, On the power of de- Comput. System Sci. 4 (1970), 177–192. terministic transitive closures, Information and [21] R. Szelepcsenyi, The method of forced enumera- Computation 119:1 (1995), 129–135. tion for nondeterministic automata, Acta Infor- [10] N. Immerman, Number of quantifiers is better than matica 26 (1988), 279–284. number of tape cells,” JCSS 22:3 (1981), 65–72. [22] M. Vardi, Complexity of relational query lan- guages, 14th ACM STOC Symp. (1982), 137–146. [11] ———, Upper and lower bounds for first order ex- pressibility, JCSS 25, (1982), 76–98.

OCTOBER 1995 NOTICES OF THE AMS 1133