Theme

Counting the same thing twice — page 13

One collection, counted by two different methods, and an identity that falls out because both answers have to agree. The proof is the pair of counts.
How often a game picked at random has a core. n=3: 0.20:1.000 0.24:1.000 0.28:1.000 0.32:1.000 0.36:1.000 0.40:1.000 0.44:1.000 0.48:1.000 0.52:1.000 0.56:1.000 0.60:1.000 0.64:1.000 0.68:1.000 0.72:0.997 0.76:0.993 0.80:0.980 0.84:0.958 0.88:0.933 0.92:0.899 0.96:0.872 1.00:0.833; n=4: 0.20:1.000 0.24:1.000 0.28:1.000 0.32:1.000 0.36:1.000 0.40:1.000 0.44:1.000 0.48:1.000 0.52:0.991 0.56:0.937 0.60:0.843 0.64:0.737 0.68:0.634 0.72:0.517 0.76:0.424 0.80:0.323 0.84:0.258 0.88:0.182 0.92:0.134 0.96:0.091 1.00:0.066; n=5: 0.20:1.000 0.24:1.000 0.28:1.000 0.32:1.000 0.36:1.000 0.40:1.000 0.44:0.994 0.48:0.904 0.52:0.725 0.56:0.438 0.60:0.245 0.64:0.116 0.68:0.059 0.72:0.022 0.76:0.009 0.80:0.002 0.84:0.002 0.88:0.001 0.92:0.001 0.96:0.000 1.00:0.000 Applied

A core is a rare thing to find at random

A game has a core when the whole can be shared so that no group would do better on its own, and Bondareva and Shapley turned that into a finite list of checks. For three players there are five checks; for four, forty-one; for five, 1,291. Draw the coalitions' values at random and the list wins: a third of three-player games fail, nineteen four-player games in twenty, and not one five-player game in two thousand passes. The cores that theorems promise come from structure, and structure is exactly what a random game lacks.

Rounding to the nearest saves three steps in ten. N=10^2: 3.981 / 3.155; N=10^3: 5.893 / 4.483; N=10^4: 7.826 / 5.832; N=10^5: 9.772 / 7.182; N=10^6: 11.702 / 8.520; N=10^7: 13.654 / 9.874; N=10^8: 15.587 / 11.214 Geometry

Rounding to the nearest remainder

Euclid's algorithm divides and keeps the remainder, and the remainder it keeps is the one left after rounding the quotient down. Rounding to the nearest instead — allowing a remainder to be taken from above — never takes more steps, and Kronecker proved that no mixture of rounding up and down does better. On average it saves three steps in ten, the ratio of the logarithms of the golden ratio and of two. And its slowest inputs are not Fibonacci numbers but Pell numbers, because the worst case of each algorithm is the number its own kind of continued fraction expands most slowly: the golden ratio for one, the square root of two for the other.

How close two sums of square roots come. two: 10:4.530e-3 14:4.702e-4 20:1.938e-4 28:8.253e-5 40:1.432e-5 56:8.481e-6 80:1.530e-6 113:1.533e-7 160:1.270e-7 226:8.370e-9 320:6.625e-9; three: 8:1.026e-3 10:1.026e-3 14:1.091e-4 20:4.823e-6 28:3.997e-7 40:1.250e-7 56:2.215e-8; slopes -4.046, -5.963. Number

How close two sums of square roots come

Two different sums of square roots of whole numbers are never equal: square roots of different squarefree numbers are independent, so no cancellation can make them agree. But they can come very close. Among sums of two square roots of numbers up to 320, √88 + √289 and √171 + √177 agree to eight decimal places. How many digits must be computed, in the worst case, to tell two such sums apart is not known — the best proof allows a number of digits doubly exponential in the length of the sums, the examples suggest only a modest polynomial, and the gap between them is why nobody knows whether the shortest route through points in the plane can be checked quickly.

