The Impact of Treewidth on Grounding and Solving of Answer Set Programs

In this paper, we aim to study how the performance of modern answer set programming (ASP) solvers is influenced by the treewidth of the input program and to investigate the consequences of this relationship. We first perform an experimental evaluation that shows that the solving performance is heavily influenced by treewidth, given ground input programs that are otherwise uniform, both in size and construction. This observation leads to an important question for ASP, namely, how to design encodings such that the treewidth of the resulting ground program remains small. To this end, we study two classes of disjunctive programs, namely guarded and connection-guarded programs. In order to investigate these classes, we formalize the grounding process using MSO transductions. Our main results show that both classes guarantee that the treewidth of the program after grounding only depends on the treewidth (and the maximum degree, in case of connection-guarded programs) of the input instance. In terms of parameterized complexity, our findings yield corresponding FPT results for answer-set existence for bounded treewidth (and also degree, for connection-guarded programs) of the input instance. We further show that bounding treewidth alone leads to NP-hardness in the data complexity for connection-guarded programs, which indicates that the two classes are fundamentally different. Finally, we show that for both classes, the data complexity remains as hard as in the general case of ASP.

[1]  Esra Erdem,et al.  Tight logic programs , 2003, Theory and Practice of Logic Programming.

[2]  Georg Gottlob,et al.  Complexity and expressive power of logic programming , 1997, Proceedings of Computational Complexity. Twelfth Annual IEEE Conference.

[3]  Stefan Woltran,et al.  lpopt: A Rule Optimization Tool for Answer Set Programming , 2016, LOPSTR.

[4]  Stefan Woltran,et al.  Answer Set Solving with Bounded Treewidth Revisited , 2017, LPNMR.

[5]  Alasdair Urquhart,et al.  Formal Languages]: Mathematical Logic--mechanical theorem proving , 2022 .

[6]  Bernhard Bliem,et al.  ASP Programs with Groundings of Small Treewidth , 2018, FoIKS.

[7]  Miroslaw Truszczynski,et al.  Answer set programming at a glance , 2011, Commun. ACM.

[8]  Arie M. C. A. Koster,et al.  Treewidth computations I. Upper bounds , 2010, Inf. Comput..

[9]  Fangzhen Lin,et al.  Answer Set Programming Phase Transition: A Study on Randomly Generated Programs , 2003, ICLP.

[10]  Martin Gebser,et al.  Answer Set Solving in Practice , 2012, Answer Set Solving in Practice.

[11]  Paul D. Seymour,et al.  Graph Minors. II. Algorithmic Aspects of Tree-Width , 1986, J. Algorithms.

[12]  Ton Kloks Treewidth, Computations and Approximations , 1994, Lecture Notes in Computer Science.

[13]  Fangzhen Lin,et al.  A Model for Phase Transition of Random Answer-Set Programs , 2016, TOCL.

[14]  Rolf Niedermeier,et al.  Invitation to Fixed-Parameter Algorithms , 2006 .

[15]  Marius Thomas Lindauer,et al.  Potassco: The Potsdam Answer Set Solving Collection , 2011, AI Commun..

[16]  Bruce A. Reed,et al.  Multicuts in unweighted graphs and digraphs with bounded degree and bounded tree-width , 2003, J. Algorithms.

[17]  Miroslaw Truszczynski,et al.  Generating Hard Random Boolean Formulas and Disjunctive Logic Programs , 2017, IJCAI.

[18]  Stephan Kreutzer,et al.  On the Parameterized Intractability of Monadic Second-Order Logic , 2009, Log. Methods Comput. Sci..

[19]  Johannes Klaus Fichte,et al.  Clause-Learning Algorithms with Many Restarts and Bounded-Width Resolution , 2011, J. Artif. Intell. Res..

[20]  Enrico Pontelli,et al.  SmodelsA - A System for Computing Answer Sets of Logic Programs with Aggregates , 2005, LPNMR.

[21]  Georg Gottlob,et al.  On the computational cost of disjunctive logic programming: Propositional case , 1995, Annals of Mathematics and Artificial Intelligence.

