class svvamp.RuleBorda(**kwargs)[source]

Borda rule.

Options

>>> RuleBorda.print_options_parameters()
cm_option: ['fast', 'exact']. Default: 'fast'.
icm_option: ['fast']. Default: 'fast'.
iia_subset_maximum_size: is_number. Default: 2.
im_option: ['exact']. Default: 'exact'.
tm_option: ['exact']. Default: 'exact'.
um_option: ['exact']. Default: 'exact'.

Notes

Voter v gives (n_c - 1) points to her top-ranked candidate, (n_c - 2) to the second, …, 0 to the last. Ties are broken by natural order on the candidates (lower index wins).

  • is_cm_(): Deciding CM is NP-complete.

    • cm_option = 'fast': Zuckerman et al. (2009). This approximation algorithm is polynomial and has a window of error of 1 manipulator.

    • cm_option = 'exact': Non-polynomial algorithm from superclass Rule.

  • is_icm_(): Algorithm is polynomial and has a window of error of 1 manipulator.

  • is_im_(): Exact in polynomial time.

  • is_iia_(): Exact in polynomial time.

  • is_tm_(): Exact in polynomial time.

  • is_um_(): Exact in polynomial time.

References

‘Algorithms for the coalitional manipulation problem’, M. Zuckerman, A. Procaccia and J. Rosenschein, 2009.

‘Unweighted Coalitional Manipulation Under the Borda Rule is NP-Hard’, Nadja Betzler, Rolf Niedermeier and Gerhard Woeginger, 2011.

‘Complexity of and algorithms for the manipulation of Borda, Nanson’s and Baldwin’s voting rules’, Jessica Davies, George Katsirelos, Nina Narodytska, Toby Walsh and Lirong Xia, 2014.

Examples

>>> profile = Profile(preferences_ut=[
...     [ 0. , -0.5, -1. ],
...     [ 1. , -1. ,  0.5],
...     [ 0.5,  0.5, -0.5],
...     [ 0.5,  0. ,  1. ],
...     [-1. , -1. ,  1. ],
... ], preferences_rk=[
...     [0, 1, 2],
...     [0, 2, 1],
...     [1, 0, 2],
...     [2, 0, 1],
...     [2, 1, 0],
... ])
>>> rule = RuleBorda()(profile)
>>> rule.demo_results_(log_depth=0)  

************************
*                      *
*   Election Results   *
*                      *
************************

***************
*   Results   *
***************
profile_.preferences_ut (reminder) =
[[ 0.  -0.5 -1. ]
 [ 1.  -1.   0.5]
 [ 0.5  0.5 -0.5]
 [ 0.5  0.   1. ]
 [-1.  -1.   1. ]]
profile_.preferences_rk (reminder) =
[[0 1 2]
 [0 2 1]
 [1 0 2]
 [2 0 1]
 [2 1 0]]
ballots =
[[2 1 0]
 [2 0 1]
 [1 2 0]
 [1 0 2]
 [0 1 2]]
scores =
[6 4 5]
candidates_by_scores_best_to_worst
[0 2 1]
scores_best_to_worst
[6 5 4]
w = 0
score_w = 6
total_utility_w = 1.0

*********************************
*   Condorcet efficiency (rk)   *
*********************************
w (reminder) = 0

condorcet_winner_rk_ctb = 0
w_is_condorcet_winner_rk_ctb = True
w_is_not_condorcet_winner_rk_ctb = False
w_missed_condorcet_winner_rk_ctb = False

condorcet_winner_rk = 0
w_is_condorcet_winner_rk = True
w_is_not_condorcet_winner_rk = False
w_missed_condorcet_winner_rk = False

***************************************
*   Condorcet efficiency (relative)   *
***************************************
w (reminder) = 0

condorcet_winner_ut_rel_ctb = 0
w_is_condorcet_winner_ut_rel_ctb = True
w_is_not_condorcet_winner_ut_rel_ctb = False
w_missed_condorcet_winner_ut_rel_ctb = False

condorcet_winner_ut_rel = 0
w_is_condorcet_winner_ut_rel = True
w_is_not_condorcet_winner_ut_rel = False
w_missed_condorcet_winner_ut_rel = False

***************************************
*   Condorcet efficiency (absolute)   *
***************************************
w (reminder) = 0

condorcet_admissible_candidates =
[ True False False]
w_is_condorcet_admissible = True
w_is_not_condorcet_admissible = False
w_missed_condorcet_admissible = False

weak_condorcet_winners =
[ True False False]
w_is_weak_condorcet_winner = True
w_is_not_weak_condorcet_winner = False
w_missed_weak_condorcet_winner = False

condorcet_winner_ut_abs_ctb = 0
w_is_condorcet_winner_ut_abs_ctb = True
w_is_not_condorcet_winner_ut_abs_ctb = False
w_missed_condorcet_winner_ut_abs_ctb = False

condorcet_winner_ut_abs = 0
w_is_condorcet_winner_ut_abs = True
w_is_not_condorcet_winner_ut_abs = False
w_missed_condorcet_winner_ut_abs = False

resistant_condorcet_winner = nan
w_is_resistant_condorcet_winner = False
w_is_not_resistant_condorcet_winner = True
w_missed_resistant_condorcet_winner = False
>>> rule.demo_manipulation_(log_depth=0)  

*****************************
*                           *
*   Election Manipulation   *
*                           *
*****************************

*********************************************
*   Basic properties of the voting system   *
*********************************************
with_two_candidates_reduces_to_plurality =  True
is_based_on_rk =  True
is_based_on_ut_minus1_1 =  False
meets_iia =  False

****************************************************
*   Manipulation properties of the voting system   *
****************************************************
Condorcet_c_ut_rel_ctb (False)     ==>     Condorcet_c_ut_rel (False)
 ||                                                               ||
 ||     Condorcet_c_rk_ctb (False) ==> Condorcet_c_rk (False)     ||
 ||           ||               ||       ||             ||         ||
 V            V                ||       ||             V          V
Condorcet_c_ut_abs_ctb (False)     ==>     Condorcet_ut_abs_c (False)
 ||                            ||       ||                        ||
 ||                            V        V                         ||
 ||       maj_fav_c_rk_ctb (False) ==> maj_fav_c_rk (False)       ||
 ||           ||                                       ||         ||
 V            V                                        V          V
majority_favorite_c_ut_ctb (False) ==> majority_favorite_c_ut (False)
 ||                                                               ||
 V                                                                V
IgnMC_c_ctb (False)                ==>                IgnMC_c (False)
 ||                                                               ||
 V                                                                V
InfMC_c_ctb (True)                 ==>                InfMC_c (True)

*****************************************************
*   Independence of Irrelevant Alternatives (IIA)   *
*****************************************************
w (reminder) = 0
is_iia = True
log_iia: iia_subset_maximum_size = 2.0
example_winner_iia = nan
example_subset_iia = nan

**********************
*   c-Manipulators   *
**********************
w (reminder) = 0
preferences_ut (reminder) =
[[ 0.  -0.5 -1. ]
 [ 1.  -1.   0.5]
 [ 0.5  0.5 -0.5]
 [ 0.5  0.   1. ]
 [-1.  -1.   1. ]]
v_wants_to_help_c =
[[False False False]
 [False False False]
 [False False False]
 [False False  True]
 [False False  True]]

************************************
*   Individual Manipulation (IM)   *
************************************
is_im = False
log_im: im_option = exact
candidates_im =
[0. 0. 0.]

*********************************
*   Trivial Manipulation (TM)   *
*********************************
is_tm = False
log_tm: tm_option = exact
candidates_tm =
[0. 0. 0.]

********************************
*   Unison Manipulation (UM)   *
********************************
is_um = False
log_um: um_option = exact
candidates_um =
[0. 0. 0.]

*********************************************
*   Ignorant-Coalition Manipulation (ICM)   *
*********************************************
is_icm = False
log_icm: icm_option = fast
candidates_icm =
[0. 0. 0.]
necessary_coalition_size_icm =
[0. 7. 5.]
sufficient_coalition_size_icm =
[0. 7. 5.]

***********************************
*   Coalition Manipulation (CM)   *
***********************************
is_cm = False
log_cm: cm_option = fast, um_option = exact, tm_option = exact
candidates_cm =
[0. 0. 0.]
necessary_coalition_size_cm =
[0. 2. 3.]
sufficient_coalition_size_cm =
[0. 2. 3.]
property scores_

1d array of integers. scores[c] is the total Borda score for candidate c.

property w_

Integer (winning candidate).

Default behavior: the candidate with highest value in vector scores_ is declared the winner. In case of a tie, the tied candidate with lowest index wins.