Araf

Cut the grid into rooms. Every room holds exactly two numbers, and its area sits strictly between them — numbers 2 and 6 mean a room of 3, 4 or 5 cells. Drag across cells to draw a room; tap a finished room to take it back.

the board

room — two numbers, legal size unfinished — not two numbers yet wrong — size outside the window proved — what the selected rung already knows

Most pairs of numbers were never going to be a room

A room holds exactly two numbers, so the first question is which two numbers could ever share one. Three things can rule a pair out before any search starts, and all three are cheap.

Over the 72 boards shipped here that is 33,426 pairs of numbers reduced to 4,333 — 13.0% survive. The third screen is the one I expected to be a rounding error and it is not: it alone accounts for 5,474 pairs, 16.4% of the total.

boardpairsno size fitstoo farblocked by a thirdalive
6×6236.57766.653.339.7
8×8692225.9286.698.880.7

The numbers only ever argue about size

Take a finished board and move one cell from room i to a neighbouring room j. Every other room is untouched, both rooms still hold their own two numbers, and the only thing the rules can complain about is that i has fallen under its floor or j has risen over its ceiling. So a board with one answer needs, for every such move, that the donor already sits at its floor or the receiver already sits at its ceiling.

Checked the blunt way: all 1,992 one-cell donations across the shipped boards are illegal. 554 of them are stopped by the donor's floor, 284 by the receiver's ceiling, and 1,287 never got that far because taking the cell out breaks the donor in two.

Now swap one cell each way between two rooms. Both sizes come out unchanged. Both rooms keep their numbers. The rules have nothing whatsoever to say about it — the entire vocabulary of Araf is room size, and a trade keeps every room size on the board. All 665 trades available on the shipped answers are illegal, and every single one of them is illegal because a room falls apart, never because of a number.

Which is why most of the rigidity is not in the numbers

That was the thing I got wrong going in. The numbers look like the whole puzzle — they are all that is printed on the board — so I expected them to be what pins the answer down. Count the one-cell perturbations of the shipped answers and they are not:

what could movecountshare
killed by the shape of the rooms1,95273.5%
killed by a floor or a ceiling70526.5%
total2,657100%

73.5% of the way this puzzle holds still is connectivity, not arithmetic. The numbers are the part you read; the geometry is the part that does the work.

The ration

Every cell lands in exactly one room, so the room sizes add up to the grid. Write lo and hi for the floor and ceiling of each room and the whole board is squeezed between two sums:

Σ lo ≤ cells ≤ Σ hi

The solver uses the same inequality on what is left: each number that has not been given a room yet is half of a room, so the cheapest and dearest room it could possibly belong to bound the cells still open. That is the ration rung, and it is the only thing on the ladder that knows anything global.

The distance the board sits above its floors plus the distance it sits below its ceilings is exactly the total slack — the number of widenings the generator managed to sneak past the uniqueness check. On the shipped boards that splits 9.9 above and 28.1 below at 8×8.

And the one-cell lemma has a consequence worth stating on its own: a room that can afford to give a cell away must never sit next to a room that can afford to take one. Of 1,074 shipped rooms, 497 can only take, 156 can only give, 269 can do both and 152 are pinned exactly. 0 pairs of them break the rule.

boardroomsnumberspairsalive pairsrooms in the catalogueslack
6×611.122.1236.539.728425.6
8×818.837.669280.777838.1

The dial is slack

The generator draws the rooms, hands each one the tightest numbers that describe it — size−1 and size+1, the only pair that pins a size exactly — and then gives the board back as much freedom as it can survive, one widening at a time. The dial below skips the checking: take a board that is unique when tight, widen k windows at random, and ask whether the answer is still alone.

wideningsdrawnuniquerate
0120120100.0%
41205545.8%
81201411.7%
121201210.0%
1612010.8%
2412000.0%
3212000.0%
4812000.0%

That is 6×6. An 8×8 has more room and the same shape of curve — 46.7% at 4 widenings, 16.7% at 8, 0.8% at 16 — and the boards shipped here carry 38.1 widenings each. Doing that at random works 0.0% of the time. Every one of them had to be checked.

Which is also why the generator refuses so much: it kept 38.1 of the 109.4 widenings it tried on an average 8×8, and when it stops, every remaining widening of every window has been tried and refused. The board is a local maximum, and npm test re-derives that from the shipped file rather than taking the generator's word for it.

Boards do not happen by accident

Random rooms, numbers drawn around them, a handful of random widenings, and then ask for the answers:

boardwideningsdrawnone answermore than one
6×662009191
6×6122000200
8×8102000200
8×8202000200

Note what never happens: a board built this way always has at least one answer, because it was built around one. Uniqueness is the part that has to be earned, and at 8×8 it never once turned up by itself in 400 draws.

Both ways of misreading "between" delete the puzzle

The rule is usually written "the number of cells is between the two numbers", and the two things people drop are the word strictly and the word edge.

Read between as inclusive and two numbers one apart — or two equal numbers — suddenly describe a room. The first screen stops firing, the catalogue swells, and nothing is unique any more.

Let a room hold together through a corner instead of only through an edge and it is worse: the catalogue grows by an order of magnitude, because a room of five cells has far more shapes when diagonals count.

misreadingboardboardsrooms (official)roomsalive pairs (official)alive pairsstill unique
inclusive6×61226453539.7580
8×8127311,78878.3121.10
diagonal6×6122642,10639.781.10
8×8127316,93778.31790

Every board sampled runs past the 2,000-answer counting cap under both misreadings, and not one of them is unique. The intended answer stays legal in both cases, which is exactly what makes the misreadings dangerous: nothing looks wrong until you notice that a second answer exists.

The ladder

Four rungs over the same catalogue of possible rooms. The number is the share of cells whose room the rung can name on its own, averaged over the bank.

rung6×68×8
pair5.6%3.4%
cell26.6%12.6%
ration100%100%
search100%100%

The interesting part is what the widening does to that. Graded before any widening — every window as tight as it goes — 35 of the 72 boards fall to cell on its own. Graded as shipped, that is 1. Slack is the difficulty.

Counting, to make sure the enumerator is telling the truth

The room enumerator is the load-bearing piece of the solver: miss one connected set and the answer count is wrong in a way nothing else would catch. Pointed at a single cell of an empty grid it has to reproduce the fixed polyominoes, A001168, exactly.

cellscounted hereA001168
111
222
366
41919
56363
6216216
7760760
82,7252,725
99,9109,910
1036,44636,446

And for scale, the space an Araf answer lives in: the number of ways to cut a grid into edge-connected rooms at all, which for the square cases is A145835. The second column restricts the rooms to the 2..5 cells this generator draws.

gridcuts into roomsrooms of 2..5
1×110
2×2123
2×37412
3×31,434118
3×427,7801,020
4×41,691,69021,190

Two engines

The pair screen and the ration are the load-bearing claims here, so both are checked against an engine that has neither: take the first cell nobody owns, grow every connected set out of it that happens to hold two numbers and a legal size, recurse, and never think about anything. On the boards small enough for it to finish, the two agree — 60 boards, 0 disagreements — and they agree on the answer set, not only the count. The same check runs under the inclusive misreading, where the screens behave completely differently.