The best Condorcet-compatible election method: Ranked Pairs

Condorcet-compatible election methods are examined and compared. The Ranked Pairs method proves significantly better than Beatpath; that both are clone-free, and have other desirable properties, makes them much better than any alternative.


Introduction
Grant we wish to elect a single candidate out of many, using a ranked-choice ballot and a Condorcet-compatible election method. What is the best way to decide the rare election when no Condorcet winner appears?
The most general form of a ranked-choice ballot allows a voter to assign each of the N candidates any integer rank from 1 to N. The voter is deemed to prefer any candidate he has given a higher rank to any candidate he has given a lower. Candidates can have ranks in common; if two candidates have the same rank, the voter is deemed to prefer neither candidate to the other. A voter need not rank all the candidates; candidates left unranked are deemed to have been ranked as equal last.
We say that the voters prefer candidate A to candidate B if the ballots show that more voters prefer A to B than prefer B to A; when this happens we say that candidate A has won his contest against candidate B in a competition for the voters' regard. As in a round-robin sports tournament, it is natural to declare that a candidate who wins his contests against each of his rivals is the overall winner, and should be elected. Such a candidate is called a Condorcet winner , and a system of elections that always elects a Condorcet winner when there is one available is called a Condorcet-compatible method.

3
The best Condorcet-compatible election method: Ranked Pairs Also as in a round-robin sports tournament, in which no contestant might defeat each of his fellow competitors, in an election with ranked-choice ballots no candidate might be preferred by the voters to each of his rivals. A Condorcet-compatible method that in every possible race declares a single winner needs a tiebreaker to decide such cases.
So rare 1 are these cases that there is little practical difference between using the best possible tiebreaker or any merely adequate tiebreaker; the behavior of candidates, voters, and factions will not be materially affected by the chance a case will occur. Rare problems are still problems, however; and the best of the tiebreakers proves to be Ranked Pairs (Tideman, 1987).
When there is no Condorcet winner among three candidates, Condorcet himself proposed (de Caritat, 1789) a tiebreaker: elect the candidate who lost a contest by the smallest margin. Most 2 Condorcet-compatible methods, however various their principles, have for three candidates their tiebreaker reduce to Condorcet's.

Intuitive and easy execution of the method
The rationale of Ranked Pairs is that a contest whose margin is large should outweigh a contest whose margin is small.
Consider a completely tangled, four-candidate election with no Condorcet winner, one for example (Schulze, 2003) with the ballots Begin by constructing a table of the results of all the different contests, with the winning margins sorted in order from largest to smallest, Any ranking of all four candidates must have some losers of these contests above some winners; Ranked Pairs makes such an inversion occur only when its margin is smaller than any that contradict it, and runs as follows.
The largest margin (12) in the table fixes that in the final ranking that D will rank ahead of B. We write all 24 possible rankings of the candidates, The next largest margin (10) fixes that B will rank ahead of C, and we drop those remaining where B does not rank ahead of C, leaving The third largest margin (8) suggests that C should rank ahead of D, but if we dropped all the remaining rankings where that was so, none would be left, so we ignore the contest where C beat D, and pass on to the next. Here is where a smaller margin (8) is not permitted to overturn the earlier larger margins (of 12 and 10) that it contradicts. Fixing the results of the next three contests is straightforward, and at the end only the ranking DABC is left. Candidate D heads it, so D is the Ranked Pairs winner. Finding the Beatpath (Schulze, 2020) rank order (here ADBC) is not as easy. 3

Freedom from influence by clones
In any collection of ranked-choice ballots a set of candidates forms a clone if on every ballot no candidate outside the set is ever ranked between any members of the set. Any one candidate belongs to a set forming a clone where that candidate is that set's single element.
For any given number of ballots, suppose that whether some candidate or other within a clone is elected is independent of the number of candidates who might belong to any clone. In detail, in any election the ballots cast can be altered to add and subtract candidates to any existing clone, provided the number of candidates in a clone remains at least 1, and then the election outcome cannot change except to replace the original winner by one of the candidates who have been part of his clone. An election system with this property is free of any influence by clones.
Such a system is highly desirable. Consider an election where all candidates belong to various political parties, and where voters have strong preferences about the party to whom the candidate elected should belong, but weak preferences about who within each party should be elected. In such a system, the party of the candidate who shall be elected is independent of how many candidates run to represent each of the parties: then a cause does not founder if multiple candidates seek to lead