[22]  Larry Joseph Stockmeyer,et al.  The complexity of decision problems in automata theory and logic , 1974 .

[23]  Bernhard Bliem,et al.  Treewidth in Non-Ground Answer Set Solving and Alliance Problems in Graphs , 2017, ICLP.

[24]  Sebastian Berndt,et al.  Practical Access to Dynamic Programming on Tree Decompositions , 2019, Algorithms.

[25]  Michael Gelfond,et al.  Classical negation in logic programs and disjunctive databases , 1991, New Generation Computing.

[26]  Michal Pilipczuk,et al.  Parameterized Algorithms , 2015, Springer International Publishing.

[27]  Stefan Szeider,et al.  On Fixed-Parameter Tractable Parameterizations of SAT , 2003, SAT.

[28]  Stefan Rümmele,et al.  A Dynamic-Programming Based ASP-Solver , 2010, JELIA.

[29]  Alexander Langer,et al.  Practical algorithms for MSO model-checking on tree-decomposable graphs , 2014, Comput. Sci. Rev..

[30]  Alexander Langer,et al.  Evaluation of an MSO-Solver , 2012, ALENEX.

[31]  Victor W. Marek,et al.  The Logic Programming Paradigm: A 25-Year Perspective , 2011 .

[32]  Wolfgang Faber,et al.  The DLV system for knowledge representation and reasoning , 2002, TOCL.

[33]  Georg Gottlob,et al.  Bounded treewidth as a key to tractability of knowledge representation and reasoning , 2006, Artif. Intell..

[34]  Stefan Woltran,et al.  The power of non-ground rules in Answer Set Programming , 2016, Theory and Practice of Logic Programming.

[35]  Stefan Rümmele,et al.  Tractable answer-set programming with weight constraints: bounded treewidth is not enough* , 2010, Theory and Practice of Logic Programming.

[36]  Bruno Courcelle,et al.  Graph Structure and Monadic Second-Order Logic - A Language-Theoretic Approach , 2012, Encyclopedia of mathematics and its applications.

[37]  Sebastian Ordyniak,et al.  Parameterized Algorithms for Modular-Width , 2013, IPEC.

[38]  Robert Ganian,et al.  Solving Problems on Graphs of High Rank-Width , 2015, WADS.

[39]  Moshe Y. Vardi The complexity of relational query languages (Extended Abstract) , 1982, STOC '82.

[40]  Dominik Peters,et al.  Precise Complexity of the Core in Dichotomous and Additive Hedonic Games , 2015, ADT.

[41]  Stefan Woltran,et al.  The Impact of Treewidth on ASP Grounding and Solving , 2017, IJCAI.

[42]  Mario Alviano,et al.  Advances in WASP , 2015, LPNMR.

[43]  Martin Gebser,et al.  ASP-Core-2 Input Language Format , 2019, Theory and Practice of Logic Programming.

[44]  Stefan Szeider,et al.  Backdoors to Tractable Answer-Set Programming , 2011, IJCAI.

[45]  Hans L. Bodlaender,et al.  A linear time algorithm for finding tree-decompositions of small treewidth , 1993, STOC.

[46]  Hector J. Levesque,et al.  Generating Hard Satisfiability Problems , 1996, Artif. Intell..

[47]  Stefan Woltran,et al.  A multiparametric view on answer set programming , 2019, Annals of Mathematics and Artificial Intelligence.

[48]  G. S. Tseitin On the Complexity of Derivation in Propositional Calculus , 1983 .

[49]  Miroslaw Truszczynski Trichotomy and dichotomy results on the complexity of reasoning with disjunctive logic programs , 2011, Theory Pract. Log. Program..

[50]  Martin Gebser,et al.  Conflict-driven answer set solving: From theory to practice , 2012, Artif. Intell..

[51]  Robin Thomas,et al.  On the complexity of finding iso- and other morphisms for partial k-trees , 1992, Discret. Math..

[52]  Georg Gottlob,et al.  Datalog LITE: a deductive query language with linear time model checking , 2002, TOCL.

[53]  Bruno Courcelle,et al.  Context-free Handle-rewriting Hypergraph Grammars , 1990, Graph-Grammars and Their Application to Computer Science.