Pick a number between 1 and 6,670,903,752,021,072,936,960
Go on. Any number. Say 3,141,592,653,589,793,238.
There are 6,670,903,752,021,072,936,960 valid ways to complete a 9×9 sudoku grid — about 6.7 sextillion. Nobody has seen them all, and nobody ever will; the universe doesn't contain enough time to write them down.
The engine I've been building can hand you grid number 3,141,592,653,589,793,238: that specific grid, the one at your index in the full ordered catalogue of every valid grid that can ever exist. It arrives in moments, from a compiled model of the entire space small enough to attach to an email.
That's a complete, addressable catalogue of a space too large to ever exist physically, folded into a few kilobytes, answering questions at conversation speed.
That's the party trick. The rest of this post is why it isn't a trick.
The machine behind it
On 20 July this engine reproduced one of the hardest exact counts ever computed: L(11), the number of 11×11 Latin squares — forty-eight digits, matched digit for digit against a value that had stood unchallenged for fifteen years. On a desktop computer.
The machine that did it is not sudoku software. It is not Latin-square software. Give it any rule-bound space: variables, the values they can hold, and the rules they must obey. It returns the exact number of valid configurations. No sampling. No estimate. No enumeration. It counts spaces it never looks at, and it proves its own work as it goes: every answer either survives an independent cross-check or the engine refuses to emit it.
Puzzles were the proving ground, because puzzles come with answer keys. The keys are used up. What's left is everything else.
Four things an estimate can't give you
The size. Take the constraint-programming literature's favourite industrial benchmark: the Renault Mégane configuration problem, 99 variables and 113 compatibility tables describing a real car's real option rules. How many orderable cars is that? Exactly 2,835,456,006,272. The engine produces that number in 1.6 seconds, an effective rate of nearly two trillion configurations a second, possible only because it never looks at them one at a time. The busybox feature model, 631 options from a real codebase: a 139-digit count, in milliseconds. A published automotive feature model, 2,513 features: a 218-digit count, matching the published value digit for digit. Where an answer key exists, it matches it. Where none exists, it mints the number, with the same machinery and the same certainty.
The address. Counting a space means every member has a number, and the engine goes from number to member directly, like the sudoku grid you just picked. That turns a counter into a perfect sampler: draw random indices and you get configurations uniformly from the valid space, no bias, no rejected candidates, seeded so a colleague or a regulator can redraw exactly your sample. Uniform test cases over a space of 10²¹ — something generate-and-discard can't offer.
Zero. Counting to zero is a proof of impossibility. "No valid configuration violates this rule": ten million passing samples make that sentence likely; an exact count of zero makes it a theorem. There is an entire class of guarantees that only exact methods can sign.
Exact probability. The chance of an outcome is one count divided by another. Compute both exactly and you have probabilities down at 10⁻⁴⁰, magnitudes no simulation could ever reach, because the event would never once appear in the sample.
The one-in-a-trillion problem
Here is where every estimate quietly fails. Monte Carlo finds what is common. Sample a billion configurations of a system whose dangerous state lives in one configuration in a trillion, and you will see it zero times, and you will report, with beautiful confidence, that it doesn't happen. The estimate isn't off by a little; it's wrong by everything, in exactly the regime where being wrong costs the most: the collision, the deadlock, the incompatible build, the leak.
Exact counting does not care how rare something is. One configuration in 10⁴⁰ is counted with the same certainty as half of them. When the rare case is the failure case, that's the whole game.
Compile once, interrogate forever
The engine compiles a space into a queryable model, and then questions cost seconds, not recomputation. How many variants survive if we discontinue this option? What does the space look like under one market's regulations? What's the cheapest valid build, and the average price across all 2.8 trillion? Count, extract, sample, narrow, price: asked and answered against the compiled artifact at interactive speed, every answer exact, so answers chain into bigger answers without a single compounding error.
What-if analysis over astronomical spaces, at the speed of a conversation — a different instrument, not a faster estimate.
Where this lands
Anywhere rules carve a huge space, which, once you see it, is everywhere:
- Configurable products: vehicles, industrial equipment, insurance, software plans. Exactly the Renault shape. Which options are secretly dead? What did last month's rule change actually remove? The industry answers these by folklore. It doesn't have to.
- Software product lines: feature models like busybox's are how an entire industry describes its variability, and they are counting problems end to end.
- Schedules, reliability, verification, security, experimental design: is the feasible space ten rosters or ten trillion; in how many failure combinations does the network stay up; how many states satisfy the spec, and how many satisfy it in ways you never intended; how much did that observation really narrow an attacker's search. All of it: counts.
And some answers have to be signed: a safety case, a regulatory submission, a contractual guarantee. In those rooms, "approximately, probably" was never an answer at all. An exact count reproduces or it doesn't. That's what defensible means.
Against the field
Claims like these deserve a control group. So the engine was raced against the strongest open exact counters in the world: same idle desktop, eight minutes per attempt, every finishing count verified against the published answer. The whole matrix was re-run from scratch the day this was written; not one count was wrong, theirs or ours.
On structured spaces, where any rival finished at all, the engine finished 3× to 165× faster. The 6×6 sudoku space: the best competitor needed four and a half minutes, two others never finished, and the engine took 1.6 seconds.
And on three instances (order-6 Latin squares, 7×7 sudoku, 15-queens) the engine was the only tool that finished at all. Every competitor ran out its clock with nothing to show. The engine returned the exact count, and the count checked out.
Bring me a space
Ten years. One desktop. A catalogue of every sudoku grid that will ever exist in a file you could email, a fifteen-year-old record in combinatorics matched to its last digit, and a real car's configuration space counted before you finish reading its name.
Somewhere in your work there is a number nobody has ever known — a space everyone estimates, samples, or shrugs at. I'd like to compute it.