arXiv · 2605.04629
CombOL: a Library for Practical Enumeration and Boltzmann Sampling of Combinatorial Classes
Abstract
We present CombOL (Combinatorial Objects Library), an open-source library for the enumeration and Boltzmann sampling of combinatorial classes. Classes can be specified by a concise string syntax, and may depend on an arbitrary number of parameters. CombOL automatically derives the associated generating functions, enabling the generation of counting sequences and the compilation of Boltzmann samplers. The library supports exact and approximate-size Boltzmann rejection sampling with automatic parameter tuning to target specific sizes. In addition to implementing established methods, CombOL contributes a novel early-rejection scheme, as well as guaranteed statistical correctness by dynamically increasing the numerical precision, eliminating bias due to floating-point rounding errors. Through the Python interface, sampled structures can be mapped to application-specific objects, enabling direct sampling of domain objects such as graphs, chemical structure representations, or other complex data types. CombOL is available from PyPI as 'combol' (pypi.org/project/combol). The source code is available at gitlab.com/casbjorn/combol.
Explore related subjects
Keep this discovery
Casper Asbjørn Eriksen, Daniel Merkle. 2026-05-06. CombOL: a Library for Practical Enumeration and Boltzmann Sampling of Combinatorial Classes. https://arxiv.org/abs/2605.04629
Cite the original work for its findings. Save a collection to share your selection of sources.