Information and resources relating to STV in general and election methods supported by OpenSTV in particular.
The basic structure of an STV method can be described as follows:
The above is ambiguous in that it does not define the winning threshold and does not describe precisely how votes are to be transferred. Specific implementations of STV define both of these and may also modify the basic structure.
The winning threshold is also called a quota. I avoid the term quota because it has negative connotation in the US. A commonly used threshold is defined as
number of votes
threshold = --------------------- + 1
number of seats + 1and then dropping any fraction.
This is the smallest threshold such that any candidate receiving this number of votes is guaranteed to be elected. This will be discussed in more detail below.
Methods for transferring surplus votes can be classified into two main groups: random transfer of votes and fractional transfer of votes. Methods for transferring votes from eliminated candidates do not vary greatly.
There are a variety of methods for computing the winning threshold. I prefer to define them in words rather than through formulas.
Within these two types there are two options. A threshold can be static or dynamic. A static threshold is determined once at the beginning and is the same until the end. A dynamic threshold is recomputed every round and decreases as the number of exhausted votes increases. The threshold can also be a whole number or a fraction. Thus, there eight variations for determining the threshold.
The above descriptions of the Droop and Hare thresholds is an ideal which is not always perfectly realized. How well a threshold conforms to the ideal is how "tight" the threshold is. For example, a fractional threshold is slightly tighter than a whole threshold since there is greater precision.
If voters are required to rank all the candidates, then there will be no exhausted votes and the static and dynamic thresholds will be identical. If voters are not required to rank all the candidates, then there will be exhausted votes and the dynamic threshold will be tighter than the static threshold.
The ERS97 rules implement a threshold that is a variation of the Droop threshold. For a static threshold, Droop and ERS97 are identical. For a dynamic threshold, ERS97 is tighter than Droop. For a given candidate, his surplus votes are transferred only once. Thus, when the threshold decreases, these votes that are above the new threshold do not help elect any candidate. The ERS97 threshold takes into account these nontransferable surplus votes when computing the threshold and this results in a threshold that is smaller (tighter) than the Droop threshold.
The basic algorithm above requires that all surplus votes be transferred before the last place candidate is eliminated. However, if the last place candidate can't win, even if he received all the surplus votes, then he can safely be eliminated before transferring the surplus votes. Thus, we can delay the transfer of surplus until after this losing candidate is eliminated.
There are two reasons for doing this. First, eliminating last place candidates is much simpler than transferring surplus votes. Thus, we should delay transferring surplus as long as we can. Second, it will help minimize the number of times that a given vote will be transferred. If we transfer surplus immediately, then part of it could transfer to a candidate who will be eliminated in the next round. These votes would be transferred twice. If we delay the transfer of surplus until after this candidate is eliminated, then the same vote would be transferred just once.
One could eliminate candidates in batches rather than one by one. There are two rationales for this. The first is practicality. If there are many candidates, each with very few votes, then it would be tedious to eliminate them one by one. The second is efficiency. If it is known that several candidates can't win, then it makes sense to eliminate them all right away.
The first method is to eliminate all candidates who have fewer votes than a flat cutoff. This would take place immediately after all surplus votes have been transferred to allow all candidates to take advantage of surplus votes to avoid being eliminated in this fashion. This will be useful when there are many candidates with very few (or even no) first place votes. With many such candidates, it would take many rounds to eliminate them one by one. The batch elimination simplifies the count by eliminating all candidates with very few votes in one round. Note that this will possibly eliminate candidates who have a chance of winning. However, this is not a problem as long as the cutoff is chosen wisely.
The second method is the same as the first, except that the cutoff is chosen as a percentage, say 0.5%, of the total number of votes cast. This method is suggested in the STV rules in Behind the Ballot Box.
The third method is to eliminate all candidates immediately who have no chance of winning. This can happen before surplus votes are transferred and at any time throughout the count. To test if a given candidate can win, it is assumed that she will receive all surplus votes and all transfers from eliminated candidates. Under this assumption, a candidate can win if it is possible that she can beat all candidates between her and the last seat. If it is known that a candidate can't win then she should be eliminated immediately. It is possible that at a given round, that several candidates can't possibly win and they should all be eliminated in a batch.
With random transfer of surplus votes, a number of ballots corresponding to the candidate's surplus are transferred to their next choices. One could choose the last ballots the candidate received, the first ballots the candidate received, or choose some other method. It is important to note is that changing the order of the ballots can change the outcome of the election. In reality, this will only happen in a close election. However, many people find this aspect disturbing.
One could choose a stack or a queue model for transferring ballots. It is useful to visualize the candidates' ballots in separate piles. With a stack model, one would take the ballots off the top of one pile and place them on the top of another pile. With a queue model, one would take the ballots off the top of one pile and place them on the bottom of another pile. With a stack model, one ballot could be transferred many times, while with the queue model, a ballot would probably transferred only once. This implementation uses the queue model.
Another consideration is whether to allow secondary surpluses. A primary surplus arises only after counting the first choices. A secondary surplus could arise after the transfer of a surplus or the transfer of votes from an eliminated candidate. This implementation allows secondary surpluses.
Fractional transfer methods are designed so that the result of the election remains the same when the order of the ballots is changed. The basic idea is that, when transferring a candidate's surplus votes, all of the ballots are transferred but at a fractional value. The fraction is set so that the total value of all the transferred ballots equals the candidate's surplus.
With fractional transfers of votes, secondary surpluses must be allowed. Since the point of fractional transfers is to ensure that the method is independent of the order of the ballots, all the ballots transferred in a given round must be treated identically.
Since floating-point arithmetic, some implementations round all calculations to a number of decimal places. This implementation does all computations in floating point.
The Cambridge rules are a random transfer STV method. The Cambridge rules also use the stack model, but with a variation. Instead of taking the ballots on the top, the pile is "sliced." This means that every Nth ballot is selected starting from the top of the pile. N is chosen to go through as much of the pile as possible.
Secondary surpluses are not allowed. When transferring votes, once a candidate has reached the winning threshold, she cannot receive any more ballots. Any ballots that would go to this candidate instead go to the next choice on the ballot.
After all surplus votes have been transferred, all candidates with fewer than 50 votes are eliminated. This is related to Cambridge's requirement that one must collect 50 signatures to be put on the ballot. It is also a matter of convenience as any candidate with fewer than 50 votes at this stage has virtually no chance of winning a seat.
Another straightforward implementation of fractional transfer STV, similar to British Columbia STV except that it uses five rather than six digits of precision.
The Green Party of California (GPCA) adopted these rules in 2000. The rules are described in the GPCA bylaws. The rules are based on the description of STV found in Electoral System Design: The New International IDEA Handbook, except that GPCA uses a fractional threshold, and does not elect candidates that do not reach the a full (static) threshold.
Neither IDEA nor the GPCA bylaws specify a method of breaking ties. This implementation breaks all ties randomly. See Jonathan Lundell's paper Random tie-breaking in STV for the rationale.
The ERS97 rules are a combination of the principles behind random transfer and fractional transfer STV. In my opinion, the rules are excessively and unnecessarily complicated. See http://www.electoral-reform.org.uk/votingsystems/stvrules.htm for the official rules.
The ERS97 rules are independent of the order of the ballots. The first time a candidate's surplus votes are transferred, the method described in Section V is used. These transfers can lead to secondary surpluses. However, the secondary transfers of surplus votes are done differently. For secondary transfers, only the last group of ballots received will be transferred. This resembles how ballots are transferred with random transfer STV methods. Tertiary transfers are possible, but much less likely to occur.
The ERS97 rules differ from the other rules presented here in many ways. See the python code for more details.
The rules used by N. Ireland are similar to but significantly less complicated than the ERS97 rules.
Previous rules are all designed for hand counting. Meek and Warren STV provide the most accurate proportional representation, but the count must be done with a computer and cannot be done by hand. The basic idea is similar to Fractional Transfer STV. There are two main differences: (1) winning candidates also receive vote transfers from eliminated candidates and surplus votes from other winning candidates, and (2) when a candidate is eliminated it is as if the candidate never entered the election. These changes create a feedback loop of vote transfers which requires a computer to implement.