User:MarkusSchulze/Statutory Rules

This article describes the Schulze method with Tideman's ranked pairs method as additional tie-breaker.

Both methods, the Schulze method and the ranked pairs method, satisfy Condorcet, monotonicity, reversal symmetry, and independence of clones. Therefore, using the one method to complete the other method when the other method fails to find a unique ranking of all candidates is a useful way to get a more decisive method without having to sacrifice any of its properties.

In this concrete proposal, we first calculate the Schulze relation >Schulze (stage 3). Then we use a random ballot (stage 4) to complete the Schulze relation >Schulze to a complete ranking >initial of all candidates (stage 5). >initial is then used to calculate a complete ranking >secondary of all pairwise defeats (stage 6). >secondary is then used to calculate a Tideman ranking >Tideman (stage 7). This Tideman ranking >Tideman is then used to complete the Schulze relation >Schulze to a complete ranking >final of all candidates (stage 8), that is more decisive than >initial.

So at first, we use the Schulze method to make the ranked pairs method more decisive. And then we use this more decisive version of the ranked pairs method to make the Schulze method more decisive.

= Stage 1 =

Each ballot contains a list of all candidates. Each voter ranks these candidates in order of preference. Each voter gives a '1' to his favorite candidate, a '2' to his second favorite candidate, a '3' to his third favorite candidate, etc..

Each voter may ...


 * ... give the same preference to more than one candidate. This indicates that this voter is indifferent between these candidates.


 * ... skip preferences. However, skipping preferences has no impact on the result of the elections, since only the order, in which the candidates are ranked, matters and not the absolute numbers of the preferences.


 * ... keep candidates unranked. When a voter doesn't rank all candidates, then this is interpreted as if this voter (1) strictly prefers all ranked to all unranked candidates and (2) is indifferent between all unranked candidates.

= Stage 2 =

For each pair of candidates V and W, we calculate the number of voters who strictly prefer candidate V to candidate W. This number will be denoted "d[V,W]".

= Definition 1 =

"(s1,s2) >win (t1,t2)" if and only if at least one of the following conditions is satisfied:


 * s1 > t1
 * s1 = t1 and s2 < t2.

= Stage 3 =

Definitions:


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


 * C(1) is identical to X.
 * C(n) is identical to Y.
 * d[C(i),C(i+1)] > d[C(i+1),C(i)] for all i = 1,...,(n-1).


 * The strength of the path C(1),...,C(n) is the minimum ( according to >win ) of all (d[C(i),C(i+1)],d[C(i+1),C(i)]) for i = 1,...,(n-1).


 * In other words: The strength of a path is the strength of its weakest link.


 * p[A,B] is the maximum ( according to >win ) of the strengths of all paths from candidate A to candidate B.


 * In other words: p[A,B] is the strength of the strongest path from candidate A to candidate B.


 * If there is no path from candidate A to candidate B at all, then p[A,B] : = (0,0).

For each pair of candidates D and E, we calculate p[D,E].

"D >Schulze E" if and only if p[D,E] >win p[E,D].

If the Schulze relation >Schulze already is a complete ranking, then this Schulze ranking >Schulze is the final ranking >final and we can directly go to stage 9. Otherwise, we have to proceed with stages 4-8.

Implementation
The strengths of the strongest paths can be calculated with the Floyd–Warshall algorithm. The following Pascal-like pseudocode illustrates the determination of such a path.


 * Input: d[i,j] is the number of voters who strictly prefer candidate i to candidate j.
 * Output: p[i,j] = (p1[i,j],p2[i,j]) is the strength of the strongest path from candidate i to candidate j.

= Stage 4 =

A Tie-Breaking Ranking of the Candidates (TBRC) >TBRC is calculated as follows:


 * In the beginning, A =TBRC B for all pairs of candidates A,B.
 * Pick a random ballot and use its rankings. That means: If A =TBRC B and if this randomly chosen ballot strictly prefers candidate A to candidate B, then replace "A =TBRC B" by "A >TBRC B".
 * Continue picking ballots randomly from those that have not yet been picked and use their rankings.
 * If you go through all ballots and there are still candidates A =TBRC B, then proceed as follows:


 * Pick a random candidate J and complete the TBRC in his favor. That means: For all candidates K ≠ J with J =TBRC K: Replace "J =TBRC K" by "J >TBRC K".
 * Continue picking candidates randomly from those that have not yet been picked and complete the TBRC in their favor.

