Skip to main content

Improved Algorithms for Counting Solutions in Constraint Satisfaction Problems

  • Conference paper
Principles and Practice of Constraint Programming – CP 2003 (CP 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2833))

Abstract

Counting the number of solutions to CSP instances has vast applications in several areas ranging from statistical physics to artificial intelligence. We provide a new algorithm for counting the number of solutions to binary Csp s which has a time complexity ranging from \(\mathcal{O}\left((d/4 \cdot \alpha^4)^n\right)\) to \(\mathcal{O}\left((\alpha+\alpha^5 + \lfloor d/4-1 \rfloor \cdot \alpha^4)^n\right)\) (where α ≈ 1.2561) depending on the domain size d ≥ 3. This is substantially faster than previous algorithms, especially for small d. We also provide an algorithm for counting k-colourings in graphs and its running time ranges from \(\mathcal{O}\left(\lfloor\log_2 k\rfloor^n\right)\) to \(\mathcal{O}\left(\lfloor\log_2 k+1\rfloor^n\right)\) depending on k ≥ 4. Previously, only an \(\mathcal{O}\left(1.8171^n\right)\) time algorithm for counting 3-colourings were known, and we improve this upper bound to \(\mathcal{O}\left(1.7879^n\right)\).

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Angelsmark, O., Jonsson, P., Linusson, S., Thapper, J.: Determining the number of solutions to a binary csp instance. In: Van Hentenryck, P. (ed.) CP 2002. LNCS, vol. 2470, p. 327. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  2. Aspvall, B., Plass, M.F., Tarjan, R.E.: A linear time algorithm for testing the truth of certain quantified Boolean formulas. Information Processing Letters 8(3), 121–123 (1979)

    Article  MATH  MathSciNet  Google Scholar 

  3. Bayardo Jr, R.J., Pehoushek, J.D.: Counting models using connected components. In: Proceedings of the 17th National Conference on Artificial Intelligence and 12th Conference on Innovative Applications of Artificial Intelligence AAAI/IAAI, pp. 157–162 (2000)

    Google Scholar 

  4. Beigel, R.: Finding maximum independent sets in sparse and general graphs. In: Proceedings of the Tenth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA-1999), pp. 856–857 (1999)

    Google Scholar 

  5. Bulatov, A., Dalmau, V.: Towards a dichotomy theorem for the counting constraint satisfaction problem. Technical report, Computing Laboratory, Oxford University (2003), Available from web.comlab.ox.ac.uk/oucl/work/andrei.bulatov/counting.ps

    Google Scholar 

  6. Creignou, N., Hermann, M.: Complexity of generalized satisfiability counting problems. Information and Computation 125, 1–12 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  7. Dahllöf, V., Jonsson, P., Wahlström, M.: Counting satisfying assignments in 2-SAT and 3-SAT. In: Ibarra, O.H., Zhang, L. (eds.) COCOON 2002. LNCS, vol. 2387, pp. 535–543. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  8. Darwiche, A.: On the tractable counting of theory models and its applications to truth maintenance and belief revision. Journal of Applied Non-Classical Logic 11(1–2), 11–34 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  9. Dubois, O.: Counting the number of solutions for instances of satisfiability. Theoretical Computer Science 81(1), 49–64 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  10. Dyer, M., Greenhill, C.: The complexity of counting graph homomorphisms. Random Structures and Algorithms 17, 260–289 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  11. Jeavons, P.G., Cohen, D.A., Pearson, J.K.: Constraints and universal algebra. Annals of Mathematics and Artificial Intelligence 24, 51–67 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  12. Jégou, P.: Decomposition of domains based on the micro-structure of finite constraint-satisfaction problems. In: Proceedings of the 11th (US) National Conference on Artificial Intelligence (AAAI 1993), Washington DC, USA, July 1993, pp. 731–736; American Association for Artificial Intelligence (1993)

    Google Scholar 

  13. Kullman, O.: New methods for 3-SAT decision and worst-case analysis. Theoretical. Computer Science 223, 1–72 (1999)

    Article  MathSciNet  Google Scholar 

  14. Kumar, V.: Algorithms for constraint-satisfaction problems: A survey. AI Magazine 13(1), 32–44 (1992)

    Google Scholar 

  15. Littman, M.L., Pitassi, T., Impagliazzo, R.: On the complexity of counting satisfying assignments (2001) (unpublished manuscript)

    Google Scholar 

  16. Montanari, U.: Networks of constraints: Fundamental properties and applications to picture processing. Information Sciences 7, 95–132 (1974)

    Article  MathSciNet  Google Scholar 

  17. Roth, D.: On the hardness of approximate reasoning. Artificial Intelligence 82, 273–302 (1996)

    Article  MathSciNet  Google Scholar 

  18. Satish Kumar, T.K.: A model counting characterization of diagnoses. In: Proceedings of the Thirteenth International Workshop on Principles of Diagnosis, pp. 70–76 (2002)

    Google Scholar 

  19. Valiant, L.G.: The complexity of computing the permanent. Theoretical Computer Science 8(2), 189–201 (1979)

    Article  MATH  MathSciNet  Google Scholar 

  20. Valiant, L.G.: The complexity of enumeration and reliability problems. SIAM Journal on Computing 8(3), 410–421 (1979)

    Article  MATH  MathSciNet  Google Scholar 

  21. Wahlström, M.: An algorithm for #2SAT. Technical report, Department of Computer Science, Linköping, Sweden. In preparation. Preliminary version (2003), available from http://www.ida.liu.se/~magwa/research/num2sat.ps

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Angelsmark, O., Jonsson, P. (2003). Improved Algorithms for Counting Solutions in Constraint Satisfaction Problems. In: Rossi, F. (eds) Principles and Practice of Constraint Programming – CP 2003. CP 2003. Lecture Notes in Computer Science, vol 2833. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-45193-8_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-45193-8_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-20202-8

  • Online ISBN: 978-3-540-45193-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics