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.

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.