Pairwise counting: Difference between revisions

Line 202:
 
Note that when a candidate is unmarked it is generally treated as if the voter has no preference between the unmarked candidates. When the voter has no preference between certain candidates, which can also be seen by checking if the voter ranks/scores/marks multiple candidates in the same way (i.e. they say two candidates are both their 1st choice, or are both scored a 4 out of 5), then it is treated as if the voter wouldn't give a vote to any of those candidates in their matchups against each other.
 
== Election examples ==
Here is an example of a pairwise victory table for the [https://en.wikipedia.org/wiki/2009_Burlington_mayoral_election Burlington 2009] election:
{| class="wikitable"
| colspan="3" rowspan="2" | 
| 
| 
| 
| 
| 
| 
|-
!wi
!JS
! DS
!KW
!BK
!AM
|-
! 
!AM
| colspan="6" |Andy
Montroll (5–0)
|5 Wins ↓
|-
! 
!BK
| colspan="5" |Bob
Kiss (4–1)
|1 Loss →
↓ 4 Wins
| 4067 (AM) –
3477 (BK)
|-
! 
!KW
| colspan="4" |Kurt
Wright (3–2)
|2 Losses →
3 Wins ↓
|4314 (BK) –
4064 (KW)
| 4597 (AM) –
3668 (KW)
|-
! 
!DS
| colspan="3" | Dan
Smith (2–3)
|3 Losses →
2 Wins ↓
| 3975 (KW) –
3793 (DS)
|3946 (BK) –
3577 (DS)
|4573 (AM) –
2998 (DS)
|-
! 
!JS
| colspan="2" |James
Simpson (1–4)
|4 Losses →
1 Win ↓
| 5573 (DS) –
721 (JS)
|5274 (KW) –
1309 (JS)
|5517 (BK) –
845 (JS)
|6267 (AM) –
591 (JS)
|-
| 
!wi
|Write-in (0–5)
| 5 Losses →
|3338 (JS) –
165 (wi)
|6057 (DS) –
117 (wi)
|6063 (KW) –
163 (wi)
|6149 (BK) –
116 (wi)
|6658 (AM) –
104 (wi)
|}To read this, take for example the cell where BK is compared to AM (the cell with BK on the left and AM on the top); "4067 (AM)" means that 4067 voters preferred AM (Andy Montroll) over BK (Bob Kiss), and "3477 (BK)" means that 3477 voters preferred BK over AM. Because AM got more votes than BK in that matchup, AM won that matchup.
 
==Notes==
[[File:Pairwise counting table with links between matchups.png|thumb|444x444px|Green arrows point from the loser of the matchup to the winner. Yellow arrows indicate a tie. Red arrows (not shown here) indicate the opposite of green arrows (i.e. who lost the matchup).For example, the B>A matchup points to A>B with a green arrow because A pairwise beats B (head-to-head).]]Pairwise counting can be used to tally the results of [[Choose-one voting]], [[Approval voting]], [[Score voting]], and [[:Category:Pairwise counting-basedScore voting methods|Category:Pairwise counting-based voting methods]].; In the firstin 3these methods, a voter is interpreted as giving a degree of support to each candidate in a matchup., Even [[IRV]]which can be understoodreflected toeither someusing extentmargins whenor observing(in itsthe compliancecase withof Score) the voter's support for both candidates in the matchup. See [[dominantRated mutualpairwise thirdpreference ballot#Margins%20and%20winning%20votes%20approaches|rated pairwise preference ballot#Margins and winning votes approaches]] propertyfor an example.
 
The naive way of counting pairwise preferences implies determining, for each pair of candidates, and for each voter, if that voter prefers the first candidate of the pair to the second or vice versa. This requires looking at ballots <math>O(Vc^2)</math> times. If reading a ballot takes a lot of time, it's possible to reduce the number of times a ballot has to be consulted by noting that if a voter ranks X first, he prefers X to everybody else; if he ranks Y second, he prefers Y to everybody but X, and so on. The Condorcet matrix still has to be updated <math>O(Vc^2)</math> times, but a ballot only has to be consulted <math>Vc</math> times at most. If the voters only rank a few preferences, that further reduces the counting time.
Line 321 ⟶ 233:
This reduces the amount of space required to store and demonstrate all of the relevant information for calculating the result of the voting method.
 
== Election examples ==
It may help to put the % of the votes a candidate got in the pairwise matchup. So, for example:
See [[Pairwise preference#Election examples]]
{| class="wikitable"
|+
!
!A
!B
|-
|A
| ---
|'''56%'''
|-
|B
|'''44%'''
| ---
|}
When looking at two candidates, a quick way to figure out the number of votes for the first candidate>second candidate and vice versa is to first locate the cell for "first candidate>second candidate", count the minimum number of cells diagonally one must go to be adjacent to the middle dividing line of the matrix (where there is a --- cell), and then going one cell further diagonally (meaning you'll be starting from the closest cell on the opposite side of that dividing line), go that number of cells further diagonally to reach the other cell. For example:
{| class="wikitable"
!
!A
! B
!C
!D
! E
|-
| A
| ---
|2
|2
|'''2'''
|2
|-
|B
|0
| ---
|2
|2
|2
|-
| C
|0
|0
| ---
|2
|2
|-
|D
|''<u>0</u>''
|0
|0
| ---
|0
|-
| E
|0
|0
|0
|0
| ---
|}Try locating A>D (the fifth cell in the second row). To find the reverse, D>A, first you check and see that you have to go one cell down and to the left to be adjacent to the middle dividing line. Then, starting from the cell one cell down and to the left of the middle dividing line, go one cell further down and to the left to reach D>A. In doing this, you would start at A>D, go down to B>C, then jumping over the middle dividing line to C>B, go down to D>A.
 
One of the notable aspects of pairwise counting is that it can be used to find a Condorcet winner or member of the Smith set in a simple manner without needing to be done with written ballots; see [[:Category:Sequential comparison Condorcet methods]] for more information.
 
==Terminology ==