Coombs

class svvamp.Coombs(population, **kwargs)[source]

Coombs method.

Inherits functions and optional parameters from superclasses ElectionResult and Election.

Example:
>>> import svvamp
>>> pop = svvamp.PopulationSpheroid(V=100, C=5)
>>> election = svvamp.Coombs(pop)

The candidate who is ranked last by most voters is eliminated. Then we iterate. Ties are broken in favor of lower-index candidates: in case of a tie, the tied candidate with highest index is eliminated.

CM():

  • CM_option = 'fast': Polynomial heuristic. Can prove CM but unable to decide non-CM (except in rare obvious cases).
  • CM_option = 'exact': Non-polynomial (\(C!\)).

ICM(): Exact in polynomial time.

IM():

  • IM_option = 'fast': Polynomial heuristic. Can prove CM but unable to decide non-IM (except in rare obvious cases).
  • IM_option = 'exact': Non-polynomial (\(C!\)).

not_IIA(): Non-polynomial or non-exact algorithms from superclass Election.

TM(): Exact in polynomial time.

UM(): For this voting system, UM and CM are equivalent. For this reason, UM_option and CM_option are linked to each other: modifying one modifies the other accordingly.

References:

‘On The Complexity of Manipulating Elections’, Tom Coleman and Vanessa Teague, 2007.
candidates_by_scores_best_to_worst

1d array of integers. Candidates are sorted according to their order of elimination.

By definition / convention, candidates_by_scores_best_to_worst[0] = w.

scores

2d array of integers. scores[r, c] is minus the number of voters who vote against candidate c at elimination round r.

w

Integer (winning candidate).