Relativized Logspace and Generalized Quanti ers over Finite Structures
Georg Gottlob Technische Universitat Wien Abstract
The expressive power of rst order logic with generalized quanti ers over nite ordered structures is studied. The following problem is addressed: Given a family Q of generalized quanti ers expressing a complexity class C, what is the expressive power of rst order logic FO(Q) extended by the quanti ers in Q? From previously studied examples, one would expect that FO(Q) captures LC , i.e., logarithmic space relativized by an oracle in C. We show that this is not always true. However, we derive sucient conditions on complexity class C such that FO(Q) captures LC . These conditions are ful lled by a large number of relevant complexity classes, in particular, for example, by NP. As an application of this result, it follows that rst order logic extended by Henkin quanti ers captures LNP . This answers a question raised by Blass and Gurevich. Furthermore we show that for many families Q of generalized quanti ers (including the family of Henkin quanti ers), each FO(Q)-formula can be replaced by an equivalent FO(Q)-formula with only two occurrences of generalized quanti ers.
1 Introduction and Overview
Generalized quanti ers [26, 27, 8, 7] are devices for expressing higher order properties that are usually not rst order de nable. The expressive power of rst order logic can be augmented by enriching the formalism with generalized quanti ers. The semantics of a generalized quanti er Q is given by the set of strutures on which Q evaluates to true (a formal de nition is given in Section 2). For example, the transitive closure of a graph is not rst order de nable. A generalized quanti er expressing transitive closure can be added to rst order logic. Another example are Henkin quanti ers (also
This is an extended abstract of a full paper available by anonymous ftp (see reference [11]). Work supported by the Christian Doppler Expert Systems Laboratory. Author's Address: Institut fur Informationssysteme, Technische Universitat Wien, Paniglgasse 16, A-1040 Vienna, Austria. Email:
[email protected].
called branching quanti ers) introduced in [18] and studied intensively in the literature. Henkin quanti ers are two-dimensional quanti ers permitting to express subtle dependencies between existentially and universally quanti ed variables that cannot be expressed ?by standard quanti ers. For example the formula 88xx21 99yy21 (x1 ; x2 ; y1 ; y2 ), whose rst item is a Henkin quanti er, expresses that there exist functions f1 and f2 such that for each x1 and x2 , (x1 ; x2 ; f1(x1 ); f2 (x2 )) is true. The salient feature here is that y1 = f (x1 ) does not depend on x2 and y2 = f (x2 ) does not depend on x1 .
The main problem studied.
A logical language L captures a complexity class C if the evaluation problem of closed L-formulas is in C, and if every C-decidable property on nite structures can be expressed by an L-formula. For each family Q of generalized quanti ers, let Q+ denote the set of formulas of the form Qx(x), where Q 2 Q and is a rst order formula. For many relevant families Q of generalized quanti ers, the expressive power over nite ordered structures of Q+ is wellknown, for it was shown that Q+ captures some wellknown complexity class C. For instance, it was shown by Immerman [19] that transitive closure quanti ers over rst order formulas capture NL (nondeterministic logspace), while Blass and Gurevich [2] showed that Henkin quanti ers capture NP. We denote by FO(Q) the formalism obtained by extending rst order logic by a family Q of generalized quanti ers (where positive and negated occurrences of generalized quanti ers are permitted, as well as nesting of all type of quanti ers). Clearly, Q+ is a syntactically rather restricted fragment of FO(Q). The central question we deal with in this paper is the following: If a family Q of generalized quanti ers is such that Q+ captures a complexity class C, what does FO(Q) express? This question is important, since one usually wants to deal with the full language FO(Q) and not only with the fragment Q+. By results of Immerman [19] and Stewart [32, 33]
we know that for a number of particular quanti er families Q, where Q+ captures some complexity class C, it holds that FO(Q) captures LC, i.e., logspace relativized with an oracle in C. It would therefore be interesting to see whether such results hold for arbitary families of quanti ers and complexity classes. In particular, because there are some ogics FO(Q) of unknown expressive power. For instance, the precise expressive power of FO(H), where H is the family of all Henkin quanti ers, was mentioned as an open problem in [2]. As a related question, we investigate the issue of normal forms for rst order logic extended by relativized quanti ers. In particular, we study sucient conditions such that formulas with several occurrences of generalized quanti ers can be replaced by equivalent formulas in some normal form having very few (one or two) occurrences of generalized quanti ers.
Overview of main results.
We tackle the main problem by using methods of complexity theory. Call a complexity class C well-behaved i for each set Q of generalized quanti ers, whenever Q+ captures C, then FO(Q) captures LC . We identify a necessary and sucient condition for the wellbehavedness of a complexity class C which relies only on structural properties of C: Any complexity class C closed under logspace reductions is well-behaved i it is smooth, i.e., i LC (C) = LC . Here LC (C) denotes the set of all problems which are LC many-one reducible to C, i.e., the set of all those problems for which the decision problem can be transformed by an LC Turing machine to some decision problem in C. Smoothness is a simple property, which trivially holds for several well-known complexity classes. However, we are able to show that there exist complexity classes which are not smooth, and therefore not wellbehaved. We prove this by using some recent diagonalization results by Wilson [39]. But we also give an intuitive argument explaining why we cannot expect smoothness in general. Note that smoothness of a complexity class C informally means that nesting of quanti ers does not create additional complexity transcending C. Therefore, classes C that are not smooth are problematic w.r.t quanti er nesting: A formula obtained by the nesting of two generalized quanti ers, each of which corresponding to a decision problem in complexity class C, may itself not be checkable in C. In this sense, we can say that the main problem arising with rst
order logic extended by generalized quanti ers is due to nesting. Since not all classes C are smooth, it makes sense to look for sucient conditions guaranteeing smoothness. In Section 4 of this paper, we present such sucient conditions. The rst conditions, aiming at deterministic complexity classes (or relativized versions of deterministic classes), are rather simple and allow us to conclude that well-known complexity classes such as L, P, Pi for i 1, PSPACE, EXPTIME, EXPSPACE are all smooth and well-behaved. The more dicult task is to deal with nondeterministic classes. By using a re ned version of the so called census technique, we are able to show the following, which constitutes one of the main results of this paper. If C is closed under NP-reductions, under conjunctions, and under marked union, then C is smooth. Fortunately, almost all relevant nondeterministic complexity classes ful ll these conditions and are thus smooth. In particular, it follows that the complexity classes NP, Pi for i 1, NEXPTIME, NEXPSPACE, as well as all dual and relativized versions of these classes are smooth and well-behaved. Moreover, we show that if C is among these nondeterministic classes and if Q+ captures C, for a family Q of generalized quanti ers, then for each formula F in FO(Q) with arbitrary deep nesting of quanti ers, there exists a \ at" formula G in Stewart Normal Form (SNF) such that F and G are equivalent over nite ordered structures. A formula is in SNF i it is in the form 9y (Q1 x1 1 (x1 ; y) ^ :Q2 x2 2 (x2 ; y)) where Q1 ; Q2 2 Q and 1 ; 2 are rst order formulas. We have thus settled the well-behavedness problem for a large number of central complexity classes. In particiular, as a corollary of our results it follows that FO(H), rst order logic with Henkin quanti ers, captures LNP , which solves the open problem by Blass and Gurevich [2]. Note that each formula in FO(H) can be replaced by an equivalent formula in SNF with only two occurrences of Henkin quanti ers. This is a new result on Henkin quanti ers, which is of interest in its own right. We believe that our results help to understand various extensions of rst order logic by generalized quanti ers, to compare the strength of dierent families of quanti ers, and to make reasonable statements about the algorithms needed to implement such logics. Moreover, our normal-form results show once more that by using complexity theory, one may obtain relevant, deeply qualitative statements that are by themselves not of complexity-theoretic nature.
Related work Pioneering work on logic with generalized quanti ers in the context of nite structures was carried-out by Petr Hajek [14], see also the book of Hajek and Havranek [15]. Immerman [19] and Blass and Gurevich [2] studied the expressive power of rst order logic extended by particular families of generalized quanti ers. Immerman considered quanti er families such as deterministic and general transitive closure, whose corresponding complexity classes (deterministic and nondeterministic logspace, respectively) are sub-polynomial and closed under complementation [20]. Blass and Gurevich, on the other hand, studied Henkin quanti ers that correspond to the complexity class NP which is most likely neither polynomial nor closed under complementation. They settled the expressiveness problem for rst order logic with a weaker form of Henkin quanti ers but left the general case open. Their work was the actual starting point of our own investigations. An early paper relating families of generalized quanti ers to oracles was published by Gradel [12]. Several interesting results are stated for the following base logics extended by families of generalized quanti ers: rst order logic (FO), xed-point logic, and fragments of second order logic. One result of Gradel, Theorem 6, seems to be closely related to our present work. Gradel's result states that rst order logic extended by generalized quanti ers expressing a form of second order existential quanti cation captures NP(poly). This complexity class is equal to LNP . This sounds similar to our result stating that FO(H) captures LNP . However, in Gradels setting, only \ at" formulas without nesting of generalized quanti ers are considered. We, on the other hand, admit nesting of generalized quanti ers. Recall that it is precisely nesting which makes life hard. Much of our work is in uenced by results of Stewart [32, 33, 34, 35, 36] who studied the expressive power of FO(Q) for several particular classes Q of generalized quanti ers (for instance, the family of Hamiltonian Path quanti ers) and relates them to computational oracles. The main dierence between Stewart's approach and ours is that Stewart deals with speci c problems (e.g. graph hamiltonicity), while we reason at the more general level of complexity classes, which allows us to obtain more general results. However, some ingenious ideas of Stewart, such as the normal form (SNF), are used and generalized in the present paper. Another important approach dealing with the de-
scriptive complexity of FO(Q) logics is the work of Makowsky and Pnueli [28, 29, 30]. They were the rst developing a systematic theory relating generalized quanti ers to oracle computations. They proved a kind of well-behavedness result for a family of complexity classes C that is yet larger than the one considered here. However, they encountered diculties with quanti er nesting (precisely the type of diculties with nesting we alluded to earlier in this section) and had to depart from the usual notion of oracle-machine and to switch to models of oracle-machines such as those described by Buss [3] having several oracletapes. In the usual Ladner-Lynch model [23], which is adopted in the present paper, an oracle machine has a unique oracle-tape. They succeeded to show deep and interesting results for relativized complexity classes de ned under the dierent oracle-model. In particular, they show that oracle classes are uniformly captured by logics with generalized quanti ers. Uniformity, in this context, means that the translation is independent of the actual de nition of the oracles and of the generalized quanti ers; for a discussion of uniformity, see [30]. It follows from our work (in particular, from Theorem 3.6 in the present paper) that results of this generality cannot be obtained under the usual oracle model. The results of Makowsky and Pnueli and our own results are in a sense complementary. They show very general results at the cost of loosening the model of oracle computation. We show that in a large number of cases | but not in all cases | one can get well-behavedness results even under the usual oracle-model. Dawar [6] studies the problem of logically expressing polynomial time in terms of logics with generalized quanti ers. Among several other interesting results, he proves a kind of well-behavedness result for rst order logic augmented with a xed-point operator. We will comment on xed point logic in Section 5. Important recent work on generalized quanti ers somewhat less related to the topic of the present paper includes the work of Hella [16, 17] on de nability hierarchies of generalized quanti ers, and of Kolaitis and Vaananen [22] who de ne speci c version of pebble games that characterize in nitary logic L!1! extended with generalized quanti ers. These papers and many others indicate that there is a vivid interest in generalized quanti ers, and, in particular, in understanding the complexity and expressive power of logics extended by families of generalized quanti ers.
2 Preliminaries and Basic De nitions 2.1 Generalized Quanti ers
A signature = hR1 ; : : : ; Rk ; c1 ; : : : ; cl i is a nite sequence of relation and constant symbols. A nite structure A = hjA; R1A ; : : : ; RkA ; cA1 ; : : : ; cAl i consists of a nite universe jAj, and interpretations of the relation and constant symbols in over jAj. The set of all nite ordered structures over a given signature is denoted by STRUC ( ). Throughout the paper we assume that the universe jAj of any nite structure A is an initial segment f0; : : : ; n ? 1g of the set IN of natural numbers such that n 1. Moreover, we assume that all structures are ordered, i.e., their signature contains a binary relation symbol Succ which is always interpreted as the usual successor relation over the natural numbers restricted to the actual universe. (Instead of the successor relation, we could also take a linear ordering < on the universe. But working with successor relations is more general, since Succ is rst-order de nable from