ABCD ACDB BACD BCAD CABD CBDA DABC DBCA ABDC ADBC BADC BDAC CADB CDAB DACB DCAB ACBD ADCB BCAD BDCA CBAD CDBA DBAC DCBA
The best Condorcet-compatible election method: Ranked Pairs it, and no cause gets an advantage if multiple candidates seek to lead another; and the policy outcome of an election cannot be manipulated by an individual choosing to run or not run whom the voters consider essentially fungible with another candidate already in the race. Of all Condorcet-compatible methods, Ranked Pairs and Beatpath (Schulze, 2003) alone are free of influence by clones. Other tiebreakers falling behind both of these by this and other criteria, 4 Beatpath emerges as Ranked Pair's chief competitor.

Simple means decide most elections
The outcome of an election should be immediate and comprehensible. A multicandidate election almost always has a Condorcet winner, and so when a Condorcetcompatible method is used the answer to the question, "Why was Mary elected, and not John?" is almost always as simple as, "More voters preferred Mary to John, than preferred John to Mary." When there is no Condorcet winner, it is helpful if we can decide an election by applying a method to a small number of candidates easily identified as potential winners, and not to all the candidates at once.
The Smith set is the smallest nonempty set of candidates each of whom wins a contest against any candidate not in the set, and fails to win a contest against some candidate within the set.
Suppose an election method has a rank order with three properties: (1) The candidates in the Smith set form the first candidates in the rank order.
(2) The order of the candidates in the Smith set doesn't change when all candidates not in the Smith set are dropped.
(3) The order of the candidates not in the Smith set doesn't change when all candidates in the Smith set are dropped.
If only (1) and (2) are true, then we can find the election winner just by applying the method only to the candidates in the Smith set; if that Smith set has n candidates, we can similarly find the rank order of the first n candidates.
If (3) is also true, we can drop those n candidates from the election, and what results is a new, smaller election; we can find its Smith set and find where a few more candidates fall in the rank order behind the ones whose positions we already know. Repeating this process, we find a succession of Smith sets, each of which belongs to an election with a smaller number of candidates; if each successive set is small, we can find the entire rank order easily.
Moreover, if the entire rank order is printed with gaps between the members of the successive Smith sets, we can immediately tell most of what would have happened had scattered sets of candidates not run. If a complex rank order came out ABC⋅D⋅E⋅FGH⋅I⋅JKL , then if candidates B, E, H, and J had not run, we can at once tell that the new rank order would have been CA⋅D⋅FG⋅I⋅KL for any method that 1 3 follows (1) and (2) and uses Condorcet's tiebreaker to rank three candidates. When one of the successive Smith sets has 4 or more candidates and some candidates from it drop, we at worst have to re-run a method among candidates within that set, paying no attention to any outside.
Property (2) holds for any system that is independent of Smith-dominated alternatives, or ISDA; Kemeny-Young (Kemeny, 1959;Young & Levenglick, 1978), Ranked Pairs, and Beatpath are all ISDA (Wikipedia, 2020). Properties (1) and (3) hold for these systems too 5 ; Kemeny-Young and Ranked Pairs because they have limited independence from irrelevant alternatives, and Beatpath, though it does not, for its own structural reason.
For these methods if we have 15 candidates running, and inspection of the victory matrix, 6 shows there are 3 candidates in the Smith set, we can correctly decide to find out who wins by examining the election had only the 3 candidates run, not all 15. If the closest any candidate not in the Smith set came to tying a candidate in the Smith set is to trail by 1000 votes, that decision need not be revisited unless we later discover at least 1000 votes had been missing.
Rank orders in these methods can disagree only on the order each imposes on the candidates within one of the sequence of Smith sets, not about the relative rank of candidates who belong to different sets in that sequence. Since the rank orders for the various methods agree for 3 candidates, the rank orders for the methods can disagree if and only if one of the sequence of Smith sets has more than 4 candidates. So to explore differences between these methods we can pay attention to the critical case where there are 4 or more candidates in the initial Smith set of the sequence, when who will win is in dispute.
We can now discard Kemeny-Young from contention because even in this case it will not be clone-free. 7 Ranked Pairs now proves to have a number of advantages over Beatpath.

