Determining the Number of Solutions to Binary CSP Instances

  • Authors:
  • Ola Angelsmark;Peter Jonsson;Svante Linusson;Johan Thapper

  • Affiliations:
  • -;-;-;-

  • Venue:
  • CP '02 Proceedings of the 8th International Conference on Principles and Practice of Constraint Programming
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

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 O(1.3247n 驴 (d/2)n) time, or odd, in which case it runs in O(1.3247n 驴 ((d2 + d + 2)/4)n/2) if d = 4 驴 k + 1, and O(1.3247n 驴 ((d2 + d)/4)n/2) 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 O(1.8171n), an improvement over our general algorithm gained by using problem specific knowledge.