WorksComputer Science
Elections with Condorcet Dimension 4
Abstract
A committee wins if, against each outsider, a strict majority of voters prefer at least one committee member to that outsider. We construct a finite ranked election in which every three-member committee faces a single outsider preferred to all three by more than of the voters. Thus four candidates can be necessary. More generally, for every there are elections in which every -member committee faces such opposition from more than a fraction of the voters. This disproves the conjecture of Charikar, Lassota, Ramakrishnan, Vetta, and Wang that the factor in Zbarsky's lower bound is optimal. Our construction lets a single candidate break ties against different opponents on different ballots. Two small grade tables give a hand proof of the majority obstruction. An exact certificate gives the stated numerical bound.
Note: This manuscript was generated by AI with minimal human input and intentionally has no human author. GPT-6.2 Astra developed the original proofs. Gemini 4 Carbon and Neon helped revise the writing. The proofs have been formalized in Lean, and are available at this [link text](this GitHub repository).
In the spirit of this [link text](this blog post), the contributors are organizing a collaboration to extend these results and produce a high-quality, human-written exposition. We invite interested researchers to join us on Zulip.
Introduction and main result
Each of finitely many voters strictly ranks the same finite set of candidates. A committee covers a voter against an outsider if the voter ranks some member of above . A Condorcet winning set covers a strict majority against each outsider [4]. A result of Jiang, Munagala, and Wang [6] on approximately stable committees implies that every election has a Condorcet winning set of at most 32 candidates. Charikar, Lassota, Ramakrishnan, Vetta, and Wang [2 Section 1.1] observed this implication and proved that six candidates suffice. Song, Nguyen, and Lin [8] reduced this to five. Prasanna Ramakrishnan [7] gives a short proof using Brouwer’s fixed-point theorem.
Write for the fraction of voters in election who rank above every member of . The opposition to is . For , define
where ranges over elections with at least one voter and more than candidates. In each such election some -member committee covers at least a fraction of voters against each outsider. This is the largest universal guarantee. Enlarging a committee weakly decreases its opposition, so committees of size at most give the same values. Nonnegative rational ballot weights summing to 1 describe a finite electorate after clearing denominators.
Sam Zbarsky’s cyclic construction [10] gives for general (see [2 Theorem 7]). Jiang, Munagala, and Wang [6] use a related construction for committee stability. Conjecture 1 of [2] asks whether every election admits a -member committee with opposition below .
Theorem 1. For every integer ,
In particular, , , and .
For each and , there is a finite election in which every -member committee faces opposition at least . Taking disproves the conjecture for every . In particular, , so there is a single finite election in which every triple faces an outsider whom more than 51.48% of voters rank above all three members. The outsider may depend on the triple. The Condorcet dimension is the size of an election’s smallest winning set. Its largest possible value is therefore four or five.
| Seats | Cyclic bound | Theorem 1 | Rounded up |
| 2 | 31.36% | ||
| 3 | 48.52% | ||
| 4 | 58.82% | ||
| 5 | 65.68% |
Table 1. Upper bounds on the universal coverage guarantee .
Figure 1. Bounds on opposition for committees of two to ten candidates. The lower bound is from Theorem 1. The upper bound is from Song, Nguyen, and Lin [8]. The dashed gray curve is Zbarsky’s cyclic bound [10].
From grade tables to strict elections
A challenger can tie different rivals for the best grade at different voter positions. To break these ties, we use a strict inner election and let each candidate choose a name from that election separately at each position. We first bound the support available against several rivals at one position.
Lemma 1 (Repeated inner challenges). Let be a finite strict election with at least three candidates and pair opposition at least : every pair has an outsider who beats it on at least a fraction of the ballots. Given any list of candidates, with repetitions allowed, some candidate beats them all on a fraction of ballots at least
Proof. For , two distinct candidates form a pair. If , pair with any other candidate of and use that pair’s challenger. In either case the success fraction is at least .
For the induction step, suppose , since a lower bound of zero is automatic. By induction some candidate beats on at least of the ballots. Apply the case to and . On the ballots where both challenges succeed, transitivity puts the second challenger above all candidates. The two sets of supporting ballots overlap on a fraction at least
Set , and abbreviate to when is fixed. For ,
Grade tables. A grade table consists of a finite nonempty list of voter positions with nonnegative rational weights summing to 1, together with a finite nonempty set of allowed grade assignments. Each grade assignment gives a grade (from a fixed ordered list, with smaller grades preferred) to every position. In the small constructions, each type has one assignment. In the certificate, each type has a menu of permitted choices for each row. A complete assignment specifies the option for each row and the set of marked positions wherever the option leaves that set free.
Fix , a list of rival assignments (repeats allowed), and a challenger assignment. At each position give the challenger credit 1 if it beats every rival in grade, 0 if a rival has a better grade, and if exactly rivals tie it for best grade. Its table score is the weighted sum of these credits.
Lemma 2 (Turning a grade table into a strict election). Fix a grade table, an integer , and a finite strict election with at least three candidates and pair opposition at least . Let be the minimum over all -tuples of rival grade assignments (repeats allowed) of the maximum table score over all challenger grade assignments. For every integer with , there is a finite strict election with more than candidates in which every -member committee faces opposition at least . Letting gives
Proof. Replace each candidate of by clones with . A candidate in the new election chooses one allowed grade assignment and, independently at each position, one inner clone . Include every such combination. Because there is at least one position, at least one allowed grade assignment, and at least 3 candidates in , the new election is finite and has at least candidates.
Independently draw a position according to its weight, a uniformly chosen voter of , and a uniform shift . At the drawn position rank the candidates by increasing grade, then by the inner voter’s ranking of , then by increasing . A fixed strict order breaks any remaining ties. All draws have rational probabilities, so these ballots form a finite strict election.
Fix a -member committee and choose a challenger grade assignment whose table score against the grade assignments of is at least . Choose its inner clone at each position as follows.
With a strictly better grade than all rivals, any clone wins. With a strictly worse grade than the best rival, any clone gives the claimed lower bound of zero.
With one tied rival, whose clone here is , take its predecessor . This clone beats it except on the one shift for which , and beats the other rivals by grade. Its success fraction is .
With rivals tied for best grade, apply Lemma 1 to their inner candidates, allowing repetitions. Any clone of the resulting candidate of beats all tied rivals on at least a fraction of the ballots here and beats every worse-graded rival on all of them.
Because every combination of clones is included, these choices define one candidate. Only positions with a single tied rival can fall short of their table credit, by each. Their total weight is at most 1, so the candidate beats on at least a fraction of all ballots. If , at least one ballot ranks it strictly above every member of , so it is an outsider. If , any outsider suffices and one exists because the election has more than candidates.
For two rivals and one challenger in a fixed table, write for the weight of positions where the challenger beats both rivals or ties one and beats the other, for the weight where all three grades tie, and for the weight where a rival has a better grade. Define for as the minimum over all pairs of rival grade assignments (repeats allowed) of the maximum of over all challenger grade assignments.
Corollary 3 (Self-improvement for pairs). For every grade table,
Fix .
(a) If every rival pair has a challenger with and , then .
(b) If every rival pair has a challenger with , then .
Proof. Take a sequence of finite elections with at least three candidates whose minimum pair oppositions tend to , as permitted by the definition of the supremum. Applying (2) with to each election gives . A finite minimum of finite maxima of affine functions is continuous. Passing to the limit gives (3).
Since , the gain in score over is . Under (a), this gain is at least for all . Under (b), since , it is at least for all . Since there are only finitely many rival pairs, throughout each range, and (3) excludes from it.
Short proofs by hand
Before proving the numerical bound in Theorem 1, we give two small constructions that can be checked by hand and already beat the cyclic bounds for pairs and for triples.
Proposition 4. We have , and so .
Proof. Take twelve candidate types numbered 0, 1, , 11 modulo 12, each with one grade assignment. Use the three length-12 grade words below (smaller digit preferred) with the listed relative weights:
| Word | Digits in positions 0, 1, , 11 | Weight |
| Word 1 | 501401301201 | 64 |
| Word 2 | 201000200001 | 16 |
| Word 3 | 501234501234 | 1 |
Table 1 (PDF p. 5).
Each word produces twelve voter positions indexed by shifts : on shift , type gets the digit at index , and each shift has the listed relative weight. Dividing by the total weight makes the 36 position weights sum to 1.
Adding the same offset modulo 12 to the rivals and challenger only permutes the twelve shifts of each word, so we may translate either rival to type 0. Choosing which rival to translate represents every pair as for some (including for two rivals of the same type). For a challenger type and one word, call a shift a win if the digit at is at most the smaller of the digits at and , without all three being equal, and a loss if it is strictly larger than that minimum. The table lists (wins) (losses) for each word and their weighted sum (64 times Word 1, plus 16 times Word 2, plus Word 3):
| Distance | Challenger | Word 1 | Word 2 | Word 3 | Weighted sum |
| 0 | 3 | 1 | 10 | ||
| 1 | 3 | 0 | 1 | 4 | |
| 2 | 11 | 0 | 1 | 10 | |
| 3 | 3 | 1 | 10 | ||
| 4 | 9 | 0 | 1 | 10 | |
| 5 | 8 | 0 | 1 | 4 | |
| 6 | 5 | 0 | 0 | 6 | 6 |
Table 2.
For example, at and , the digits in Word 1 differ only on . There the challenger beats the rivals on (, , ) and loses on (), giving . Every other entry is checked in the same way by comparing the digits at , , and for .
Let and be the weighted totals of wins and losses across all 36 positions, so and . Because in every row of the table,
for every rival pair. Corollary 3(b) with gives , so .
:::
Earlier pair constructions. Elkind, Lang, and Saffidine [3 Proposition 6] gave a 15-candidate election, built from three cyclic blocks of five candidates, where every pair is beaten by one outsider on at least 8 of 15 ballots. More generally, use three cyclic blocks of candidates. The ballots use every outer and inner rotation, with the same inner rotation in each block. If both rivals are in one block, any candidate in the preceding block beats them on ballots. If the rivals lie in different blocks, one rival’s block precedes the other’s in two outer rotations; in both, the cyclic predecessor of that first rival beats the other rival by block and beats the first rival in inner rotations, giving wins out of ballots. Letting grow gives .
Elkind, Lang, and Saffidine [4 pp. 500, 516] report two further strict-majority examples from personal communications. Cervone and Zwicker found one with 11 candidates and 11 voters in 2011. Cervone, Hardin, and Zwicker found one with 7 candidates and 21 voters in 2012 (see also [1]). David E. Speyer [9] posted a 7-candidate example in 2013 in which every pair is beaten on 11 of 21 ballots. In Christian Geist’s 6-candidate, 6-voter example [5 Fig. 2], every pair faces opposition of exactly one half, enough to prevent a strict majority for the pair.
Proposition 5. We have , and so .
Proof. By Proposition 4, we can fix and take an inner election with pair opposition at least . By (1), , , and .
Split six candidate types into two groups and of three types each. Use six equally weighted positions (weight each):
Three -rows, giving grades , , and to and grade 0 to all of .
Three -rows, swapping the roles of and .
Given any three rival types (repeats allowed), by symmetry we may assume that at least two lie in . We sum the credits over all six rows before dividing by 6:
Two rivals in and one in . Challenge with a type in different from the -rival. On the three -rows, the challenger has grade 0 and ties the -rival plus whichever -rivals have grade 0; the tie counts on the three rows are either 3, 1, 1 (credit ) or 2, 2, 1 (credit ). On the -row where the challenger has grade 0, the -rival has grade 1 or 2 while both -rivals have grade 0, adding . The total is .
Three rivals in , of at least two types. Challenge with any type in . On the three -rows, the challenger has grade 0 and ties whichever rivals have grade 0; the tie counts on the three rows are either 2, 1, 0 (credit ) or 1, 1, 1 (credit ). On the -row where the challenger has grade 0, it ties all three -rivals for credit . The total is at least .
Three rivals of the same type in . By cyclic symmetry, suppose all three are , and challenge with . On two of the three -rows, has a smaller grade than ( and ), earning 1 on each. On all three -rows, every type in has grade 0, so ties all three rivals and earns on each. The total is because .
In every case the table score is at least . By Lemma 2, (exceeding in one finite election for large ); letting gives , so . □
Larger committees
Proposition 5 gives , but is smaller than whenever . We now sharpen the triple bound to , prove for four seats, and combine elections for two, three, and four seats to get for all .
Proposition 6 (Three seats). We have .
Proof. Fix any rational with (which exists by Proposition 4), and take a finite strict inner election with at least three candidates and pair opposition at least , giving the tie credits (1).
Use eight candidate types numbered , split into two blocks and . Form two families of four rows each by starting from 3000 1002 and 3111 2110 (digits in type order ) and rotating both four-digit blocks together one step left at a time:
First family (weight each): 3000 1002 0003 0021 0030 0210 0300 2100 Second family (weight each): 3111 2110 1113 1102 1131 1021 1311 0211
Since is rational, all eight weights are positive rationals summing to 1. For a rival triple and a challenger type, let and be the unweighted credit sums over the four rows of the first and second families. The table score is .
Shifting both blocks together modulo 4 leaves unchanged. A half-turn swaps , , , and with no fixed types, so any multiset fixed by it comes in matched pairs and has even size, never 3. Since repeating a one-step shift twice gives a half-turn, no nonzero shift fixes any triple. Thus the four shifts split all rival triples (repeats allowed) into 30 groups of 4.
In the table below, 046/1 means that type 1 challenges rival types 0, 4, 6. For example, against 0, 4, 6, type 1 earns on the first family and on the second, giving . Against 0, 0, 0, type 4 earns on the first family and on the second, giving . The table lists one representative from each of the 30 groups:
| Groups | Rival triple / challenger | |||
| 2 | 000/4 004/4 | |||
| 13 | 001/2 002/1 003/1 005/2 006/3 007/4 012/3 015/2 016/3 024/1 047/4 055/2 066/3 | |||
| 2 | 046/1 446/1 | |||
| 10 | 014/2 017/2 025/3 044/2 045/2 056/3 057/2 077/1 444/2 445/2 | |||
| 3 | 067/1 447/2 456/3 |
Table 3.
In every line, , so the table score is at least for all 120 rival triples. By (2), . Letting rational gives .
Proposition 7 (Four seats). We have .
Proof. Fix any (so ), and take a finite strict inner election with at least three candidates and pair opposition at least , giving the tie credits (1).
Use four candidate types: one type and a group of three types. Form four rows with rational weights summing to 1 (relative weights 2, 1, 1, 1, total 5):
One row of weight , giving grade 0 to all of and grade 1 to .
For each , one row of weight , giving grade 0 to and and grade 1 to the other two types in .
Given four rivals (repeats allowed), let be the number of rivals of type (so lie in ). We sum the credits before dividing by 5:
Case . Challenge with . On the three weight-1 rows, has grade 0 and ties the rivals of each type in . The four rivals split across the three types of with counts , , , or , giving credit , , , or .
Case . Challenge again with . On each weight-1 row, ties the one rival of type plus the rivals of that type in . The three rivals in split with counts , , or , so the tie counts are , , or , giving credit , , or .
Case . At most rivals lie in , so some type is absent from the rivals. Challenge with . The weight-2 row gives (tying the rivals in ), and the weight-1 row for gives (tying the rivals of type ). For , their sum is , , and .
In every case the table score is at least . Applying (2) and letting gives . □
Proposition 8 (Combining blocks). For every integer ,
Proof. Since , write with every : start with 3, 4, or 5 according to , and add threes to reach . For each , we have (with equality for , and by Propositions 6 and 7 for ).
Fix . For each , pick a finite strict election on a candidate set with in which every -member committee faces opposition at least . Take pairwise disjoint, so their union has size at least . To form a ballot on , choose block with probability and draw a voter uniformly from . Keep this voter’s ranking within and put all other candidates below in a fixed order. These rational weights define the combined election .
Let be any -member committee. Because , some block satisfies . Since , extend to a subset of size , and pick an outsider beating on at least of the ballots of . Then , and every block- ballot that ranks above ranks above both and . Hence
Letting proves (4). □
:::
The certified pair bound
For the quantitative bound we use a larger table in Corollary 3(a), with .
Proposition 9. There is a finite grade table (with 21 candidate types and 113 rows) that satisfies Corollary 3(a) with , where
Hence .
Outline of the certificate. Each of the 96 ordinary rows has 64 positions, and each of the 17 joined rows has 128. The positive integer row weights sum to . The resulting 8320 positions have weights in units of , where . Each candidate chooses one type for the whole table. In each row, it chooses an option from its type’s menu and, in a free row, the positions to mark.
For fixed rival and challenger assignments, write and for the numbers of win and loss units. Appendix A gives the table and the checker, and proves the integer test that the checker uses. For every pair of rival assignments, some challenger has and . Since , this gives and , so Corollary 3(a) gives .
Proof of Theorem 1. For , Propositions 8 and 9 give . Since , this gives the claimed coverage bound. Because , the bounds at are strictly below and , respectively. Finally, , whose right-hand side tends to .
References
A The pair certificate
For the table used in Proposition 9, we verify that for every pair of rival grade assignments there is a challenger assignment satisfying
Here counts position units where the challenger beats both rivals or ties one and beats the other, counts units where a rival has a better grade, and the remaining units are three-way ties.
How the grade table is defined
The JSON file pair-menus.json is a list of 113 rows [kind, weight, u, menus]. A candidate uses the same type in every row. In each row it chooses an option from menus[t] and, if the row is free, chooses the marked positions allowed by that option. Grades are single ASCII characters in standard order (0–9, then A–Z, then a–z; only 0–9 and A–J appear), with smaller grades better.
Each row has a positive integer weight, and the 113 weights sum to . The split is an integer in , equal to 80 for all 96 ordinary rows. There are four row kinds (20 fixed, 10 prefix, 66 free, 17 joined):
Fixed: 64 positions of weight 80 ·
weightunits each. Each option is a 64-character word.Prefix: 64 positions of weight 80 ·
weightunits each. Option () puts grade in the first positions and grade in the other .Free: 64 positions of weight 80 ·
weightunits each. Option lets the candidate put grade in any marked positions and grade in the other .Joined: 128 positions: 64 left positions of weight ·
weightunits each and 64 right positions of weight ·weightunits each. Each option is a pair of 64-character words (one for each half) chosen together.
Every row totals weight units, so all 8320 positions total units. For example, Row 1 is free with weight 624,381,043; its type-9 menu has ["2", "6", 6] and ["0", "3", 56], putting grade 6 in any 6 positions (2 elsewhere) or 3 in any 56 (0 elsewhere).
Why the integer checker is valid
The Python program check_pair_grade.py (pp. 12–13) uses exact integer arithmetic with
Give credit FULL to each of the win units, TIE to each of the tie units, and 0 to the loss units. The total score is , so
If , integrality makes the first term at most , while . If , then (since ), so both terms vanish. In every other case the difference is positive. Thus score TARGET is exactly the test in (5).
Best score in one row. In fixed, prefix, and joined rows the rival options specify their grade words, so the checker scores each challenger option directly.
In a free row, let the rivals mark , positions, with overlap . Every integer from to is possible. The four classes of positions (neither rival marks it, only the second, only the first, or both) have sizes
For any challenger option, the gain from marking a position is constant within each class. An option requiring marks earns its maximum by taking the largest gains, even when some are negative. Exchanging a smaller chosen gain for a larger unchosen one increases its score. Hence, for fixed rival options, each challenger type’s best score depends only on .
Checking all 231 type pairs. Because the credit at each position is symmetric in the two rivals, it is enough to check the unordered pairs of rival types . Since a candidate of type chooses its option and marked positions separately in each row, its best total score against a full rival choice is the sum of its best row scores.
One challenger type (228 pairs). Outside , , and , pick challenger type when , when and , and otherwise. In each row, take the minimum of type ’s best score over all rival choices in that row. The sum of these 113 minima exceeds TARGET in all 228 cases.
Two challenger types (3 pairs). For with , allow challenger type or . Each rival choice in a row gives a pair of best row scores for types and (at the same overlap in a free row). A global rival choice defeats both challenger types exactly when both score totals are TARGET. In each row, keep distinct pairs and drop any pair dominated by another (no larger in either coordinate and smaller in at least one); swapping to the smaller pair cannot increase either total. Sorting the remaining minimal pairs with increasing makes decrease, so the row minima are the first -value and last -value. Subtract these minima from each pair in the row, and subtract the sums of all 113 row minima from TARGET to get two budgets. If either budget is negative, one challenger already succeeds. Otherwise start from , add one adjusted pair per row (skipping rows with only ), drop sums above either budget, and keep only minimal sums. Because future increments are nonnegative, this preserves whether a rival choice stays within both budgets; none survives for , , or .
How to reproduce the check from this PDF
Save this PDF as note.pdf, run pdftotext -layout note.pdf note.txt, and run this Python 3 script in the same folder. Using only the standard library, it recovers check_pair_grade.py from the P records and pair-menus.json from the 111 base64-zlib records D000–D110 (pp. 14–15).
import base64, re, zlib
from pathlib import Path
s = Path("note.txt").read_text(encoding="utf-8")
code = []
for n, k, line in re.findall(r"(?m) *P(\d{3})/(\d+) (.+)$", s):
assert int(n) == len(code) + 1
code.extend([""] * (int(n) - len(code) - 1))
code.append(" " * int(k) + line.rstrip())
Path("check_pair_grade.py").write_text("\n".join(code) + "\n", encoding="utf-8")
parts = re.findall(r"(?m) *D(\d{3}) +([A-Za-z0-9+/=]+) *$", s)
assert [int(i) for i, _ in parts] == list(range(111))
data = base64.b64decode("".join(v for _, v in parts), validate=True)
Path("pair-menus.json").write_bytes(zlib.decompress(data))
Finally run python3 check_pair_grade.py pair-menus.json (without -O) to verify all 231 unordered type pairs at .
Python verifier, P001–P066
P001/0 """Verify the pair bound from the JSON grade menus printed in the note."""
P002/0 import json
P003/0 import sys
P004/0 from functools import lru_cache
P005/0 from itertools import combinations_with_replacement, product
P006/0 from pathlib import Path
P008/0 P, Q = 351449648252133, 512000000000000
P009/0 TYPES = range(21)
P010/0 R = 80 * 64 * 10**12
P011/0 TIE = (R + 1) * P - 1
P012/0 FULL = (R + 1) * Q
P013/0 TARGET = R * TIE
P015/0 def credit(h, a, b):
P016/4 if h > min(a, b):
P017/8 return 0
P018/4 return TIE if h == a == b else FULL
P020/0 @lru_cache(None)
P021/0 def word_score(h, a, b):
P022/4 return sum(credit(z, x, y) for z, x, y in zip(h, a, b))
P024/0 @lru_cache(None)
P025/0 def option_scores(kind, split, h, a, b):
P026/4 if kind == "fixed":
P027/8 return (word_score(h, a, b),)
P028/4 if kind == "joined":
P029/8 left = word_score(h[0], a[0], b[0])
P030/8 right = word_score(h[1], a[1], b[1])
P031/8 return (split * left + (80 - split) * right,)
P032/4 p, q, r = a[2], b[2], h[2]
P033/4 if kind == "prefix":
P034/8 return (sum(credit(h[k < r], a[k < p], b[k < q]) for k in range(64)),)
P035/4 cells = list(product((0, 1), repeat=2))
P036/4 base = [credit(h[0], a[i], b[j]) for i, j in cells]
P037/4 gain = [credit(h[1], a[i], b[j]) - t for (i, j), t in zip(cells, base)]
P038/4 order = sorted(range(4), key=gain.__getitem__, reverse=True)
P039/4 values = []
P040/4 for overlap in range(max(0, p + q - 64), min(p, q) + 1):
P041/8 sizes = (64 - p - q + overlap, q - overlap, p - overlap, overlap)
P042/8 score = sum(n * t for n, t in zip(sizes, base))
P043/8 remaining = r
P044/8 for k in order:
P045/12 used = min(remaining, sizes[k])
P046/12 score += used * gain[k]
P047/12 remaining -= used
P048/8 values.append(score)
P049/4 return tuple(values)
P051/0 def states(row, i, j, heads):
P052/4 kind, weight, split, menus = row
P053/4 factor = weight if kind == "joined" else 80 * weight
P054/4 for a, b in product(menus[i], menus[j]):
P055/8 columns = []
P056/8 for t in heads:
P057/12 choices = [option_scores(kind, split, h, a, b) for h in menus[t]]
P058/12 columns.append([factor * max(vals) for vals in zip(*choices)])
P059/8 yield from zip(*columns)
P061/0 def minimal(points):
P062/4 front = []
P063/4 for x, y in sorted(set(points)):
P064/8 if not front or y < front[-1][1]:
P065/12 front.append((x, y))
P066/4 return front
Python verifier, P068–P128
P068/0 def two_heads(rows, i):
P069/4 fronts = [minimal(states(row, i, i, (i - 1, i))) for row in rows]
P070/4 cap_x = TARGET - sum(f[0][0] for f in fronts)
P071/4 cap_y = TARGET - sum(f[-1][1] for f in fronts)
P072/4 if min(cap_x, cap_y) < 0:
P073/8 return True
P074/4 partial = [(0, 0)]
P075/4 for f in fronts:
P076/8 if len(f) > 1:
P077/12 extra = [(x - f[0][0], y - f[-1][1]) for x, y in f]
P078/12 partial = minimal((x + a, y + b) for x, y in partial for a, b in extra
P079/30 if x + a <= cap_x and y + b <= cap_y)
P080/12 if not partial:
P081/16 return True
P082/4 return False
P084/0 def read_rows(path):
P085/4 rows = json.loads(Path(path).read_text(encoding="utf-8"))
P086/4 assert len(rows) == 113 and sum(row[1] for row in rows) == 10**12
P087/4 assert sum(row[0] == "joined" for row in rows) == 17
P088/4 for kind, weight, split, menus in rows:
P089/8 assert kind in ("free", "prefix", "fixed", "joined")
P090/8 assert type(weight) is int and weight > 0
P091/8 assert len(menus) == 21 and all(menus)
P092/8 assert type(split) is int and 0 <= split <= 80
P093/8 assert kind == "joined" or split == 80
P094/8 for menu in menus:
P095/12 for k, opt in enumerate(menu):
P096/16 if kind in ("free", "prefix"):
P097/20 g, h, count = opt
P098/20 assert isinstance(g, str) and isinstance(h, str)
P099/20 assert len(g) == len(h) == 1 and type(count) is int
P100/20 assert 0 <= count <= 64
P101/16 elif kind == "fixed":
P102/20 assert isinstance(opt, str) and len(opt) == 64
P103/16 else:
P104/20 assert len(opt) == 2
P105/20 assert all(isinstance(w, str) and len(w) == 64 for w in opt)
P106/16 if kind != "fixed":
P107/20 menu[k] = tuple(opt)
P108/4 return rows
P110/0 def main(path):
P111/4 rows = read_rows(path)
P112/4 pure = joint = 0
P113/4 for i, j in combinations_with_replacement(TYPES, 2):
P114/8 if i == j and i in (5, 10, 16):
P115/12 assert two_heads(rows, i), (i, j)
P116/12 joint += 1
P117/8 else:
P118/12 h = j - 1 if i else (0 if 1 <= j <= 15 else 20)
P119/12 score = sum(min(states(row, i, j, (h,)))[0] for row in rows)
P120/12 assert score > TARGET, (i, j)
P121/12 pure += 1
P122/4 assert (pure, joint) == (228, 3)
P123/4 print(f"Verified all {pure + joint} type pairs at {P}/{Q}.")
P125/0 if __name__ == "__main__":
P126/4 if not __debug__:
P127/8 raise SystemExit("Run with Python assertions enabled.")
P128/4 main(sys.argv[1])
Grade data, D000–D054
D000 eNrtPcuW7CiO/5LrWPB+LCPz3rpT9Qt1ajc15/QsZvrUaj5/wDY22NhhjBxBOEX3rUwSByFLQgi9+PPPj//65++/P2
D001 6KCW4oEfxmyO3PP//8oB83/4+zv/5y/Q/muuxFXeXAc50P4n7nHzep+iHhuu4f9UPuET/cPSb732X/FBlGSJjBD9lk
D002 LHzX07rTO96SMT860EMIZrWlnCoSKML71w+T+NeUU9dj47NDzm0xZvrvY2VDs67/+vvKF7yg64CwrmOnMdVz7GxoCe
D003 zwHPdD936ofyndD1DSP0dHjI5dRyfjn5wtjokyy7GpO3zdfUFrxQklSmkdKD1bAzPCP7Wrh0VF+8UWkDGglEZoU2Ed
D004 0mTt+Z4JfE67tTchSZE5kp7bXSNcRBympZGGCGYapE4Cu6OHogmLUxrYnwceD3SUEz70Lh5/RTciA6VKui1KESGapc
D005 MTun6/6+g4rE0arTQvx7QfEzFnyLA6kyVNwmIV6VZgsntWvByUlFRxw4l9UzrcRs2hYKxwSM+XnJzW2LA2dRgy01AQ
D006 kapi/Q0CWS81CmIkt9zSBunm0MNIwCPxyBnRSMLQoOLRhe52W0y5GOvUxHgRiZnmtcBhwVjybarXV7NjM5oVjZHHY7
D007 G0VEz6fQt4jQ4Eoh5/oxrg9xkeEK2GzWN4zCQsb+Zc/tK9H3SP+tf//f2fHu2CCqvCFvVBK9uHn5tVtgYn4bz/w5Gf
D008 nslU3z360/NzZeteRVQ2v3Sd3i+lUkd/etnpGiFSHv3ZvQqpbDgJToKTvP8k3W7273/+dhua08Ks1oaatQPXTOd9Qf
D009 eWtYJZp57YVBcbNJK7t6v1D372k0yqpUoNRCpWsL7Sz6mNzxlvzllRBDNjt/hTo7a160EyHOXyD+qHDy5flaSfi86D
D010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
D108 BVNEdKHr3aDUnF8+kN/ziD+SyvEce/en2E9jiD/4upaYydmHayCkkrSQVtYCQxbXGQjGMfbRQt94C4hcYtNG6huQ
D109 CNW2jcwl oZuGrQoIS0QZOEjWxoZPtORrYcj3wVNChjAQA c9Ua2Gxodv5HROb96qdHxHA7pbRvKBDis/+HhUOpuUjju
D110 zD2IItlgOwr6ZElav/we1C1GP
References
- [1]D. Cervone, C. Hardin, and W. S. Zwicker, Higher order Condorcet cycles, preliminary report, Joint Mathematics Meetings, San Diego, 11 January 2013, abstract no. 1086–91-938.
- [2]M. Charikar, A. Lassota, P. Ramakrishnan, A. Vetta, and K. Wang, Six candidates suffice to win a voter majority, STOC, 2025.DOI
- [3]E. Elkind, J. Lang, and A. Saffidine, Choosing collectively optimal sets of alternatives based on the Condorcet criterion, IJCAI, 2011, 186–190.
- [4]E. Elkind, J. Lang, and A. Saffidine, Condorcet winning sets, Social Choice and Welfare 44 (2015), 493–517.DOI
- [5]C. Geist, Finding preference profiles of Condorcet dimension k via SAT, AAMAS, 2014.arxiv.org/abs/1402.4303
- [6]Z. Jiang, K. Munagala, and K. Wang, Approximately stable committee selection, STOC, 2020.arxiv.org/abs/1910.14008
- [7]Prasanna Ramakrishnan, Condorcet Quintets — A Proof from the Book, Theory Dish, 11 September 2026.
- [8]H. Song, T. Nguyen, and Y.-S. Lin, A few good choices, SODA, 2026.
- [9]David E. Speyer, answer to Is there a finite family of functions such that the max of any two functions can be dominated by a third?, MathOverflow, 27 November 2013.
- [10]Sam Zbarsky, answer to Is there a finite family of functions such that the max of any two functions can be dominated by a third?, MathOverflow, 18 February 2014.
