Jump to content
Wikipedia The Free Encyclopedia

User:MarkusSchulze/Statutory Rules

From Wikipedia, the free encyclopedia

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

[edit ]

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

[edit ]

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

[edit ]

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

  1. s1 > t1
  2. s1 = t1 and s2 < t2.

Stage 3

[edit ]

Definitions:

A path from candidate X to candidate Y is a sequence of candidates C(1),...,C(n) with the following properties:
  1. C(1) is identical to X.
  2. C(n) is identical to Y.
  3. 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

[edit ]

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.
fori:=1toNumberOfCandidates
begin
forj:=1toNumberOfCandidates
begin
if(ij)then
begin
if(d[i,j]>d[j,i])then
begin
p1[i,j]:=d[i,j]
p2[i,j]:=d[j,i]
end
else
begin
p1[i,j]:=0
p2[i,j]:=0
end
end
end
end

fori:=1toNumberOfCandidates
begin
forj:=1toNumberOfCandidates
begin
if(ij)then
begin
fork:=1toNumberOfCandidates
begin
if(ik)then
begin
if(jk)then
begin
u1:=p1[j,i]
u2:=p2[j,i]
if((p1[i,k]<u1)or((p1[i,k]=u1)and(p2[i,k]>u2)))then
begin
u1:=p1[i,k]
u2:=p2[i,k]
end
if((p1[j,k]<u1)or((p1[j,k]=u1)and(p2[j,k]>u2)))then
begin
p1[j,k]:=u1
p2[j,k]:=u2
end
end
end
end
end
end
end

Stage 4

[edit ]

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

  1. In the beginning, A =TBRC B for all pairs of candidates A,B.
  2. 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".
  3. Continue picking ballots randomly from those that have not yet been picked and use their rankings.
  4. If you go through all ballots and there are still candidates A =TBRC B, then proceed as follows:
  1. 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".
  2. Continue picking candidates randomly from those that have not yet been picked and complete the TBRC in their favor.

Stage 5

[edit ]

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

  1. In the beginning, "marked[A] = false" for all candidates A. In the beginning, A =initial B for all pairs of candidates A,B.
  2. Repeat until "marked[X] = true" for all candidates X:
  1. U is the set of all candidates A with (1) marked[A] = false and (2) p[A,B] ≥win p[B,A] for all other candidates B with marked[B] = false.
  2. Choose candidate C with (1) C ∈ U and (2) C >TBRC D for all other candidates D ∈ U.
  3. Replace "marked[C] = false" by "marked[C] = true".
  4. For all candidates E with marked[E] = false, replace "C =initial E" by "C >initial E".

Implementation

[edit ]

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.
fori:=1toNumberOfCandidates
begin
initial[i,i]:=false
marked[i]:=false
end

fori:=1toNumberOfCandidates
begin

forj:=1toNumberOfCandidates
begin
if(marked[j]=true)then
begin
U[j]:=false
end
if(marked[j]=false)then
begin
U[j]:=true
fork:=1toNumberOfCandidates
begin
if(marked[k]=false)then
begin
if(jk)then
begin
if((p1[j,k]<p1[k,j])or((p1[j,k]=p1[k,j])and(p2[j,k]>p2[k,j])))then
begin
U[j]:=false
end
end
end
end
end
end

forj:=1toNumberOfCandidates
begin
if(U[j]=true)then
begin
m:=true
fork:=1toNumberOfCandidates
begin
if(jk)then
begin
if(U[k]=true)then
begin
if(TBRC[k,j]=true)then
begin
m:=false
end
end
end
end
if(m=true)then
begin
c:=j
end
end
end

marked[c]:=true

forj:=1toNumberOfCandidates
begin
if(marked[j]=false)then
begin
initial[c,j]:=true
initial[j,c]:=false
end
end

end

Stage 6

