Nine Digits, Four Windows, and a Middle That Cannot Move
Nine slots hold the digits 1 to 9 and four overlapping windows each add to 20. One subtraction pins the centre digit to 5 with no search at all, and the same structure classifies every arrangement: there are 96 of them, falling into 48 mirror pairs. Change the target and the centre is forced to an odd digit that sometimes admits nothing.
Nine slots sit in a row. Into them go the digits 1 through 9, each used exactly once. Four windows of consecutive slots are marked on the row, and every window has to add up to 20: slots 1 to 4, slots 2 to 6, slots 4 to 8, and slots 6 to 9. The usual phrasing then asks what the values are.
There are 96 answers. That is the first thing worth saying, because the phrasing invites you to hunt for the arrangement, and hunting is the wrong move. Swap two digits, recheck four sums, swap again. It works eventually and it teaches nothing. The four conditions do not pin down a row. They pin down a skeleton, and one slot inside that skeleton is nailed to a single value in all 96 cases. Finding that slot takes one subtraction and no search whatsoever.
Two windows that miss the middle
Write for the digits in the nine slots. The conditions are
Now look only at the first window and the last one. Slots 1 to 4, and slots 6 to 9. They share no slot at all, and between them they cover eight of the nine positions. The one position they both miss is slot 5. Because they are disjoint, adding their two equations counts eight distinct digits once each, with nothing double counted:
The nine digits together add to 45, the ninth triangular number. Slot 5 is whatever is left over:
That is the entire argument for the middle digit. No case analysis, no trial, and no appeal to the two inner windows. It is forced rather than merely consistent, which is a distinction worth being pedantic about: the derivation used only the two window sums and the fact that each digit appears once, so nothing else could have gone there.
The choice of windows is doing real work. Try the same trick on the two inner windows, slots 2 to 6 against slots 4 to 8. They overlap in slots 4, 5 and 6, so adding them triple counts three digits and the resulting 40 tells you nothing about anything. Disjointness is the load bearing property, and among the four windows there is exactly one disjoint pair.
Subtracting neighbours
Two more relations fall out of the overlaps, and they are what turn one forced digit into a complete classification. The second window contains the first one minus slot 1 plus slots 5 and 6, so subtract them:
The shared block cancels, which is the only reason this is painless. Substituting the value we already have for the middle:
The second half of that comes from doing the same thing at the far end, third window minus fourth window, which cancels and leaves .
Both relations immediately constrain the digits. Since we get , and the same bound applies to . Neither can be 5, because slot 5 has taken it. And they cannot be equal to each other, since would force , which no permutation allows.
Write and . Every solution has , has and distinct in , and has its two end digits determined by them: and . Only slots 2, 3, 7 and 8 are still free, and they hold the four digits nobody has claimed.
Every solution at once
Choosing the ordered pair is 4 times 3, so twelve ways. That choice fixes five of the nine slots. The four digits still unplaced are interesting: the large digits are , which is exactly through , and two of them have been used as and . So if and are the two small digits left over, the leftovers are precisely .
The first window now reads , and the last window gives the same number for . The two free pairs must therefore carry equal sums:
The last equality holds because . So the question reduces to splitting four known digits into two pairs of equal sum. There are three ways to cut four things into two pairs, and only one of them can ever work:
The first split is off by 10 and the second by , so the balanced split is unique and it never depends on which digits happened to be left. That is a small thing but it is the reason the count is clean. Two decisions remain: which balanced pair goes on the left, and the order inside each pair. Eight fillings per choice of , so
The inner windows never needed checking. Substituting and into the second window gives identically, and the third window collapses the same way. Four conditions that look independent behave like the first and the last plus the two subtraction relations, which is why the solution set is as large as it is.
The row that usually gets quoted as the answer, 6 8 4 2 5 1 3 9 7, is one of the 96 and it sits in the skeleton exactly where it should: and , so and , and the leftovers 3, 4, 8, 9 balance as 4 plus 8 on the left against 3 plus 9 on the right. All four windows check out at , , and . Handing that row over as the answer is not wrong so much as incomplete, and the honest reply names the invariant instead: the middle is 5, and there are 96 ways to dress it.
The mirror
Reversing the row sends slot to slot . Watch what that does to the windows: slots 1 to 4 becomes slots 6 to 9, and slots 2 to 6 becomes slots 4 to 8. The set of four conditions is unchanged, so reversal permutes the solutions among themselves. In skeleton terms it swaps and .
Since always, no solution can equal its own reversal. A palindromic arrangement would need , and we ruled that out three paragraphs ago. So reversal is an involution with no fixed points, and the 96 solutions fall into 48 mirror pairs. The count being even is structural rather than accidental. Reversing the quoted row gives 7 9 3 1 5 2 4 8 6, which is a different solution with the same 5 in the middle.
Other targets, and where the argument stops
Nothing in the disjoint cover step cared that the target was 20. Replace it by a general and the same subtraction gives
which is always odd. Whatever target you pick, the centre digit can never be even. For it to be a digit at all we need , so is confined to 18, 19, 20, 21, 22 and every other target makes the system empty on sight.
Inside that window the behaviour is uneven. At the forced middle is 9, a perfectly legal digit, and yet nothing works: relation (4) reads , which no digit can satisfy. A value being forced and being achievable are separate questions, and this is the cleanest place to see the gap. The four surviving targets give 16, 96, 16 and 112 solutions with middles 7, 5, 3 and 1, so the symmetry of the counts around that you might expect is simply not there.
What carries over from this puzzle is the reasoning rather than the number. When someone hands you a pile of overlapping constraints, the useful first move is to look for a pair that does not overlap, because such a pair adds without double counting and a forced value tends to be hiding in the remainder. Everything else here, the twelve ordered choices and the eight fillings and the 48 mirror pairs, followed from one subtraction that took less time than checking a single candidate row.
Sources and further reading
- The 45 that makes the whole thing work — Triangular number
- Overlapping conditions as a linear system — System of linear equations
- Arrangements of the nine digits — Permutation
- Why a fixed point free involution forces an even count — Involution (mathematics)
Every count above was produced twice. Once by the classification in this article, which builds each solution from an ordered pair and a balanced split, and once by walking all 362,880 orderings of the nine digits and testing the four window sums directly. The two sets agree exactly: 96 solutions, and a 5 in the middle of every one.
Comments · 0
Be the first to comment.