What went into the ledger
Our imaginary town employs a night clerk. The form has a box for the number of lit windows on each floor. On a cold night the clerk might like to add that someone was reading in the kitchen. There is nowhere on the form to put the kitchen.
Give the clerk another column for vertical counts, then two more for diagonals. A mathematical name for each of these views is a discrete X-ray. A discrete X-ray tells you how many points lie on each line parallel to a chosen direction. Here each lit window contributes one point, even if another light lies farther along the same line. The house holds still between readings. Gardner and Gritzmann, 1997.
Try it on the back of an envelope
Draw four floors with four windows apiece. Give each floor one light. Give each vertical stack one light too. If the top light moves one window to the left, can you move the other three so that every diagonal still gives its old count?
Unfold two drawings that work
Number the windows from left to right and read the floors from the roof down. In the first house light windows 3, 1, 4, 2. In the second light 2, 4, 1, 3. No light stays put. Each floor and each stack still contributes one.
Run a pencil along the diagonal that joins the second window on the top floor to the first window on the floor below. The second house lights the first end of your pencil. The first house lights the other. The clerk writes 1 both times. Slide the pencil parallel to itself from corner to corner. You will write 0, 1, 1, 0, 1, 1, 0 in either house. Turn the pencil to the other diagonal and the same seven numbers come back.
A stencil for the second house
Mark the four windows that went dark and the four that lit up. These eight marks are the moving part. At any of the other eight windows, light a lamp in both houses. Every line through that lamp gains one on each ledger. You can furnish those eight rooms however you please and keep the pair indistinguishable.
Choose a house on the sheet. Move one place across or down and a single shared window changes in both twins.
Eight independent switches give 256 settings. Each setting makes one pair. Are there other ways to fool all four views on this grid? There is room on the back of the envelope for that answer too.
Why this one stencil accounts for every pair
Subtract the second house from the first, window by window. Write +1 where the light belongs to the first house, −1 where it belongs to the second, and 0 wherever they agree. Give the top left square coordinates (0, 0), count columns c to the right and rows r downward. Store each signed entry as a coefficient on xcyr. Adding all the terms gives one polynomial F.
Set x to 1. Terms on the same floor collect at the same power of y. If row counts agree, their coefficients cancel and F(1, y) vanishes. That gives a factor x − 1. Setting y to 1 collects the vertical stacks and gives y − 1.
Put x = y = t. A window now contributes a power with exponent c + r, constant along each rising diagonal. Equal counts give the factor x − y. Finally set x = t and y = 1/t. Now the exponent is c − r, constant along each falling diagonal. Vanishing on that substitution gives the factor xy − 1.
These are distinct irreducible factors over the rationals, so their product divides F. The product already has degree three in each variable. A four-window side only has coordinates 0 through 3. There is room to multiply by a constant, and nothing more. Expanding (x − 1)(y − 1)(x − y)(xy − 1) gives +1 at windows 3, 1, 4, 2 and −1 at windows 2, 4, 1, 3, reading down the floors. A binary house difference can only scale this by 1 or −1, or by zero if the houses coincide. Turning the stencil over just exchanges the names of the two houses.
The whole street, counted
Imagine filing every possible house. Sixteen windows with two positions each give 65,536 drawings. Open a fresh folder each time a new list of line counts appears. Put every drawing with those counts into the same folder. Some folders hold one drawing and settle every window. Here is what extra directions do to the filing cabinet.
| Views recorded | Folders | Holding one | Most in a folder |
|---|---|---|---|
| Rows | 625 | 16 | 1,296 |
| Add columns | 16,145 | 6,902 | 90 |
| Add falling diagonals | 59,256 | 54,272 | 5 |
| Add rising diagonals | 65,280 | 65,024 | 2 |
In the last cabinet, 256 folders hold two drawings apiece. Those 512 houses are the whole population that can trade places across all four views. The remaining 65,024 houses each have a file to themselves.
Give each floor one more window and try to move between drawings with the same four-column stencil. Open the longer ledger.
The independent check draws all 65,536 houses, files their readings, and compares the pairs with the stencil. Download and run the check · research/the-lantern-census/verify.mjs.