= Stage 5 =

The TBRC >TBRC is now used to complete the Schulze relation >Schulze to a complete ranking >initial.


 * In the beginning, "marked[A] = false" for all candidates A. In the beginning, A =initial B for all pairs of candidates A,B.
 * Repeat until "marked[X] = true" for all candidates X:


 * U is the set of all candidates A with (1) marked[A] = false and (2) p[A,B] &ge;win p[B,A] for all other candidates B with marked[B] = false.
 * Choose candidate C with (1) C ∈ U and (2) C >TBRC D for all other candidates D ∈ U.
 * Replace "marked[C] = false" by "marked[C] = true".
 * For all candidates E with marked[E] = false, replace "C =initial E" by "C >initial E".

Implementation
Input:


 * "TBRC[i,j] = true" means i >TBRC j.
 * "TBRC[i,j] = false" means j >TBRC i.
 * p[i,j] = (p1[i,j],p2[i,j]) is the strength of the strongest path from candidate i to candidate j.

Output:


 * "initial[i,j] = true" means i >initial j.
 * "initial[i,j] = false" means j >initial i.
 * "initial[i,i] = false" for all i.

= Stage 6 =

The initial ranking >initial of the candidates is now used to calculate a secondary ranking >secondary of the pairwise defeats.

JK >secondary MN if and only if at least one of the following conditions is satisfied:


 * (d[J,K],d[K,J]) >win (d[M,N],d[N,M]).
 * (d[J,K],d[K,J]) =win (d[M,N],d[N,M]) and J >initial K and N >initial M.
 * (d[J,K],d[K,J]) =win (d[M,N],d[N,M]) and J >initial K and M >initial N and J >initial M.
 * (d[J,K],d[K,J]) =win (d[M,N],d[N,M]) and K >initial J and N >initial M and J >initial M.
 * (d[J,K],d[K,J]) =win (d[M,N],d[N,M]) and J ≡ M and N >initial K.
 * (d[J,K],d[K,J]) =win (d[M,N],d[N,M]) and K ≡ N and J >initial M.

= Stage 7 =

The secondary ranking >secondary of the pairwise defeats is now used to calculate a ranking >Tideman of the candidates:


 * In the beginning, A =Tideman B for all pairs of candidates A,B.
 * From the strongest to the weakest pairwise defeat ( according to >secondary ) proceed as follows: Lock the pairwise defeat JK in its original direction J >Tideman K if it does not create a directed cycle with already locked pairwise defeats; otherwise lock it in its opposite direction K >Tideman J.

Implementation
Input:


 * "initial[i,j] = true" means i >initial j.
 * "initial[i,j] = false" means j >initial i.
 * "initial[i,i] = false" for all i.
 * d[i,j] is the number of voters who strictly prefer candidate i to candidate j.

Output:


 * "Tideman[i,j] = true" means i >Tideman j.
 * "Tideman[i,j] = false" means j >Tideman i.

= Stage 8 =

The Tideman ranking >Tideman is now used to complete the Schulze relation >Schulze to a complete ranking >final.


 * In the beginning, "marked[A] = false" for all candidates A. In the beginning, A =final B for all pairs of candidates A,B.
 * Repeat until "marked[X] = true" for all candidates X:


 * U is the set of all candidates A with (1) marked[A] = false and (2) p[A,B] &ge;win p[B,A] for all other candidates B with marked[B] = false.
 * Choose candidate C with (1) C ∈ U and (2) C >Tideman D for all other candidates D ∈ U.
 * Replace "marked[C] = false" by "marked[C] = true".
 * For all candidates E with marked[E] = false, replace "C =final E" by "C >final E".

Implementation
Input:


 * "Tideman[i,j] = true" means i >Tideman j.
 * "Tideman[i,j] = false" means j >Tideman i.
 * p[i,j] = (p1[i,j],p2[i,j]) is the strength of the strongest path from candidate i to candidate j.

Output:


 * "final[i,j] = true" means i >final j.
 * "final[i,j] = false" means j >final i.

= Stage 9 =

When Z vacant seats have to be filled, then the winners are the top Z candidates of the final ranking >final.

= References =


 * A New Monotonic, Clone-Independent, Reversal Symmetric, and Condorcet-Consistent Single-Winner Election Method by Markus Schulze