Computer Algorithms for Voting Power Analysis

(Go straight to programs list.)

These pages provide access to computer software for voting power analysis that you can run over the internet from your web browser. (We are still working on them and improvements occur from time to time. We would welcome your feedback.)

The programs calculate voting power indices for weighted voting bodies in which the members or parties possess different numbers of votes and decisions are taken by qualified majority voting. In such a system of qualified majority voting a decision is taken when the total number of votes cast in favour of a particular action equals or exceeds the quota. Many real world organisations use such systems for example the IMF, World Bank, EU Council, the US presidential electoral college, corporations and political parties. There are therefore many important applications for which this web page may be a useful analytical resource.

In a weighted voting body a member's power is not related to its weight in a simple way. Certainly it is not generally true that a member's power is represented by its weight: "weighted voting doesn't work" in the words of a well known journal article on the topic (Banzhaf 1965; see the bibliography for references.). In fact a member's power is a property of the whole voting body and depends on all other members' weights and the decision rule, and hence in order to analyse a member's power it is necessary to investigate all the possible outcomes of votes that could occur. It can only be found with a lot of computational effort. The computer programs that can be run from this web page enable this to be done easily.  Various algorithms are provided to deal with different aspects.

References: The best authority on voting power indices is the book by Dan Felsenthal and Moshé Machover, The Measurement of Voting Power, Edward Elgar, 1998. An overview of the topic of computing power indices and a description of the algorithms used here is given in the paper "Computation of Power Indices", Warwick Economic Research Papers number 644, July 2002, by Dennis Leech. (Click here for a pdf version.)

There are a number of good web pages on voting power analysis: click here for links.

The algorithms here compute the so called "classical" power indices of Shapley and Shubik and Banzhaf based on different coalition models. We also provide the indices - closely  related to the Banzhaf index - due to Penrose (also known as the absolute Banzhaf index) and Coleman (the power to initiate action and the power to prevent action which are useful when the quota exceeds half the total weight; see Coleman (1971)).  Other power indices have been defined and used but they are outside the scope of this web page and are not calculated currently.

The programs are in two groups. It is assumed that not all who want to do voting power analysis will necessarily wish to use both types of indices. The Banzhaf, Penrose and Coleman indices are computed by programs whose names begin with ip (from I-power: power as influence), and the Shapley-Shubik indices are computed by programs beginning with ss.

The programs described below are currently available to run from these pages. Others will be added later. To access the page for the program you want to use, click on its name.
 

Program Name Description
 (References are to items in the bibliography.)
ipdirect Computes the Banzhaf, Penrose and Coleman indices using the basic definitions (the method of direct enumeration). This is the most direct algorithm. However it is only feasible for voting bodies with small numbers of members: in practice no more than 25 or so in this implementation. [This program was formerly called ipexact but since it is not the only method that produces exact results, it has been renamed.]
ipgenf Computes the Banzhaf, Penrose and Coleman indices by the method of generating functions. Very fast algorithm that can be applied to voting bodies with any number of  members but the the total number of votes it can handle is limited by the storage requirements. Requires quota and weights to be integers. The implementation here is limited to voting bodies with a maximum of 200 members. This is the best option for most applications.
ipmmle

Computes the Banzhaf, Penrose and Coleman indices by Leech's  modification of Owen's mutilinear approximation method . This algorithm can handle bodies that are large both in terms of number of members and number of votes, with good approximation, for which the other, exact methods are not suitable.
ipnice Computes the Banzhaf, Penrose and Coleman indices for the member countries of the EU exactly using the triple-majority decision rule of the EU Council of Ministers under Treaty of Nice.
ssdirect
Computes the Shapley-Shubik Indices using the basic definition (the method of direct enumeration). This algorithm is only feasible for small numbers of players: in practice no more than 25 or so in this implementation.
ssgenf Computes the Shapley-Shubik indices using the original generating functions method due to Cantor, Mann and Shapley. Very fast algorithm that can be applied for voting bodies with any number of  members but the the total number of votes it can handle is limited by the storage requirements. Requires quota and weights to be integers. This implementation, based on Lambert (1988), limits the number of members to 100.

This program computes the Shapley-Shubik indices for a large voting body using Leech's modification of Owen's mutilinear approximation method. This algorithm can handle bodies that are large both in terms of number of members and number of votes, with good approximation, for which the other, exact methods are not available.

Computes the Shapley-Shubik indices for an "oceanic" game in which there are a finite number of "atomic" players with finite weights and an "ocean" of "non-atomic" players with infinitesimally small weights. [Note: "oceanic" ip indices can be computed using ipdirect after adjusting the quota by half the total weight of the "ocean".]

Dennis Leech
University of Warwick
Personal home page
Robert Leech
Imperial College London
Personal home page

Click below to e-mail any comments
e-mail