How often each rule finds the Condorcet winner. n=3: 0.8824/0.9412/0.9559/0.6471; n=5: 0.8259/0.9751/0.9378/0.6866; n=7: 0.8281/0.9578/0.9278/0.6833; n=11: 0.8054/0.9656/0.9179/0.7079; n=21: 0.7941/0.9619/0.9097/0.7205; n=51: 0.7804/0.9624/0.9046/0.7339; limit 0.7572±0.0009/0.9629±0.0004/0.9011±0.0006/0.7563±0.0009; P(CW) limit 0.9116. Applied

How often the rules find the majority favourite

When one candidate beats every rival head to head, a voting rule ought to elect it. Plurality does about three times in four when every ranking is equally likely, the runoff between the top two 96 times in a hundred, Borda's count 90. Every profile of up to 51 voters is counted exactly, the limit is sampled, and adding candidates pulls plurality down below one half.

The number of stable matchings in a random market. n=10 (400): mean 3.03±0.10, median 3, 10-90% 1-5, max 20, e^-1 n ln n 8.5; n=20 (400): mean 6.34±0.18, median 6, 10-90% 3-10, max 33, e^-1 n ln n 22.0; n=40 (400): mean 15.51±0.48, median 13, 10-90% 7-26, max 87, e^-1 n ln n 54.3; n=70 (400): mean 33.10±0.92, median 29, 10-90% 16-56, max 147, e^-1 n ln n 109.4; n=100 (400): mean 54.84±1.46, median 48, 10-90% 26-90, max 230, e^-1 n ln n 169.4; n=150 (400): mean 93.47±2.51, median 79, 10-90% 49-164, max 350, e^-1 n ln n 276.5; n=200 (200): mean 144.33±5.75, median 128, 10-90% 71-229, max 589, e^-1 n ln n 389.8; n=300 (100): mean 239.96±12.32, median 203, 10-90% 128-409, max 669, e^-1 n ln n 629.5; n=500 (40): mean 409.55±24.38, median 410, 10-90% 212-663, max 799, e^-1 n ln n 1143.1; n=700 (16): mean 648.44±83.83, median 573, 10-90% 323-1286, max 1504, e^-1 n ln n 1687.0; n=1000 (10): mean 1053.30±211.84, median 807, 10-90% 458-2467, max 2467, e^-1 n ln n 2541.2 Applied

How many stable matchings a market has

A market with random preferences on both sides has not one stable matching but many — a few at ten a side, a few dozen at a hundred, about a thousand at a thousand — and all of them are reached from the proposers' best by a chain of rotations. Boris Pittel proved that the average grows like n ln n / e. The averages measured here sit at a third of that at every size a computer can reach.

Thirty-seven points in thirty-six boxes. n=6: pair q=8,15; difference 7: ‖q√2‖=0.100505, ‖q√3‖=0.124356. Discrete

Two numbers approximated at once

Thirty-seven points in thirty-six boxes force a multiple of √2 and a multiple of √3 to land near whole numbers together, and the same count in more boxes makes q times the two distances less than one infinitely often. Littlewood guessed that the product can be made as small as anyone likes. Each number alone has a floor; the product finds a new record eight times below twenty million, and nobody can prove it will keep going.

A multiplication table and its repeats. n=30: 308 distinct products of 900. Number

Most numbers are missing from the table

An N × N multiplication table has N² cells, and every product in it is less than or equal to N². Yet only 22.5% of the numbers that small turn up in the 10,000 × 10,000 table, and the share keeps falling. Erdős proved in 1955 that it falls to nought; Kevin Ford found in 2008 how slowly — like a tiny power of the logarithm, 0.0861 — because a product of two numbers has too many prime factors to be typical.

Arcs that overlap and still leave gaps. n=14, a=0.2: starts 0.014,0.017,0.118,0.192,0.232,0.237,0.251,0.428,0.458,0.500,0.510,0.579,0.930,0.931; gaps 1; P(cover) exact 0.34675223. Probability

Arcs that cover a circle

Throw fourteen arcs, each a fifth of a circle, onto the circle at random: together they are nearly three times as long as it, and still a third of the time some stretch is left bare. The chance of covering is an alternating sum over which gaps are too long, found by W. L. Stevens in 1939. Its terms run into the thousands and cancel to almost nothing, and they say that random covering costs a logarithm.

How many subgroups of each index a surface group has. genus 1: 1,3,4,7,6,12,8,15; genus 2: 1,15,220,5275,151086,6605004,362069912,26370058035; genus 3: 1,63,7924,2757307,2081946006,3233368740252,9037199115520808,42295362888015649395; free F2: 1,3,13,71,461,3447,29093,273343. Topology

The subgroups of a surface group

A covering of a surface with n sheets is a choice of permutations for its handles whose commutators multiply to the identity, and counting those choices is a question about the characters of the symmetric group. Only their dimensions are needed — the numbers of ways to fill a Young diagram — and they give the torus σ(n) subgroups of index n, the genus-two surface 15, 220, 5,275, 151,086, and every surface a count that soon becomes 2n times a power of n factorial.

The cost of running a computation backwards with a few stored states. Minimal recomputation to reverse chains of length up to 200 with 1, 2, 3, 4, 6 slots; at length 200: 1: 19900, 2: 2470, 3: 1305, 4: 948, 6: 680. Analysis

Running a computation backwards with little memory

The reverse sweep that gives a whole gradient for the price of a few evaluations needs the computation's intermediate states in reverse order, and storing them all can cost more memory than the machine has. Keep only a few and recompute the rest, and the cheapest schedule has an exact answer found by Andreas Griewank in 1992: with c stored states and no step run more than r times, the longest chain that can be reversed is the binomial coefficient C(c + r, c). Pascal's triangle is the table of what memory buys.

An optimal way to divide 9 soldiers among three battlefields. Colonel Blotto with 9 soldiers each on three fields: 55 allocations, optimal mixture on 7: 6-3-0:0.143 5-0-4:0.143 4-4-1:0.143 3-1-5:0.143 2-5-2:0.143 1-2-6:0.143 0-6-3:0.143. Applied

Two colonels and a linear programme

Two colonels divide their soldiers among three battlefields at once, and whoever sends more to a field wins it. Every division can be beaten by some other, so neither colonel has a safe plan — until they are allowed to choose at random. The best random choice is a linear programme, the opponent's best is its dual, and the theorem that the two meet is von Neumann's. With nine soldiers each, one optimal plan uses only seven divisions, and on every field it sends each number from nought to six exactly once.

Three arrows in and three out: counting on prisms of the cubic grid. Entropy per point of Eulerian orientations on cubic prisms: 2x2: 2.79369, 2x3: 2.68151, 3x3: 2.58713; small tori 2 × 2 × 2 3.14618, 2 × 2 × 3 2.95513, 2 × 3 × 3 2.81100, 3 × 3 × 3 2.69925; Pauling 2.5. Discrete

Three arrows in and three out

Put an arrow on every edge of the cubic grid so that every point has three arrows in and three out. On the square grid the same question — two in, two out — has an exact answer, found by Elliott Lieb in 1967: about 1.5396 arrangements per point. On the cubic grid nobody knows the answer. Pauling's guess of 2.5 is a proven lower bound, and exact counts on prisms of the grid come down towards it from above — 2.794, 2.682, 2.587 as the cross-section widens — without reaching it.

What is left in the other box. Banach matchbox remainder distribution for N=50: means p=0.5: 7.0385, p=0.55: 9.9165, p=0.6: 16.1560; at p=0.5 P(0)=0.07959, P(1)=0.07959. Probability

The matches left in the other pocket

A smoker keeps a box of fifty matches in each pocket and picks a pocket at random. When one box is found empty, the other holds about seven, and none and one are exactly equally likely. Favour one pocket by a tenth and the answer is sixteen; give each box five thousand matches and a fair choice leaves seventy-nine while a bias of one in a hundred leaves nearly two hundred — because a fair remainder grows like a square root and any bias makes it grow in proportion, with the change-over at a bias of one over the square root of the box.

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. Computation

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. Computation

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 circle with a count running round it. Josephus circle, n=41, k=3: removal order 3,6,9,12,15,18,21,24,27,30,33,36,39,1,5,10,14,19,23,28,32,37,41,7,13,20,26,34,40,8,17,29,38,11,25,2,22,4,35,16,31. Discrete

