Near-Optimal Encodings of Cardinality Constraints
Abstract
We present several novel encodings for cardinality constraints, which use fewer clauses than previous encodings and, more importantly, introduce new generally applicable techniques for constructing compact encodings. First, we present a CNF encoding for the constraint using clauses, thus refuting the conjectured optimality of Chen's product encoding. Our construction also yields a smaller monotone circuit for the threshold-2 function, improving on a 50-year-old construction of Adleman and incidentally solving a long-standing open problem in circuit complexity. On the other hand, we show that any encoding for this constraint requires at least clauses, which is the first nontrivial unconditional lower bound for this constraint and answers a question of Ku\v{c}era, Savick\'y, and Vorel. We then turn our attention to encodings of , where we introduce "grid compression", a technique inspired by hash tables, to give encodings using clauses as long as and clauses as long as . Previously, the smallest known encodings were of size for and for .
Keywords
Cite
@article{arxiv.2603.28954,
title = {Near-Optimal Encodings of Cardinality Constraints},
author = {Andrew Krapivin and Benjamin Przybocki and Bernardo Subercaseaux},
journal= {arXiv preprint arXiv:2603.28954},
year = {2026}
}
Comments
15 pages (body) + 22 pages of appendix, 6 figures. Comments welcome! (v2 fixes minor typos)