Generator

ballot

A generator in the applied library, called 32 times across 4 essays. Below: what it draws at its defaults and at each mode an essay asks for, what it checks while drawing, and everywhere it is used.

ballot is one function. Everything below came out of it during this build, at parameters taken from the essays rather than invented for this page — so a figure here is the same figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

A profile of 100 ranked ballots, and the majority in every pairThe voter groups as columns with the ranking down each, beside the pairwise majority matrix whose cells are the margins.the ballotsone column per group, size abovethe pairwise majoritiesrow against column3533321st2nd3rdABCBCACABABCABC·+34−30−34·+36+30−36·the row candidate wins the pairthe row candidate loses it100 voters in 3 groups, each ranking all 3 candidateseach cell of the matrix is the margin by which the row candidate beats the column one; all 3 pairssplit the electorate exactly, 67 against 33 for A and Bno candidate beats every other: this profile has no Condorcet winner

show: "manipulate"

Every ballot one voter could submit under instant runoffOne voter's true ranking beside every ranking that voter could submit instead, with the winner each produces and the profitable misreports marked.the electoratethe first column is the manipulating voterevery ballot that voter could submitand the winner it producestrue1121st2nd3rdAABCBBCBCCAAelectsfor the voterA ≻ B ≻ CA ≻ C ≻ BB ≻ A ≻ CB ≻ C ≻ AC ≻ A ≻ BC ≻ B ≻ AChonestCno gainBbetterBbetterCno gainCno gainthe honest ballota misreport that paysthe control: the same voters, A and B only0 of 2 ballots payelectsfor the voterA ≻ BB ≻ ABhonestBno gainthe voter's true ranking is A ≻ B ≻ C; the honest ballot elects C under instant runoff2 of the 6 ballots the voter could submit elect somebody the voter ranks higher: B ≻ A ≻ C; B ≻ C ≻ Athe control runs the identical search with only A and B left: 0 of the 2 ballots pay, which is what astrategy-proof contest looks like

show: "iia"

Independence of irrelevant alternatives, broken by BordaTwo profiles that agree on every voter's ranking of two candidates and differ only in where the others sit, with the rule's verdict between the two reversed.first profile4 voters, one column eachsecond profilethe same voters on A and Bv1v2v3v41st2nd3rdAABBBCAACBCCv1v2v3v41st2nd3rdAABBBBACCCCAA 6 · B 5 pointsA 5 · B 6 pointsBorda: A ≻ BBorda: B ≻ AflipsABthe candidates that movedevery voter ranks A against B the same way in both profiles; only the third candidate moves — and Bordareverses its verdictno pair of profiles flips Borda at 3 voters; at 4 voters 3456 of the 104976 ordered pairs inside a class do

show: "rules"

Five rules on one profile of 27 ballots, and 5 different winnersThe ballot groups as columns beside a table of five voting rules with the winner each returns and the count that decided it.the profileone column per group, size abovethe rulesand what each returns7655221st2nd3rd4th5thDACEACEBDBBEBEBCDACDADCDACEAEBwinnerpluralityBordainstant runoffCondorcetCoombsABCDEthe deciding count8 first places63 points19 of 27 at the end4 of 4 pairs14 of 27 at the endthe candidate that rule returnsthe count it was decided on27 voters in 6 groups over 5 candidates; a majority is more than 13.5the five rules return 5 different winners: plurality A, Borda B, instant runoff C, Condorcet D, Coombs Einstant runoff eliminates B, E, D; Coombs eliminates A, C, D

show: "cycle"

A majority cycle over 3 candidates, and how often 3 voters produce oneThe majority tournament as a directed polygon with each arc's margin, beside one cell for every profile of the stated size, filled where no Condorcet winner exists.the majority tournament100 voters, every pair decidedevery profile of the space216 of them, one cell each+34+36+30ABCno Condorcet winner (12)a winner exists (204)the 3 arcs of the ring are the majority in each pair, and following them returns to A: A → B → C → A12 of the 216 profiles of 3 voters over 3 candidates have no Condorcet winner — 5.6% of the space, every oneof them built and tested

show: "profile"

A profile of 27 ranked ballots, and the majority in every pairThe voter groups as columns with the ranking down each, beside the pairwise majority matrix whose cells are the margins.the ballotsone column per group, size abovethe pairwise majoritiesrow against column7655221st2nd3rd4th5thDACEACEBDBBEBEBCDACDADCDACEAEBABCDEABCDE·−7−11−7−1+7·+13−1−1+11−13·−3−9+7+1+3·+1+1+1+9−1·the row candidate wins the pairthe row candidate loses it27 voters in 6 groups, each ranking all 5 candidateseach cell of the matrix is the margin by which the row candidate beats the column one; all 10 pairs split the electorate exactly, 10 against 17 for A and BD beats every other candidate, so D is the Condorcet winner

What it checks while it draws

Collected by running the family and recording what it asserted, not written here. The count is how many separate times the claim was put to the test while these drawings were made.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

The whole library · What the figures prove