Variable Voter Axioms¶
Reinforcement¶
- pref_voting.variable_voter_axioms.has_reinforcement_violation(prof, vm, verbose=False)[source]¶
Returns True if there is a binary partition of the electorate such that (i) at least one candidate wins in both subelections and either (ii) some candidate who wins in both subelections does not win in the full election or (iii) some candidate who wins in the full election does not win both subelections.
- 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)
- pref_voting.variable_voter_axioms.find_all_reinforcement_violations(prof, vm, verbose=False)[source]¶
Returns all violations of reinforcement for a given profile and voting method.
- 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:
Two list of triples (cand,prof1,prof2) where prof1 and prof2 partition the electorate. In the first list, (cand,prof1,prof2) indicates that cand wins in both prof1 and prof2 but loses in prof. In the second list, (cand,prof1,prof2) indicates that cand wins in prof but not in both prof1 and prof2 (and there are candidates who win in both prof1 and prof2).
Positive Involvement¶
- pref_voting.variable_voter_axioms.has_positive_involvement_violation(prof, vm, verbose=False, violation_type='Removal', coalition_size=1, uniform_coalition=True, require_resoluteness=False, require_uniquely_weighted=False, check_probabilities=False)[source]¶
If violation_type = “Removal”, returns True if removing some voter (or voters if coalition_size > 1) who ranked a losing candidate A in first place causes A to win, witnessing a violation of positive involvement.
If uniform_coalition = True, then only coalitions of voters with the same ranking are considered.
If require_resoluteness = True, then only profiles with a unique winner are considered.
If require_uniquely_weighted = True, then only uniquely-weighted profiles are considered.
If check_probabilities = True, the function also checks whether removing the voters who ranked A in first-place causes A’s probability of winning to increase (in the case of a tie broken by even-chance tiebreaking).
- 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”
- 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_positive_involvement_violations(prof, vm, verbose=False, violation_type='Removal', coalition_size=1, uniform_coalition=True, require_resoluteness=False, require_uniquely_weighted=False, check_probabilities=False)[source]¶
If violation_type = “Removal”, returns a list of pairs (loser, rankings, counts) such that removing the indicated rankings with the indicated counts causes the loser to win, witnessing a violation of positive involvement.
If uniform_coalition = True, then only coalitions of voters with the same ranking are considered.
If require_resoluteness = True, then only profiles with a unique winner are considered.
If require_uniquely_weighted = True, then only uniquely-weighted profiles are considered.
If check_probabilities = True, the function also checks whether removing the voters who ranked A in first-place causes A’s probability of winning to increase (in the case of a tie broken by even-chance tiebreaking).
- 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”
- Returns:
A List of triples (loser,rankings,counts) witnessing violations of positive involvement.
Warning
This function is slow when uniform_coalition = False and the numbers of voters and candidates are too large.
Negative Involvement¶
- pref_voting.variable_voter_axioms.has_negative_involvement_violation(prof, vm, verbose=False, violation_type='Removal')[source]¶
If violation_type = “Removal”, returns True if removing some voter who ranked a winning candidate A in last place causes A to lose, witnessing a violation of negative involvement :param prof: a Profile or ProfileWithTies object. :param vm: A voting method to test. :type vm: VotingMethod :param verbose: If a violation is found, display the violation. :type verbose: bool, default=False :param violation_type: default is “Removal”
- 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_negative_involvement_violations(prof, vm, verbose=False, violation_type='Removal')[source]¶
If violation_type = “Removal”, returns a list of pairs (winner,ranking) such that removing a voter with the given ranking causes the winner to lose, witnessing a violation of negative involvement.
- 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”
- Returns:
A List of pairs (winner, ranking) witnessing violations of negative involvement.
Tolerant Positive Involvement¶
- pref_voting.variable_voter_axioms.has_tolerant_positive_involvement_violation(prof, vm, verbose=False, violation_type='Removal')[source]¶
If violation_type = “Removal”, returns True if it is possible to cause a loser A to win by removing some voter who ranked A above every candidate B such that A is not majority preferred to B, witnessing a violation of tolerant positive involvement.
- ..note:
A strengthening of positive involvement, introduced in https://arxiv.org/abs/2210.12503
- 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”
- 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_tolerant_positive_involvement_violations(prof, vm, verbose=False, violation_type='Removal')[source]¶
If violation_type = “Removal”, returns a list of pairs (loser,ranking) such that removing a voter with the given ranking causes the loser to win, witnessing a violation of tolerant positive involvement.
- 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”
- Returns:
A List of pairs (loser,ranking) witnessing violations of positive involvement.
Bullet-Vote Positive Involvement¶
- pref_voting.variable_voter_axioms.has_bullet_vote_positive_involvement_violation(prof, vm, verbose=False, coalition_size=1, require_resoluteness=False, require_uniquely_weighted=False, check_probabilities=False)[source]¶
Returns True if it is possible to cause a winner A to lose by adding coalition_size-many new voters who bullet vote for A.
If require_resoluteness = True, then only profiles with a unique winner are considered.
If require_uniquely_weighted = True, then only uniquely-weighted profiles are considered.
If check_probabilities = True, then the function also checks whether adding coalition_size-many new voters who bullet vote for A causes A’s probability of winning to decrease (in the case of a tie broken by even-chance tiebreaking).
- 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”
- 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_bullet_vote_positive_involvement_violations(prof, vm, verbose=False, coalition_size=1, require_resoluteness=False, require_uniquely_weighted=False, check_probabilities=False)[source]¶
Returns a list of candidates who win in the given profile but lose after adding coalition_size-many new voters who bullet vote for them.
If require_resoluteness = True, then only profiles with a unique winner are considered.
If require_uniquely_weighted = True, then only uniquely-weighted profiles are considered.
If check_probabilities = True, then the function also checks whether adding coalition_size-many new voters who bullet vote for A causes A’s probability of winning to decrease (in the case of a tie broken by even-chance tiebreaking).
- 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 candidates who win in the given profile but lose after adding coalition_size-many new voters who bullet vote for them.
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.
Single-Voter Resolvability¶
- pref_voting.variable_voter_axioms.has_single_voter_resolvability_violation(prof, vm, verbose=False)[source]¶
If prof is a Profile, returns True if there are multiple vm winners in prof and for one such winner A, there is no linear ballot that can be added to prof to make A the unique winner.
If prof is a ProfileWithTies, returns True if there are multiple vm winners in prof and for one such winner A, there is no Ranking (allowing ties) that can be added to prof to make A the unique 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)
- pref_voting.variable_voter_axioms.find_all_single_voter_resolvability_violations(prof, vm, verbose=False)[source]¶
If prof is a Profile, returns a list of candidates who win in prof but who cannot be made the unique winner by adding a linear ballot.
If prof is a ProfileWithTies, returns a list of candidates who win in prof but who cannot be made the unique winner by adding a Ranking (allowing ties).
- 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 candidates who win in the given profile but who cannot be made the unique winner by adding a ballot.