Skip to main content

Treewidth and Counting Projected Answer Sets

  • Conference paper
  • First Online:
Logic Programming and Nonmonotonic Reasoning (LPNMR 2019)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 11481))

Abstract

In this paper, we introduce novel algorithms to solve projected answer set counting . #PAs asks to count the number of answer sets with respect to a given set of projection atoms, where multiple answer sets that are identical when restricted to the projection atoms count as only one projected answer set. Our algorithms exploit small treewidth of the primal graph of the input instance by dynamic programming (DP).

We establish a new algorithm for head-cycle-free (HCF) programs and lift very recent results from projected model counting to #PAs when the input is restricted to HCF programs. Further, we show how established DP algorithms for tight, normal, and disjunctive answer set programs can be extended to solve #PAs. Our algorithms run in polynomial time while requiring double exponential time in the treewidth for tight, normal, and HCF programs, and triple exponential time for disjunctive programs.

Finally, we take the exponential time hypothesis (ETH) into account and establish lower bounds of bounded treewidth algorithms for #PAs. Under ETH, one cannot significantly improve our obtained worst-case runtimes.

This work extends an abstract [11] explaining only concepts, and a preliminary workshop paper, and has been supported by Austrian Science Fund (FWF): Y698 and DFG: HO 1294/11-1. Hecher is also affiliated with University of Potsdam, Germany.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Let \(G=(V,E)\) be a digraph and \(W \subseteq V\). Then, a cycle in G is a W-cycle if it contains all vertices from W.

  2. 2.

    Proofs marked with “\(\star \)” are in extended version at: https://tinyurl.com/y6gkrblc.

  3. 3.

    \(\text {Post-order}(T,n)\) provides the sequence of nodes for tree T rooted at n.

  4. 4.

    Note that in Listing 1, \(\mathbb {A}\) takes in addition as input set P and table \(\iota _t\), used later. Later, P represents the projection atoms and \(\iota _t\) is a table at t from an earlier traversal.

  5. 5.

    Later we use (among others) \(\mathtt {PCNT}_{{\mathbb {PHC}}}\) where \(\mathbb {A}={\mathbb {PHC}} \).

  6. 6.

    Table \(\nu (t)\) contains rows obtained by recursively following origins of \(\tau (n)\) for root n.

References

  1. Aziz, R.A.: Answer set programming: founded bounds and model counting. Ph.D. thesis, The University of Melbourne, September 2015

    Google Scholar 

  2. Ben-Eliyahu, R., Dechter, R.: Propositional semantics for disjunctive logic programs. Ann. Math. Artif. Intell. 12(1), 53–87 (1994)

    Article  MathSciNet  Google Scholar 

  3. Bidoít, N., Froidevaux, C.: Negation by default and unstratifiable logic programs. TCS 78(1), 85–112 (1991)

    Article  MathSciNet  Google Scholar 

  4. Bodlaender, H.L.: A linear-time algorithm for finding tree-decompositions of small treewidth. SIAM J. Comput. 25(6), 1305–1317 (1996)

    Article  MathSciNet  Google Scholar 

  5. Bodlaender, H.L., Kloks, T.: Efficient and constructive algorithms for the pathwidth and treewidth of graphs. J. Algorithms 21(2), 358–402 (1996)

    Article  MathSciNet  Google Scholar 

  6. Brewka, G., Eiter, T., Truszczyński, M.: Answer set programming at a glance. Commun. ACM 54(12), 92–103 (2011)

    Article  Google Scholar 

  7. Cygan, M., et al.: Parameterized Algorithms. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-319-21275-3

    Book  MATH  Google Scholar 

  8. Durand, A., Hermann, M., Kolaitis, P.G.: Subtractive reductions and complete problems for counting complexity classes. TCS 340(3), 496–513 (2005)

    Article  MathSciNet  Google Scholar 

  9. Eiter, T., Gottlob, G.: On the computational cost of disjunctive logic programming: propositional case. Ann. Math. Artif. Intell. 15(3–4), 289–323 (1995)

    Article  MathSciNet  Google Scholar 

  10. Fages, F.: Consistency of Clark’s completion and existence of stable models. Meth. Logic CS 1(1), 51–60 (1994)

    Google Scholar 

  11. Fichte, J.K., Hecher, M.: Exploiting treewidth for counting projected answer sets. In: KR 2018, pp. 639–640. AAAI Press (2018)

    Google Scholar 

  12. Fichte, J.K., Hecher, M., Morak, M., Woltran, S.: Answer set solving with bounded treewidth revisited. In: Balduccini, M., Janhunen, T. (eds.) LPNMR 2017. LNCS (LNAI), vol. 10377, pp. 132–145. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-61660-5_13

    Chapter  MATH  Google Scholar 

  13. Fichte, J.K., Hecher, M., Morak, M., Woltran, S.: Exploiting treewidth for projected model counting and its limits. In: Beyersdorff, O., Wintersteiger, C.M. (eds.) SAT 2018. LNCS, vol. 10929, pp. 165–184. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-94144-8_11

    Chapter  MATH  Google Scholar 

  14. Gebser, M., Kaufmann, B., Schaub, T.: Solution enumeration for projected boolean search problems. In: van Hoeve, W.-J., Hooker, J.N. (eds.) CPAIOR 2009. LNCS, vol. 5547, pp. 71–86. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-01929-6_7

    Chapter  MATH  Google Scholar 

  15. Gelfond, M., Lifschitz, V.: Classical negation in logic programs and disjunctive databases. New Gener. Comput. 9(3/4), 365–386 (1991)

    Article  Google Scholar 

  16. Harvey, D., van der Hoeven, J., Lecerf, G.: Even faster integer multiplication. J. Complex. 36, 1–30 (2016)

    Article  MathSciNet  Google Scholar 

  17. Impagliazzo, R., Paturi, R., Zane, F.: Which problems have strongly exponential complexity? J. Comput. Syst. Sci. 63(4), 512–530 (2001)

    Article  MathSciNet  Google Scholar 

  18. Jakl, M., Pichler, R., Woltran, S.: Answer-set programming with bounded treewidth. In: IJCAI 2009, vol. 2, pp. 816–822 (2009)

    Google Scholar 

  19. Lin, F., Zhao, J.: On tight logic programs and yet another translation from normal logic programs to propositional logic. In: IJCAI 2003, pp. 853–858. Morgan Kaufmann (2003)

    Google Scholar 

  20. Lokshtanov, D., Marx, D., Saurabh, S.: Slightly superexponential parameterized problems. In: SODA, pp. 760–776. SIAM (2011)

    Google Scholar 

  21. Samer, M., Szeider, S.: Algorithms for propositional model counting. J. Discrete Algorithms 8(1), 50–64 (2010)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Markus Hecher .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Fichte, J.K., Hecher, M. (2019). Treewidth and Counting Projected Answer Sets. In: Balduccini, M., Lierler, Y., Woltran, S. (eds) Logic Programming and Nonmonotonic Reasoning. LPNMR 2019. Lecture Notes in Computer Science(), vol 11481. Springer, Cham. https://doi.org/10.1007/978-3-030-20528-7_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-20528-7_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-20527-0

  • Online ISBN: 978-3-030-20528-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics