Solving Combinatorial Counting Problems with Weighted First-Order Model Counting

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Wang, Yuanhong, Pu, Juhua, Zhou, Yuxu, Wang, Yuyi, Kuželka, Ondřej
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916042734829568
author Wang, Yuanhong
Pu, Juhua
Zhou, Yuxu
Wang, Yuyi
Kuželka, Ondřej
author_facet Wang, Yuanhong
Pu, Juhua
Zhou, Yuxu
Wang, Yuyi
Kuželka, Ondřej
contents Combinatorial counting problems pervade artificial intelligence, statistics, and discrete mathematics. Whether the task is enumerating subsets, multisets, permutations, partitions, or compositions under structural and arithmetic constraints, solving it remains a stubbornly manual exercise. Closed-form derivations are powerful but brittle, while naive encodings to propositional model counting or constraint satisfaction destroy the exchangeability that makes counting tractable in the first place. We present Cofola (COmbinatorial counting LAnguage with First-Order logic), a typed declarative language whose primitives are the combinatorial objects that recur in everyday counting questions, including sets, bags, tuples, sequences, circles, partitions, and compositions, together with natural relational and arithmetic constraints over them. A denotational semantics maps every Cofola program to a well-defined combinatorial counting problem, and a three-phase compilation pipeline (preprocessing, decomposition, and symmetry-preserving encoding) reduces this problem to a weighted first-order model counting (WFOMC) instance augmented with coefficient-extraction constraints. To stay inside known domain-liftable fragments whenever possible, the encoding groups indistinguishable entities, breaks the symmetry of unordered groupings lexicographically, and encodes sequences and circles via order axioms. On a suite of representative combinatorial counting problems, ranging from textbook math problems to multi-object scenarios that the closest prior framework cannot express, Cofola produces concise specifications and a uniform solving pipeline that is practical end-to-end.
format Preprint
id arxiv_https___arxiv_org_abs_2605_24845
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Solving Combinatorial Counting Problems with Weighted First-Order Model Counting
Wang, Yuanhong
Pu, Juhua
Zhou, Yuxu
Wang, Yuyi
Kuželka, Ondřej
Artificial Intelligence
Combinatorics
05A99
I.2.3; F.4.0
Combinatorial counting problems pervade artificial intelligence, statistics, and discrete mathematics. Whether the task is enumerating subsets, multisets, permutations, partitions, or compositions under structural and arithmetic constraints, solving it remains a stubbornly manual exercise. Closed-form derivations are powerful but brittle, while naive encodings to propositional model counting or constraint satisfaction destroy the exchangeability that makes counting tractable in the first place. We present Cofola (COmbinatorial counting LAnguage with First-Order logic), a typed declarative language whose primitives are the combinatorial objects that recur in everyday counting questions, including sets, bags, tuples, sequences, circles, partitions, and compositions, together with natural relational and arithmetic constraints over them. A denotational semantics maps every Cofola program to a well-defined combinatorial counting problem, and a three-phase compilation pipeline (preprocessing, decomposition, and symmetry-preserving encoding) reduces this problem to a weighted first-order model counting (WFOMC) instance augmented with coefficient-extraction constraints. To stay inside known domain-liftable fragments whenever possible, the encoding groups indistinguishable entities, breaks the symmetry of unordered groupings lexicographically, and encodes sequences and circles via order axioms. On a suite of representative combinatorial counting problems, ranging from textbook math problems to multi-object scenarios that the closest prior framework cannot express, Cofola produces concise specifications and a uniform solving pipeline that is practical end-to-end.
title Solving Combinatorial Counting Problems with Weighted First-Order Model Counting
topic Artificial Intelligence
Combinatorics
05A99
I.2.3; F.4.0
url https://arxiv.org/abs/2605.24845