Algorithm Search⌘K

Social choice and voting

Problems

  • Apportionment problem

    Allocate a fixed number of integer seats to states or parties in proportion to their populations or vote counts.

    core
  • Election control and bribery

    Decide whether an organizer can make a candidate win by adding or deleting voters or candidates, or by paying voters to change ballots.

    advanced
  • Kemeny rank aggregation

    Find the ranking that minimizes the total Kendall tau distance to the input rankings; NP-hard already for four input lists.

    O(2^n n^2 + n^2 k) worstadvanced
  • Manipulation of a voting rule

    Given the other ballots, decide whether a voter or coalition can cast ballots that make a chosen candidate win. It is NP-hard for some rules.

    advanced
  • Participatory budgeting

    Choose a set of projects within a budget from voters' approvals or rankings so that the outcome is efficient and proportional.

    research

Algorithms

  • Approval voting

    Each voter approves any set of candidates, and the candidate with the most approvals wins.

    O(n + m + L) worst1 languagesintro
  • Borda count

    Gives each item points by its position in each input ranking and sorts the items by the total of their points.

    O(n k + n log n) worst1 languagesintro
  • D'Hondt method

    Assigns seats one at a time to the party with the largest votes divided by one plus its seats. It favours large parties.

    O(n + h log n) worst1 languagesintro
  • Hamilton's method

    Gives each party the integer part of its quota and the remaining seats to the parties with the largest fractional remainders.

    O(n log n) worst1 languagesintro
  • Instant-runoff voting

    Repeatedly eliminates the candidate with the fewest first places and transfers its ballots until one candidate has a majority.

    O(L + m^2) worst1 languagesintro
  • Plurality voting

    Elects the candidate ranked first by the most voters. It ignores all but the top choice of each voter.

    O(n + m) worst1 languagesintro
  • Copeland's method

    Ranks candidates by the number of pairwise majority contests they win minus those they lose. It is Condorcet consistent.

    O(n m^2) worst1 languagescore
  • Huntington-Hill method

    A divisor method that rounds each quota at the geometric mean of consecutive integers. The US House of Representatives uses it.

    O(n + h log n) worst1 languagescore
  • Ranked pairs

    Locks in pairwise majorities from the largest margin down, skipping any that would form a cycle, and elects the source of the result.

    O(n m^2 + m^3) worst1 languagescore
  • Sainte-Lague method

    Assigns seats one at a time to the party with the largest votes divided by 2s + 1, where s is its current number of seats.

    O(n + h log n) worst1 languagescore
  • Schulze method

    Elects the candidate whose strongest path of pairwise majorities to each rival is at least as strong as the reverse, using the widest path variant of Floyd-Warshall.

    O(n m^2 + m^3) worst1 languagescore
  • Single transferable vote

    Elects a committee from ranked ballots by quota, transferring surplus votes of elected candidates and votes of eliminated ones.

    O(L + m^2) worst1 languagescore
  • Chamberlin-Courant rule

    Elects the committee of k candidates that maximizes the total satisfaction of the voters with their favourite member. NP-hard in general, polynomial on single-peaked profiles.

    O(m^2 (n + k)) worst1 languagesadvanced
  • Dodgson's rule

    Elects the candidate that needs the fewest swaps of adjacent candidates in ballots to become a Condorcet winner. Winner finding is Theta_2^p-complete (Hemaspaandra, Hemaspaandra and Rothe 1997).

    O(m^3 n (n/2 + 2)^(m - 1)) worst1 languagesadvanced
  • Generalized median voter rule

    Takes the median of the reported peaks and n+1 fixed phantom points. On a single-peaked line these are exactly the anonymous strategyproof rules that use only the peaks.

    O(n + m) worst1 languagesadvanced
  • KwikSort for rank aggregation

    Quicksort with random pivots on pairwise majorities. It is an expected 2-approximation for Kemeny aggregation, and 11/7 when the better of it and an input ranking is kept.

    O(n m^2) worst1 languagesadvanced
  • Phragmen's sequential method

    Elects committee members one by one. Each member costs 1, shared by its supporters, and the next member is the one that keeps the largest load on a voter as small as possible.

    O(k m n) worst1 languagesadvanced
  • Proportional approval voting

    Elects the committee that maximizes the sum over voters of 1 + 1/2 + ... + 1/j, where j is the number of approved members.

    O(k^3 m n log k) worst1 languagesadvanced
  • Recognizing single-peaked profiles

    Decides whether a profile is single-peaked on some ordering of the candidates, and finds such an axis, in O(mn) time by placing candidates from the two ends inward.

    O(m n) worst1 languagesadvanced
  • Slater's rule

    Finds the ranking that disagrees with the fewest pairwise majority outcomes, a minimum feedback arc set of the majority tournament.

    O(n m^2 + 2^m m) worst1 languagesadvanced
  • Method of equal shares

    Gives each voter an equal budget and buys candidates or projects whose supporters can cover the cost at the lowest share each.

    O(k m n log n) worst1 languagesresearch

Concepts

  • Condorcet paradox

    Majority preferences between pairs of candidates can form a cycle even when every voter's ranking is transitive.

    intro
  • Alabama paradox

    Under Hamilton's method a state can lose a seat when the total number of seats rises.

    core

Definitions

  • Condorcet winner

    A candidate who beats every other candidate in a pairwise majority vote. Condorcet-consistent rules elect one when it exists.

    intro
  • Preference profile

    A list of the voters' preferences, each a ranking of the candidates. Every voting rule takes one as input.

    intro
  • Social welfare function

    A rule that maps each preference profile to a collective ranking of the candidates. A social choice function maps it to a winner.

    intro
  • Single-peaked preferences

    A profile is single-peaked if the candidates can be put on a line so that each voter likes candidates less the farther they lie from the voter's favourite.

    core
  • Smith set

    The smallest nonempty set of candidates each of whom beats every candidate outside it in pairwise majority votes.

    core
  • Justified representation

    Axioms for approval committees that give each cohesive group of n/k voters at least as many members as its size and cohesion warrant.

    advanced
  • Metric distortion of voting rules

    The worst-case ratio of the social cost of a rule's winner to the optimum when voters and candidates lie in an unknown metric space.

    research

Theorems

  • Arrow's impossibility theorem

    With three or more candidates, every social welfare function that is unanimous and independent of irrelevant alternatives is a dictatorship.

    intro
  • May's theorem

    With two candidates, majority rule is the only voting rule that is anonymous, neutral and positively responsive.

    intro
  • Condorcet jury theorem

    If voters are independently right with probability above 1/2, the chance that the majority is right tends to 1 as the electorate grows.

    core
  • Gibbard-Satterthwaite theorem

    Every deterministic voting rule with at least three possible winners that is strategyproof is a dictatorship.

    core
  • Median voter theorem

    On a single-peaked profile the peak of the median voter is a weak Condorcet winner. With an odd number of voters it is the Condorcet winner and majority voting is transitive.

    core
  • Balinski-Young theorem

    No apportionment method for 4 or more states always stays within quota and is free of the population paradox.

    advanced