CondorcetAbsIRV

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

Absolute-Condorcet Instant Runoff Voting.

Inherits functions and optional parameters from superclasses ElectionResult and Election.

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

Note

When in doubt between CondorcetAbsIRV and CondorcetVtbIRV, we suggest to use CondorcetVtbIRV.

Each voter must provide a weak order, and a strict total order that is coherent with this weak order (i.e., is a tie-breaking of this weak order).

If there is a Condorcet winner (computed with the weak orders, i.e. in the sense of matrix_victories_ut_abs), then she is elected. Otherwise, IRV is used (with the strict total orders).

If sincere preferences are strict total orders, then this voting system is equivalent to CondorcetVtbIRV for sincere voting, but manipulators have more possibilities (they can pretend to have ties in their preferences). In that case especially, it is a more ‘natural’ framework to use CondorcetVtbIRV.

CM():

  • CM_option = 'fast': Rely on IRV‘s fast algorithm. Polynomial heuristic. Can prove CM but unable to decide non-CM (except in rare obvious cases).
  • CM_option = 'slow': Rely on ExhaustiveBallot‘s exact algorithm. Non-polynomial heuristic (\(2^C\)). Quite efficient to prove CM or non-CM.
  • CM_option = 'almost_exact': Rely on IRV‘s exact algorithm. Non-polynomial heuristic (\(C!\)). Very efficient to prove CM or non-CM.
  • CM_option = 'exact': Non-polynomial algorithm from superclass Election.

Each algorithm above exploits the faster ones. For example, if CM_option = 'almost_exact', SVVAMP tries the fast algorithm first, then the slow one, then the ‘almost exact’ one. As soon as it reaches a decision, computation stops.

ICM(): Exact in polynomial time.

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

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

TM(): Exact in polynomial time.

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

References:

‘Condorcet criterion, ordinality and reduction of coalitional manipulability’, François Durand, Fabien Mathieu and Ludovic Noirie, working paper, 2014.
candidates_by_scores_best_to_worst

1d array of integers. If there is a Condorcet winner, candidates are sorted according to their (scalar) score.

Otherwise, candidates_by_scores_best_to_worst is the list of all candidates in the reverse order of their IRV elimination.

By definition, candidates_by_scores_best_to_worst[0] = w.

scores

1d or 2d array.

If there is a Condorcet winner, then scores[c] is the number of victories for c in matrix_victories_ut_abs.

Otherwise, scores[r, c] is defined like in IRV: it is the number of voters who vote for candidate c at round r. For eliminated candidates, scores[r, c] = numpy.nan. At the opposite, scores[r, c] = 0 means that c is present at round r but no voter votes for c.

w

Integer (winning candidate).