Skip to main content

Determining the Number of Solutions to Binary CSP Instances

  • Conference paper
  • First Online:
Principles and Practice of Constraint Programming - CP 2002 (CP 2002)

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

Abstract

Counting the number of solutions to CSP instances has applications in several areas, ranging from statistical physics to artificial intelligence. We give an algorithm for counting the number of solutions to binary CSPs, which works by transforming the problem into a number of 2-sat instances, where the total number of solutions to these instances is the same as those of the original problem. The algorithm consists of two main cases, depending on whether the domain size d is even, in which case the algorithm runs in time, or odd, in which case it runs in if d = 4 · k + 1, and if d = 4 · k + 3. We also give an algorithm for counting the number of possible 3-colourings of a given graph, which runs in , an improvement over our general algorithm gained by using problem specific knowledge.

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. B. Aspvall, M. F. Plass, and R. E. Tarjan. A linear time algorithm for testing the truth of certain quantified Boolean formulas. Information Processing Letters, 8:121–123, 1979.

    Article  MathSciNet  MATH  Google Scholar 

  2. R. Bayardo and J. D. Pehoushek. 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-2000), pages 157–162, 2000.

    Google Scholar 

  3. M. Cooper, D. A. Cohen, and P. G. Jeavons. Characterising tractable constraints. Artificial Intelligence, 65(2):347–361, 1994.

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  5. V. Dahllöf and P. Jonsson. An algorithm for counting maximum weighted independent sets and its applications. In Proceedings of the 13th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA-2002), pages 292–298, 2002.

    Google Scholar 

  6. V. Dahllöf, P. Jonsson, and M. Wahlström. Counting satisfying assignments in 2-SAT and 3-SAT. In Proceedings of the 8th Annual International Computing and Combinatorics Conference (COCOON-2002), Singapore, Aug. 2002. To appear.

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  9. D. Eppstein. Improved algorithms for 3-coloring, 3-edge-coloring, and constraint satisfaction. In Proceedings of the 12th Annual Symposium on Discrete Algorithms (SODA-2001), pages 329–337, 2001.

    Google Scholar 

  10. T. Feder and R. Motwani. Worst-case time bounds for coloring and satisfiability problems. Unpublished manuscript.

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  12. M. Jerrum. A very simple algorithm for estimating the number of k-colourings of a low-degree graph. Random Structures and Algorithms, 7:157–165, 1995.

    Article  MathSciNet  MATH  Google Scholar 

  13. V. Kumar. Algorithms for constraint-satisfaction problems: A survey. AI Magazine, pages 32–44, Spring, 1992.

    Google Scholar 

  14. M. L. Littman, T. Pitassi, and R. Impagliazzo. On the complexity of counting satisfying assignments. Unpublished manuscript, 2001.

    Google Scholar 

  15. A. K. Mackworth. Consistency in networks of relations. Artificial Intelligence, 8:99–118, 1977.

    Article  MATH  Google Scholar 

  16. S. Micali and V. V. Vazirani. v · e ) algorithm for finding maximum matching in general graphs. In 21st Annual Symposium on Foundations of Computer Science (FOCS-1980), pages 10–16. IEEE Computer Society, 1980.

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  18. J. K. Pearson and P. G. Jeavons. A survey of tractable constraint satisfaction problems. Technical Report CSD-TR-97-15, Royal Holloway, University of London, July 1997.

    Google Scholar 

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

    Article  MathSciNet  Google Scholar 

  20. U. Schöning. A probabilistic algorithm for k-SAT and constraint satisfaction problems. In 40th Annual Symposium on Foundations of Computer Science (FOCS-1999), pages 410–414. IEEE Computer Society, 1999.

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  23. E. Vigoda. Improved bounds for sampling colorings. In 40th Annual Symposium on Foundations of Computer Science (FOCS-1999), pages 51–59. IEEE Computer Society, 1999.

    Google Scholar 

  24. W. Zhang. Number of models and satisfiability of sets of clauses. Theoretical Computer Science, 155(1):277–288, 1996.

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Angelsmark, O., Jonsson, P., Linusson, S., Thapper, J. (2002). Determining the Number of Solutions to Binary CSP Instances. In: Van Hentenryck, P. (eds) Principles and Practice of Constraint Programming - CP 2002. CP 2002. Lecture Notes in Computer Science, vol 2470. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46135-3_22

Download citation

  • DOI: https://doi.org/10.1007/3-540-46135-3_22

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-44120-5

  • Online ISBN: 978-3-540-46135-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics