Schulze method

The Schulze method is a voting system developed by Markus Schulze that selects a single winner using votes that express preferences. The Schulze method can also be used to create a sorted list of winners. The Schulze method is also known as "Schwartz sequential dropping" (SSD), "cloneproof Schwartz sequential dropping" (CSSD), "beatpath method", "beatpath winner", "path voting", and "path winner".

If there is a candidate who is preferred over the other candidates, when compared in turn with each of the others, the Schulze method guarantees that that candidate will win. Because of this property, the Schulze method is (by definition) a Condorcet method. Note that this is different from some other preference voting systems such as Borda and Instant-runoff voting, which do not make this guarantee.

Many different heuristics for the Schulze method have been proposed. The most important heuristics are the path heuristic and the Schwartz set heuristic.

The path heuristic
Each ballot contains a complete list of all candidates. Each voter ranks these candidates in order of preference. The individual voter may give the same preference to more than one candidate and he may keep candidates unranked. When a given voter does not rank all candidates, then it is presumed that this voter strictly prefers all ranked candidates to all not ranked candidates and that this voter is indifferent between all not ranked candidates.

Procedure
Suppose d[V,W] is the number of voters who strictly prefer candidate V to candidate W.

A path from candidate X to candidate Y of strength p is a sequence of candidates C(1),...,C(n) with the following five properties:


 * C(1) is identical to X.
 * C(n) is identical to Y.
 * For all i = 1,...,(n-1): d[C(i),C(i+1)] &gt; d[C(i+1),C(i)].
 * For all i = 1,...,(n-1): d[C(i),C(i+1)] &ge; p.

p[A,B], the strength of the strongest path from candidate A to candidate B, is the maximum value such that there is a path from candidate A to candidate B of that strength. If there is no path from candidate A to candidate B at all, then p[A,B] : = 0.

Candidate D is better than candidate E if and only if p[D,E] &gt; p[E,D].

Candidate D is a potential winner if and only if p[D,E] &ge; p[E,D] for every other candidate E.

Remark
It is possible to prove that p[X,Y] &gt; p[Y,X] and p[Y,Z] &gt; p[Z,Y] together imply p[X,Z] &gt; p[Z,X]. Therefore, it is guaranteed (1) that the above definition of "better" really defines a transitive relation and (2) that there is always at least one candidate D with p[D,E] &ge; p[E,D] for every other candidate E.

Implementation
Suppose C is the number of candidates. Then the strengths of the strongest paths can be calculated with the Floyd–Warshall algorithm.

Input: d[i,j] is the number of voters who strictly prefer candidate i to candidate j.

Output: Candidate i is a potential winner if and only if "winner[i] = true".

1 for i : = 1 to C 2 begin 3   for j : = 1 to C 4   begin 5      if ( i ≠ j ) then 6      begin 7         if ( d[i,j] > d[j,i] ) then 8         begin 9            p[i,j] : = d[i,j] 10         end 11         else 12         begin 13            p[i,j] : = 0 14         end 15      end 16   end 17 end 18 19 for i : = 1 to C 20 begin 21   for j : = 1 to C 22   begin 23      if ( i ≠ j ) then 24      begin 25         for k : = 1 to C 26         begin 27            if ( i ≠ k ) then 28            begin 29               if ( j ≠ k ) then 30               begin 31                  p[j,k] : = max { p[j,k]; min { p[j,i]; p[i,k] } } 32               end 33            end 34         end 35      end 36   end 37 end 38 39 for i : = 1 to C 40 begin 41   winner[i] : = true 42 end 43 44 for i : = 1 to C 45 begin 46   for j : = 1 to C 47   begin 48      if ( i ≠ j ) then 49      begin 50         if ( p[j,i] > p[i,j] ) then 51         begin 52            winner[i] : = false 53         end 54      end 55   end 56 end