Simple means check all elections
Suppose there are n candidates in the Smith set; we can record all the information about these candidates in a victory matrix, where the entry in row A and column B is the number of ballots on which candidate A is preferred to candidate B, minus the number of ballots on which B is preferred to A; the diagonal elements are meaningless and be omitted. For the election in Sect. 2.1 the victory matrix is 5 For a proof see the Appendix. 6 Sorting the candidates in the N × N victory matrix so that the candidates in the Smith set are instantly seen by the eye is a process that is at worst O(N 2 ) , where N is the number of candidates (Darlington, 2021;Wikipedia, 2021). 7 Also no algorithm is known to find the Kemeny-Young rank order in a Smith set in a time polynomial in n, so the method can become unworkable for tens or scores of candidates. This falls into the common case when all the elements above the diagonal are different and none are zero, the case when the Ranked Pairs algorithm runs without having to resolve some sort of tie. Consider the two rank orders D>A>B>C , and A>D>B>C , one of which is the Ranked Pairs rank order. We can tell which is not as follows.
For each rank order, in a copy of the victory matrix mark the element in row A and column B if in the rank order A is ranked ahead of B. We find for the respective rank orders Now from each copy list the marked elements from high to low; we find The first position, working left to right, where the lists differ will have one element less than the other. That rank order, here A>D>B>C , is thereby proven not to be the rank order for Ranked Pairs.
More generally, this scheme of comparing lists sorts the n! possible rank orders into an ordered list with the Ranked Pairs rank order at the head of it. Compare the lists for any two rank orders; the one with the greater element has the rank order that is closer to the head of the list. The scheme generalizes to set up an ordered list of all rank orders even in the case that the Ranked Pairs algorithm does encounter ties. 8 In the common case any voter, without doing even one addition, can see if a proposed rank-order proves some officially announced rank-order wrong-or vice versa. All he needs is two copies of the victory matrix, a matrix which an official tasked with the canvas of the ballots and with choosing a winner must compute anyway, and which the official should therefore be required to make public; and a copy of whatever rank order is offered in challenge.
A voter relies of course on the election official having correctly scanned and processed all the ballots to get the elements of the victory matrix. But the element AB is simply the number of votes by which A would lead B in a two-candidate race decided by simple majority, merely using the ranked-choice ballots to tell if a given voter would then vote for A, or for B; that number is not any harder to understand or to audit than under our present system of election by plurality. Beatpath is not known to have anything like so simple a structure as sorting all possible rank orders into a list. Beatpath does have a check-system, but one has to at least 9 search among all possible paths in an n-vertex graph to find particular directed paths, called chains; and add numbers along each edge belonging to a chain; and then compare the resulting sums for various chains. This is not something most voters could do or understand, and becomes impossible for even sophisticated voters to do on paper at modest values of n.
For a Smith Set of size n the best computer algorithm finds a rank order under Beatpath in a time, independent of input, proportional to n 3 . Under Ranked Pairs the time in the worst case scales as n 3 (but still marginally faster than Beatpath); but on average the time is much less, and empirically scales as n 2 as far out 10 as n = 1000 . Real elections use values of n so small that the time to decide an election using either method will overwhelmingly be dominated by the time to scan paper ballots and to construct the victory matrix, and not by what either method does with the victory matrix thereafter.

Informative and sensible rank order of candidates
Elections are not solely about choosing one candidate for office; they are (or should be) reliable measures of what candidates and causes have risen and fallen in voters' esteem: on one election day, and over many. A ranked-choice election records in its ballots an extraordinary amount of information, but some way to make it comprehensible must be found. Most systems of election report not only a single winner but a rank order, a list of all the candidates from first to last, with the candidate they declare elected at the head.
Plurality too provides such a list; but one cause can lead and another trail not because the first cause has more support, but because the second cause had been represented by many candidates. So for a method to provide a list is easy; making it mean something is hard.
For most elections, those in which each set in the succession of Smith sets has but one element, any Condorcet-compatible method provides a rank order that means exactly what it seems to mean: if any set of candidates had not run, the rank order of the candidates remaining would not change. It is therefore inevitable that the press and pundits will use the list to draw such inferences; but it has been proved impossible (Arrow, 1963) for any reasonable election method to have those inferences always be correct. Fortunately methods with the three properties in Sect. 2.3 come close; for these, dropping a candidate can only affect the order within the block of candidates who belong with him in a set in the sequence of successive Smith sets.

3
The best Condorcet-compatible election method: Ranked Pairs Whence does the candidate who was placed first in a rank order by a given method derive the moral authority to be declared elected? If he is deemed to be the best, even by a narrow margin, on some absolute scale, then it should follow that if every voter's preferences had been reversed, he would have to deemed the worst; and the second-best candidate would be deemed the second worst, and so on. The rank orders given by Ranked Pairs and Beatpath (and Kemeny-Young) have that property; but not those from all Condorcet-compatible methods.
True, to find the candidate who is the best on an absolute scale may not be the goal of every election system; a system might be intended instead to find the candidate who is the compromise acceptable to diametrically opposed factions; and in such a system, the same candidate might emerge as the compromise if all the voters' preferences had been reversed and so the factions in effect switched places. But to abandon finding the best candidate on an absolute scale, just because an election is nearly tied, is not what I believe most voters desire.
If the order of candidates is to have something to do with merit, then if the candidate who placed first had not run, then the candidate who placed second should have won. Kemeny-Young and Ranked Pairs have that property, but Beatpath fails it in the worst possible way; the candidate who placed second can become ranked last of the remaining candidates. 11 In Ranked Pairs and Kemeny-Young, by contrast, the deletion of any continuous block of candidates in the rank order that starts with the first candidate (or with the last, or both) would not change the order of the candidates that remain.
Despite their differences the Ranked Pairs, Beatpath, and Kemeny-Young methods are intimately related. Ranked Pairs and Beatpath can be viewed as approximations intended to adhere closely to the Kemeny-Young result except when in a large fraction of the ballots a set of candidates appears as a clone. 12 But Ranked Pairs preserves this useful property of the method that it is approximating, while Beatpath does not; so the rank order from Ranked Pairs is not only the more useful but the more natural.

