* *** IRV_COUNTING_2010 TXT - 17 Oct 2010 11:29:38 - JKNAUTH Instant Runoff Vote Counting ======= ====== ==== ======== Based on http://www.sboe.state.nc.us/GetDocument.aspx?id=2412 here's an example of how I think the Instant Runoff vote counting works: ballot col1 col2 col3 1 A < B C 2 D < B A 3 B A < D 4 A < D C 5 D < C B 6 C F D < 7 F E D < 8 E F B After round 1, A and D each have two votes (the column 1 votes) and are the two runoff candidates; no one had a majority. Ballots 1, 2, 4, and 5 are now removed from the counting process. Note this means ballot 2's vote for A in column 3 and ballot 4's vote for D in column 2 will not be counted. (Ballot 2 said D was preferred over A and ballot 4 said A was preferred over D -- preferences rule.) Ballots 3, 6, 7, and 8 will now be processed for the remaining two columns. First process column 2. Only ballot 3 (of the remaining ballots) has one of the two runoff candidates marked. Thus A gets one more vote. A=3 and D=2 so far. Now ballot 3 exits the process (and its column 3 vote for D is not counted -- preferences rule). All that's left now are ballots 6, 7, and 8. For them the two column 3 votes for D in ballots 6 and 7 are added, giving a final total of A=3 and D=4. Ballot 8 didn't have a vote in any column for any of the runoff candidates, so didn't contribute to any count except the initial calculation to see if some candidate had a majority of the total votes cast. ------------------------------------------------------------------------ From a programming point of view, one could use the following logic: If some candidate has more than 50% of the votes cast in column 1, that candidate is the winner. In this case, the process ends here; there is no need to do an IRV count. Otherwise, do an IRV count: Let A and B be the candidates with the two highest vote counts in column 1 of the ballots. Set the A and B counts to 0. For each ballot: If candidate A is marked in column 1, add 1 to the A count and go on to the next ballot If candidate B is marked in column 1, add 1 to the B count and go on to the next ballot If neither A nor B is marked in column 1, look at column 2 If candidate A is marked in column 2, add 1 to the A count and go on to the next ballot If candidate B is marked in column 2, add 1 to the B count and go on to the next ballot If neither A nor B is marked in column 2, look at column 3 If candidate A is marked in column 3, add 1 to the A count and go on to the next ballot If candidate B is marked in column 3, add 1 to the B count and go on to the next ballot Go on to the next ballot When all ballots have been processed, the candidate (A or B) with the higher count is the winner. The above logic does some redundant work since the A and B column 1 counts are already known before the IRV counting process starts (that's how you had determined who A and B are). However the above (redoing the column 1 counts in the process) makes clear that if A or B is marked in column 1, processing for that ballot is now finished; you don't look at columns 2 or 3 for that ballot if A or B is in column 1. Unknown (but hopefully documented somewhere by the NC BOE): What happens in the case of a tie, e.g., there are three candidates having the highest vote count in column 1 with all three being equal, or at least the bottom two being equal -- who is in the runoff? Or what if there is a tie between the two runoff candidates after the IRV process completes? Presumably the tie breaker for such cases is somewhere between a coin toss and a duel at dawn. Jeff Knauth