Example 1
Example (45 voters; 5 candidates):


 * 5 ACBED
 * 5 ADECB
 * 8 BEDAC
 * 3 CABED
 * 7 CAEBD
 * 2 CBADE
 * 7 DCEBA
 * 8 EBADC

The critical defeats of the strongest paths are underlined.

Candidate E is a potential winner, because p[E,X] &ge; p[X,E] for every other candidate X.

As 25 = p[E,A] > p[A,E] = 24, candidate E is better than candidate A.

As 28 = p[E,B] > p[B,E] = 24, candidate E is better than candidate B.

As 28 = p[E,C] > p[C,E] = 24, candidate E is better than candidate C.

As 31 = p[E,D] > p[D,E] = 24, candidate E is better than candidate D.

As 28 = p[A,B] > p[B,A] = 25, candidate A is better than candidate B.

As 28 = p[A,C] > p[C,A] = 25, candidate A is better than candidate C.

As 30 = p[A,D] > p[D,A] = 25, candidate A is better than candidate D.

As 29 = p[C,B] > p[B,C] = 28, candidate C is better than candidate B.

As 29 = p[C,D] > p[D,C] = 28, candidate C is better than candidate D.

As 33 = p[B,D] > p[D,B] = 28, candidate B is better than candidate D.

Therefore, the Schulze ranking is E > A > C > B > D.

Example 2
Example (30 voters; 4 candidates):


 * 5 ACBD
 * 2 ACDB
 * 3 ADCB
 * 4 BACD
 * 3 CBDA
 * 3 CDBA
 * 1 DACB
 * 5 DBAC
 * 4 DCBA

The critical defeats of the strongest paths are underlined.

Candidate D is a potential winner, because p[D,X] &ge; p[X,D] for every other candidate X.

As 18 = p[D,A] > p[A,D] = 17, candidate D is better than candidate A.

As 18 = p[D,B] > p[B,D] = 17, candidate D is better than candidate B.

As 18 = p[D,C] > p[C,D] = 17, candidate D is better than candidate C.

As 20 = p[A,B] > p[B,A] = 19, candidate A is better than candidate B.

As 20 = p[A,C] > p[C,A] = 19, candidate A is better than candidate C.

As 21 = p[C,B] > p[B,C] = 19, candidate C is better than candidate B.

Therefore, the Schulze ranking is D > A > C > B.

Example 3
Example (30 voters; 5 candidates):


 * 3 ABDEC
 * 5 ADEBC
 * 1 ADECB
 * 2 BADEC
 * 2 BDECA
 * 4 CABDE
 * 6 CBADE
 * 2 DBECA
 * 5 DECAB

The critical defeats of the strongest paths are underlined.

Candidate B is a potential winner, because p[B,X] &ge; p[X,B] for every other candidate X.

As 19 = p[B,A] > p[A,B] = 18, candidate B is better than candidate A.

As 19 = p[B,C] > p[C,B] = 18, candidate B is better than candidate C.

As 19 = p[B,D] > p[D,B] = 18, candidate B is better than candidate D.

As 19 = p[B,E] > p[E,B] = 18, candidate B is better than candidate E.

As 20 = p[A,C] > p[C,A] = 19, candidate A is better than candidate C.

As 21 = p[A,D] > p[D,A] = 19, candidate A is better than candidate D.

As 21 = p[A,E] > p[E,A] = 19, candidate A is better than candidate E.

As 20 = p[D,C] > p[C,D] = 19, candidate D is better than candidate C.

As 30 = p[D,E] > p[E,D] = 19, candidate D is better than candidate E.

As 20 = p[E,C] > p[C,E] = 19, candidate E is better than candidate C.

Therefore, the Schulze ranking is B > A > D > E > C.

Example 4
Example (9 voters; 4 candidates):


 * 3 ABCD
 * 2 DABC
 * 2 DBCA
 * 2 CBDA

The critical defeats of the strongest paths are underlined.

