Datalog and Constraint Satisfaction with Infinite Templates

We relate the expressive power of Datalog and constraint satisfaction with infinite templates. The relationship is twofold: On the one hand, we prove that every non-empty problem that is closed under disjoint unions and has Datalog width one can be formulated as a constraint satisfaction problem (CSP) with a countable template that is ω-categorical. Structures with this property are of central interest in classical model theory. On the other hand, we identify classes of CSPs that can be solved in polynomial time with a Datalog program. For that, we generalise the notion of the canonical Datalog program of a CSP, which was previously defined only for CSPs with finite templates by Feder and Vardi. We show that if the template Γ is ω-categorical, then CSP(Γ) can be solved by an (l,k)-Datalog program if and only if the problem is solved by the canonical (l,k)-Datalog program for Γ. Finally, we prove algebraic characterisations for those ω-categorical templates whose CSP has Datalog width (1,k), and for those whose CSP has strict Datalog width l. Topic: Logic in Computer Science, Computational Complexity.

[1]  R. Lyndon THE REPRESENTATION OF RELATIONAL ALGEBRAS , 1950 .

[2]  Ashok K. Chandra,et al.  Optimal implementation of conjunctive queries in relational data bases , 1977, STOC '77.

[3]  Jan van Leeuwen,et al.  Graph Algorithms , 1991, Handbook of Theoretical Computer Science, Volume A: Algorithms and Complexity.

[4]  Phokion G. Kolaitis,et al.  On the expressive power of datalog: tools and a case study , 1990, J. Comput. Syst. Sci..

[5]  Jaroslav Nesetril,et al.  On the complexity of H-coloring , 1990, J. Comb. Theory, Ser. B.

[6]  P. Cameron,et al.  Oligomorphic permutation groups , 1990 .

[7]  J. Covington Homogenizable relational structures , 1990 .

[8]  Jaroslav Nesetril,et al.  The core of a graph , 1992, Discret. Math..

[9]  Wilfrid Hodges,et al.  Model Theory: The existential case , 1993 .

[10]  Roger D. Maddux,et al.  Representations for Small Relation Algebras , 1994, Notre Dame J. Formal Log..

[11]  Peter B. Ladkin,et al.  On binary constraint problems , 1994, JACM.

[12]  Jörg Flum,et al.  Finite model theory , 1995, Perspectives in Mathematical Logic.

[13]  Robin Hirsch,et al.  Expressive Power and Complexity in Algebraic Logic , 1997, J. Log. Comput..

[14]  Marc Gyssens,et al.  Closure properties of constraints , 1997, JACM.

[15]  Demetrios Achlioptas,et al.  The complexity of G-free colourability , 1997, Discret. Math..

[16]  Wilfrid Hodges,et al.  A Shorter Model Theory , 1997 .

[17]  Phokion G. Kolaitis,et al.  Conjunctive-query containment and constraint satisfaction , 1998, PODS.

[18]  Tomás Feder,et al.  The Computational Structure of Monotone Monadic SNP and Constraint Satisfaction: A Study through Datalog and Group Theory , 1999, SIAM J. Comput..

[19]  S. Shelah,et al.  Universal Graphs with Forbidden Subgraphs and Algebraic Closure , 1998, math/9809202.

[20]  Martin C. Cooper,et al.  Constraints, Consistency and Closure , 1998, Artif. Intell..

[21]  Justin Pearson,et al.  Closure Functions and Width 1 Problems , 1999, CP.

[22]  Jaroslav Nesetril,et al.  Duality Theorems for Finite Structures (Characterising Gaps and Good Characterisations) , 2000, J. Comb. Theory, Ser. B.

[23]  Thomas Wilke,et al.  Automata logics, and infinite games: a guide to current research , 2002 .

[24]  Phokion G. Kolaitis,et al.  Constraint Satisfaction, Bounded Treewidth, and Finite-Variable Logics , 2002, CP.

[25]  Some problems not definable using structure homomorphisms , 2003, Ars Comb..

[26]  Tomás Feder,et al.  Homomorphism closed vs. existential positive , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[27]  Matteo Cristani,et al.  The complexity of constraint satisfaction problems for small relation algebras , 2004, Artif. Intell..

[28]  Ivo Düntsch,et al.  Relation Algebras and their Application in Temporal and Spatial Reasoning , 2005, Artificial Intelligence Review.

[29]  V. Dalmau,et al.  First-order definable retraction problems for posets and reflexive graphs , 2004, LICS 2004.

[30]  Jaroslav Nesetril,et al.  Graphs and homomorphisms , 2004, Oxford lecture series in mathematics and its applications.

[31]  P. Jeavons,et al.  The complexity of constraint satisfaction : an algebraic approach. , 2005 .

[32]  Manuel Bodirsky,et al.  The Core of a Countably Categorical Structure , 2005, STACS.

[33]  Albert Atserias,et al.  On digraph coloring problems and treewidth duality , 2005, 20th Annual IEEE Symposium on Logic in Computer Science (LICS' 05).

[34]  Benjamin Rossman,et al.  Existential positive types and preservation under homomorphisms , 2005, 20th Annual IEEE Symposium on Logic in Computer Science (LICS' 05).

[35]  Víctor Dalmau,et al.  A new tractable class of constraint satisfaction problems , 2005, Annals of Mathematics and Artificial Intelligence.

[36]  Peter Jeavons,et al.  Classifying the Complexity of Constraints Using Finite Algebras , 2005, SIAM J. Comput..

[37]  Michaël Rusinowitch,et al.  Relating two standard notions of secrecy , 2006, Log. Methods Comput. Sci..

[38]  Jaroslav Nesetril,et al.  Constraint Satisfaction with Countable Homogeneous Templates , 2003, J. Log. Comput..

[39]  Claude Tardif,et al.  A Characterisation of First-Order Constraint Satisfaction Problems , 2006, 21st Annual IEEE Symposium on Logic in Computer Science (LICS'06).

[40]  Manuel Bodirsky,et al.  Qualitative Temporal and Spatial Reasoning Revisited , 2007, J. Log. Comput..

[41]  Martin Grohe The complexity of homomorphism and constraint satisfaction problems seen from the other side , 2007, JACM.

[42]  Manuel Bodirsky Cores of Countably Categorical Structures , 2007, Log. Methods Comput. Sci..

[43]  Iain A. Stewart,et al.  Constraint Satisfaction, Logic and Forbidden Patterns , 2007, SIAM J. Comput..