[EM] Election calculator / Czech Green Party case

Juho juho.laatu at gmail.com
Wed Jun 16 17:33:25 PDT 2010


I wrote some code to study proportionality in the Czech Green Party  
case. I uploaded some of that stuff also in the Internet in case you  
are interested to experiment with it. The code is purely experimental  
and draft and not very stable at the moment, i.e. no guarantees given,  
but right now it seems to be operational at some level. You may check  
it at http://electioncalculator.appspot.com/. At the moment the  
proportional method does some exhaustive search over all the  
combinations, so use it only with small number of candidates and  
elected council members to avoid combinatorial explosion. (I'm  
interested also in non-exhaustive versions but they are not good  
enough to be used at the moment.)

Example input:

method == Proportional
members == 5
ordered == 2
group == 2 aceg
group == 2 bdf
24 abcd
24 cbad
4 d
24 efgd
24 gfed

Button "Calculate" should do the job. In this input the used method is  
obviously "Proportional". Number of council members is 5 ("members ==  
5"). Two of the members will be elected using a proportional ranking  
method ("ordered == 2"). There are two groups that each must get at  
least two members (could be men and women). Different groups may  
contain also same characters (candidates) and not contain some  
characters in any of the groups although in the male/female case that  
would not be very "natural" :-). And then there are the votes. The  
requirement to achieve maximum proportionality and sufficient  
participation of all the groups will not impact the ordered candidates  
(i.e. the ordered candidates may distort proportionality a bit like in  
the given example where d will be elected as the president, and  
forcing sufficient representation of the groups may distort the  
selection of the other members of the council a bit more since the  
presidents will not participate in this game). Note that the "=="  
parameters must be given in the first rows of the input. The  
calculator is not very sensitive with respect to the format of the  
input. It can eat all kind of strings with (optional) number at the  
beginning of the row and all kinds of ASCII characters and equal signs  
and English alphabet characters (candidates) later on the row.

These properties do cover most of the topics that were addressed in  
the Czech Green Party discussions. (At least possibility of separate  
votes for the presidents is still missing (maybe not a key feature but  
somewhat interesting in theory).)

The given example contains some ties. Ties will be resolved using  
random numbers. Ties will be indicated in the results (in the given  
example both among the ordered candidates and sometimes also in the  
composition of the whole council).

I included also some other buttons for some other methods. Clicking  
button "PO" corresponds to having a "method == PO" parameter row among  
the parameters at the beginning of the input. "PO" means proportional  
order/ranking. The above mentioned additional parameters do not have  
any influence in this method, except that it seems that the "members"  
parameter will list given number of candidates from the beginning of  
the ranking. (You should be able to reach the same results also with  
the "Proportional" method and suitable parameters (all members/ 
candidates ordered).)

The "Proportional" method is a quite straight forward CPO-STV style  
method that uses a Hare style quota (number of non-empty ballots  
divided by the number of council members (not rounded/truncated)). The  
weight of each vote that ranks some candidates that are in both  
compared councils above the first candidate that will make the  
difference between which alternative the vote supports will be reduced  
by one quota (shared between all such votes). No negative weights  
though. Equal ranking is allowed. Minmax(margins) is used to compare  
different alternative council compositions and pick the winning one.

My current code is full of experimental and testing/debugging related  
features but if needed I can extract some appropriate variant and  
provide open source code for it. In this kind of complex methods open  
source code and/or alternative implementations and/or reference  
implementations are important to guarantee that the method (and the  
implementation that will be used in the actual election) is correct  
and does not contain any unintentional bugs nor any malicious  
bugs/"features" (and also to make it easier for people to trust that  
the system works as intended, not just to guarantee that it works as  
intended).

Problem reports and other comments are welcome. I hope not too many  
problem reports though :-). I will expand and improve (and otherwise  
modify, maybe even destroy) the calculator when time allows and I have  
the energy and ideas.

Juho








More information about the Election-Methods mailing list