Candidate B and candidate D are potential winners, because p[B,X] &ge; p[X,B] for every other candidate X and p[D,Y] &ge; p[Y,D] for every other candidate Y.

As 7 = p[B,C] > p[C,B] = 5, candidate B is better than candidate C.

As 6 = p[D,A] > p[A,D] = 5, candidate D is better than candidate A.

Possible Schulze rankings are B > C > D > A, B > D > A > C, B > D > C > A, D > A > B > C, D > B > A > C, and D > B > C > A.

The Schwartz Set
The definition of a Schwartz set, as used in the Schulze method, is as follows:


 * 1) An unbeaten set is a set of candidates of whom none is beaten by anyone outside that set.
 * 2) An innermost unbeaten set is an unbeaten set that doesn't contain a smaller unbeaten set.
 * 3) The Schwartz set is the set of candidates who are in innermost unbeaten sets.

Procedure
The voters cast their ballots by ranking the candidates according to their preferences, just like for any other Condorcet election.

The Schulze method uses Condorcet pairwise matchups between the candidates and a winner is chosen in each of the matchups.

From there, the Schulze method operates as follows to select a winner (or create a ranked list):


 * 1) Calculate the Schwartz set based only on undropped defeats.
 * 2) If there are no defeats among the members of that set then they (plural in the case of a tie) win and the count ends.
 * 3) Otherwise, drop the weakest defeat among the candidates of that set. Go to 1.

To create a ranked list, simply remove the winner(s) of this procedure, and repeat it to find the 2nd place candidates, then 3rd place candidates, etc.

The Situation
Imagine an election for the capital of Tennessee, a state in the United States that is over 500 miles east-to-west, and only 110 miles north-to-south. Let's say the candidates for the capital are Memphis (on the far west end), Nashville (in the center), Chattanooga (129 miles southeast of Nashville), and Knoxville (on the far east side, 114 northeast of Chattanooga). Here's the population breakdown by metro area (surrounding county):


 * Memphis (Shelby County): 826,330
 * Nashville (Davidson County): 510,784
 * Chattanooga (Hamilton County): 285,536
 * Knoxville (Knox County): 335,749

Let's say that in the vote, the voters vote based on geographic proximity. Assuming that the population distribution of the rest of Tennessee follows from those population centers, one could easily envision an election where the percentages of votes would be as follows:

The results would be tabulated as follows:


 * [A] indicates voters who preferred the candidate listed in the column caption to the candidate listed in the row caption
 * [B] indicates voters who preferred the candidate listed in the row caption to the candidate listed in the column caption
 * [NP] indicates voters who expressed no preference between either candidate

Pairwise Winners
First, list every pair, and determine the winner:

Note that absolute counts of votes can be used, or percentages of the total number of votes; it makes no difference.

Dropping
Next we start with our list of cities and their matchup wins/defeats


 * Nashville 3-0
 * Chattanooga 2-1
 * Knoxville 1-2
 * Memphis 0-3

Technically, the Schwartz set is simply Nashville as it beat all others 3 to 0.

Therefore, Nashville is the winner.

Ambiguity Resolution Example
Let's say there was an ambiguity. For a simple situation involving candidates A, B, and C.


 * A > B 72%
 * B > C 68%
 * C > A 52%

In this situation the Schwartz set is A, B, and C as they all beat someone.

The Schulze method then says to drop the weakest defeat, so we drop C > A and are left with


 * A > B 72% (as C has been removed from the Schwartz set and thus eliminated, since they no longer beat or tie anyone in the set)

Therefore, A is the winner.

(It may be more accessible to phrase that as "drop the weakest win", though purists may complain.)

Summary
In the (first) example election, the winner is Nashville. This would be true for any Condorcet method. Using the first-past-the-post system and some other systems, Memphis would have won the election by having the most people, even though Nashville won every simulated pairwise election outright. Using Instant-runoff voting in this example would result in Knoxville winning, even though more people preferred Nashville over Knoxville.

