Ganak is a high-performance exact model counter: given a CNF formula, it tells you how many satisfying assignments it has, optionally projected onto a set of variables and weighted. It won all available awards at the 2024 and 2025 Model Counting Competitions. It can count over any field, including integers, rationals, complex numbers, integers modulo a prime, and polynomials over a finite field.

Ganak runs in probabilistic mode by default, and can also run fully non-probabilistically (--prob 0), or switch to ApproxMC after a timeout to give an approximate count (--appmct). It should be used together with our preprocessor, Arjun. Release binaries are on GitHub, it is available via Nix, and you can try it in your browser.

The ideas behind Ganak are described in Engineering an Efficient Probabilistic Exact Model Counter (CAV 2025) and the original GANAK: A Scalable Probabilistic Exact Model Counter (IJCAI 2019). For the story of how it came about, see Ganak: The Making of a Versatile, High Performance Model Counter and Ganakv2 Released.