Skip to main content
QUICK REVIEW

[Paper Review] Encoding Cardinality Constraints using Generalized Selection Networks

Michał Karpiński, Marek Piotrów|arXiv (Cornell University)|Apr 14, 2017
Rough Sets and Fuzzy LogicComputer Science1 citations
TL;DR

This paper introduces two novel families of generalized selection networks—m-Wise Selection Network and m-Odd-Even Selection Network—that use m-sorters (for m ≥ 2) instead of traditional 2-sorters (comparators) to encode Boolean cardinality constraints more efficiently. By recursively partitioning inputs into m columns, selecting k largest elements in each, and merging them via multi-way merging, the approach reduces the number of auxiliary variables and clauses in CNF encodings, leading to significant speedups in SAT-solving performance, especially for larger k and n, with 4-Odd-Even Selection Network outperforming state-of-the-art encodings in experiments.

ABSTRACT

Boolean cardinality constraints state that at most (at least, or exactly) $k$ out of $n$ propositional literals can be true. We propose a new class of selection networks that can be used for an efficient encoding of them. Several comparator networks have been proposed recently for encoding cardinality constraints and experiments have proved their efficiency. Those were based mainly on the odd-even or pairwise comparator networks. We use similar ideas, but we extend the model of comparator networks so that the basic components are not only comparators (2-sorters) but more general $m$-sorters, for $m \geq 2$. The inputs are organized into $m$ columns, in which elements are recursively selected and, after that, columns are merged using an idea of multi-way merging. We present two algorithms parametrized by $m \geq 2$. We call those networks $m$-Wise Selection Network and $m$-Odd-Even Selection Network. We give detailed construction of the mergers when $m=4$. The construction can be directly applied to any values of $k$ and $n$. The proposed encoding of sorters is standard, therefore the arc-consistency is preserved. We prove correctness of the constructions and present the theoretical and experimental evaluation, which show that the new encodings are competitive to the other state-of-art encodings.

Motivation & Objective

  • To develop a new class of selection networks that generalize comparator networks by using m-sorters (m ≥ 2) instead of only 2-sorters to encode cardinality constraints.
  • To reduce the number of auxiliary variables and clauses in CNF encodings of cardinality constraints, improving efficiency for SAT solvers.
  • To eliminate the need for costly optimization of splitting points in hybrid encodings, as seen in prior work.
  • To maintain arc consistency through standard m-scanner encoding, ensuring compatibility with SAT solvers.
  • To evaluate the practical performance of the new encodings on real-world benchmark suites and compare them to state-of-the-art methods.

Proposed method

  • The method uses a divide-and-conquer strategy: inputs are split into m columns, and k largest elements are recursively selected in each column using m-sorters.
  • The selected subsequences from each column are merged using a multi-way merging network, with detailed constructions provided for m = 4.
  • Two distinct merging networks are introduced: 4-Wise Merging Network (based on Gao et al. multi-way merging) and 4-Odd-Even Merging Network (generalization of Batcher’s odd-even merging).
  • The encodings of m-sorters are standard, preserving arc consistency and enabling efficient SAT solving.
  • The construction is parametric and works for any k and n, allowing integration with direct encoding for small subproblems.
  • The approach avoids the power-of-two input size restriction of prior work, making it more broadly applicable.

Experimental results

Research questions

  • RQ1Can generalized m-sorters (m ≥ 2) be used to build more efficient encodings of cardinality constraints than traditional 2-sorter networks?
  • RQ2Does using multi-way merging with m = 4 reduce the number of variables and clauses in CNF encodings compared to 2-column pairwise or odd-even networks?
  • RQ3Can the new encodings achieve better SAT solver performance without requiring expensive optimization of splitting points?
  • RQ4Is the 4-Odd-Even Selection Network more efficient than the standard Odd-Even Selection Network in terms of variable and clause count for large k and n?
  • RQ5Does the generalized selection network approach maintain arc consistency and enable incremental strengthening in SAT solving?

Key findings

  • The 4-Odd-Even Selection Network reduced the number of variables and clauses in CNF encodings compared to the standard Odd-Even Selection Network for sufficiently large k and n.
  • The 4-Odd-Even Selection Network achieved a 2× speed-up in SAT solver runtime on the MSU4 benchmark suite compared to the CS encoding, with 50% fewer time-outs.
  • The 4-Wise Selection Network outperformed the PCN encoding, reducing total running time by approximately 18,000 seconds (5 hours) and cutting time-outs by 75% on the MSU4 suite.
  • On the PB15 suite, 4OE was the fastest encoding, finishing 20,000 seconds faster than CS, with total running times within 1% of other encodings but significantly better in solving capacity.
  • Cactus plots confirmed that 4OE consistently solved more instances faster than all other encodings, especially on MSU4, and 4WISE was the second-best performer.
  • The encodings based on generalized selection networks showed superior performance in practice, with significant speed-ups and reduced resource usage, validating their practical superiority over existing state-of-the-art methods.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.