Table 4: Calculation of all solutions to color the Birkhoff’s
diamond using 3, 4 of 5 colors.
number of time in
nodes colors variables solutions seconds
10 3 30 0 0.00
10 4 40 576 0.00
10 5 50 40800 0.02
Table 5: Calculation of all solutions to color the Birkhoff’s
diamond and graphs that include two or four such graphs
using 4 colors.
number of time in
nodes colors variables solutions seconds
10 4 40 576 0.00
20 4 80 99888 0.20
40 4 160 100800 4.97
solver is controlled by the requirement clauses.
For graph coloring we have the simple require-
ment that there must be one color assigned to each
node of the graph. In order to find all allowed as-
signments of four colors for the graph of Figure 5,
we must solve the equation:
10
^
i=1
(K
1i
∨ K
2i
∨ K
3i
∨ K
4i
) = 1 . (25)
The time to solve this equation using the oper-
ations
UNI
and
ISC
of XBOOLE (Posthoff and
Steinbach, 2004) was less than a single time-tick
(15 ms). Figure 5 (b) shows one of the 576 solu-
tions that have been found.
Two experiments demonstrate the power of this
approach. In the first experiment we calculated all
solutions to color Birkhoff’s diamond using three,
four or five colors. Table 4 summarizes these re-
sults.
In the second experimentwe created several larger
graphs: we combined first two Birkhoff’s dia-
monds using some additional edges and thereafter
four Birkhoff’s diamonds in a similar way. Table
5 summarizes these results.
7 SUMMARY
There are several results presented in this paper.
1. Many finite discrete constraint-related problems
can bee modeled as a SAT-problem. It has been
shown that it is not necessary to write down the
huge number of clauses of the conjunctive forms
which must be solved by a SAT-solver. Based on
the explored properties of the problem, it is possi-
ble to generate partial solution sets of the restric-
tive properties of the problem.
2. A new implicit two-phase SAT-solver has been
used. In the first phase this SAT-solver creates
partial solution sets which are used in the second
phase to calculate the solution without any further
decisions.
3. The matrix of the partial solution sets describes
general constraints of the problem without any
consideration of clauses.
4. The use of the partial solution sets in the second
phase of the SAT-solver allows to solve the SAT-
problems very fast. The partial solution sets help
to restrict significantly the enormous search space.
The remaining clauses of the problem are replaced
by unions of partial solution sets which speed up
the solution procedure.
5. In many applications the Boolean modeling can
be considered as very efficient, and it is not neces-
sary to develop special algorithms; it is much eas-
ier to use a general methodology based on ternary
vectors.
REFERENCES
Lynce, I. and Ouaknine, J. (2006). Sudoku as a sat problem.
In Proceedings of the 9 th International Symposium
on Artificial Intelligence and Mathematics, AIMATH
2006, Fort Lauderdale. Springer.
Posthoff, C. and Steinbach, B. (2004). Logic Functions
and Equations - Binary Models for Computer Science.
Springer, Dordrecht, The Netherlands.
Posthoff, C. and Steinbach, B. (2006). A multi-processor
approach to sat-problems. In Proceedings of the 7th
International Workshop on Boolean Problems, pages
49–62, Freiberg University of Mining and Technol-
ogy, Freiberg, Germany.
Rossi, F., van Beek, P., and Walsh, T. (2006). Handbook of
Constraint Programming. ELSEVIER.
Steinbach, B. and Posthoff, C. (2009). Logic Functions and
Equations - Examples and Exercises. Springer Sci-
ence + Business Media B.V.
Weber, T. (2005). A SAT-based Sudoku solver. In Sut-
cliffe, G. and Voronkov, A., editors, LPAR-12, The
12th International Conference on Logic for Program-
ming, Artificial Intelligence, and Reasoning, Short Pa-
per Proceedings, pages 11–15.
THE SOLUTION OF DISCRETE CONSTRAINT PROBLEMS USING BOOLEAN MODELS - The Use of Ternary
Vectors for Parallel SAT-Solving
493