Bucklin

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

Bucklin method.

Inherits functions and optional parameters from superclasses ElectionResult and Election.

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

At counting round r, all voters who rank candidate c in rth position gives her an additional vote. As soon as at least one candidate has more than V/2 votes (accrued with previous rounds), the candidate with most votes is declared the winner. In case of a tie, the candidate with lowest index wins.

CM(): Exact in polynomial time.

ICM(): Exact in polynomial time.

IM(): Exact in polynomial time.

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

TM(): Exact in polynomial time.

UM(): Exact in polynomial time.

References:

‘The Majoritarian Compromise in large societies’, Arkadii Slinko, 2002.

‘Complexity of Unweighted Coalitional Manipulation under Some Common Voting Rules’, Lirong Xia, Michael Zuckerman, Ariel D. Procaccia, Vincent Conitzer and Jeffrey S. Rosenschein, 2009.

candidates_by_scores_best_to_worst

1d array of integers. Candidates are sorted according to their scores during the counting round during which at least one candidate reaches majority.

By definition, candidates_by_scores_best_to_worst[0] = w.

scores

2d array of integers. scores[r, c] is the accrued score of candidate c at elimination round r. It is the number of voters who rank c between 0th and rth rank on their ballot.

For information, ballot are still counted after the round where the decision is made (it is used for manipulation algorithms).

w

Integer (winning candidate). When at least one candidate has more than V/2 votes, the candidate with most votes gets elected. In case of a tie, the candidate with highest index wins.