Schulze method

Revision as of 12:36, 27 May 2025 by imported>MarkusSchulze (fixed link)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Template:Short description Template:Electoral systems sidebar The Schulze method (Template:IPAc-en), also known as the beatpath method, is a single winner ranked-choice voting rule developed by Markus Schulze. The Schulze method is a Condorcet completion method, which means it will elect a majority-preferred 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 breaks 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 methodEdit

File:Preferential ballot.svg
A sample ballot asking voters to order candidates by preference

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

Beatpath explanationEdit

The idea behind Schulze's method is that if Alice defeats Bob, and Bob beats Charlie, then Alice "indirectly" defeats Charlie. These chained sequences of "beats" are called 'beatpaths'.

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, 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 strongest 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.<ref name="schulze201122">Markus Schulze, "A new monotonic, clone-independent, reversal symmetric, and Condorcet-consistent single-winner election method", Social Choice and Welfare, volume 36, number 2, page 267–303, 2011. Preliminary version in Voting Matters, 17:9-19, 2003.</ref>Template:Rp As a result, the Schulze method is a Condorcet method, providing a full extension of the majority rule to any set of ballots.

Iterative descriptionEdit

The Schulze winner can also be constructed iteratively, using a defeat-dropping method:

  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:
    • Check if any candidates are tied (and if so, break the ties by random ballot).
    • Eliminate all candidates outside the majority-preferred set.
    • Delete the edge closest to being tied.

The winner is the only candidate left at the end of the procedure.

ExampleEdit

In the following example 45 voters rank 5 candidates.

Number of voters Order of preference
5 ACBED
5 ADECB
8 BEDAC
3 CABED
7 CAEBD
2 CBADE
7 DCEBA
8 EBADC

The pairwise preferences have to be computed first. For example, when comparing Template:Mvar and Template:Mvar pairwise, there are Template:Math voters who prefer Template:Mvar to Template:Mvar, and Template:Math voters who prefer Template:Mvar to Template:Mvar. So <math>d[A, B] = 20</math> and <math>d[B, A] = 25</math>. The full set of pairwise preferences is:

File:Schulze method example1.svg
Directed graph labeled with pairwise preferences d[*, *]
Matrix of pairwise preferences
<math>d[*,A]</math> <math>d[*,B]</math> <math>d[*,C]</math> <math>d[*,D]</math> <math>d[*,E]</math>
<math>d[A,*]</math> 20 26 30 22
<math>d[B,*]</math> 25 16 33 18
<math>d[C,*]</math> 19 29 17 24
<math>d[D,*]</math> 15 12 28 14
<math>d[E,*]</math> 23 27 21 31

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.

Strongest paths
Template:Diagonal split header A B C D E
A Template:N/a A-(30)-D-(28)-C-(29)-B A-(30)-D-(28)-C A-(30)-D A-(30)-D-(28)-C-(24)-E A
B B-(25)-A Template:N/a B-(33)-D-(28)-C B-(33)-D B-(33)-D-(28)-C-(24)-E B
C C-(29)-B-(25)-A C-(29)-B Template:N/a C-(29)-B-(33)-D C-(24)-E C
D D-(28)-C-(29)-B-(25)-A D-(28)-C-(29)-B D-(28)-C Template:N/a D-(28)-C-(24)-E D
E E-(31)-D-(28)-C-(29)-B-(25)-A E-(31)-D-(28)-C-(29)-B E-(31)-D-(28)-C E-(31)-D Template:N/a E
A B C D E Template:Diagonal split header
Strengths of the strongest paths
<math>p[*,A]</math> <math>p[*,B]</math> <math>p[*,C]</math> <math>p[*,D]</math> <math>p[*,E]</math>
<math>p[A,*]</math> 28 28 30 24
<math>p[B,*]</math> 25 28 33 24
<math>p[C,*]</math> 25 29 29 24
<math>p[D,*]</math> 25 28 28 24
<math>p[E,*]</math> 25 28 28 31

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

ImplementationEdit

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.<syntaxhighlight line="" lang="text">

  1. Input: d[i,j], the number of voters who prefer candidate i to candidate j.
  2. Output: p[i,j], the strength of the strongest path from candidate i to candidate j.

for i from 1 to C

   for j from 1 to C
       if i ≠ j then
           if d[i,j] > d[j,i] then
               p[i,j] := d[i,j]
           else
               p[i,j] := 0

for i from 1 to C

   for j from 1 to C
       if i ≠ j then
           for k from 1 to C
               if i ≠ k and j ≠ k then
                   p[j,k] := max (p[j,k], min (p[j,i], p[i,k]))

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

Ties and alternative implementationsEdit

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.<ref name="schulze20113">Markus Schulze, "A new monotonic, clone-independent, reversal symmetric, and condorcet-consistent single-winner election method", Social Choice and Welfare, volume 36, number 2, page 267–303, 2011. Preliminary version in Voting Matters, 17:9-19, 2003.</ref>

Although ties in the Schulze ranking are unlikely, they are possible. Schulze's original paper recommended breaking ties by random ballot.<ref name="schulze20113" />

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.

Initial results table
E A C B D
E 1 −3 9 17
A −1 7 −5 15
C 3 −7 13 −11
B −9 5 −13 21
D −17 −15 11 −21

