This function computes the nucleolus solution of a game with a maximum of 4 agents.
Usage
Nucleolus(x, type = "Gains")
Arguments
x
Object of class Game
type
Specify if the game refers to Gains or Cost
Details
The nucleolus looks for an individually rational distribution of the worth of the grand coalition in which the maximum dissatisfaction is minimized. The nucleolus selects the element in the core, if this is nonempty, that lexicographically minimizes the vector of non-increasing ordered excesses of coalitions. In order to compute this solution we consider a sequence of linear programs, which looks for an imputation that minimizes the maximum excess among all coalitions.
Value
The command returns a table with the following elements:
v(S)
Individual value of player i
x(S)
Nucleolus solution of the player i
Ei
Excess of the player i
Author(s)
Sebastian Cano-Berlanga <cano.berlanga@gmail.com>
References
Lemaire J (1991). "Cooperative game theory and its insurance applications." Astin Bulletin, 21(01), 17–40.
Schmeidler D (1969). "The Nucleolus of a characteristic function game." SIAM Journal of Applied Mathematics, 17, pp.1163–1170.
Examples
## EXAMPLE FROM LEMAIRE (1991)
# Begin defining the game
COALITIONS <- c(46125,17437.5,5812.5,69187.5,53812.5,30750,90000)
LEMAIRE<-DefineGame(3,COALITIONS)
# End defining the game
LEMAIRENUCLEOLUS<-Nucleolus(LEMAIRE)
summary(LEMAIRENUCLEOLUS) # Gains Game, the excess should be negative
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(GameTheory)
Loading required package: lpSolveAPI
Loading required package: combinat
Attaching package: 'combinat'
The following object is masked from 'package:utils':
combn
Loading required package: gtools
Loading required package: ineq
Loading required package: kappalab
Loading required package: lpSolve
Loading required package: quadprog
Loading required package: kernlab
Attaching package: 'kappalab'
The following object is masked from 'package:ineq':
entropy
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/GameTheory/Nucleolus.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Nucleolus
> ### Title: Nucleolus solution
> ### Aliases: Nucleolus
>
> ### ** Examples
>
>
> ## EXAMPLE FROM LEMAIRE (1991)
>
> # Begin defining the game
>
> COALITIONS <- c(46125,17437.5,5812.5,69187.5,53812.5,30750,90000)
> LEMAIRE<-DefineGame(3,COALITIONS)
>
> # End defining the game
>
> LEMAIRENUCLEOLUS<-Nucleolus(LEMAIRE)
Model name: Nucleolus of a gains game
C1 C2 C3 C4
Minimize 0 0 0 -1
R1 0 0 0 1 >= 0
R2 1 0 0 -1 >= 46125
R3 0 1 0 -1 >= 17437.5
R4 1 1 0 -1 >= 69187.5
R5 0 0 1 -1 >= 5812.5
R6 1 0 1 -1 >= 53812.5
R7 0 1 1 -1 >= 30750
R8 1 1 1 0 = 90000
Kind Std Std Std Std
Type Real Real Real Real
Upper Inf Inf Inf Inf
Lower 0 0 0 0
Model name: 'Nucleolus of a gains game ' - run #1
Objective: Minimize(R0)
SUBMITTED
Model size: 8 constraints, 4 variables, 19 non-zeros.
Sets: 0 GUB, 0 SOS.
Using DUAL simplex for phase 1 and PRIMAL simplex for phase 2.
The primal and dual simplex pricing strategy set to 'Devex'.
Found feasibility by dual simplex after 4 iter.
Optimal solution -6562.5 after 5 iter.
Excellent numeric accuracy ||*|| = 0
MEMO: lp_solve version 5.5.2.0 for 64 bit OS, with 64 bit LPSREAL variables.
In the total iteration count 5, 0 (0.0%) were bound flips.
There were 2 refactorizations, 0 triggered by time and 0 by density.
... on average 2.5 major pivots per refactorization.
The largest [LUSOL v2.2.1.0] fact(B) had 18 NZ entries, 1.0x largest basis.
The constraint matrix inf-norm is 1, with a dynamic range of 1.
Time to load data was 0.003 seconds, presolve used 0.000 seconds,
... 0.000 seconds in simplex solver, in total 0.003 seconds.
Using DUAL simplex for phase 1 and PRIMAL simplex for phase 2.
The primal and dual simplex pricing strategy set to 'Devex'.
Found feasibility by dual simplex after 3 iter.
Optimal solution -7031.25 after 4 iter.
Excellent numeric accuracy ||*|| = 0
MEMO: lp_solve version 5.5.2.0 for 64 bit OS, with 64 bit LPSREAL variables.
In the total iteration count 4, 0 (0.0%) were bound flips.
There were 3 refactorizations, 0 triggered by time and 0 by density.
... on average 1.3 major pivots per refactorization.
The largest [LUSOL v2.2.1.0] fact(B) had 17 NZ entries, 1.0x largest basis.
The constraint matrix inf-norm is 1, with a dynamic range of 1.
Time to load data was 0.003 seconds, presolve used 0.000 seconds,
... 0.000 seconds in simplex solver, in total 0.003 seconds.
Using DUAL simplex for phase 1 and PRIMAL simplex for phase 2.
The primal and dual simplex pricing strategy set to 'Devex'.
Found feasibility by dual simplex after 3 iter.
Optimal solution -7031.25 after 4 iter.
Excellent numeric accuracy ||*|| = 0
MEMO: lp_solve version 5.5.2.0 for 64 bit OS, with 64 bit LPSREAL variables.
In the total iteration count 4, 0 (0.0%) were bound flips.
There were 3 refactorizations, 0 triggered by time and 0 by density.
... on average 1.3 major pivots per refactorization.
The largest [LUSOL v2.2.1.0] fact(B) had 16 NZ entries, 1.0x largest basis.
The constraint matrix inf-norm is 1, with a dynamic range of 1.
Time to load data was 0.004 seconds, presolve used 0.000 seconds,
... 0.000 seconds in simplex solver, in total 0.004 seconds.
> summary(LEMAIRENUCLEOLUS) # Gains Game, the excess should be negative
Nucleolus of a Gains Game for the given coalitions
v(S) x(S) Ei
1 46125.0 52687.50 -6562.50
2 17437.5 24468.75 -7031.25
3 5812.5 12843.75 -7031.25
>
>
>
>
>
>
>
> dev.off()
null device
1
>