Field

Computation — page 5

A fixed set of operations, and the exact question of what it can and cannot build.
A square cut into rectangles of ratio φ squared. 1/r@(0.0000,0.0000) 0.1273×0.3333; r@(0.1273,0.0000) 0.8727×0.3333; 1/r@(0.0000,0.3333) 0.1273×0.3333; r@(0.1273,0.3333) 0.8727×0.3333; 1/r@(0.0000,0.6667) 0.1273×0.3333; r@(0.1273,0.6667) 0.8727×0.3333

The rectangles a square can be cut into

Cut a square into rectangles that all have the same shape — the same ratio of long side to short, in any sizes, lying either way. Two to one is easy. The golden ratio is impossible, however many pieces are used and however small. The ratio φ squared works with six. What decides it is not the ratio but its partner: the number obtained by changing the sign of the square root, which must be positive. Changing that sign is a map that keeps every sum and product and scrambles every size, and areas that must add up to one cannot all turn negative.

The Golay code drawn from an icosahedron. generator rows f19001 e72002 eac004 47d008 8bb010 33e020 bca040 7d4080 de1100 2e7200 58f400 957800; weight distribution 0:1 8:759 12:2576 16:759 24:1.

A code built from an icosahedron

Write down which corners of an icosahedron are not joined by an edge, put the table beside a diagonal of ones, and add the twelve rows together in every combination. The 4,096 strings of 24 bits that come out differ from each other in at least eight places, occur in only five weights, and — with one bit deleted — fill the space of 23-bit strings so exactly that every one of the 8,388,608 lies within three flips of exactly one of them. This is the Golay code, which carried Voyager's pictures home, and its words of weight eight cover every five of the twenty-four positions exactly once.

A word that survives losing any one of its bits. codeword 100110010110, a=0 mod 13; deletions at 1..12 all decoded.

A code that survives a lost bit

A flipped bit leaves the word the right length and wrong in one place; a lost bit leaves it one short, with no sign of where the gap was. Keep only the words whose 1s sit at positions adding up to a multiple of n + 1, and any single lost bit can be put back. The price is about log₂(n + 1) bits, the same as the Hamming code pays for a flip.

A Kloosterman sum, drawn one term at a time. p=1009: K(1,1;p)=20.255823, 2√p=63.529521, angle 71.407°.

A sum that never leaves its circle

Add up e^(2πi(x + x̄)/p) over the nonzero x modulo a prime, where x̄ is the inverse of x. A thousand unit steps could go a thousand units; Kloosterman's sum never goes beyond 2√p, and at a fixed prime its values over every choice of coefficient fall on a semicircle whose moments are the Catalan numbers. Follow one sum through the primes instead and the same semicircle appears — and nobody can prove it.

Dudeney's four pieces, as a triangle and as a square. Dudeney dissection of the equilateral triangle of side 2 (area 1.732051) into a square of side 1.316074: J at (0.25451, 0.44082), K at (0.75451, 1.30685); piece areas 0.40568, 0.68076, 0.39787, 0.24775.

Dudeney's four pieces are the fewest

In 1902 Henry Dudeney cut an equilateral triangle into four pieces that rearrange into a square, and hinged them so the triangle folds into the square in one motion. For a hundred and twenty-two years nobody could say whether three pieces would do. In December 2024 Erik Demaine, Tonan Kamata and Ryuhei Uehara proved they would not. The construction, built exactly here, shows why four is natural; the proof shows why it is necessary.

How many words can survive two lost bits. Two-deletion-correcting code sizes by length: n=4: optimum 2, greedy 2, Helberg 2; n=5: optimum 2, greedy 2, Helberg 2; n=6: optimum 4, greedy 4, Helberg 3; n=7: optimum 5, greedy 5, Helberg 4; n=8: optimum 7, greedy 6, Helberg 5; n=9: optimum 11, greedy 9, Helberg 6; n=10: optimum -, greedy 13, Helberg 8; n=11: optimum -, greedy 20, Helberg 9; n=12: optimum -, greedy 29, Helberg 11; n=13: optimum -, greedy 46, Helberg 15.

Two lost bits

One congruence repairs any single lost bit, and the set of words it defines is believed to be the best possible. Two lost bits defeat it. An exhaustive search finds the largest codes that survive two — 2, 2, 4, 5, 7 and 11 words for lengths 4 to 9 — and Helberg's congruence, with weights that grow like Fibonacci numbers, gives a code that provably works at every length but spends a fixed share of every bit on protection. The best codes need only about four times the logarithm of the length.

Three distances fix a word of three bits. The cube of three-bit words with landmarks 000, 001, 010; each word labelled by its Hamming distances to them; all eight lists differ.

How few distances fix a word

An unknown word of a thousand bits can be read one bit at a time with a thousand questions. Ask instead for its distance from a chosen word, and each answer is worth about half of log₂ n bits, so roughly two hundred distances fix it. A balance reading many coins at once is the same question. So is Mastermind, in which Knuth's rule finds any of the 1,296 codes in at most five guesses and a mean of 4.476, and no first guess is best on both counts.

A sorting network on 8 wires. Batcher's odd-even merge network with 8 wires, 19 comparators and depth 6; it sorts every input, checked on all 256 strings of noughts and ones.

A sort that never looks at the answers

Most sorting decides its next comparison from the last one. A sorting network decides them all in advance: a fixed sequence of swaps-if-out-of-order, wired up before any number arrives. Whether such a thing sorts everything can be settled by trying 2ⁿ strings of noughts and ones instead of n! orderings. Nineteen comparators sort eight numbers, and proving that nothing shorter sorts eleven took decades and a satisfiability solver. Over neighbours only, one single test, the reversed row, decides the whole question.

A secret on a curve in a finite field. The quadratic 17 + 9x + 4x² modulo 31: shares q(1) = 30, q(2) = 20, q(3) = 18, q(4) = 24, q(5) = 7, q(6) = 29, q(7) = 28, q(8) = 4; the secret is q(0) = 17.

Two shares know nothing

Hide a number as the constant term of a quadratic modulo a prime and give eight people one value each. Any three can recover it. Any two know exactly nothing: of the 2,197 quadratics modulo 13, those matching two shares split into exactly one for each possible secret. Over the whole numbers the same two shares already give away the secret's parity.

A code made of the flats of a space. All 32 words of the Reed–Muller code RM(1, 4), each drawn on the sixteen points of the affine space of four dimensions over two elements: one word of weight 0, one of weight 16 and thirty of weight 8.

Parallel planes take a vote

Draw a four-dimensional space with two values to a coordinate as a 4 × 4 grid, and mark its hyperplanes: thirty-two patterns any two of which differ on eight of sixteen squares. A polynomial's top coefficient can be read off any plane, and parallel planes do not overlap, so an error spoils only one vote. One of them flew to Mars, and in 2016 it turned out to reach Shannon's limit.

Every convex shape the tangram can make. The 13 convex polygons that the seven tangram pieces can form, each with one arrangement, and the number of arrangements of each: 20, 12, 12, 12, 36, 12, 8, 8, 16, 4, 56, 24, 36.

Thirteen convex tangrams

The seven tangram pieces make thousands of figures, and only thirteen of them are convex. The proof turns a puzzle with sliding pieces into a finite list: every piece is made of the same small triangle, any convex figure puts them all on one grid, and that grid allows exactly twenty convex outlines of the right area. A search tries all twenty and finds that thirteen can be made.

Seven hats, sixteen losses. All 128 ways seven red-or-blue hats can fall, each drawn as seven dots, with the 16 configurations the Hamming strategy loses framed: the team wins 112 of 128, a probability of 7/8.

Wrong guesses that arrive together

Seven players in red or blue hats each see every hat but their own, and must guess their own colour or pass. Every guess is a coin toss, yet with the Hamming code the team wins seven times in eight — not by making guesses better, but by making the wrong ones arrive together. The best chance for any number of players is fixed by the fewest losses that cover the cube.

A marked ruler slid through (1, 2) with its marks 5 apart: 4 placements, none within ruler and compass. The two axes, the pole (1, 2) and the 4 positions of a segment of length 5 through it with an end on each axis: 1: (−4.720, 0) to (0, 1.650); 2: (0.712, 0) to (0, −4.949); 3: (1.745, 0) to (0, 4.686); 4: (4.263, 0) to (0, 2.613). Verdict: solid.

The slides a compass could have made

Slide a marked ruler through a point until one mark sits on each of two perpendicular lines, and the positions solve a quartic. Usually no compass can find them. Put the point on the bisector and every position is two square roots away, which is why the ancient vergings of a square were plane problems. Off the bisector the dividing line is a cubic with a whole-number root: 18 of 1,694 small slides pass, the point (1, 7) passes at infinitely many lengths, and (1, 2) at none yet found.

13 cards, any two sharing exactly one symbol. JKLM CFIJ BEHJ GHIM CEGL BFGK DEFM CDHK BDIL ABCM AFHL AEIK ADGJ

A deck where any two cards match once

A card game deals cards of eight pictures each, and any two cards in the deck share exactly one picture. The deck is the projective plane of order seven with its lines dealt as cards — 57 of them, of which the game prints 55. The two left out can be reconstructed from the counts of the pictures alone; a deck built one card at a time, by careful search, gets stuck at about two dozen; and the bound of 57 needs one exception, a deck that never stops.

A square whose every diagonal is a transversal. n=5 k=2: rows 01234 34012 12340 40123 23401

Queens on a torus, and the squares whose every diagonal is a transversal

Roll a chessboard into a torus so that its diagonals wrap round, and ask for n queens that do not attack. Pólya proved in 1918 that it can be done exactly when n shares no factor with 6, by two short sums. A Latin square whose every wrapped diagonal holds each symbol once — a Knut Vik design, from Norwegian field trials — is the same problem solved n times at once. Search finds 10, 28, 88 and 4,524 placements at 5, 7, 11 and 13; every one is a straight line until 13, where 4,394 are not.

Sixteen numbers, seven questions and one lie. 7:16/0 w128 6:8/8 w64 5:4/8 w32 4:2/6 w16 3:0/8 w8 2:0/4 w4 1:0/2 w2 0:0/1 w1

Twenty questions when one answer may lie

Twenty yes-or-no questions find any number up to a million. Allow the person answering to lie once, and twenty are no longer enough — and the exact number needed is decided by a single conserved quantity, Berlekamp's weight, which every question splits between its two answers. The weight says 25; an exhaustive search of the game confirms that the bound is met for almost every range, missing it by one question only at 3, 5, 9, 51 and 93 below 300; and the questions can even be written down in advance, as a code.

A Room square of side seven. n=7 from strong starter {1, 3} {2, 6} {4, 5}; 28 pairs, 21 empty cells

Every pair once, at every table

Eight players are to meet in pairs, four pairs a round at four of seven tables, so that every two players are partners exactly once and every player visits every table exactly once. The schedule is a square of seven rows and seven columns with a pair in some cells and nothing in the others, and it exists. With six players it does not, and with four it does not — and from eight players on it always does. The square is two ways of splitting the same pairs into rounds that cut across each other, and the arithmetic of remainders builds it in one line.

Two difference tables for sixteen words. n=4: inversion delta 4; random permutation delta 8

The inverse that spreads every difference

Change the input of a map on 8-bit words by a fixed amount and count how often the output changes by each amount. A random shuffle of the 256 words concentrates some differences: one input change produces one output change ten or twelve times. Taking the inverse in the field of 256 elements never does it more than four times. That is why the map sits at the heart of a widely used cipher. Whether any shuffle of 8-bit words can do it only twice is an open question.

All essays