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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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.
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.
M. Cooper, D. A. Cohen, and P. G. Jeavons. Characterising tractable constraints. Artificial Intelligence, 65(2):347–361, 1994.
N. Creignou and M. Hermann. Complexity of generalized satisfiability counting problems. Information and Computation, 125:1–12, 1996.
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.
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.
O. Dubois. Counting the number of solutions for instances of satisfiability. Theoretical Computer Science, 81(1):49–64, 1991.
M. Dyer and C. Greenhill. The complexity of counting graph homomorphisms. Random Structures and Algorithms, 17:260–289, 2000.
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.
T. Feder and R. Motwani. Worst-case time bounds for coloring and satisfiability problems. Unpublished manuscript.
P. G. Jeavons, D. A. Cohen, and J. K. Pearson. Constraints and universal algebra. Annals of Mathematics and Artificial Intelligence, 24:51–67, 1998.
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.
V. Kumar. Algorithms for constraint-satisfaction problems: A survey. AI Magazine, pages 32–44, Spring, 1992.
M. L. Littman, T. Pitassi, and R. Impagliazzo. On the complexity of counting satisfying assignments. Unpublished manuscript, 2001.
A. K. Mackworth. Consistency in networks of relations. Artificial Intelligence, 8:99–118, 1977.
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.
U. Montanari. Networks of constraints: Fundamental properties and applications to picture processing. Information Sciences, 7:95–132, 1974.
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.
D. Roth. On the hardness of approximate reasoning. Artificial Intelligence, 82:273–302, 1996.
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.
L. G. Valiant. The complexity of computing the permanent. Theoretical Computer Science, 8(2):189–201, 1979.
L. G. Valiant. The complexity of enumeration and reliability problems. SIAM Journal on Computing, 8(3):410–421, 1979.
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.
W. Zhang. Number of models and satisfiability of sets of clauses. Theoretical Computer Science, 155(1):277–288, 1996.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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