The last place in the circle

Forty-one people stand in a circle and every third is removed. Which place is safe? Counting round by hand is not necessary: the survivor is a running sum on a dial that grows by one each step. With every second person it is n's binary digits rotated by one place, which is a tidier fact than anybody asked for. With every third the rule depends on repeatedly multiplying by three halves and rounding up, and the constant it reaches, 1.62227…, has no known closed form.

Many points on many lines. Grid of 192 points and 128 lines with 512 incidences, against (n m)^(2/3) = 845. Geometry

How often points can sit on lines

A million points and a million lines: how many times can a point lie on a line? Counting pairs says about a billion, and over a finite field that is exactly right. In the real plane the true limit is about a hundred million, because a line has an order along it. The proof takes four lines and uses nothing but a crossing count, and from it follows the fact that no set of numbers can have both few sums and few products.

The twenty monotone functions of three letters. All 20 monotone Boolean functions of three letters drawn on the cube of inputs, from the constant false to the constant true. Logic

Functions that only go up

Of the 256 logical functions of three letters, only twenty never turn off when a letter is turned on. Dedekind asked in 1897 how many such monotone functions there are for n letters. Computing the count is hard enough that the answer has advanced one letter every twenty-five years or so, and the ninth arrived in 2023, from two groups in the same month, at forty-two digits. Almost everything about the number comes from a single layer of the cube.

Six choices make one. Three tournaments on four points; each arrow points from the chosen end of a pair. Scores: 1 3 1 1; 1 2 2 1; 3 0 1 2. Census of least-score set sizes: {"1":32,"2":24,"3":8,"4":0}. Logic

Six choices make a seventh

Bertrand Russell's millionaire needs the axiom of choice to pick one sock from each of infinitely many pairs. Does having that power for pairs give the same power for sets of four? It does, by a short trick that Tarski found: choosing from the six pairs inside a set of four makes a tournament, and all 64 tournaments single out something definite. For sets of three it fails, and whether a size follows from smaller ones is settled almost entirely by arithmetic: from pairs, 4 is the only other size that can follow.

Amounts arranged by remainder. Payable and unpayable amounts for coins 5 and 7, in columns modulo 5: largest unpayable 23, 12 unpayable amounts. Number

The largest amount two coins cannot pay

With coins of 5 and 7, the amounts 1, 2, 3, 4, 6, 8, 9, 11, 13, 16, 18 and 23 cannot be paid, and everything else can. Two lines of argument give the formula ab − a − b for the last gap, and half the rest of the board is gaps. For three coins no such formula exists, in a sense that can be proved. And the sets that coins can make have a count that climbs at the golden ratio, a conjecture settled from a table of 67, 118, 204.

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. Computation

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. Computation

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.

A restaurant with room for one parameter. Seeded Chinese restaurants of 60 customers: 0.5: 4 tables, largest 44; 2: 10 tables, largest 17; 10: 22 tables, largest 10. Probability

A restaurant and a shuffled deck

Each new customer sits at a table with chance proportional to the people there, or starts a new one with weight θ. That one rule gives the kinds of species in a catch and the alleles at a gene. At θ = 1 it is exactly the cycles of a shuffled deck, 62.4% of which lie in the longest, and the same shares describe the largest prime factors of a random number.

Crossings counted with signs. Circle maps x to dx plus a bend: degree 3: 2 fixed, signed sum -2; degree −2: 3 fixed, signed sum 3; degree 2, bent: 5 fixed, signed sum -1. Topology

A number that counts what it cannot see

Whether a map has a fixed point seems to need the map. Lefschetz's number needs only what the map does to holes, and it stays the same however the map is bent. On a torus it is one determinant: |det(I − A)| fixed points, checked exactly on all 2,401 small matrices, 1, 5, 16, 45, 121 periodic points for Arnold's cat, and a formula that also counts solutions of equations over finite fields.

All themes