Model Checking Positive Equality-free FO:
Boolean Structures and Digraphs of Size Three
We study the model checking problem, for fixed structures , over positive equality-free first-order logic – a natural generalisation of the non-uniform quantified constraint satisfaction problem . We prove a complete complexity classification for this problem when ranges over 1.) boolean structures and 2.) digraphs of size (less than or equal to) three. The former class displays dichotomy between and -complete, while the latter class displays tetrachotomy between , -complete, -complete and -complete.
The model checking problem over a logic – here always a fragment of first-order logic () – takes as input a structure (model) and a sentence of , and asks whether . When is the existential conjunctive positive fragment of , -, the model checking problem is equivalent to the much-studied constraint satisfaction problem (CSP). Similarly, when is the (quantified) conjunctive positive fragment of , -, the model checking problem is equivalent to the well-studied quantified constraint satisfaction problem (QCSP). In this manner, the QCSP is the generalisation of the CSP in which universal quantification is restored to the mix. In both cases it is essentially irrelevant whether or not equality is permitted in the sentences, as it may be propagated out by substitution. Much work has been done on the parameterisation of these problems by the structure – that is, where is fixed and only the sentence is input. It is conjectured  that the ensuing problems attain only the complexities and -complete. This may appear surprising given that 1.) so many natural problems may be expressed as CSPs (see, e.g., myriad examples in ) and 2.) itself does not have this ‘dichotomy’ property (assuming ) . While this dichotomy conjecture remains open, it has been proved for certain classes of (e.g., for structures of size at most three  and for undirected graphs ) The like parameterisation of the QCSP is also well-studied, and while no overarching polychotomy has been conjectured, only the complexities , -complete and -complete are known to be attainable (for trichotomy results on certain classes see [1, 12], as well as the dichotomy for boolean structures, e.g., in ).
In previous work, , we have studied the model checking problem, parameterised by the structure, for various fragments of . Various complexity classifications are obtained and the case is put that the only interesting fragment, other than those that give rise to the CSP and the QCSP is positive equality-free , - (the classification for the remaining fragments in near-trivial). This model checking problem may be seen as the generalisation of the QCSP in which disjunction is returned to the mix – although note that the absence of equality is here important.
In , some general hardness results are given for the model checking problem, parameterised by the structure , over positive equality-free , which we denote -. In the case where ranges over boolean digraphs, a full classification – a dichotomy – is given. In this paper, we extend this result in two directions. Firstly, in Section 3, we prove, for boolean structures , that - is either in or is -complete. A similar result, but with different classification criteria is known for , i.e. - (see, e.g., ). Secondly, in Section 4, we prove, for digraphs of size (less than or equal to) three, that - is either in , is -complete, is -complete or is -complete. While the classification criterion for the boolean case is fairly simple, the criteria for digraphs of size three are far from obvious (our result is achieved through a series of ad hoc methods). This suggests that, from the viewpoint of complexity theory, the class of model checking problems over - is pleasingly rich.
Let be a -structure, for some relational signature , over universe of cardinality . Let - be the positive equality-free fragment of first-order logic (). Define the problem - to have as input a sentence of -, and to have as yes-instances those sentences such that . While - is the principal fragment involved in this paper, we will sometimes have recourse to the equality-free fragments -, - and -,111We imagine the definitions of these fragments to be clear from their notation: for example, - is the fragment of involving no instances of negation, universal quantification or equality. together with their respective model checking problems.
We assume that all sentences of - are in prenex form, since they may be thus translated in logarithmic space. We note that -, which contains , is always in , by an inward evaluation procedure of the quantified variables (see ). Similarly, -, which contains , is always in . Henceforth all proofs of -completeness for - will include only proof of hardness. The reductions used will involve only straightforward substitutions, and will always be logspace many-to-one.
3 Boolean Structures
Let be a boolean structure, that is , where we consider normalised as . Relations of that contain no tuples (respectively, all tuples) are of little interest from the viewpoint of complexity theory, since they may be substituted in instances of - by the boolean false (respectively, true) without affecting whether . Such substitutions may be carried out in logarithmic space, and we note here that, if each relation of is either empty or contains all tuples, then - is in , since evaluation is equivalent to the Boolean Sentence Value Problem  (note that this would be the case were to be ). Henceforth, in this section, we work under the assumption
that does not contain any relations that are either empty or contain all tuples.
Define the canonical relation (note the subscript) to be (where is the interpretation of in ). The arity of is the sum of the arities of . effectively encodes all the relations of ; note that the stipulation that contains no empty relations is essential to its definition.
In a boolean structure , whose canonical relation of arity is , is termed a -canon and a -canon if, for all partitions of ,
where and are with the variables of substituted by and , respectively (note that and contain free variables, and the statement should hold for all their instantiations). In the parlance of, e.g., , and being -canon and -canon, respectively, is equivalent to dominating . We may term a -canon and a -canon in the obvious symmetric manner. The following is the principle result of this section.
Theorem 1 (Dichotomy).
Let be a boolean structure. If contains a -canon (and a -canon) then - is in , otherwise it is -complete.
Let and be the boolean structures involving the single ternary relations and , respectively. It may be verified from our classification that - is in , while - is -complete.
Let be a boolean structure. If contains a -canon (and a -canon) then - is in .
In , and w.l.o.g., assume that is a -canon and is a -canon. For in -, we claim that iff where is the quantifier-free sentence obtained from by instantiating all universal variables as and all existential variables as . The evaluation of on is equivalent to the Boolean Sentence Value Problem, known to be in . Our claim follows straight from the definition together with the positivity of . Let us consider this briefly. We may assume that all universal variables of , in turn, are set to , since any existential witnesses to are also witnesses to . Thereafter, we may assume that all remaining (existential) variables are set to , because acts as a witness to everything that does. ∎
Let be a boolean structure. If does not contain a -canon, then - is -complete.
The proof of this proposition will follow from the next three lemmas.
3.1 -complete Cases
A boolean digraph is a boolean structure over a single binary relation . Let and be boolean digraphs with edge sets and , respectively. The following observation will be of use to us.
Both - and - are -complete.
For , we use a reduction from the problem -, where is the boolean structure with a single ternary relation . This problem is a generalisation of the quantified not-all-equal -satisfiability problem – -, a.k.a. – well-known to be -complete (see ). Let be an input for -. Let be built from by substituting all instances of by . It is easy to see that iff , and the result follows.
For , we reduce from the complement of -, which we now know to be -complete, and use the fact that (see ). Let be an input for -. Generate from by swapping all instances of and , and swapping all instances of and . By de Morgan’s laws we may derive that iff , and the result follows. ∎
Let be a boolean structure s.t. both and . Then - is -complete.
It follows from that contains some tuple . Let be the partition of s.t. iff . Create from by identifying the variables of and as and , respectively. Setting we note that defines . The result now follows via the obvious reduction from -. ∎
Let be a boolean structure s.t. both and . Then - is -complete.
It follows from that fails to contain some tuple . Let be the partition of s.t. iff . Create from by identifying the variables of and as and , respectively. Setting we note that defines . The result now follows via the obvious reduction from -. ∎
Let be a boolean structure s.t. either
but , or
and contains no -canon. Then - is -complete.
We prove the first case; the second follows by symmetry. Knowing that is not a -canon, we can derive the existence of some partition of s.t. but , where is some -tuple instantiation of the elements of . We further partition into according to whether the corresponding instantiation in is a or . Note that each of , and is non-empty. Create from by identifying the variables in , and as , and , respectively. Note that each of , and appears free in , which is s.t.
Consider . It follows that but . Now define . defines , and the result now follows via the obvious reduction from -. ∎
4 Digraphs of size three
Let be a digraph, that is a relational structure involving a single binary relation . For a digraph , let be the complement digraph over the same vertex set but with . The following observation, essentially an extension of the second part of Lemma 4, will be of great use to us.
Let be a digraph s.t. - is in (respectively, is -complete), then - is in (respectively, is -complete). Furthermore, if - is -complete (respectively, is -complete), then - is -complete (respectively, is -complete).
First, recall that both and are closed under complementation (see ). Now, consider a (prenex) sentence of -. By de Morgan’s laws, it is clear that is logically equivalent to the sentence where is derived from by I.) swapping all instances of and , II.) swapping all instances of and and III.) negating all atoms (in the quantifer-free part). Let be derived from in a similar manner, but without the execution of part III (negating the atoms). It is clear that, for any digraph ,
We reduce the complement of the problem - to - by the mapping . The results all follow from (the contrapositive of) . ∎
In a digraph , a vertex is termed a -canon if, for all , and . Dually, a vertex is termed a -canon if, for all , . Note that these definitions are consistent, on boolean digraphs, with those given in Section 3 (though they are given in a rather liberal notation). Being a -canon (respectively, -canon) is equivalent to, in the parlance of, e.g., , being dominated by (respectively, dominating)222Although this is different from the graph-theoretic notion of a dominating vertex, e.g., as used in . every vertex of . It may be verified that a vertex is a -canon (respectively, -canon) iff is a -canon (respectively, -canon). However, our definitions are motivated primarily by the following.
Let be a digraph and let be a (prenex) sentence of -.
If is a -canon, then iff , where is obtained from by instantiating each of the universal variables as the vertex . Consequently, - is in .
If is a -canon, then iff , where is obtained from by instantiating each of the existential variables as the vertex . Consequently, - is in .
If are -canon and -canon, respectively, then iff , where is obtained from by instantiating each of the universal variables as and the existential variables as . Consequently, - is in .
Recall that the Boolean Sentence Value Problem is in . All results follow straight from the definitions since is positive. ∎
While the presence of both a -canon and a -canon is a sufficient condition for tractability of -, we will see later that it is not necessary. A vertex is isolated if, for all , ; an isolated vertex is a -canon.
For a digraph , let and be the symmetric and transitive closures of , respectively. Let be the subdigraph induced by the double edges of ; that is, iff and (whereas iff or ). The following is a another basic observation.
Let be a digraph. -, - and - are all polynomial-time reducible to -.
We may reduce - to - by substituting instances of in an input in the former by in the latter. For the method is similar, but the substitution is now by .
For , assume is of size . For , if there is a path in from to , then there is a path from to of length . Any instances of in an input for - should be converted to
in an instance of -. ∎
For a digraph and , define to be the induced subdigraph of on vertex set . We will also need the following result.
Let be vertices that satisfy, for all , and . Then - -.
Intuitively, FO logic without equality can not distinguish between and , and so can not tell if only one of them is there. More formally, one observes that the surjective homomorphism given by together with the identity on has the property that it preserves negated (as well as positive) atoms. For full details see, e.g, the Homomorphism Theorem in . ∎
Let , , , , and be the complete antireflexive digraphs on , and vertices and complete reflexive digraphs on , and vertices, respectively. Let , , and denote the antireflexive undirected - and -paths and the antireflexive directed - and -paths, respectively. The superscripted s and s indicate vertices with or without self-loops, respectively, whence the meaning of, say, as a directed -path whose first vertex is the only self-loop, should become clear. We will also build non-connected digraphs from the disjoint union of certain of these. Note that our digraphs may have multiple notations under our various conventions, e.g. , and (although ).
The following basic results will form the backbone of our tetrachotomy.
and . Are proved in Lemma 4.
. - contains the problem -, a.k.a. , as a special instance. The latter is well-known to be -complete (see ).
. Follows from via Lemma 8.
. For , note that the vertex of is a -canon and the problem - is in by Lemma 9. For completeness, note that the problems - and - coincide (that is, and agree on all sentences of - – see ). The -complete problem not-all-equal -satisfiability may be reduced to --, as in the second part of Lemma 4, so -hardness of the superproblem - of - immediately follows.
and . -completeness of - and - now follows from Lemma 11 since and (respectively, and ) agree on all sentences of -. ∎
The two digraphs of size clearly give rise to - in . The classification for digraphs of size may be read from that for boolean structures (it is also explicitly in ) as a dichotomy between those - that are in , and those that are -complete. We are now in a position to work through the main result of this section.
Theorem 13 (Tetrachotomy).
Let be a digraph of size . Then - is either in , is -complete, is -complete or is -complete.
We will prove this theorem through exhaustive consideration of a variety of cases. We may refer back to the known cases of Proposition 12 without citation.
4.1 Digraphs that are either non-connected, antireflexive or reflexive
Let be a non-connected digraph. We consider two cases.
contains an isolated vertex . Since is a -canon, we know - is in (by Lemma 9). It is complete if the other component is non-empty and antireflexive, since then is (see Lemma 10). If the other component is empty, then and - is in (there are no yes-instances). Suppose now that the other component contains a self-loop at . Since is an isolated vertex and a -canon, we know that iff (where is with the universal variables evaluated to ), but now it is clear from the self-loop at that iff (where is with the remaining (existential) variables evaluated to ). It follows that - is also in in this case.
contains no isolated vertex. In this case is either or and - is -complete, by Lemma 10.
Connected antireflexive digraphs.
If is antireflexive and connected, then is either or , and - is -complete by Lemma 10.
Reflexive digraphs’ complements are antireflexive, and may be classified, through Lemma 8, according to the previous two paragraphs.
4.2 Connected digraphs with one or two self-loops that are subdigraphs of
One self-loop at end.
One self-loop in the middle.
For , or , drawn below, the problem - is in . This is due to these agreeing on all sentences of - with those respective digraphs on two vertices drawn to their right (see Lemma 11). The result now follows from Lemma 9 as the vertices and on the right-hand digraphs are -canon and -canon, respectively.
When is either of the following or , the vertices and are -canon and -canon, respectively. It follows from Lemma 9 that the problem - is in in both cases.
We have only one more digraph to consider in this paragraph: , drawn below with its complement.
Two self-loops, none in the middle.
Two self-loops, one in the middle.
Firstly, we consider the digraph and four of its subdigraphs.
For , or , is a -canon and is a -canon. It follows from Lemma 9 that - is in .
For or , we can only say that is a -canon ( is not actually a -canon). For in -, let be with the universal variables evaluated to and let be with the remaining (existential) variables evaluated to . We know from Lemma 9 that iff . It is easy to see that iff