Satisfied criteria
The Schulze method satisfies the following criteria:


 * 1) Mutual majority criterion
 * 2) Monotonicity criterion
 * 3) Pareto criterion
 * 4) Condorcet criterion
 * 5) Smith criterion (a.k.a. Generalized Condorcet criterion)
 * 6) local independence from irrelevant alternatives
 * 7) Schwartz criterion
 * 8) Plurality criterion
 * 9) the winner is always chosen from the Immune set
 * 10) the winner is always chosen from the CDTT set
 * 11) Minimal Defense criterion
 * 12) Strategy-Free criterion
 * 13) Generalized Strategy-Free criterion
 * 14) Strong Defensive Strategy criterion
 * 15) Weak Defensive Strategy criterion
 * 16) Summability criterion
 * 17) Independence of clones
 * 18) Neutrality of Spoiled Ballots
 * 19) Independence of Smith-dominated Alternatives

The Schulze method violates the following criteria:


 * 1) Participation criterion
 * 2) Consistency criterion
 * 3) invulnerability to compromising
 * 4) invulnerability to burying
 * 5) Favorite Betrayal criterion
 * 6) Later-no-harm criterion

History of the Schulze method
The Schulze method was developed by Markus Schulze in 1997. The first time that the Schulze method was discussed in a public mailing list was in 1998. In the following years, the Schulze method has been adopted e.g. by "Software in the Public Interest" (2003), Debian (2003), Gentoo (2005), TopCoder (2005), and "Sender Policy Framework" (2005). The first books on the Schulze method were written by Tideman (2006) and by Stahl and Johnson (2007).

Computational complexity
Using the Floyd-Warshall algorithm, determining the winner (or the order of finish of all candidates) takes $$O(c^3)$$ time, where $$c$$ is the number of candidates.

Unlike Ranked pairs, determining the Schulze winner is in the NL complexity class. This indicates that it is easier to parallelize than Ranked pairs (unless NL=P).

Because Schulze, like Ranked Pairs, is equivalent to Minimax when there are 3 or fewer candidates with no pairwise ties, and passes Independence of Smith-dominated Alternatives, it is possible to eliminate all candidates not in the Smith set before running Schulze and get the same result, potentially making computation easier, and when the Smith set has 3 or fewer members with no pairwise ties between them, Minimax can then be used instead after eliminating non-Smith candidates to find the Schulze winner.

Smith set-based variant
A possible variation of Schulze (caution: not proposed, endorsed, or seriously analyzed by Markus Schulze) which is only Smith-efficient and not Schwartz-efficient (see the image to the right for an example) can be described as "Iteratively repeat the following two steps until there are no more pairwise defeats, at which point all of the remaining candidates are tied to win: 1) Eliminate all candidates not in the Smith set, and then 2) turn the weakest pairwise defeat into a pairwise victory for both candidates in the matchup." This can be argued to be simpler than regular Schulze, since the Smith set is easier to understand than the Schwartz set. It will return the same result as regular Schulze when there are no pairwise ties between any members of the Smith set. This variation could be called the cloneproof Smith sequential dropping method (though when dropping defeats, they are "flipped" to victories for both candidates in the matchup, rather than turned into a pairwise tie). It may be possible when using this variation to pretend a particular pairwise matchup simply didn't happen, rather than to say that both candidates in the matchup got a pairwise victory, when dropping defeats.

