Pairwise counting: Difference between revisions

No edit summary
Line 143:
== Example using various ballot types ==
 
[See [[:File:Pairwise counting procedure.png|File:Pairwise_counting_procedure.png]], which appears in the [[Pairwise counting#Notes|Notes]] section, for an image explaining all of this).
 
Suppose there are five candidates A, B, C, D and E.
Line 291:
 
==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-based voting methods|Category:Pairwise counting-based voting methods]]. In the first 3 methods, a voter is interpreted as giving a degree of support to each candidate in a matchup. Even [[IRV]] can be understood to some extent when observing its compliance with the [[dominant mutual third]] property.
[[File:Pairwise counting procedure.png|thumb|The procedure for pairwise counting with various ballot formats and examples.]]
 
Pairwise counting can be used to tally the results of [[Choose-one voting]], [[Approval voting]], [[Score voting]], and [[:Category:Pairwise counting-based voting methods|Category:Pairwise counting-based voting methods]]. In the first 3 methods, a voter is interpreted as giving a degree of support to each candidate in a matchup. Even [[IRV]] can be understood to some extent when observing its compliance with the [[dominant mutual third]] property.
 
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.