##
###
Complexity of the first-order theory of almost all finite structures

Etienne Grandjean

1983
*
Information and Control
*

A first-order sentence of a relational type Y is true almost everywhere if the proportion of its models among the structures of type Y and cardinality m tends to 1 when m tends to 0o. It is shown that Tb(Y), the set of sentences (of type Y) true almost everywhere, is complete in PSPACE. Further, various upper and lower bounds of the complexity of this theory are obtained. For example, if the arity of the relation symbols of Y is d) 2 and if Pr Th(Y) is the set of prenex sentences of Th(~9~),
## more »

... n and Pr Th(Y) C DSPACE((n/Iog n) d) Pr Th(~) ~ NTIME(o(n/log n)a). If R is a binary relation symbol and 5 P = JR }, (Th(Y) is the theory of almost all graphs), then Pr Th(Y) ~ NSPACE(o(n/Iog n)). These results are optimal modulo open problems in complexity such as NTIME(T) ~ ? DSPACE(T) and NSPACE(S) = ? DSPACE(S2). Fagin (1976) proved that the theory, called Th(Y), of the first-order sentences (of type Y) true a.e. coincides with the theory the axioms of which say roughly: "any finite substructure (possibly empty) has any possibIe finite extension." This rather natural theory was previously discovered and studied by S. Jaskowski, A. Ehrenfeucht, and C. Ryll-Nardzewski (unpublished results); they proved that this theory has exactly one infinite denumerable model and therefore is consistent, complete, and decidable. case Y contains a non-unary relation symbol, there is no algorithm for deciding if a monadic second-order sentence of type S ~ is true a.e. Blass and Harary (1979) noted that the existence of such a sentence neither true a.e. nor false a.e. is unknown.) Gaifman (1964) introduced Th(Y) in the context of a certain infinite "probability model" and gave a procedure to decide this theory by quantifier elimination (see also Blass and Harary, 1979) . However, the quantifier elimination is not an efficient procedure. Graph theorists are interested in graph properties true a.e. Unfortunately Th(Y) is not a very interesting theory from this point of view because Blass and Harary (1979) proved that important graph properties true a.e. such as rigidity or hamiltonicity are not deducible from first-order properties true a.e. However, we are convinced that Th(Y) deserves to be studied because it is a natural logical theory. In this paper, we show that Th(Y) is <~tog-Complete in PSPACE and then is one of the simplest logical theories. (Quantified Boolean Formulas and the first-order theory of equality (Stockmeyer, 1974; Stockmeyer and Meyer, 1973) are the best-known examples of logical theories complete in PSPACE.) Moreover we give many upper and lower bounds of the complexity of Th(Y), the main bounds of which are described in Table 1 . In Section 3 we exhibit a decision algorithm of Th(Y). The principle of our method is similar to that used by Ferrante and Geiser (1977) in an efficient procedure for the theory of rational order, that is: "only order TABLE 1

doi:10.1016/s0019-9958(83)80043-6
fatcat:bjodas7nw5hrnhccna2h6lvhka