THE FOLD / GLITCH / OFF BY ONE / THE BALLOT
THE BALLOT
strictly ahead, never merely level
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Two candidates. A finishes with a votes and B with b, and a > b. Count the ballots one at a time in random order: what is the chance A is strictly ahead at every single moment of the count? The answer is (a−b)/(a+b), and it is startling twice over — first that it is so simple, and second that it depends on nothing but the margin over the total. A landslide counted slowly and a squeaker counted quickly can carry exactly the same probability of never once being level.
LIT verified live by exhaustive enumeration of every ordering: (5,3) gives 14 of 56; (10,6) gives 2002 of 8008 — the same 1/4, from twice the votes; (3,2) gives 2 of 10; (7,4) gives 90 of 330; (6,1) gives 5 of 7; (4,3) gives 5 of 35. Every case matches (a−b)/(a+b) exactly in integer arithmetic, with no floating point anywhere in the check.
LIT verified live by exhaustive enumeration of every ordering: (5,3) gives 14 of 56; (10,6) gives 2002 of 8008 — the same 1/4, from twice the votes; (3,2) gives 2 of 10; (7,4) gives 90 of 330; (6,1) gives 5 of 7; (4,3) gives 5 of 35. Every case matches (a−b)/(a+b) exactly in integer arithmetic, with no floating point anywhere in the check.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at OFF BY ONE, which is the whole problem: strictly ahead, never merely level, and the entire result turns on that one word.
AVAN (AI) checked the identity in integer arithmetic rather than by comparing decimals — the test is
AVAN (AI) checked the identity in integer arithmetic rather than by comparing decimals — the test is
ahead × (a+b) === total × (a−b), which is exact and cannot pass by rounding. That matters more than it sounds: 2002/8008 and 14/56 both reduce to 1/4, and a float comparison would have “confirmed” the equality at a tolerance rather than establishing it. The counts here are enumerated, not computed from the formula — the recursion walks all 8,008 orderings for the largest case — so the formula and the count are genuinely independent of each other. Bertrand posed it in 1887; Désiré André’s reflection argument followed the same year.3 ONE DIMENSION
Six elections, enumerated to the last ordering. The formula never misses.
4 TWO DIMENSIONS · INTERACTIVE
Every count is a path. The ones that touch zero are the ones that failed.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the lattice of counts, with the surviving paths lit.
AVAN’s addition (the inverse-companion): the forward reading is “the probability is (a−b)/(a+b).” The inverse is that the reflection argument works by finding a perfect pairing between failures — every count that touches zero can be reflected at its first tie into exactly one count starting with the other candidate, and back again. So the failures come in matched pairs and can be subtracted off without ever being individually described. Read backwards, the simplicity of the answer is a symptom: a formula this clean almost always means a bijection was found, and the thing genuinely proved is not a probability but a pairing.
LIT by exhaustive enumeration of every ordering, (5,3) gives 14 of 56 and (10,6) gives 2002 of 8008 - the same 1/4, from twice the votes; (3,2) gives 2 of 10; (7,4) gives 90 of 330; (6,1) gives 5 of 7; (4,3) gives 5 of 35; every case matches (a-b)/(a+b) exactly in integer arithmetic, with no floating point anywhere in the check
FIG The identity was checked in INTEGER arithmetic rather than by comparing decimals - the test is ahead x (a+b) === total x (a-b), which is exact and cannot pass by rounding. That matters: 2002/8008 and 14/56 both reduce to 1/4, and a float comparison would have 'confirmed' the equality at a tolerance rather than establishing it. The counts are enumerated, not computed from the formula - the recursion walks all 8,008 orderings for the largest case - so formula and count are genuinely independent. Bertrand posed it in 1887; Desire Andre's reflection argument followed the same year.
FIG The identity was checked in INTEGER arithmetic rather than by comparing decimals - the test is ahead x (a+b) === total x (a-b), which is exact and cannot pass by rounding. That matters: 2002/8008 and 14/56 both reduce to 1/4, and a float comparison would have 'confirmed' the equality at a tolerance rather than establishing it. The counts are enumerated, not computed from the formula - the recursion walks all 8,008 orderings for the largest case - so formula and count are genuinely independent. Bertrand posed it in 1887; Desire Andre's reflection argument followed the same year.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of OFF BY ONE · David Lee Wise (ROOT0), with AVAN