Skip to main content
Springer Nature - PMC COVID-19 Collection logoLink to Springer Nature - PMC COVID-19 Collection
. 2020 Jun 24;12098:149–162. doi: 10.1007/978-3-030-51466-2_13

ASNP: A Tame Fragment of Existential Second-Order Logic

Manuel Bodirsky 5,, Simon Knäuer 5, Florian Starke 5
Editors: Marcella Anselmo8, Gianluca Della Vedova9, Florin Manea10, Arno Pauly11
PMCID: PMC7309507

Abstract

Amalgamation SNP (ASNP) is a fragment of existential second-order logic that strictly contains binary connected MMSNP of Feder and Vardi and binary connected guarded monotone SNP of Bienvenu, ten Cate, Lutz, and Wolter; it is a promising candidate for an expressive subclass of NP that exhibits a complexity dichotomy. We show that ASNP has a complexity dichotomy if and only if the infinite-domain dichotomy conjecture holds for constraint satisfaction problems for first-order reducts of binary finitely bounded homogeneous structures. For such CSPs, powerful universal-algebraic hardness conditions are known that are conjectured to describe the border between NP-hard and polynomial-time tractable CSPs. The connection to CSPs also implies that every ASNP sentence can be evaluated in polynomial time on classes of finite structures of bounded treewidth. We show that the syntax of ASNP is decidable. The proof relies on the fact that for classes of finite binary structures given by finitely many forbidden substructures, the amalgamation property is decidable.

Introduction

Feder and Vardi in their groundbreaking work [15] formulated the famous dichotomy conjecture for finite-domain constraint satisfaction problems, which has recently been resolved [11, 26]. Their motivation to study finite-domain CSPs was the question which fragments of existential second-order logic might exhibit a complexity dichotomy in the sense that every problem that can be expressed in the fragment is either in P or NP-complete. Existential second-order logic without any restriction is known to capture NP [14] and hence does not have a complexity dichotomy by an old result of Ladner [24]. Feder and Vardi proved that even the fragments of monadic SNP and monotone SNP do not have a complexity dichotomy since every problem in NP is polynomial-time equivalent to a problem that can be expressed in these fragments. However, the dichotomy for finite-domain CSPs implies that monotone monadic SNP (MMSNP) has a dichotomy, too [15, 23].

MMSNP is also known to have a tight connection to a certain class of infinite-domain CSPs [7]: an MMSNP sentence is equivalent to a connected MMSNP sentence if and only if it describes an infinite-domain CSP. Moreover, every problem in MMSNP is equivalent to a finite disjunction of connected MMSNP sentences. The infinite structures that appear in this connection are tame from a model-theoretic perspective: they are reducts of finitely bounded homogeneous structures (see Sect. 4.1). CSPs for such structures are believed to have a complexity dichotomy, too; there is even a known hardness condition such that all other CSPs in the class are conjectured to be in P [8]. The hardness condition can be expressed in several equivalent forms [1, 2].

In this paper we investigate another candidate for an expressive logic that has a complexity dichotomy. Our minimum requirement for what constitutes a logic is relatively liberal: we require that the syntax of the logic should be decidable. The same requirement has been made for the question whether there exists a logic that captures the class of polynomial-time solvable decision problems (see, e.g., [19, 20]). The idea of our logic is to modify monotone SNP so that only CSPs for model-theoretically tame structures can be expressed in the logic; the challenge is to come up with a definition of such a logic which has a decidable syntax. We would like to require that the (universal) first-order part of a monotone SNP sentence describes an amalgamation class. We mention that the Joint Embedding Property (JEP), which follows from the Amalgamation Property (AP), has recently been shown to be undecidable [10]. In contrast, we use the fact that the AP for binary signatures is decidable (Sect. 5). We call our new logic Amalgamation SNP (ASNP). This logic contains binary connected MMSNP; it also contains the more expressive logic of binary connected guarded monotone SNP. Guarded monotone SNP (GMSNP) has been introduced in the context of knowledge representation [3] (see Sect. 6). We show that ASNP has a complexity dichotomy if and only if the infinite-domain dichotomy conjecture holds for constraint satisfaction problems for first-order reducts of binary finitely bounded homogeneous structures. In particular, every problem that can be expressed in ASNP is a CSP for some countably infinite Inline graphic-categorical structure Inline graphic. In Sect. 7 we present an example application of this fact: every problem that can be expressed in one of these logics can be solved in polynomial time on instances of bounded treewidth.

Constraint Satisfaction Problems

Let Inline graphic be structures with a finite relational signature Inline graphic; each symbol Inline graphic is equipped with an arity Inline graphic. A function Inline graphic is called a homomorphism from Inline graphic to Inline graphic if for every Inline graphic and Inline graphic we have Inline graphic; in this case we write Inline graphic. We write Inline graphic for the class of all finite Inline graphic-structures Inline graphic such that Inline graphic.

