Strategic Axioms¶
Strategy Proofness¶
- pref_voting.strategic_axioms.has_strategy_proofness_violation(prof, vm, set_preference='single-winner', verbose=False)[source]¶
Returns True if there is a voter who can benefit by misrepresenting their preferences.
If set_preference = “single-winner”, a voter benefits only if they can change the unique winner in the original profile to a unique winner in the new profile such that in their original ranking, the new winner is above the old winner.
If set_preference = “weak-dominance”, a voter benefits only if in their original ranking, all new winners are weakly above all old winners and some new winner is strictly above some old winner.
If set_preference = “optimist”, a voter benefits only if in their original ranking, their favorite new winner is above their favorite old winner.
If set_preference = “pessimist”, a voter benefits only if in their original ranking, their least favorite new winner is above their least favorite old winner.
- Parameters:
prof – a Profile or ProfileWithTies object.
vm (VotingMethod) – A voting method to test.
verbose (bool, default=False) – If a violation is found, display the violation.
- Returns:
Returns True if there is a violation and False otherwise.
- Return type:
Result of the test (bool)
Note
The different set preference notions are drawn from Definition 2.1.1 (p. 42) of The Mathematics of Manipulation by Alan D. Taylor.
- pref_voting.strategic_axioms.find_all_strategy_proofness_violations(prof, vm, set_preference='single-winner', verbose=False)[source]¶
Returns a list of tuples (old_ranking, new_ranking) where old_ranking is the original ranking and new_ranking is the ranking that the voter can change to in order to benefit.
If set_preference = “single-winner”, a voter benefits only if they can change the unique winner in the original profile to a unique winner in the new profile such that in their original ranking, the new winner is above the old winner.
If set_preference = “weak-dominance”, a voter benefits only if in their original ranking, all new winners are weakly above all old winners and some new winner is strictly above some old winner.
If set_preference = “optimist”, a voter benefits only if in their original ranking, their favorite new winner is above their favorite old winner.
If set_preference = “pessimist”, a voter benefits only if in their original ranking, their least favorite new winner is above their least favorite old winner.
- Parameters:
prof – a Profile or ProfileWithTies object.
vm (VotingMethod) – A voting method to test.
verbose (bool, default=False) – If a violation is found, display the violation.
- Returns:
A List of tuples (old_ranking, new_ranking) where old_ranking is the original ranking and new_ranking is the ranking that the voter can change to in order to benefit.
Participation¶
- pref_voting.variable_voter_axioms.has_participation_violation(prof, vm, verbose=False, violation_type='Removal', coalition_size=1, uniform_coalition=True, set_preference='single-winner')[source]¶
If violation_type = “Removal”, returns True if removing some voter(s) from prof changes the vm winning set such that the (each) voter prefers the new winner(s) to the original winner(s), according to the set_preference relation.
If violation_type = “Addition”, returns True if adding some voter(s) from prof changes the vm winning set such that the (each) voter prefers the original winner(s) to the new winner(s), according to the set_preference relation.
If coalition_size > 1, checks for a violation involving a coalition of voters acting together.
If uniform_coalition = True, all voters in the coalition must have the same ranking.
If set_preference = “single-winner”, a voter prefers a set A of candidates to a set B of candidates if A and B are singletons and the voter ranks the candidate in A above the candidate in B.
If set_preference = “weak-dominance”, a voter prefers a set A to a set B if in their sincere ranking, all candidates in A are weakly above all candidates in B and some candidate in A is strictly above some candidate in B.
If set_preference = “optimist”, a voter prefers a set A to a set B if in their sincere ranking, their favorite from A is above their favorite from B.
If set_preference = “pessimist”, a voter prefers a set A to a set B if in their sincere ranking, their least favorite from A is above their least favorite from B.
- Parameters:
prof – a Profile or ProfileWithTies object.
vm (VotingMethod) – A voting method to test.
verbose (bool, default=False) – If a violation is found, display the violation.
violation_type – default is “Removal”
coalition_size – default is 1
uniform_coalition – default is True
set_preference – default is “single-winner”. Other options are “weak-dominance”, “optimist”, and “pessimist”.
- Returns:
Returns True if there is a violation and False otherwise.
- Return type:
Result of the test (bool)
- pref_voting.variable_voter_axioms.find_all_participation_violations(prof, vm, verbose=False, violation_type='Removal', coalition_size=1, uniform_coalition=True, set_preference='single-winner')[source]¶
Returns a list of tuples (preferred_winners, dispreferred_winners, ranking) witnessing violations of participation.
If violation_type = “Removal”, returns a list of tuples (preferred_winners, dispreferred_winners, ranking) such that removing coalition_size-many voters with the given ranking changes the winning set from the preferred_winners to the dispreferred_winners, according to the set_preference relation.
If violation_type = “Addition”, returns a list of tuples (preferred_winners, dispreferred_winners, ranking) such that adding coalition_size-many voters with the given ranking changes the winning set from the preferred_winners to the dispreferred_winners, according to the set_preference relation.
If coalition_size > 1, checks for a violation involving a coalition of voters acting together.
If uniform_coalition = True, all voters in the coalition must have the same ranking.
If set_preference = “single-winner”, a voter prefers a set A of candidates to a set B of candidates if A and B are singletons and the voter ranks the candidate in A above the candidate in B.
If set_preference = “weak-dominance”, a voter prefers a set A to a set B if in their sincere ranking, all candidates in A are weakly above all candidates in B and some candidate in A is strictly above some candidate in B.
If set_preference = “optimist”, a voter prefers a set A to a set B if in their sincere ranking, their favorite from A is above their favorite from B.
If set_preference = “pessimist”, a voter prefers a set A to a set B if in their sincere ranking, their least favorite from A is above their least favorite from B.
- Parameters:
prof – a Profile or ProfileWithTies object.
vm (VotingMethod) – A voting method to test.
verbose (bool, default=False) – If a violation is found, display the violation.
violation_type – default is “Removal”
coalition_size – default is 1
uniform_coalition – default is True
set_preference – default is “single-winner”. Other options are “weak-dominance”, “optimist”, and “pessimist”.
- Returns:
A List of tuples (preferred_winners, dispreferred_winners, ranking) witnessing violations of participation.