Weighted majority games II - Instructions
This application provides the Shapley power index and the Banzhaf power index
for whichever weighted majority game with a number of players within 2 and 50 players.
1- Inserting the number of players
Type the number of players in the textbox on the right of the following sentence:
For example for a 3 players game, type the number 3 as follows:
2- Inserting the weights
a)
Now you can type the value of the weight of each player:
For instance, if the weight of player 1 is 1, then type the value 1 in the textbox
as in the following picture:
Then press the button:
On the same button it will appear the a new sentence, as shown in following picture:
whereas in the dialogue frame will be displayed the related sentences:
b)
Type the weights of the other players repeating the instructions on point 2
until you have inserted al the weights.
3- Inserting the quota
In the textbox close to the following sentence:
type the quota for majority. A coalition, in order to win (i.e. the ch.f. gets value 1),
must own an overall weight (the sum of all he weights of the players inside the coalition)
strictly larger than the quota.
For example, if the quota for majority is 3, you must type the value 3 in the textbox
as follows:
4- Displaying the weighted majority game
After point 3, the whole quota and weights structure will be reported on the dialogue frame:
Now you can press the button
On the output frame will be shown the ch.f. of the related weighted majority game.
Moreover, the application will show on the output frame also
the number of winner coalitions which each player belongs to.
These information will appear on the output frame as in the following example:
where v(S), for each coalition S of players, is the value of the ch.f. of the game
(the symbol {} means empty set!).
5- Getting the Shapley power index
Press the button
and in the output frame will be displayed the n-components vector representing the Shapley
value associated to the game in the following format (with respect to the game of the previous example):
where Si, where i within 1 and number of players, represents the i-th component of the
Shapley value of the game.
6- Getting the Banzhaf power index
Press the button
and in the output frame will be displayed the n-components vector representing the Shapley
value associated to the game in the following format (with respect to the game of the previous example):
where Si, where i within 1 and number of players, represents the i-th component of the
Banzhaf value of the game.
7- Inserting a new game
Press the button
.
All the variables will be initialized and you will be allowed to insert the data structure
for a new game.
(BE CAREFUL! It is not possible to modify a data already inserted)
8- Deleting frames
In order to delete the frames, press the button
.
All the information displayed both on the dialogue and output frames will be erased.
(deleting frames you are not able to insert a new game: for a new game
you must follow point 7).