An efficient algorithm for counting the number of solutions to a Constraint Satisfaction Problem with binary inequality cosntraints and arbitrary unary constraints. This package provides various ordering heuristics, methods for tracing intermediate factors created during computation and some "interface" methods. Code is loosely based on the implementation of the Variable Elimination algorithm for probabilistic inference in Bayesian Networks written by .

Algorithm implementation uses Bell package.

For a detailed description see JavaDocs [HTML] [PDF 138kB]. The package is made available under GNU General Public License.

Package: JAR file with source code + JavaDocs [ZIP 363kB]

Applet shown below, given a Constraint Network in CSPif format computes the number of solutions to this network. You may use CIspace Consistency Based CSP Solver applet to generate network description in CSPif format (use its graphical editor to create network, then go to "Edit" - "View\Edit Text Representation" and copy the text representation into the applet below). Note that our algorithm allows only binary ineqality constraints (and arbitrary unary constraints).

Your browser is completely ignoring the <APPLET> tag!

  • Version 1.1 (25 April 2006): JAR file with source code + JavaDocs [ZIP 375kB]