This paper presents a comparison of SAT encodings for the at-most-k constraint, which is commonly used in combinatorial problems. Previous experiments have shown that the sequential-counter encoding is competitive for k > 1. The parallel-counter encoding is more compact than the binary-adder encoding but has been excluded due to its inability to enforce arc consistency through unit propagation. This paper introduces an experiment that demonstrates the remarkable performance of the binary-adder encoding for the at-most-k constraint. The experiment evaluates different encodings using the pigeonhole problem as a benchmark. The goal of this problem is to assign P pigeons to H holes, with each hole capable of holding up to K pigeons. The encodings are tested based on their CPU time using the Maple SAT solver. Table 1 provides a comparison of encodings for the at-most-one constraint in terms of CPU time and shows that some instances are small and unsatisfiable while others are large and satisfiable. Table 2 further compares encodings for ≤k (where k > 1) based on CPU time and reveals that the binary-adder encoding consistently performs better than both sequential counter and parallel counter encodings across various instances. The use of complete adders and enforcement of cardinality on all new variables contribute to its superior speed. In conclusion, this experiment demonstrates that the binary adder encoding exhibits astounding performance for solving combinatorial problems with the at most k constraint compared to other encodings such as sequential counter and parallel counter.
- Sequential-counter encoding is good when k is greater than 1.
- Parallel-counter encoding is smaller but lacks consistency.
- Binary-adder encoding works well for the at-most-k constraint.
- The experiment tests different encodings using a pigeonhole problem as a benchmark.
- Encodings are compared based on CPU time using Maple SAT solver.
Definitions
- Sequential-counter encoding: A way of representing numbers in order, useful when k is greater than 1.
- Parallel-counter encoding: Another way of representing numbers that takes up less space but may not be consistent.
- Binary-adder encoding: A method that performs well for the at-most-k constraint, where numbers are added together in binary form.
- Arc consistency: Ensuring that all constraints in a problem are satisfied and no contradictions occur through unit propagation.
- Pigeonhole problem: A mathematical problem used as a benchmark to test different encodings.
- CPU time: The amount of time it takes for a computer's processor to complete a task or calculation.
- Maple SAT solver: A software program used to solve logical problems and evaluate different encodings.
At-Most-K Constraint: A Comparison of SAT Encodings
Combinatorial problems are often solved using the at-most-k constraint, which limits the number of items that can be selected from a set. Previous experiments have shown that the sequential counter encoding is competitive for k > 1, while the parallel counter encoding is more compact but has been excluded due to its inability to enforce arc consistency through unit propagation. This paper introduces an experiment that demonstrates the remarkable performance of the binary adder encoding for this type of constraint.
The Pigeonhole Problem and Benchmarking
The experiment evaluates different encodings using the pigeonhole problem as a benchmark. The goal of this problem is to assign P pigeons to H holes, with each hole capable of holding up to K pigeons. The encodings are tested based on their CPU time using Maple SAT solver.
Table 1: At Most One Constraint Performance
Table 1 provides a comparison of encodings for the at-most-one constraint in terms of CPU time and shows that some instances are small and unsatisfiable while others are large and satisfiable.
Table 2: ≤k (where k > 1) Performance
Table 2 further compares encodings for ≤k (where k > 1) based on CPU time and reveals that the binary adder encoding consistently performs better than both sequential counter and parallel counter encodings across various instances. The use of complete adders and enforcement of cardinality on all new variables contribute to its superior speed.
Conclusion
In conclusion, this experiment demonstrates that binary adder encoding exhibits astounding performance for solving combinatorial problems with at most k constraints compared to other encodings such as sequential counter and parallel counter.
The at-most-k constraint is ubiquitous in combinatorial problems, and numerous SAT encodings are available for the constraint. Prior experiments have shown the competitiveness of the sequential-counter encoding for k $>$ 1, and have excluded the parallel-counter encoding, which is more compact that the binary-adder encoding, from consideration due to its incapability of enforcing arc consistency through unit propagation. This paper presents an experiment that shows astounding performance of the binary-adder encoding for the at-most-k constraint.