Example 1

If Inline graphic is the 3-clique, i.e., the complete undirected graph with three vertices, then Inline graphic is the graph 3-colouring problem, which is NP-complete [18].

Example 2

If Inline graphic then Inline graphic is the digraph acyclicity problem, which is in P.

Example 3

If Inline graphic for Inline graphic then Inline graphic is the Betweenness problem, which is NP-complete [18].

A homomorphism h from Inline graphic to Inline graphic is called an embedding of Inline graphic into Inline graphic if h is injective and for every Inline graphic and Inline graphic we have Inline graphic if and only if Inline graphic; in this case we write Inline graphic. The union of two Inline graphic-structures Inline graphic is the Inline graphic-structure Inline graphic with domain Inline graphic and the relation Inline graphic for every Inline graphic. The intersection Inline graphic is defined analogously. A disjoint union of Inline graphic and Inline graphic is the union of isomorphic copies of Inline graphic and Inline graphic with disjoint domains. As disjoint unions are unique up to isomorphism, we usually speak of the disjoint union of Inline graphic and Inline graphic, and denote it by Inline graphic. A structure is connected if it cannot be written as a disjoint union of at least two structures with non-empty domain. A class of structures Inline graphic is closed under inverse homomorphisms if whenever Inline graphic and Inline graphic homomorphically maps to Inline graphic we have Inline graphic. If Inline graphic is a finite relational signature, then it is well-known and easy to see [5] that Inline graphic for a countably infinite Inline graphic-structure Inline graphic if and only if Inline graphic is closed under inverse homomorphisms and disjoint unions.

Monotone SNP

Let Inline graphic be a finite relational signature, i.e., Inline graphic is a set of relation symbols R, each equipped with an arity Inline graphic. An SNP (Inline graphic-) sentence is an existential second-order (Inline graphic-) sentence with a universal first-order part, i.e., a sentence of the form

graphic file with name M64.gif

where Inline graphic is a quantifier-free formula over the signature Inline graphic. We make the additional convention that the equality symbol, which is usually allowed in first-order logic, is not allowed in Inline graphic (see [15]). We write Inline graphic for the class of all finite models of Inline graphic.

Example 4

Inline graphic for the SNP Inline graphic-sentence Inline graphic given below.

graphic file with name M73.gif

A class Inline graphic of finite Inline graphic-structures is said to be in SNP if there exists an SNP Inline graphic-sentence Inline graphic such that Inline graphic; we use analogous definitions for all logics considered in this paper. We may assume that the quantifier-free part of SNP sentences is written in conjunctive normal form, and then use the usual terminology (clauses, literals, etc).

Definition 1

An SNP Inline graphic-sentence Inline graphic with quantifier-free part Inline graphic and existentially quantified relation symbols Inline graphic is called

  • monotone if each literal of Inline graphic with a symbol from Inline graphic is negative, i.e., of the form Inline graphic for Inline graphic.

  • monadic if all the existentially quantified relations are unary.

  • connected if each clause of Inline graphic is connected, i.e., the following Inline graphic-structure Inline graphic is connected: the domain of Inline graphic is the set of variables of the clause, and Inline graphic if and only if Inline graphic is a disjunct of the clause.

The SNP sentence from Example 4 is monotone, but not monadic, and it can be shown that there does not exist an equivalent MMSNP sentence [4].

Theorem 1

([5]). Every sentence in connected monotone SNP describes a problem of the form Inline graphic for some relational structure Inline graphic. Conversely, for every structure Inline graphic, if Inline graphic is in SNP then it is also in connected monotone SNP.

Amalgamation SNP

In this section we define the new logic Amalgamation SNP (ASNP). We first revisit some basic concepts from model theory.

The Amalgamation Property

Let Inline graphic be a finite relational signature and let Inline graphic be a class of Inline graphic-structures. We say that Inline graphic is finitely bounded if there exists a finite set of finite Inline graphic-structures Inline graphic such that Inline graphic if and only if no structure in Inline graphic embeds into Inline graphic; in this case we also write Inline graphic. Note that Inline graphic is finitely bounded if and only if there exists a universal Inline graphic-sentence Inline graphic (which might involve the equality symbol) such that for every finite Inline graphic-structure Inline graphic we have Inline graphic if and only if Inline graphic. We say that Inline graphic has

  • the Joint Embedding Property (JEP) if for all structures Inline graphic there exists a structure Inline graphic that embeds both Inline graphic and Inline graphic.

  • the Amalgamation Property (AP) if for any two structures Inline graphic such that Inline graphic induce the same substructure in Inline graphic and in Inline graphic (a so-called amalgamation diagram) there exists a structure Inline graphic and embeddings Inline graphic and Inline graphic such that Inline graphic for all Inline graphic.

