CondorcetAbsIRV¶
-
class
svvamp.
CondorcetAbsIRV
(population, **kwargs)[source]¶ Absolute-Condorcet Instant Runoff Voting.
Inherits functions and optional parameters from superclasses
ElectionResult
andElection
.Example: >>> import svvamp >>> pop = svvamp.PopulationSpheroid(V=100, C=5) >>> election = svvamp.CondorcetAbsIRV(pop)
Note
When in doubt between
CondorcetAbsIRV
andCondorcetVtbIRV
, we suggest to useCondorcetVtbIRV
.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 useCondorcetVtbIRV
.CM()
:CM_option
='fast'
: Rely onIRV
‘s fast algorithm. Polynomial heuristic. Can prove CM but unable to decide non-CM (except in rare obvious cases).CM_option
='slow'
: Rely onExhaustiveBallot
‘s exact algorithm. Non-polynomial heuristic (\(2^C\)). Quite efficient to prove CM or non-CM.CM_option
='almost_exact'
: Rely onIRV
‘s exact algorithm. Non-polynomial heuristic (\(C!\)). Very efficient to prove CM or non-CM.CM_option
='exact'
: Non-polynomial algorithm from superclassElection
.
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 superclassElection
.not_IIA()
: Non-polynomial or non-exact algorithms from superclassElection
.TM()
: Exact in polynomial time.UM()
: Non-polynomial or non-exact algorithms from superclassElection
.References:
‘Condorcet criterion, ordinality and reduction of coalitional manipulability’, François Durand, Fabien Mathieu and Ludovic Noirie, working paper, 2014.See also
-
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 forc
in matrix_victories_ut_abs.Otherwise,
scores[r, c]
is defined like inIRV
: it is the number of voters who vote for candidatec
at roundr
. For eliminated candidates,scores[r, c] = numpy.nan
. At the opposite,scores[r, c] = 0
means thatc
is present at roundr
but no voter votes forc
.
-
w
¶ Integer (winning candidate).