Lesson · Intermediate

The squeeze and the ceiling: minimum and maximum fill

Almost every deduction in a thermometer puzzle that isn't a simple count comes from one idea: compare what a line needs with what the rest of the line can supply. This lesson turns that idea into a precise, repeatable rule.

Updated · 5 min read

Part of the complete guide to solving thermometer puzzles · lesson 5 of 10

The rule in one sentence

Pick a line and one thermometer in it. Work out the least and the most mercury the rest of the line can still supply. The thermometer must supply what's left over, so its share of the line is at least clue − rest max and at most clue − rest min.

need ≥ c − (rest max)
need ≤ c − (rest min)

That's all there is to it. A lower limit above zero is the squeeze: the thermometer must fill at least that far, and because mercury rises from the bulb, the first cells are certain. An upper limit below the thermometer's length in that line is the ceiling: anything further along is air.

The squeeze, worked

A row of 7 needs 5. It holds a 4-cell thermometer (bulb on the left) and a 3-cell thermometer (bulb on the right), and nothing is known yet.

5
Row of 7 needing 5: before
5
After the squeeze: three cells are certain
  • For the 4-cell thermometer, the rest of the line (the 3-cell one) can supply at most 3, so it needs at least 5 − 3 = 2: its first two cells.
  • For the 3-cell thermometer, the rest can supply at most 4, so it needs at least 5 − 4 = 1: its bulb is certain.
  • The upper limits (5 − 0 = 5 for each) are longer than the thermometers themselves, so there is no ceiling here. The squeeze has given three certain cells, and which of the remaining cells hold the other two depends on the crossing columns.

The ceiling, worked

Same row, but now the clue is 2 and one cell is already known to be mercury: the bulb of the right-hand thermometer.

2
Row of 7 needing 2 with one known: before
2
After the ceiling: three cells become air
  • The rest of the line already has at least 1 (the known bulb), so the left thermometer can have at most 2 − 1 = 1 cell: everything after its bulb is air.
  • The left thermometer has at least 0, so the right one can have at most 2 − 0 = 2: its third cell is air.

Notice that nothing here is certain mercury except what was given. The ceiling only removes possibilities, and that is often what unlocks the crossing columns.

Crossing thermometers: the 0-or-1 case

A straight thermometer that crosses a line puts exactly one of its cells into that line. Its contribution is therefore 0 or 1, and it is 1 only if the mercury reaches that cell. This makes the rule very sharp. Below, the middle row needs 1, and column 1's thermometer already has mercury in that row.

1
The middle row needs 1, and it already has it.
1
Every other crossing is air, and air flows on to the tips.

The rest of the row already supplies 1, so each other crossing thermometer has a ceiling of 0 in this row. Its middle cell is air. Then flow takes over: for thermometers with the bulb at the top, everything below the middle is air too, and for those with the bulb at the bottom, everything above it. One ceiling decided 8 cells.

A step-by-step method

  1. Choose a line where the clue is close to its current minimum or maximum. Those lines have the least slack.
  2. Write down, for each thermometer in the line, the least and most it can still put into the line (from what you already know).
  3. Add them up to get the line's overall minimum and maximum.
  4. For each thermometer, compute rest min = line min − its own min, and rest max = line max − its own max.
  5. Apply the rule: its share lies between c − rest max and c − rest min. Fill from the bulb or mark air from the tip side accordingly.
  6. Spread the new cells along their tubes, and repeat on any line that changed.
Why this always works: it is exactly the reasoning our puzzle generator uses to check that every puzzle can be solved without guessing. Each step of our solved 6×6 example is one application of this method to a single line.

Thinking in "slack"

A quicker way to see squeezes is to think about slack, the gap between the most a line could hold and what it needs. If a line's maximum is 6 and its clue is 5, it has a slack of 1. Every thermometer in it can then be "short" by at most one cell. So any thermometer that can still reach k cells into the line is certain to have at least k − 1. The ceiling works the same way with the gap between the clue and the minimum.

Questions

Is the squeeze the same as the overlap rule?
The overlap rule is the squeeze in the special case where nothing in the line is known yet and every other cell is assumed free. The full squeeze also uses what you already know, so it keeps working in the middle of a solve.
Do I need to do this arithmetic for every line?
No. With practice you will spot most squeezes at a glance: a big clue with little room left, or a small clue with a long thermometer. Do the full count only when a line looks close.
What if neither the squeeze nor the ceiling finds anything?
Try combining two neighbouring lines (see bridging), or use a hint in the game. It will point at a cell that follows from the current board.

Practise the squeeze

8×8 and 10×10 puzzles are where these techniques shine.

Play 8×8 →