Note that since Inline graphic is relational, the AP implies the JEP. A class of finite Inline graphic-structures which has the AP and is closed under induced substructures and isomorphisms is called an amalgamation class.

The age of Inline graphic is the class of all finite Inline graphic-structures that embed into Inline graphic. We say that Inline graphic is finitely bounded if Inline graphic is finitely bounded. A relational Inline graphic-structure Inline graphic is called homogeneous if every isomorphism between finite substructures of Inline graphic can be extended to an automorphism of Inline graphic. Fraïssé’s theorem implies that for every amalgamation class Inline graphic there exists a countable homogeneous Inline graphic-structure Inline graphic with Inline graphic; the structure Inline graphic is unique up to isomorphism, also called the Fraïssé-limit of Inline graphic. Conversely, it is easy to see that the age of a homogeneous Inline graphic-structure is an amalgamation class. A structure Inline graphic is called a reduct of a structure Inline graphic if Inline graphic is obtained from Inline graphic by restricting the signature. It is called a first-order reduct of Inline graphic if Inline graphic is obtained from Inline graphic by first expanding by all first-order definable relations, and then restricting the signature. An example of a first-order reduct of Inline graphic is the structure Inline graphic from Example 3.

Defining Amalgamation SNP

As we have mentioned in the introduction, the idea of our logic is to require that a certain class of finite structures associated to the first-order part of an SNP sentence is an amalgamation class. We then use the fact that for binary signatures, the amalgamation property is decidable (Sect. 5).

Definition 2

Let Inline graphic be a finite relational signature. An Amalgamation SNP Inline graphic-sentence is an SNP sentence Inline graphic of the form Inline graphic where

  • Inline graphic are binary;

  • Inline graphic is a conjunction of Inline graphic-formulas and of conjuncts of the form Inline graphic where Inline graphic and Inline graphic is a Inline graphic-formula;

  • the class of Inline graphic-reducts of the finite models of Inline graphic is an amalgamation class.

Note that ASNP inherits from SNP the restriction that equality symbols are not allowed. Also note that Amalgamation SNP sentences are necessarily monotone. This implies in particular that the class of Inline graphic-reducts of the finite models of Inline graphic is precisely the class of finite Inline graphic-structures that satisfy the conjuncts of Inline graphic that are Inline graphic-formulas (i.e., that do not contain any symbol from Inline graphic).

Example 5

The monotone SNP sentence from Example 4 describing Inline graphic is in ASNP. The problem Inline graphic from Example 3 can be expressed by the ASNP sentence

graphic file with name M176.gif

Note that every finite-domain CSP can be expressed in ASNP; this can be seen similarly as in the argument of Feder and Vardi that finite-domain CSPs can be expressed in MMSNP [15].

Then the class of finite models of the first-order part of Inline graphic has the JEP, and since equality is not allowed in SNP the class is even closed under disjoint unions; it follows that also Inline graphic is closed under disjoint unions. It can be shown as in the proof of Theorem 1 that every Amalgamation SNP sentence can be rewritten into an equivalent connected Amalgamation SNP sentence.

ASNP and CSPs

We present the link between ASNP and infinite-domain CSPs.

Theorem 2

For every ASNP Inline graphic-sentence Inline graphic there exists a first-order reduct Inline graphic of a binary finitely bounded homogeneous structure such that Inline graphic.

Proof

Let Inline graphic be the set of existentially quantified relation symbols of Inline graphic. Let Inline graphic, for a quantifier-free formula Inline graphic in conjunctive normal form, be the first-order part of Inline graphic. Let Inline graphic be the class of Inline graphic-reducts of the finite models of Inline graphic; by assumption, Inline graphic is an amalgamation class. Moreover, Inline graphic is finitely bounded because it is the class of models of a universal Inline graphic-sentence. Let Inline graphic be the Fraïssé-limit of Inline graphic; then Inline graphic is a finitely bounded homogeneous structure. Let Inline graphic be the Inline graphic-structure which is the first-order reduct of the structure Inline graphic where the relation Inline graphic for Inline graphic is defined as follows: if Inline graphic are all the Inline graphic-formulas such that Inline graphic contains the conjunct Inline graphic for all Inline graphic, then the first-order definition of S is given by Inline graphic.

Claim 1

If Inline graphic is a finite Inline graphic-structure such that Inline graphic, then Inline graphic.

Let Inline graphic be a homomorphism. Let Inline graphic be the Inline graphic-expansion of Inline graphic where Inline graphic of arity l denotes Inline graphic. Then Inline graphic satisfies Inline graphic: to see this, let Inline graphic and let Inline graphic be a conjunct of Inline graphic. Since Inline graphic we have in particular that Inline graphic and so there must be a disjunct Inline graphic of Inline graphic such that Inline graphic. Then one of the following cases applies.

  • Inline graphic is a Inline graphic-literal and hence must be negative since Inline graphic is a monotone SNP sentence. In this case Inline graphic implies Inline graphic since h is a homomorphism.

  • Inline graphic is a Inline graphic-literal. Then by the definition of Inline graphic we have that Inline graphic if and only if Inline graphic.