Short definition that covers all cases
The example of Ranked Pairs in Sect. 2.1 does not settle how to choose a single rank order if any of the possible exact ties occur. An implementation of Ranked Pairs that does, declaring a single winner and a single rank order for every election even when the most general form of a ranked-choice ballot is in use, can be described in 320 words. 13 1 3

Conclusions
Of all the Condorcet-compatible methods known, only Ranked Pairs and Beatpath are clone-free, so only for these is the outcome of an election proof against being manipulated by the deliberate or accidental running of candidates whom voters consider fungible compared to a candidate already in a race. Of the two, Ranked Pairs has the more useful, intelligible, and meaningful rank order; for small numbers of candidates, its rank order is the one more easily found using pencil and paper; and for so many candidates that finding a rank order requires a computer, under Ranked Pairs it remains possible to check with pencil and paper and no arithmetic which of two proposed rank orders has to be wrong, while for Beatpath that is not possible. Ranked Pairs therefore emerges as the best and most practical of the Condorcet-compatible methods.

For Kemeny-Young and Ranked Pairs
An election system that has limited independence from irrelevant alternatives has the property (among others) that any continuous block of candidates that starts at the top of the rank order can be dropped, and the order of the remaining candidates is unchanged. Suppose for a system that is ISDA and has that property that (1) were not true; we shall reach a contradiction. Let there be n candidates in the Smith set; by assumption, there must be at least one candidate among the first n in the rank order who is not in the Smith set. Call the first such candidate X. If X is not at the head of the rank order, then using the property we can drop a block of as many candidates as we need to get a new election that has X at the head of the rank order, with the order of all the remaining candidates unchanged. Since that block must have fewer than n candidates, a set of at least one of the n candidates from the original Smith set must be part of this smaller election. A subset of this set must be the Smith set of the new election; and that Smith set cannot be empty, because there is at least one candidate in it who wins his contests against all the candidates remaining; and X cannot be in it, because all the candidates in it win their contest against X. Thus we have constructed a smaller election where the deletion of X, a candidate not in the Smith set, changes the winner of the election. No such election can exist for an election system that is ISDA, so we have reached the desired contradiction. Now that (1) is known to be true, (3) follows, because the property allows the n candidates in the Smith set, now known to be the first n in the rank order, to be dropped without changing the order of the candidates that remain.

For Beatpath
The Beatpath method depends on a directed graph of an election; each candidate is identified with a vertex, and an arrow connects each candidate with each other; the arrow points from candidate A to candidate B if A wins his contest against B, and each arrow is labeled with the margin by which that contest is won. 14 A chain between A and B is a path from A to B that follows the arrows, visiting each of the other vertices at most once. The strength of a chain is the smallest margin labeled on any arrow the chain includes. The strongest chain from A to B is the chain from A to B that has the greatest strength of all such. Under Beatpath, a unique rank order of the candidates follows from asserting: In the rank order of candidates, candidate A will precede candidate B if the strongest chain from A to B is stronger than the strongest chain from B to A.
Candidates fall into two groups: those inside the Smith set, and those outside. No chain exists that connects a candidate outside the Smith set to any inside; every arrow from a candidate outside to one inside runs in the wrong direction. So if A is inside, and B is outside, there is always a chain from A to B, but never a chain from B to A; and so A must precede B in the rank order. Therefore all the candidates in the Smith set precede in the rank order all the candidates not in the Smith set, and we have (1).
A chain that starts at a candidate in the Smith set cannot pass through a candidate not in the Smith set, and return to another candidate in the Smith set; one arrow on the return must point the wrong way. Similarly a chain cannot start at a candidate not in the Smith set, pass through a candidate in the Smith set, and return to another candidate not in the Smith set; one arrow on the outward pass must point the wrong way. The problems of finding the rank order of candidates within the Smith set, and of finding the rank order of candidate outside the Smith set, are therefore disjoint, and can be solved for separately; and we have (3).

Author contributions
The author thanks T.N. Tideman for helpful discussions.

Declarations
Competing interest The authors declare no competing interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.