Anti-Harassment Tools/SecurePoll Improvements/Understanding the STV result

SecurePoll now supports the Single Transferable Vote method. Single Transferable Vote or STV is a ranked voting method that allows voters to specify candidates they want to see elected in order of preference. For SecurePoll, we selected the Meek's implementation with Droop Quota. Meek's implementation is the most popular for STV elections and is used by several organizations and governments for their elections.

Example election
Candidates: Alice, Bob, Charlie Seats: 2 Voters: 5

Droop quota = floor(total valid votes/seats+1) + 1 = floor(5/(2+1)) + 1 = 2

Round 1

 * Alice: 3 votes
 * Bob: 0 votes
 * Charlie: 2 votes

For Round 1, we consider every voter's 1st preference votes. Alice got more votes than the Droop quota and is hence declared elected. Their leftover votes (3-2=1) are proportionally distributed to the candidates indicated as their second preference in Round 2.

Round 2

 * Alice: Elected
 * Bob: 0 + 3 + (1 * 2/3) = 3.66
 * Charlie: 2 + 1 + (1 * 1/3) = 3.33

For Round 2, each candidate's votes are calculated by: Votes from Round 1 + votes cast as 2nd preferences + proportional votes received from surplus of elected/eliminated candidate. Bob and Charlie both achieve Droop quota but Bob gets more surplus votes from Alice and is thus declared elected.

Result
Elected candidates: Alice and Bob Eliminated: Charlie

Things to note

 * If no candidate achieves the Droop quota in a round, the candidate with the lowest votes is eliminated and their votes are re-distributed among remaining candidates in accordance with the voter's ranked preferences.
 * If two or more candidates tie for elimination in the final round with one seat remaining, the software allows the election admins or election committee to make a judgement call on how to break the tie.
 * If two or more candidates tie for elimination in one of the intermediate rounds, we follow the "Short-cut exclusion rule" as outlined in this paper. This rule allows us to eliminate candidates when it is mathematically guaranteed that they can never win. This will happen when the candidate's votes don't exceed the votes by the next-best candidate even when they are assigned all the outstanding surplus votes. This seems a fairer method to decide eliminations as compared to randomly eliminating a candidate in the event of a tie. An example with a bigger election. Note that OpaVote/OpenSTV uses pseudo-random eliminations when it comes to ties. Hence their results may differ from ours in the event of a tie.