Hence, Inline graphic. Since the conjunct Inline graphic of Inline graphic and Inline graphic were arbitrarily chosen, we have that Inline graphic. Hence, Inline graphic satisfies Inline graphic.

Claim 2

If Inline graphic is a finite Inline graphic-structure such that Inline graphic, then Inline graphic.

If Inline graphic has a Inline graphic-expansion Inline graphic that satisfies Inline graphic, then there exists an embedding from the Inline graphic-reduct Inline graphic of Inline graphic into Inline graphic by the definition of Inline graphic. This embedding is in particular a homomorphism from Inline graphic to Inline graphic.   Inline graphic

Theorem 3

Let Inline graphic be a first-order reduct of a binary finitely bounded homogeneous structure Inline graphic. Then Inline graphic can be expressed in ASNP.

Proof

Let Inline graphic be the signature of Inline graphic and Inline graphic the signature of Inline graphic. We may assume without loss of generality that Inline graphic contains a binary relation E that denotes the equality relation; it is easy to see that an expansion by the equality relation preserves finite boundedness. Consider the structure Inline graphic with the domain Inline graphic where

graphic file with name M271.gif

To show that Inline graphic is homogeneous, let h be an isomorphism between finite substructures of Inline graphic. Let Inline graphic be the set of all first entries of elements of the first structure. Define Inline graphic by picking for Inline graphic an element of the form Inline graphic and defining by Inline graphic. This is well-defined: if h is defined on Inline graphic and on Inline graphic, then Inline graphic, and hence Inline graphic. The same consideration for Inline graphic shows that g is a bijection, and in fact an isomorphism between finite substructures of Inline graphic. By the homogeneity of Inline graphic there exists an extension Inline graphic of g. For each Inline graphic pick a permutation Inline graphic of Inline graphic that extends the bijection given by Inline graphic. Then the map Inline graphic given by Inline graphic is an automorphism of Inline graphic that extends h. Since Inline graphic is finitely bounded, there exists a universal Inline graphic-formula Inline graphic such that Inline graphic. Note that Inline graphic might contain the equality symbol (which we do not allow in SNP sentences). Let Inline graphic be the formula obtained from Inline graphic by

  • replacing each occurrence of the equality symbol by the symbol Inline graphic;

  • joining conjuncts that imply that E denotes an equivalence relation;

  • joining for every Inline graphic of arity n the conjunct
    graphic file with name M303.gif
    (implementing indiscernibility of identicals for the relation E).

We claim that Inline graphic. To see this, let Inline graphic be a finite Inline graphic-structure. If Inline graphic satisfies Inline graphic, then every induced substructure Inline graphic of Inline graphic with the property that Inline graphic implies that at most one of x and y is an element of A, satisfies Inline graphic, and hence is a substructure of Inline graphic. This in turn means that Inline graphic is in Inline graphic. The implications in this statement can be reversed which shows the claim.

Let Inline graphic be the formula obtained from Inline graphic as follows. For each Inline graphic let Inline graphic be the first-order definition of Inline graphic in Inline graphic; since Inline graphic is homogeneous we may assume that Inline graphic is quantifier-free [21]. Furthermore, we may assume that Inline graphic is given in conjunctive normal form. Let k be the arity of S. We then add for each conjunct Inline graphic of Inline graphic the conjunct

graphic file with name M327.gif

By construction, the sentence Inline graphic obtained from Inline graphic by quantifying all relation symbols of Inline graphic is an ASNP Inline graphic-sentence.   Inline graphic

Corollary 1

ASNP has a complexity dichotomy if and only if the infinite-domain dichotomy conjecture is true for first-order reducts of binary finitely bounded homogeneous structures.

Deciding Amalgamation

In this section we show how to algorithmically decide whether a given existential second-order sentence is in ASNP. The following is a known fact in the model theory of homogeneous structures (the first author has learned the fact from Gregory Cherlin), but we are not aware of any published proof in the literature.

Theorem 4

Let Inline graphic be a finite set of finite binary relational Inline graphic-structures. There is an algorithm that decides whether Inline graphic has the amalgamation property.

Proof

Let m be the maximal size of a structure in Inline graphic, and let Inline graphic be the number of isomorphism types of two-element structures in Inline graphic. It is well-known and easy to prove that Inline graphic has the amalgamation property if and only if it has the so-called 1-point amalgamation property, i.e., the amalgamation property restricted to diagrams Inline graphic where Inline graphic. Suppose that Inline graphic is such an amalgamation diagram without amalgam. Let Inline graphic. Let Inline graphic and Inline graphic. Let Inline graphic be a Inline graphic-structure Inline graphic with domain Inline graphic such that Inline graphic and Inline graphic are substructures of Inline graphic. Since Inline graphic by assumption is not an amalgam for Inline graphic, there must exist Inline graphic such that the substructure of Inline graphic induced by Inline graphic embeds a structure from Inline graphic.

Note that the number of such Inline graphic-structures Inline graphic is bounded by Inline graphic since they only differ by the substructure induced by p and q. So let Inline graphic be a list of sets witnessing that all of these structures Inline graphic embed a structure from Inline graphic. Let Inline graphic be the substructure of Inline graphic induced by Inline graphic and Inline graphic be the substructure of Inline graphic induced by Inline graphic. Suppose for contradiction that Inline graphic has an amalgam Inline graphic; we may assume that this amalgam is of size at most Inline graphic. Depending on the two-element structure induced by Inline graphic in Inline graphic, there exists an Inline graphic such that the structure induced by Inline graphic in Inline graphic embeds a structure from Inline graphic, a contradiction.    Inline graphic

Corollary 2

There is an algorithm that decides for a given existential second-order sentence Inline graphic whether it is in ASNP.

Proof

Let k be the maximal number of variables per clause in the first-order part Inline graphic of Inline graphic, and let Inline graphic be the set of all structures at most the elements Inline graphic that do not satisfy Inline graphic. Then Inline graphic and the result follows from Theorem 2.   Inline graphic

Guarded Monotone SNP

In this section we revisit an expressive generalisation of MMSNP introduced by Bienvenu, ten Cate, Lutz, and Wolter [3] in the context of ontology-based data access, called guarded monotone SNP (GMSNP). It is equally expressive as the logic MMSNPInline graphic introduced by Madelaine [25]1. We will see that every GMSNP sentence is equivalent to a finite disjunction of connected GMSNP sentences (Proposition 1), each of which lies in ASNP if the signature is binary (Theorem 5).

Definition 3

A monotone SNP Inline graphic-sentence Inline graphic with existentially quantified relations Inline graphic is called guarded if each conjunct of Inline graphic can be written in the form

graphic file with name M394.gif
  • Inline graphic are atomic Inline graphic-formulas, called body atoms,

  • Inline graphic are atomic Inline graphic-formulas, called head atoms,

  • for every head atom Inline graphic there is a body atom Inline graphic such that Inline graphic contains all variables from Inline graphic (such clauses are called guarded).

We do allow the case that Inline graphic, i.e., the case where the head consists of the empty disjunction, which is equivalent to Inline graphic (false).

The next proposition extends a well-known fact for MMSNP to guarded SNP.

Proposition 1

Every GMSNP sentence Inline graphic is equivalent to a finite disjunction Inline graphic of connected GMSNP sentences.

Proof

We prove Proposition 1. Let Inline graphic be a guarded SNP sentence. Suppose that the quantifier-free part of Inline graphic has a disconnected clause Inline graphic (Definition 1). By definition the variable set can be partitioned into non-empty variable sets Inline graphic and Inline graphic such that for every negative literal Inline graphic of the clause either Inline graphic or Inline graphic. The same is true for every positive literal, since otherwise the definition of guarded clauses would imply a negative literal on a set that contains Inline graphic, contradicting the property above. Hence, Inline graphic can be written as Inline graphic for non-empty disjoint tuples of variables Inline graphic and Inline graphic. Let Inline graphic be the formula obtained from Inline graphic by replacing Inline graphic by Inline graphic, and let Inline graphic be the formula obtained from Inline graphic by replacing Inline graphic by Inline graphic.

Let Inline graphic be the existential predicates in Inline graphic, and let Inline graphic be the input signature of Inline graphic. It suffices to show that for every Inline graphic-expansion Inline graphic of Inline graphic we have that Inline graphic satisfies Inline graphic if and only if Inline graphic satisfies Inline graphic or Inline graphic. If Inline graphic falsifies a clause of Inline graphic, there is nothing to show since then Inline graphic satisfies neither Inline graphic nor Inline graphic. If Inline graphic satisfies all clauses of Inline graphic, it in particular satisfies a literal from Inline graphic; depending on whether this literal lies in Inline graphic or in Inline graphic, we obtain that Inline graphic satisfies Inline graphic or Inline graphic, and hence Inline graphic or Inline graphic. Iterating this process for each disconnected clause of Inline graphic, we eventually arrive at a finite disjunction of connected guarded SNP sentences.   Inline graphic

It is well-known and easy to see [17] that each of Inline graphic can be reduced to Inline graphic in polynomial time. Conversely, if each of Inline graphic is in P, then Inline graphic is in P, too. It follows in particular that if connected GMSNP has a complexity dichotomy into P and NP-complete, then so has GMSNP.

Theorem 5