[edit ]

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:

  1. (d[J,K],d[K,J]) >win (d[M,N],d[N,M]).
  2. (d[J,K],d[K,J]) =win (d[M,N],d[N,M]) and J >initial K and N >initial M.
  3. (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.
  4. (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.
  5. (d[J,K],d[K,J]) =win (d[M,N],d[N,M]) and J ≡ M and N >initial K.
  6. (d[J,K],d[K,J]) =win (d[M,N],d[N,M]) and K ≡ N and J >initial M.

Stage 7

[edit ]

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

  1. In the beginning, A =Tideman B for all pairs of candidates A,B.
  2. 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

[edit ]

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.
fori:=1toNumberOfCandidates
begin
forj:=1toNumberOfCandidates
begin
if(ij)then
begin
Tideman[i,j]:=false
marked[i,j]:=false
end
end
end

fori:=1toNumberOfCandidates*(NumberOfCandidates-1)/2

begin
"Step1:Wedeterminethestrongestlink(c1,c2)thathasn't yet been used."
 for j : = 1 to NumberOfCandidates
 begin
 for k : = 1 to NumberOfCandidates
 begin
 if ( j ≠ k ) then
 begin
 if ( ( marked[j,k] = false ) and ( d[j,k] ≥ d[k,j] ) ) then
 begin

 m : = true

 for s : = 1 to NumberOfCandidates
 begin
 for t : = 1 to NumberOfCandidates
 begin
 if ( s ≠ t ) then
 begin
 if ( ( marked[s,t] = false ) and ( d[s,t] ≥ d[t,s] ) and ( ( j ≠ s ) or ( k ≠ t ) ) ) then
 begin

 if ( ( d[s,t] > d[t,s] ) and ( d[j,k] = d[k,j] ) ) then
 begin
 m : = false
 end

 if ( ( d[s,t] > d[t,s] ) and ( d[j,k] > d[k,j] ) ) then
 begin

 if ( d[s,t] > d[j,k] ) then
 begin
 m : = false
 end

 if ( ( d[s,t] = d[j,k] ) and ( d[t,s] < d[k,j] ) ) then
 begin
 m : = false
 end

 if ( ( d[s,t] = d[j,k] ) and ( d[t,s] = d[k,j] ) ) then
 begin

 if ( ( initial[s,t] = true ) and ( initial[k,j] = true ) ) then
 begin
 m : = false
 end

 if ( ( initial[s,t] = true ) and ( initial[j,k] = true ) and ( initial[s,j] = true ) ) then
 begin
 m : = false
 end

 if ( ( initial[t,s] = true ) and ( initial[k,j] = true ) and ( initial[s,j] = true ) ) then
 begin
 m : = false
 end

 if ( ( s = j ) and ( initial[k,t] = true ) ) then
 begin
 m : = false
 end

 if ( ( t = k ) and ( initial[s,j] = true ) ) then
 begin
 m : = false
 end

 end

 end

 if ( ( d[s,t] = d[t,s] ) and ( d[j,k] = d[k,j] ) ) then
 begin

 if ( ( initial[s,t] = true ) and ( initial[k,j] = true ) ) then
 begin
 m : = false
 end

 if ( ( initial[s,t] = true ) and ( initial[j,k] = true ) and ( initial[s,j] = true ) ) then
 begin
 m : = false
 end

 if ( ( initial[t,s] = true ) and ( initial[k,j] = true ) and ( initial[s,j] = true ) ) then
 begin
 m : = false
 end

 if ( ( s = j ) and ( initial[k,t] = true ) ) then
 begin
 m : = false
 end

 if ( ( t = k ) and ( initial[s,j] = true ) ) then
 begin
 m : = false
 end

 end
 end
 end
 end
 end

 if ( m = true ) then
 begin
 marked[j,k] : = true
 c1 : = j
 c2 : = k
 end

 end
 end
 end
 end

 "Step 2: We determine whether the link (c1,c2) has
 to be locked in its original direction or in its
 opposite direction. To do this, we have to check
 whether we can get from candidate c2 to candidate c1
 via links that have already been locked."

 for j : = 1 to NumberOfCandidates
 begin
 reachable[j] : = false
 end

 reachable[c2] : = true

 m : = true

 repeat
 m : = false
 for j : = 1 to NumberOfCandidates
 begin
 if ( reachable[j] = true ) then
 begin
 for k : = 1 to NumberOfCandidates
 begin
 if ( j ≠ k ) then
 begin
 if ( Tideman[j,k] = true ) then
 begin
 if ( reachable[k] = false ) then
 begin
 m : = true
 end
 reachable[k] : = true
 end
 end
 end
 end
 end
 until ( m = false )

 if ( reachable[c1] = false ) then
 begin
 Tideman[c1,c2] : = true
 end

 if ( reachable[c1] = true ) then
 begin
 Tideman[c2,c1] : = true
 end

end

Stage 8

[edit ]

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

  1. In the beginning, "marked[A] = false" for all candidates A. In the beginning, A =final B for all pairs of candidates A,B.
  2. Repeat until "marked[X] = true" for all candidates X:
  1. U is the set of all candidates A with (1) marked[A] = false and (2) p[A,B] ≥win p[B,A] for all other candidates B with marked[B] = false.
  2. Choose candidate C with (1) C ∈ U and (2) C >Tideman D for all other candidates D ∈ U.
  3. Replace "marked[C] = false" by "marked[C] = true".
  4. For all candidates E with marked[E] = false, replace "C =final E" by "C >final E".

Implementation

[edit ]

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.
fori:=1toNumberOfCandidates
begin
marked[i]:=false
end

fori:=1toNumberOfCandidates
begin

forj:=1toNumberOfCandidates
begin
if(marked[j]=true)then
begin
U[j]:=false
end
if(marked[j]=false)then
begin
U[j]:=true
fork:=1toNumberOfCandidates
begin
if(marked[k]=false)then
begin
if(jk)then
begin
if((p1[j,k]<p1[k,j])or((p1[j,k]=p1[k,j])and(p2[j,k]>p2[k,j])))then
begin
U[j]:=false
end
end
end
end
end
end

forj:=1toNumberOfCandidates
begin
if(U[j]=true)then
begin
m:=true
fork:=1toNumberOfCandidates
begin
if(jk)then
begin
if(U[k]=true)then
begin
if(Tideman[k,j]=true)then
begin
m:=false
end
end
end
end
if(m=true)then
begin
c:=j
end
end
end

marked[c]:=true

forj:=1toNumberOfCandidates
begin
if(marked[j]=false)then
begin
final[c,j]:=true
final[j,c]:=false
end
end

end

Stage 9

[edit ]

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

References

[edit ]

AltStyle によって変換されたページ (->オリジナル) /