Schulze method

The Schulze method is a single winner ranked-choice voting rule developed by Markus Schulze. It is also known as the beatpath method. The Schulze method is a Condorcet method, which means it will elect a majority-choice candidate if one exists; in other words, if most people rank A above B, A will defeat B (whenever this is possible).

Schulze's method is based on the idea of breaking cyclic ties by using indirect victories. The idea is that if Alice beats Bob, and Bob beats Charlie, then Alice (indirectly) beats Charlie; this kind of indirect win is called a beatpath.

For proportional representation, a single transferable vote (STV) variant known as Schulze STV also exists. The Schulze method is used by several organizations including Debian, Ubuntu, Gentoo, Pirate Party political parties and many others. It was also used by Wikimedia prior to their adoption of score voting.

Description of the method


Schulze's method uses ranked ballots with equal ratings allowed. There are two common (equivalent) descriptions of Schulze's method.

Beatpath explanation
The idea behind Schulze's method is that if Alice defeats Bob, and Bob beats Charlie, then Alice "indirectly" defeats Charlie; this kind of indirect win is called a 'beatpath'.

Every beatpath is assigned a particular strength. The strength of a single-step beatpath from Alice to Bob is just the number of voters who rank Alice over Bob. For a longer beatpath, consisting of multiple "beats", the strength of a beatpath is as strong as its weakest link (i.e. the beat with the smallest number of winning votes).

We say Alice has a "beatpath-win" over Bob if her strongest beatpath to Bob is stronger than all of Bob's beatpaths to Alice. The winner is the candidate who has a beatpath-win over every other candidate.

Markus Schulze proved that this definition of a beatpath-win is transitive; in other words, if Alice has a beatpath-win over Bob, and Bob has a beatpath-win over Charlie, Alice has a beatpath-win over Charlie. As a result, the Schulze method is a Condorcet method, providing a full extension of the majority rule to any set of ballots.

Iterative description
The Schulze winner can also be constructed iteratively, using a defeat-dropping method: The winner is the only candidate left at the end of the procedure.
 * 1) Draw a directed graph with all the candidates as nodes; label the edges with the number of votes supporting the winner.
 * 2) If there is more than one candidate left:
 * 3) * Check if any candidates are tied (and if so, break the ties by random ballot).
 * 4) * Eliminate all candidates outside the majority-preferred set.
 * 5) * Delete the edge closest to being tied.

Example
In the following example 45 voters rank 5 candidates.

The pairwise preferences have to be computed first. For example, when comparing $A$ and $B$ pairwise, there are $5+5+3+7=20$ voters who prefer $A$ to $B$, and $8+2+7+8=25$ voters who prefer $B$ to $A$. So $$d[A, B] = 20$$ and $$d[B, A] = 25$$. The full set of pairwise preferences is:

The cells for d[X, Y] have a light green background if d[X, Y] > d[Y, X], otherwise the background is light red. There is no undisputed winner by only looking at the pairwise differences here.

Now the strongest paths have to be identified. To help visualize the strongest paths, the set of pairwise preferences is depicted in the diagram on the right in the form of a directed graph. An arrow from the node representing a candidate X to the one representing a candidate Y is labelled with d[X, Y]. To avoid cluttering the diagram, an arrow has only been drawn from X to Y when d[X, Y] > d[Y, X] (i.e. the table cells with light green background), omitting the one in the opposite direction (the table cells with light red background).

One example of computing the strongest path strength is p[B, D] = 33: the strongest path from B to D is the direct path (B, D) which has strength 33. But when computing p[A, C], the strongest path from A to C is not the direct path (A, C) of strength 26, rather the strongest path is the indirect path (A, D, C) which has strength min(30, 28) = 28. The strength of a path is the strength of its weakest link.

For each pair of candidates X and Y, the following table shows the strongest path from candidate X to candidate Y in red, with the weakest link underlined.