For every sentence Inline graphic in connected GMSNP there exists a reduct Inline graphic of a finitely bounded homogeneous structures such that Inline graphic. If all existentially quantified relation symbols in Inline graphic are binary then it is equivalent to an ASNP sentence.

In the proof of Theorem 5 we use a result of Cherlin, Shelah, and Shi [12] in a strengthened form due to Hubička and Nešetřil [22], namely that for every finite set Inline graphic of finite Inline graphic-structures, for some finite relational signature Inline graphic, there exists a finitely bounded homogeneous Inline graphic-structure Inline graphic such that a finite Inline graphic-structure Inline graphic homomorphically maps to Inline graphic if none of the structures in Inline graphic homomorphically maps to Inline graphic. We now prove Theorem 5.

Proof

Let Inline graphic be a Inline graphic-sentence in connected guarded monotone SNP with existentially quantified relation symbols Inline graphic. Let Inline graphic be the signature which contains for every relation symbol Inline graphic two new relation symbols Inline graphic and Inline graphic of the same arity and for every relation symbol Inline graphic a new relation symbol Inline graphic. Let Inline graphic be the first-order part of Inline graphic, written in conjunctive normal form, and let n be the number of variables in the largest clause of Inline graphic. Let Inline graphic be the sentence obtained from Inline graphic by replacing each occurrence of Inline graphic by Inline graphic and each occurrence of Inline graphic by Inline graphic, and finally each occurrence of Inline graphic by Inline graphic. Let Inline graphic be the (finite) class of all finite Inline graphic-structures with at most n elements that do not satisfy Inline graphic. We apply the mentioned theorem of Hubička and Nešetřil to Inline graphic, and obtain a finitely bounded homogeneous Inline graphic-structure Inline graphic such that the age of the Inline graphic-reduct Inline graphic of Inline graphic equals Inline graphic. We say that Inline graphic is correctly labelled if for every Inline graphic of arity m and Inline graphic we have Inline graphic if and only if Inline graphic. Let Inline graphic the Inline graphic-expansion of Inline graphic where Inline graphic of arity m denotes

graphic file with name M514.gif

Since Inline graphic is finitely bounded homogeneous, Inline graphic is finitely bounded homogeneous, too. Let Inline graphic be the Inline graphic-reduct of Inline graphic. We claim that Inline graphic. First suppose that Inline graphic is a finite Inline graphic-structure that satisfies Inline graphic. Then it has an Inline graphic-expansion Inline graphic that satisfies Inline graphic. Let Inline graphic be the Inline graphic-structure with the same domain as Inline graphic where

  • Inline graphic denotes Inline graphic for each Inline graphic;

  • Inline graphic denotes Inline graphic for each Inline graphic;

  • Inline graphic denotes Inline graphic for each Inline graphic.

Then Inline graphic satisfies Inline graphic, and hence embeds into Inline graphic. This embedding is a homomorphism from Inline graphic to Inline graphic since the image of the embedding is correctly labelled by the construction of Inline graphic.

Conversely, suppose that Inline graphic has a homomorphism h to Inline graphic. Let Inline graphic be the Inline graphic-expansion of Inline graphic by defining Inline graphic if and only if Inline graphic, for every n-ary Inline graphic. Then each clause of Inline graphic is satisfied, because each clause of Inline graphic is guarded: let Inline graphic be the variables of some clause of Inline graphic. If Inline graphic satisfy the body of this clause, and Inline graphic is a head atom of such a clause, then the set Inline graphic is correctly labelled. This implies that some of the head atoms of the clause must be true in Inline graphic because Inline graphic satisfies Inline graphic. The second statement follows from Theorem 3.    Inline graphic

The following example shows that GMSNP does not contain ASNP.

Example 6

Inline graphic is in ASNP (see Example 5) but not in GMSNP. Indeed, suppose that Inline graphic is a GMSNP sentence which is true on all finite directed paths. We assume that the quantifier-free part Inline graphic of Inline graphic is in conjunctive normal form. Let Inline graphic be the existentially quantified relation symbols of Inline graphic, let Inline graphic, and let l be the number of variables in Inline graphic. Every directed path, viewed as a Inline graphic-structure, satisfies Inline graphic, and therefore has an Inline graphic-expansion Inline graphic that satisfies Inline graphic. Note that there are finitely many different Inline graphic-expansions of a path of length Inline graphic; let Inline graphic be this number. Hence, for a path of length Inline graphic, there must be Inline graphic with Inline graphic such that the substructures of Inline graphic induced by Inline graphic and by Inline graphic are isomorphic. We then claim that the directed cycle Inline graphic satisfies Inline graphic: this is witnessed by the Inline graphic-expansion inherited from Inline graphic which satisfies Inline graphic since each clause in Inline graphic is guarded. Hence, Inline graphic does not express digraph acyclicity.

Application: Instances of Bounded Treewidth

