Complexity Results for First-Order Two-Variable Logic with Counting
SIAM journal on computing (Print)
Let C 2 p denote the class of rst order sentences with two variables and with additional quanti ers \there exists exactly (at most, at least) i", for i p, and let C 2 be the union of C 2 p taken over all integers p. We prove that the satis ability problem for C 2 1 sentences is NEXPTIME-complete. This strengthens the results by E. Gr adel, Ph. Kolaitis and M. Vardi 15] who showed that the satis ability problem for the rst order two-variable logic L 2 is NEXPTIME-complete and by E. Gr adel, M.
... to and E. Rosen 16] who proved the decidability of C 2 . Our result easily implies that the satis ability problem for C 2 is in non-deterministic, doubly exponential time. It is interesting that C 2 1 is in NEXPTIME in spite of the fact, that there are sentences whose minimal (and only) models are of doubly exponential size. It is worth noticing, that by a recent result of E. Gr adel, M. Otto and E. Rosen 17], extensions of two-variables logic L 2 by a week access to cardinalities through the H artig (or equicardinality) quanti er is undecidable. The same is true for extensions of L 2 by very week forms of recursion. The satis ability problem for logics with a bounded number of variables has applications in arti cial intelligence, notably in modal logics (see e.g. 22]), where counting comes in the context of graded modalities and in description logics, where counting can be used to express so-called number restrictions (see e.g. 8]).