Now the output of the Schulze method can be determined. For example, when comparing $A$ and $B$, since $$(28 =) p[A,B] > p[B,A] (= 25)$$, for the Schulze method candidate $A$ is better than candidate $B$. Another example is that $$(31 =) p[E,D] > p[D,E] (= 24)$$, so candidate E is better than candidate D. Continuing in this way, the result is that the Schulze ranking is $$E > A > C > B > D$$, and $E$ wins. In other words, $E$ wins since $$p[E,X] \ge p[X,E]$$ for every other candidate X.

Implementation
The only difficult step in implementing the Schulze method is computing the strongest path strengths. However, this is a well-known problem in graph theory sometimes called the widest path problem. One simple way to compute the strengths, therefore, is a variant of the Floyd–Warshall algorithm. The following pseudocode illustrates the algorithm.

This algorithm is efficient and has running time O(C3) where C is the number of candidates.

Ties and alternative implementations
When allowing users to have ties in their preferences, the outcome of the Schulze method naturally depends on how these ties are interpreted in defining d[*,*]. Two natural choices are that d[A, B] represents either the number of voters who strictly prefer A to B (A>B), or the margin of (voters with A>B) minus (voters with B>A). But no matter how the ds are defined, the Schulze ranking has no cycles, and assuming the ds are unique it has no ties.

Although ties in the Schulze ranking are unlikely, they are possible. Schulze's original paper recommended breaking ties by random ballot.

There is another alternative way to demonstrate the winner of the Schulze method. This method is equivalent to the others described here, but the presentation is optimized for the significance of steps being visually apparent as a human goes through it, not for computation.
 * 1) Make the results table, called the "matrix of pairwise preferences", such as used above in the example. Then, every positive number is a pairwise win for the candidate on that row (and marked green), ties are zeroes, and losses are negative (marked red). Order the candidates by how long they last in elimination.
 * 2) If there is a candidate with no red on their line, they win.
 * 3) Otherwise, draw a square box around the Schwartz set in the upper left corner. It can be described as the minimal "winner's circle" of candidates who do not lose to anyone outside the circle. Note that to the right of the box there is no red, which means it is a winner's circle, and note that within the box there is no reordering possible that would produce a smaller winner's circle.
 * 4) Cut away every part of the table outside the box.
 * 5) If there is still no candidate with no red on their line, something needs to be compromised on; every candidate lost some race, and the loss we tolerate the best is the one where the loser obtained the most votes. So, take the red cell with the highest number (if going by margins, the least negative), make it green—or any color other than red—and go back step 2.

Here is a margins table made from the above example. Note the change of order used for demonstration purposes.

The first drop (A's loss to E by 1 vote) does not help shrink the Schwartz set. So we get straight to the second drop (E's loss to C by 3 votes), and that shows us the winner, E, with its clear row.

This method can also be used to calculate a result, if the table is remade in such a way that one can conveniently and reliably rearrange the order of the candidates on both the row and the column, with the same order used on both at all times.

Satisfied criteria
The Schulze method satisfies the following criteria:


 * Monotonicity criterion
 * Majority criterion
 * Majority loser criterion
 * Condorcet criterion
 * Condorcet loser criterion
 * Smith criterion
 * Independence of Smith-dominated alternatives
 * Mutual majority criterion
 * Independence of clones
 * Reversal symmetry
 * Mono-append
 * Mono-add-plump
 * Resolvability criterion
 * Polynomial runtime
 * prudence
 * MinMax sets
 * Woodall's plurality criterion if winning votes are used for d[X,Y]
 * Symmetric-completion if margins are used for d[X,Y]

Failed criteria
Since the Schulze method satisfies the Condorcet criterion, it automatically fails the following criteria:
 * Participation
 * Consistency
 * Invulnerability to burying
 * Later-no-harm

Likewise, since the Schulze method is not a dictatorship and is a ranked voting system (not rated), Arrow's Theorem implies it fails:


 * Independence of irrelevant alternatives

The Schulze method also fails
 * Peyton Young's criterion of Local Independence of Irrelevant Alternatives.