If a computational problem can be formulated in ASNP or in GMSNP, then this has remarkable consequences besides a potential complexity dichotomy. In this section we show that every problem that can be formulated in ASNP or in GMSNP is in P when restricted to instances of bounded treewidth. The corresponding result for Monadic Second-Order Logic (MSO) instead of ASNP is a famous theorem of Courcelle [13]. We strongly believe that ASNP is not contained in MSO (consider for instance the Betweenness Problem from Example 3), so our result appears to be incomparable to Courcelle’s.

In the proof of our result, we need the following concepts from model theory. A first-order theory T is called Inline graphic-categorical if all countable models of T are isomorphic [21]. A structure Inline graphic is called Inline graphic-categorical if its first-order theory (i.e., the set of first-order sentences that hold in Inline graphic) is Inline graphic-categorical. Note that with this definition, finite structures are Inline graphic-categorical. Another classic example is the structure Inline graphic. The definition of treewidth can be treated as a black box in our proof, and we refer the reader to [6].

Theorem 6

Let Inline graphic be an ASNP or a connected GMSNP Inline graphic-sentence and let Inline graphic. Then the problem to decide whether a given finite Inline graphic-structure Inline graphic of treewidth at most k satisfies Inline graphic can be decided in polynomial time with a Datalog program (of width k).

Proof

Since structures that are homogeneous in a finite relational language are Inline graphic-categorical [21] and first-order reducts of Inline graphic-categorical structures are Inline graphic-categorical [21], Theorem 2 and Theorem 5 imply that the problem to decide whether a finite Inline graphic-structure satisfies Inline graphic can be formulated as CSPInline graphic for an Inline graphic-categorical structure Inline graphic. Then the statement follows from Corollary 1 in [6].   Inline graphic

Remark 1

In Theorem 6 it actually suffices to assume that the core of Inline graphic has treewidth at most k.

Corollary 3

Let Inline graphic be a GMSNP Inline graphic-sentence and let Inline graphic. Then there is a polynomial-time algorithm that decides whether a given Inline graphic-structure of treewidth at most k satisfies Inline graphic.

Proof

Immediate from Theorem 1 and Theorem 6.   Inline graphic

Conclusion and Open Problems

ASNP is a candidate for an expressive logic with a complexity dichotomy: every problem in ASNP is NP-complete or in P if and only if the infinite-domain dichotomy conjecture for first-order reducts of binary finitely bounded homogeneous structures holds. See Fig. 1 for the relation to other candidate logics that are known to have a dichotomy, might have a complexity, or provably do not have a dichotomy.

Fig. 1.

Fig. 1.

Fragments of existential second-order logic and complexity dichotomies.

We presented an application of ASNP concerning the evaluation of computational problems on classes of structures of bounded treewidth. We also proved that the syntax of ASNP is algorithmically decidable. The following problems concerning ASNP are open.

  1. Is the Amalgamation Property decidable for (not necessarily binary) classes given by finitely many forbidden substructures?

  2. Is every binary CSP in Monadic Second-Order Logic (MSO) also in ASNP?

  3. Is every problem in NP polynomial-time equivalent to a problem in Amalgamation SNP if we drop the monotonicity assumption?

  4. Is there a natural logic (which in particular has an effective syntax) that contains both ASNP and connected GMSNP and which describes CSPs for reducts of finitely bounded homogeneous structures?

Footnotes

1

MMSNPInline graphic relates to MMSNP as Courcelle’s MSOInline graphic relates to MSO [13].

This work has been supported by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (Grant Agreement No 681988, CSP-Infinity) and by DFG Graduiertenkolleg 1763 (QuantLA).

Contributor Information

Marcella Anselmo, Email: manselmo@unisa.it.

Gianluca Della Vedova, Email: gianluca.dellavedova@unimib.it.

Florin Manea, Email: flmanea@gmail.com.

Arno Pauly, Email: arno.m.pauly@gmail.com.

Manuel Bodirsky, Email: manuel.bodirsky@tu-dresden.de.

