Draft:Pairwise vote counting

Pairwise vote counting is the process of counting ranked (or rated) ballot preferences by considering one pair of candidates at a time, and for each pair counting the comparison results.. In addition to identifying which of the paired candidates beats (is preferred by more voters over) the other candidate, the comparison counts indicate how many voters prefer the pairwise winner over the pairwise loser, how many voters have the opposite preference, and how many voters indicate an equal preference between the two candidates.

Most, but not all, election methods that meet the Condorcet criterion or the Condorcet loser criterion use pairwise counting. See Condorcet method for information on how pairwise counts are used to identify a winning candidate who meets the Condorcet criterion.

Pairwise comparison matrix
Pairwise counts are often displayed in a pairwise comparison matrix or outranking matrix such as those below. In these matrices, each row represents each candidate as a 'runner', while each column represents each candidate as an 'opponent'. The cells at the intersection of rows and columns each show the result of a particular pairwise comparison. Cells comparing a candidate to themselves are blank or contain a symbol such as '—'.

Imagine there is an election between four candidates: A, B, C and D. The first matrix below records the preferences expressed on a single ballot paper, in which the voter's preferences are (B, C, A, D); that is, the voter ranked B first, C second, A third, and D fourth. In the matrix a '1' indicates that the runner is preferred over the opponent, while a '0' indicates that the opponent is preferred over the runner.

In this matrix the number in each cell indicates either the number of votes for runner over opponent (runner,opponent) or the number of votes for opponent over runner (opponent,runner).

Each ballot can be transformed into this style of matrix, and then added to all other ballot matrices using matrix addition. The resulting sum of all ballots in an election is called the sum matrix, and it summarizes all the voter preferences.

An election counting method can use the sum matrix to identify the winner of the election.

Suppose that this imaginary election has two additional voters, and their preferences are (D, A, C, B) and (A, C, B, D). Added to the first voter, these ballots yield the following sum matrix:

In the sum matrix above, A is the Condorcet winner because A beats every other candidate. When there is no Condorcet winner, Condorcet completion methods such as Ranked Pairs and the Schulze method and the Condorcet-Kemeny method use the information contained in the sum matrix to choose a winner.

The first matrix above, which represents a single ballot, is inversely symmetric: (runner,opponent) is ¬(opponent,runner). Or (runner,opponent) + (opponent,runner) = 1. The sum matrix has this property: (runner,opponent) + (opponent,runner) = N for N voters, if all runners are fully ranked by each voter.

Example without numbers
If pairwise counting is used in an election that has three candidates named A, B, and C, the following pairwise counts are produced:


 * Number of voters who prefer A over B
 * Number of voters who prefer B over A
 * Number of voters who have no preference for A versus B
 * Number of voters who prefer A over C
 * Number of voters who prefer C over A
 * Number of voters who have no preference for A versus C
 * Number of voters who prefer B over C
 * Number of voters who prefer C over B
 * Number of voters who have no preference for B versus C

Alternatively, the words "Number of voters who prefer A over B" can be interpreted as "The number of votes that help A beat (or tie) B in the A versus B pairwise matchup".

If the number of voters who have no preference between two candidates is not supplied, it can be calculated using the supplied numbers. Specifically, start with the total number of voters in the election, then subtract the number of voters who prefer the first over the second, and then subtract the number of voters who prefer the second over the first.

The pairwise comparison matrix for these comparisons is shown below.

A candidate cannot be pairwise compared to itself (for example candidate A can't be compared to candidate A), so the cell that indicates this comparison is either empty or contains a symbol such as '—'.

In cases where only some pairwise counts are of interest, those pairwise counts can be displayed in a table with fewer table cells.

Example with numbers
These ranked preferences indicate which candidates the voter prefers. For example, the voters in the first column prefer Memphis as their 1st choice, Nashville as their 2nd choice, etc. As these ballot preferences are converted into pairwise counts they can be entered into a table.

The following square-grid table displays the candidates in the same order in which they appear above.

The following tally table shows another table arrangement with the same numbers.

Number of pairwise comparisons
When the number of candidates is N, there are 0.5*N*(N-1) pairwise matchups. For example, for 2 candidates there is one pairwise comparison, for 3 candidates there are 3 pairwise comparisons, for 4 candidates there are 6 pairwise comparisons, for 5 candidates there are 10 pairwise comparisons, for 6 candidates there are 15 pairwise comparisons, and for 7 candidates there are 21 pairwise comparisons.