Comparison table
The following table compares the Schulze method with other single-winner election methods:

The main difference between the Schulze method and the ranked pairs method can be seen in this example:

Suppose the MinMax score of a set X of candidates is the strength of the strongest pairwise win of a candidate A ∉ X against a candidate B ∈ X. Then the Schulze method, but not Ranked Pairs, guarantees that the winner is always a candidate of the set with minimum MinMax score. So, in some sense, the Schulze method minimizes the largest majority that has to be reversed when determining the winner.

On the other hand, Ranked Pairs minimizes the largest majority that has to be reversed to determine the order of finish, in the MinLexMax sense. In other words, when Ranked Pairs and the Schulze method produce different orders of finish, for the majorities on which the two orders of finish disagree, the Schulze order reverses a larger majority than the Ranked Pairs order.

History
The Schulze method was developed by Markus Schulze in 1997. It was first discussed in public mailing lists in 1997–1998 and in 2000.

In 2011, Schulze published the method in the academic journal Social Choice and Welfare.

Government
The Schulze method is used by the city of Silla for all referendums. It is also used by the cities of Turin and San Donà di Piave and by the London Borough of Southwark through their use of the WeGovNow platform, which in turn uses the LiquidFeedback decision tool.

Political parties
Schulze was adopted by the Pirate Party of Sweden (2009), and the Pirate Party of Germany (2010). The newly formed Boise, Idaho, chapter of the Democratic Socialists of America in February chose this method for their first special election held in March 2018.


 * Five Star Movement of Campobasso, Fondi, Monte Compatri, Montemurlo, Pescara, and San Cesareo
 * Pirate Parties of Australia, Austria, Belgium, Brazil, Germany, Iceland, Italy, the Netherlands, Sweden, Switzerland, and the United States
 * SustainableUnion
 * Volt Europe

Student government and associations

 * AEGEE – European Students' Forum
 * Club der Ehemaligen der Deutschen SchülerAkademien e. V.
 * Associated Student Government at École normale supérieure de Paris
 * Flemish Society of Engineering Students Leuven
 * Graduate Student Organization at the State University of New York: Computer Science (GSOCS)
 * Hillegass Parker House
 * Kingman Hall
 * Associated Students of Minerva Schools at KGI
 * Associated Student Government at Northwestern University
 * Associated Student Government at University of Freiburg
 * Associated Student Government at the Computer Sciences Department of the University of Kaiserslautern

Organizations
It is used by the Institute of Electrical and Electronics Engineers, by the Association for Computing Machinery, and by USENIX through their use of the HotCRP decision tool.

Organizations which currently use the Schulze method include:


 * Annodex Association
 * Berufsverband der Kinder- und Jugendärzte (BVKJ)
 * BoardGameGeek
 * Cloud Foundry Foundation
 * County Highpointers
 * Dapr
 * Debian
 * EuroBillTracker
 * European Democratic Education Community (EUDEC)
 * FFmpeg
 * Free Geek
 * Free Hardware Foundation of Italy
 * Gentoo Foundation
 * GNU Privacy Guard (GnuPG)
 * Haskell
 * Homebrew
 * Internet Corporation for Assigned Names and Numbers (ICANN) (until 2023)
 * Kanawha Valley Scrabble Club
 * KDE e.V.
 * Knight Foundation
 * Kubernetes
 * Kumoricon
 * League of Professional System Administrators (LOPSA)
 * LiquidFeedback
 * Madisonium
 * Metalab
 * MTV
 * Neo
 * Noisebridge
 * OpenEmbedded
 * Open Neural Network Exchange
 * OpenStack
 * OpenSwitch
 * RLLMUK
 * Squeak
 * Students for Free Culture
 * Sugar Labs
 * Sverok
 * TopCoder
 * Ubuntu
 * Vidya Gaem Awards
 * Wikimedia (2008)
 * Wikipedia in French,  Hebrew,  Hungarian, Russian, and Persian.