The first drop (A's loss to E by 1 vote) does not help shrink the Schwartz set.

First drop
E A C B D
E 1 −3 9 17
A −1 7 −5 15
C 3 −7 13 −11
B −9 5 −13 21
D −17 −15 11 −21

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.

Second drop, final
E A C B D
E 1 −3 9 17
A −1 7 −5 15
C 3 −7 13 −11
B −9 5 −13 21
D −17 −15 11 −21

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 and failed criteriaEdit

Satisfied criteriaEdit

The Schulze method satisfies the following criteria: Template:Div colTemplate:Rp

Template:Div col end

Failed criteriaEdit

Since the Schulze method satisfies the Condorcet criterion, it automatically fails the following criteria:

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, meaning it can be vulnerable to the spoiler effect in some rare circumstances. The Schulze method also fails Peyton Young's criterion of Local Independence of Irrelevant Alternatives.

Comparison tableEdit

The following table compares the Schulze method with other single-winner election methods: Template:Comparison of Schulze to preferential voting systems

Difference from ranked pairsEdit

Ranked pairs is another Condorcet method which is very similar to Schulze's rule, and typically produces the same outcome. There are slight differences, however. The main difference between the beatpath method and ranked pairs is that Schulze retains behavior closer to minimax. Say that the minimax 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 the winner is always a candidate of the set with minimum minimax score.<ref name="schulze20113" />Template:Rp This is the sense in which 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.<ref>Tideman, T. Nicolaus, "Independence of clones as a criterion for voting rules", Social Choice and Welfare vol 4 #3 (1987), pp. 185–206.</ref> 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.

HistoryEdit

The Schulze method was developed by Markus Schulze in 1997. It was first discussed in public mailing lists in 1997–1998<ref>See:

UsageEdit

GovernmentEdit

The Schulze method is used by the city of Silla, Spain for all referendums.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> It is also used by the cities of Turin and San Donà di Piave in Italy and by the London Borough of Southwark through their use of the WeGovNow platform, which in turn uses the LiquidFeedback decision tool.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

Political partiesEdit

Schulze was adopted by the Pirate Party of Sweden (2009),<ref name="PiratePartySweden2">See:

  • {{#invoke:citation/CS1|citation

|CitationClass=web }}

  • {{#invoke:citation/CS1|citation

|CitationClass=web }}

  • {{#invoke:citation/CS1|citation

|CitationClass=web }}</ref> and the Pirate Party of Germany (2010).<ref name="PiratePartyGermany2">11 of the 16 regional sections and the federal section of the Pirate Party of Germany are using LiquidFeedback for unbinding internal opinion polls. In 2010/2011, the Pirate Parties of Neukölln (link), Mitte (link), Steglitz-Zehlendorf (link), Lichtenberg (link), and Tempelhof-Schöneberg (link) adopted the Schulze method for its primaries. Furthermore, the Pirate Party of Berlin (in 2011) (link) and the Pirate Party of Regensburg (in 2012) (link) adopted this method for their primaries.</ref> The Boise, Idaho chapter of the Democratic Socialists of America in February chose this method for their first special election held in March 2018.<ref name="Boise DSA2">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

|CitationClass=web }}</ref> Monte Compatri,<ref>article 25(5) of the bylaws, October 2013</ref> Montemurlo,<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Pescara,<ref>article 12 of the bylaws, January 2015</ref> and San Cesareo<ref>Ridefinizione della lista di San Cesareo con Metodo Schulze, February 2014</ref>

|CitationClass=web }}</ref> Austria,<ref>§6(10) of the bylaws</ref> Belgium,<ref>Article III.3.4 of the Statutory Rules (french, dutch)</ref> Brazil, Germany,<ref name="PiratePartyGermany2" /> Iceland,<ref>article 14.5 of the bylaws</ref> Italy,<ref>Rules adopted on 18 December 2011</ref> the Netherlands,<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Sweden,<ref name="PiratePartySweden2" /> Switzerland,<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> and the United States<ref>article IV section 3 of the bylaws, July 2012</ref>

  • SustainableUnion<ref>§10 III of its bylaws, June 2013</ref>
  • Volt Europe<ref>{{#invoke:citation/CS1|citation

|CitationClass=web }}</ref>

Student government and associationsEdit

|CitationClass=web }}</ref>

|CitationClass=web }}</ref>

|CitationClass=web }}</ref>

OrganizationsEdit

It is used by the Institute of Electrical and Electronics Engineers, by the Association for Computing Machinery, and by USENIXTemplate:Cn through their use of the HotCRP decision tool.Template:Technical inline

Organizations which currently use the Schulze method include: Template:Div col

|CitationClass=web }}</ref>

|CitationClass=web }}</ref>

|CitationClass=web }}</ref>

|CitationClass=web }}</ref>

|CitationClass=web }}</ref>

  • Metalab<ref>{{#invoke:citation/CS1|citation

|CitationClass=web }}</ref>

|CitationClass=web }}</ref>

|CitationClass=web }}</ref>

|CitationClass=web }}</ref>

  • OpenSwitch<ref>{{#invoke:citation/CS1|citation

|CitationClass=web }}</ref>

  • RLLMUK<ref>{{#invoke:citation/CS1|citation

|CitationClass=web }}</ref>

|CitationClass=web }}</ref>

{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

  • Ubuntu<ref>{{#invoke:citation/CS1|citation

|CitationClass=web }}</ref>

|CitationClass=web }}</ref>

|CitationClass=web }}</ref>Template:Circular reference<ref>See e.g. here [1] (May 2009), here [2] (August 2009), and here [3] (December 2009).</ref> Hungarian,<ref>See here and here.</ref> Russian,<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> and Persian.<ref>See here</ref> Template:Div col end

GeneralizationsEdit

In 2008, Camps et. al devised a method that, while ranking candidates in the same order of finish as Schulze, also provides ratings indicating the candidates' relative strength of victory.<ref name="t630">Template:Cite arXiv</ref>

NotesEdit

<references ></references>

External linksEdit

Template:Sister project

Template:Voting systems