Example (taken from https://en.wikipedia.org/wiki/User:MarkusSchulze/Wikimedia_Board_of_Trustees_elections,_2008):

In the Wikimedia Board of Trustees 2008 election, a Condorcet ranking of candidates existed from 1st to 5th place, and from 10th place to 15th place, but there was a Condorcet cycle from 6th place to 9th. The cycle can be seen as:

To start off with, when looking at only these candidates, all of them are in the Smith set (because there is a beatpath cycle of SS>RS>JH>RP>SS).

If using winning votes to calculate defeat strength, then the defeats from weakest to strongest were: RS>JH:745, RP>SS:755, SS>RS:778, RP>RS:797, JH>SS:798, JH>RP:841.

The Smith set-based variant of Schulze (Smith-Schulze) would take the weakest defeat, RS>JH, and instead treat it as a victory for both RS and JH in that matchup. So now the new table is:

The new Smith set is simply JH, since they pairwise beat all other candidates, so they are ranked uniquely highest among all of these candidates, and are thus put in 6th place in the overall Schulze ranking. To find the ranking of the remaining candidates, we remove JH, at which point the table becomes:

Here, there is a clear Condorcet ranking of these candidates of RP>SS>RS. Therefore, the Schulze ranking fills in the ranking from 6th place to 9th place as JH>RP>SS>RS.

Use of the Schulze method
The Schulze method is not currently used in government elections. However, it is starting to receive support in some public organizations. Organizations which currently use the Schulze method are:


 * Annodex Association
 * Blitzed
 * BoardGameGeek
 * Cassandra
 * Cinelerra
 * Codex Alpe Adria
 * College of Marine Science
 * Computer Science Departmental Society for York University (HackSoc)
 * County Highpointers
 * Debian
 * Digital Freedom in Education and Youth
 * EnMasse Forums
 * EuroBillTracker
 * European Democratic Education Conference
 * Fair Trade Northwest (see article XI section 2 of their bylaws)
 * Free Hardware Foundation of Italy
 * Free Software Foundation Europe (FSFE) (see article 6 section 3 of the constitution)
 * Free Software Foundation Latin America (FSFLA)
 * Gentoo Foundation
 * GNU Privacy Guard (GnuPG)
 * Gothenburg Hacker Space (GHS) (see §14 of the bylaws)
 * Graduate Student Organization at the State University of New York: Computer Science (GSOCS)
 * Haskell
 * Kanawha Valley Scrabble Club
 * KDE e.V. (see section 3.4.1 of the Rules of Procedures for Online Voting)
 * Kingman Hall
 * Knight Foundation
 * Kumoricon
 * League of Professional System Administrators (LOPSA) (see article 8.3 of the bylaws)
 * Libre-Entreprise
 * Mason Apollonic Society (see article 5 of the constitution)
 * Mathematical Knowledge Management Interest Group (MKM-IG) (The MKM-IG uses Condorcet with dual dropping. That means: The Schulze ranking and the ranked pairs ranking are calculated and the winner is the top-ranked candidate of that of these two rankings that has the better Kemeny score.)
 * Metalab
 * Music Television (MTV)
 * netznetz
 * Noisebridge
 * North Shore Cyclists (NSC)
 * OpenCouchSurfing
 * Park Alumni Society (PAS)
 * Pirate Party of Sweden
 * Pittsburgh Ultimate
 * RPMrepo
 * Sender Policy Framework (SPF)
 * Software in the Public Interest (SPI)
 * Students for Free Culture
 * Sugar Labs
 * TopCoder
 * Ubuntu
 * Wikimedia Foundation
 * Wikipedia in French (The Schulze method is one of three methods recommended for decision-making.)
 * Wikipedia in Hebrew
 * Wikipedia in Hungarian
 * Wikipedia in Russian
 * Wikipedia in Spanish

Wikimedia Foundation, 2008
In June 2008, the Wikimedia Foundation used the Schulze method for the election to its Board of Trustees: One vacant seat had to be filled. There were 15 candidates, about 26,000 eligible voters, and 3,019 valid ballots.

As Chen was a clear Condorcet winner, he won the vacant seat. However, there was a tie for sixth to ninth position between Heiskanen, Postlethwaite, Smith, and Saintonge. Heiskanen beat Postlethwaite; Postlethwaite beat Smith; Smith beat Saintonge; Saintonge beat Heiskanen.

Each figure represents the number of voters who ranked the candidate at the left better than the candidate at the top. A figure in green represents a victory in that pairwise comparison by the candidate at the left. A figure in red represents a defeat in that pairwise comparison by the candidate at the left.

General

 * Proposed Statutory Rules for the Schulze Single-Winner Election Method by Markus Schulze
 * A New Monotonic and Clone-Independent Single-Winner Election Method by Markus Schulze (mirrors: )
 * A New Monotonic, Clone-Independent, Reversal Symmetric, and Condorcet-Consistent Single-Winner Election Method by Markus Schulze
 * Free Riding and Vote Management under Proportional Representation by the Single Transferable Vote by Markus Schulze
 * Implementing the Schulze STV Method by Markus Schulze
 * A New MMP Method by Markus Schulze
 * A New MMP Method (Part 2) by Markus Schulze

Tutorials

 * Spieltheorie by Bernhard Nebel
 * Schulze-Methode by the University of Stuttgart

Discussions

 *  formerly "Advocacy" 

This section contains various public discussions about the Schulze method.

2020

 * "What are the key disadvantages of the Schulze method?" (2020-06-04) - a discussion started on EndFPTP regarding the possible disadvantages of Schulze's method.

2019 and earlier

 * Voting Methods Survey by James Green-Armytage
 * Descriptions of ranked-ballot voting methods by Rob LeGrand
 * Accurate Democracy by Rob Loring
 * Schulze beatpaths method by Warren D. Smith
 * Election Methods and Criteria by Kevin Venzke
 * The Debian Voting System by Jochen Voss
 * election-methods: a mailing list containing technical discussions about election methods

Research papers

 * A Continuous Rating Method for Preferential Voting by Rosa Camps, Xavier Mora, and Laia Saumell
 * Voting Systems by Paul E. Johnson
 * Test Run: Group Determination in Software Testing by James D. McCaffrey
 * Distance from Consensus: a Theme and Variations by Tommi Meskanen and Hannu Nurmi
 * Descriptions of voting systems by Warren D. Smith
 * Election Systems by Peter A. Taylor
 * Personalisierung der Verhältniswahl durch Varianten der Single Transferable Vote by Martin Wilke
 * Objective Measures of Preferential Ballot Voting Systems by Barry Wright
 * Approaches to Constructing a Stratified Merged Knowledge Base by Anbu Yue, Weiru Liu, and Anthony Hunter

Books

 * Christoph Börgers (2009), Mathematics of Social Choice: Voting, Compensation, and Division, SIAM, ISBN 0-8987-1695-0
 * Saul Stahl and Paul E. Johnson (2006), Understanding Modern Mathematics, Sudbury: Jones and Bartlett Publishers, ISBN 0-7637-3401-2
 * Nicolaus Tideman (2006), Collective Decisions and Voting: The Potential for Public Choice, Burlington: Ashgate, ISBN 0-7546-4717-X

Newspaper articles

 * Entscheidungsfindung via Software by Peter Mühlbauer (January 2010)

Software
Modern Ballots
 * Voting Software Project by Blake Cretney
 * Condorcet with Dual Dropping Perl Scripts by Mathew Goldstein
 * Condorcet Voting Calculator by Eric Gorr
 * Selectricity and RubyVote by Benjamin Mako Hill
 * Java implementation of the Schulze method by Thomas Hirsch
 * schulze implementation implementation in c++ with python bindings by Alexander Kjäll
 * Electowidget by Rob Lanphier
 * Votator.com by Louis Philippe Lessard
 * Haskell Condorcet Module by Evan Martin
 * Condorcet Internet Voting Service (CIVS) by Andrew Myers
 * BetterPolls.com by Brian Olson
 * OpenSTV by Jeffrey O'Neill
 * Election Web Service implements both the Schulze method and Schulze STV, with an associated interface at

Legislative project

 * Condorcet Policy "Think Tank" moderated by Jeffry R. Fisher
 * Arizonans for Condorcet Ranked Voting