References

  • 1.Barto, L., Kompatscher, M., Olšák, M., Pham, T.V., Pinsker, M.: Equations in oligomorphic clones and the constraint satisfaction problem for Inline graphic-categorical structures. J. Math. Logic, 19(2), #1950010 (2019). An extended abstract appeared at the Proceedings of the 32nd Annual ACM/IEEE Symposium on Logic in Computer Science - LICS’17
  • 2.Barto, L., Pinsker, M.: The algebraic dichotomy conjecture for infinite domain constraint satisfaction problems. In: Proceedings of the 31th Annual IEEE Symposium on Logic in Computer Science, LICS 2016, pp. 615–622 (2016). Preprint arXiv:1602.04353
  • 3.Bienvenu M, ten Cate B, Lutz C, Wolter F. Ontology-based data access: a study through disjunctive datalog, CSP, and MMSNP. ACM Trans. Database Syst. 2014;39(4):33. doi: 10.1145/2661643. [DOI] [Google Scholar]
  • 4.Bodirsky, M.: Constraint satisfaction with infinite domains. Dissertation, Humboldt-Universität zu Berlin (2004)
  • 5.Bodirsky, M.: Complexity classification in infinite-domain constraint satisfaction. Mémoire d’habilitation à diriger des recherches, Université Diderot - Paris 7. arXiv:1201.0856 (2012)
  • 6.Bodirsky M, Dalmau V. Datalog and constraint satisfaction with infinite templates. J. Comput. Syst. Sci. 2013;79:79–100. doi: 10.1016/j.jcss.2012.05.012. [DOI] [Google Scholar]
  • 7.Bodirsky, M., Madelaine, F., Mottet, A.: A universal-algebraic proof of the complexity dichotomy for Monotone Monadic SNP. In: Proceedings of the Symposium on Logic in Computer Science (LICS), pp. 105–114 (2018). Preprint available under arXiv:1802.03255
  • 8.Bodirsky, M., Pinsker, M., Pongrácz, A.: Projective clone homomorphisms. J. Symb. Logic (2014). Preprint arXiv:1409.4601
  • 9.Bodirsky, M., Rydval, J.: Temporal constraint satisfaction problems in fixed point logic (2019). Preprint
  • 10.Braunfeld, S.: Towards the undecidability of atomicity for permutation classes via the undecidability of joint embedding for hereditary graph classes (2019). Preprint available at arXiv:1903.11932
  • 11.Bulatov, A.A.: A dichotomy theorem for nonuniform CSPs. In: 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2017, Berkeley, CA, USA, 15–17 October 2017, pp. 319–330 (2017)
  • 12.Cherlin G, Shelah S, Shi N. Universal graphs with forbidden subgraphs and algebraic closure. Adv. Appl. Math. 1999;22:454–491. doi: 10.1006/aama.1998.0641. [DOI] [Google Scholar]
  • 13.Courcelle B, Engelfriet J. Graph Structure and Monadic Second-Order Logic: A Language-Theoretic Approach. New York: Cambridge University Press; 2012. [Google Scholar]
  • 14.Fagin R. Generalized first-order spectra and polynomial-time recognizable sets. Complex. Comput. 1974;7:43–73. [Google Scholar]
  • 15.Feder T, Vardi MY. The computational structure of monotone monadic SNP and constraint satisfaction: a study through Datalog and group theory. SIAM J. Comput. 1999;28:57–104. doi: 10.1137/S0097539794266766. [DOI] [Google Scholar]
  • 16.Feder, T., Vardi, M.Y.: Homomorphism closed vs. existential positive. In: Proceedings of the Symposium on Logic in Computer Science (LICS), pp. 311–320 (2003)
  • 17.Foniok J, Nešetřil J. Generalised dualities and maximal finite antichains in the homomorphism order of relational structures. Eur. J. Combin. 2008;29(4):881–899. doi: 10.1016/j.ejc.2007.11.017. [DOI] [Google Scholar]
  • 18.Garey M, Johnson D. A Guide to NP-Completeness. Stanford: CSLI Press; 1978. [Google Scholar]
  • 19.Grohe, M.: The quest for a logic capturing PTIME. In: Proceedings of ACM/IEEE Symposium on Logic in Computer Science (LICS), pp. 267–271 (2008)
  • 20.Gurevich Y. Toward logic tailored for computational complexity. In: Börger E, Oberschelp W, Richter MM, Schinzel B, Thomas W, editors. Computation and Proof Theory; Heidelberg: Springer; 1984. pp. 175–216. [Google Scholar]
  • 21.Hodges W. Model Theory. Cambridge: Cambridge University Press; 1993. [Google Scholar]
  • 22.Hubička J, Nešetřil J. Homomorphism and embedding universal structures for restricted classes. Multiple-Valued Logic Soft Comput. 2016;27(2–3):229–253. [Google Scholar]
  • 23.Kun G. Constraints, MMSNP, and expander relational structures. Combinatorica. 2013;33(3):335–347. doi: 10.1007/s00493-013-2405-4. [DOI] [Google Scholar]
  • 24.Ladner RE. On the structure of polynomial time reducibility. J. ACM. 1975;22(1):155–171. doi: 10.1145/321864.321877. [DOI] [Google Scholar]
  • 25.Madelaine F. Universal structures and the logic of forbidden patterns. In: Ésik Z, editor. Computer Science Logic; Heidelberg: Springer; 2006. pp. 471–485. [Google Scholar]
  • 26.Zhuk, D.: A proof of CSP dichotomy conjecture. In: 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2017, Berkeley, CA, USA, 15–17 October 2017, pp. 331–342 (2017). https://arxiv.org/abs/1704.01914

Articles from Beyond the Horizon of Computability are provided here courtesy of Nature Publishing Group

RESOURCES