Skip to content

Exercises — predict, then peek

Worked problems with solutions. Each exercise poses a small election, asks you to commit to a prediction on paper, and only then lets you open the solution — every part behind a click, with the engine's actual output embedded. The format is the classroom classic (practice problems with solutions), borrowed with attribution from Brendan W. Sullivan's An Introduction to the Math of Voting Methods (2022).

Three layers of answer key, so you can trust it:

  1. The collapsed solutions on each exercise page — worked arithmetic plus the relevant slice of engine output.
  2. The runnable YAML — each election is a real file you can tabulate yourself; the command is on every page.
  3. The _tabulated mirror — the full audit report (preference matrix, Condorcet check, score distribution, method divergence), one per election in the exercises_tabulated/ subfolder, linked from every exercise page. The expected_winners keys are checked by the engine's regression suite for every single-winner score file; the multi-winner, Approval, and ranked files (9, 12, 13's approval variants, 14) document their keys the same way, so the answers can't silently rot.
  4. The frozen BetterVoting export — BV-backed exercises keep their full *_bv_export.json (Election + Ballots + Results) beside the YAML: the canonical record of the live election at freeze time, even if strangers vote on the public pages later.

The exercises

Exercise The question Concepts Files
1 — Two districts, one mayor Avery wins West. Avery wins East. Who wins the city? consistency (join-consistency) · runoff pairing · why this is not a summability failure west · east · combined · live: W↗ E↗ C↗
2 — The tenth ballot A mislaid ballot scores the announced winner 5 of 5. Can counting it hurt him? participation / no-show paradox · runoff-slot spoiler nine · ten · Bella exits
3 — One electorate, five verdicts Nine snack ballots, five tabulations. How many different winners? ballot vs method · the Condorcet loser wins Choose-One · Approval bridge rule yaml · live:
4 — Lillehammer 1994 Real Olympic judges' ballots: Score says Kerrigan, STAR says Baiul. Which matches history? rank→score maps · Score vs STAR · Pareto dominance yaml
5 — The squeezed bridge-builder Every voter scores Brook 3+. Does RCV-IRV ever find that out? center squeeze · Condorcet winner · first-choice bottleneck yaml · live:
6 — Bullet voting backfires Four fans zero their second choice to lift their favorite. What do they wake up to? bullet voting · when the gamble is safe and when it detonates honest · strategic · live: H↗ S↗
7 — The vanishing votes "3 of 9 voters had a preference." Did six votes vanish? Equal Support · the two denominators · zero vs blank yaml
8 — Build your own reversal Construct "top scorer loses" yourself — then prove 3 voters is the floor. constructive design · breadth vs depth · a minimality proof 2-cand · 3-cand
9 — Game night: nobody is unbeatable A rock-paper-scissors cycle with no Condorcet winner. Who deserves game night? pairwise matrix · Ranked Robin's ladder · Smith set · (LH-only: BV would coin-flip) yaml (ranked ballots)
10 — Later-no-harm, both readings Did the fans' generous 3s harm Amir — or did their 0s hide Bess? later-no-harm · LNH ≠ favorite betrayal · the trade IRV makes instead reticent · generous · live: R↗ G↗
11 — Recruit a spoiler Brett's campaign can't flip a voter — so it adds a candidate. Under which counting rules does the trick pay? spoiler effect · clones · vote-splitting as ballot design base · spoiler added · live: B↗ S↗
12 — Two seats, one neighborhood Same ten ballots: Bloc STAR seats Asa + Bram; Allocated Score seats Asa + Cleo. Which board is "fair"? multi-winner design · Bloc vs proportional · quotas spend ballot weight bloc · allocated · live:
13 — Where do you draw the line? One honest electorate, three approval thresholds — three different Approval winners (and Score vs STAR split too). Approval's free parameter · no canonical sincere ballot · devolution to Choose-One opinions · 3+ · 4+ · 5s · live:
14 — The transfer machine Follow one STV ballot: 4/5 of it elects Austen, the last 1/5 rides on to elect Camus. Droop quota · surplus & elimination transfers · proportionality on ranked ballots · a live BV bug, found & diagnosed yaml · fullranks probe · live: vote↗ (BV results error — see page)

| 15 — Read the ballot, name the method | Two filled-in profiles, no method named. Identify each from the marks, then count — and find the guarantee hiding in one of them. | dichotomous vs cardinal ballots · approval shares ≠ vote shares · Condorcet-consistency on a domain · an election where nothing diverges | yes/no · pairwise · scores · live: a↗ b↗ |

A suggested path: start with the reading drills (3, 7, 15), then the mechanisms (5, 6, 11), then the criteria probes (1, 2, 10), then the capstones (4, 8, 9) — and finish in the multi-winner wing (12, 14) with the ballot-design coda (13). The set sits at the Voting 201–301 end of the curriculum, framed per reading these fairly.

How to use them

Paper first: tabulate the scoring round, pick the finalists, run the runoff by hand. Then open the collapsed solution and check. Then run the file:

python STARVote_LH_tabulation_engine/starvote_larry_hastings.py 01_STAR/05_Practice/cases/ex01_district_west.yaml

Teaching a group? Each exercise works as a live segment: show the ballots, take predictions, tabulate on screen, then argue about what the "right" winner even means.

Sources & fairness

Exercises 1–2 adapt ballot data from RangeVoting.org (a Score-voting advocacy site — its framing favors Score, the arithmetic is method-neutral) as posed in Sullivan's method-neutral textbook; exercise 3 borrows his one-electorate-many-methods format with this repo's own ballots; exercise 4 uses the real 1994 Olympics ordinals as reproduced there; exercises 5–14 are original to this repo (13 borrows Sullivan's imposing-approvals-on-scores move); exercise 15 rebuilds two textbook-style "which method is this?" profiles with named candidates and adds the parts such prompts stop before. The criticism is deliberately symmetric: STAR fails criteria in 1, 2, and 10; RCV-IRV takes the hit in 5 (and inside 10); Choose-One in 3 and 11; a strategy fails in 6; and 7 and 9 are pure reading drills. Exercise 13 puts Approval's threshold on the bench — with Score and STAR disagreeing on the same opinions in the same breath — and 12 and 14 have no villain at all: majoritarian vs proportional is a design choice, stated as one. Every solution links the counterweight pages (STAR's honest limits, the four-part test).

More exercises are welcome — on deck: a quorum/turnout drill, a scale-granularity flip (0–5 vs 0–9 moving a finalist), and a Ranked Robin burial probe. Follow the set's pattern: one page, predictions before reveals, runnable YAMLs, tested answer keys.

file: README.md