Dodgson's method

Dodgson's method is an electoral system based on a proposal by mathematician Charles Dodgson, better known as Lewis Carroll. The method searches for a majority-preferred winner; if no such winner is found, the method proceeds by finding the candidate who could be transformed into a Condorcet winner with the smallest number of ballot edits possible, where a ballot edit switches two neighboring candidates on a voter's ballot.

Description
In Dodgson's method, each voter submits an ordered list of all candidates according to their own preference (from best to worst). The winner is defined to be the candidate for whom we need to perform the minimum number of pairwise swaps in each ballot (added over all candidates) before they become a Condorcet winner.

Computation
In short, we must find the voting profile with minimum Kendall tau distance from the input, such that it has a Condorcet winner; then, the Condorcet winner is declared the victor. Computing the winner or even the Dodgson score of a candidate (the number of swaps needed to make that candidate a winner) is an NP-hard problem by reduction from Exact Cover by 3-Sets (X3C).

Given an integer k and an election, it is NP-complete to determine whether a candidate can become a Condorcet winner with fewer than k swaps.