Last data update: 2014.03.03

R: Per Capita Nucleolus
NucleolusCapitaR Documentation

Per Capita Nucleolus

Description

This function computes the per capita nucleolus solution of a gains game with a maximum of 4 agents.

Usage

NucleolusCapita(x, type = "Gains")

Arguments

x

Object of class Game

type

Specify if the game refers to Gains or Cost

Details

The per capita nucleolus represents a measure of dissatisfaction per capita of such a coalition. It is also an individually rational distribution of the worth of the grand coalition in which the maximum per capita dissatisfaction is minimized. Formally, is defined like the nucleolus but taking into the account the per capita excess.

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

	
## DATA 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<-NucleolusCapita(LEMAIRE)
summary(LEMAIRENUCLEOLUS) 

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/NucleolusCapita.Rd_%03d_medium.png", width=480, height=480)
> ### Name: NucleolusCapita
> ### Title: Per Capita Nucleolus
> ### Aliases: NucleolusCapita
> 
> ### ** Examples
> 
> 	
> ## DATA 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<-NucleolusCapita(LEMAIRE)
     Var1 Var2 Var3
[1,]    1    0    0
[2,]    0    1    0
[3,]    2    2    0
[4,]    0    0    1
[5,]    2    0    2
[6,]    0    2    2
[7,]    1    1    1
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           2     2     0    -1  >=  69187.5
R5           0     0     1    -1  >=   5812.5
R6           2     0     2    -1  >=  53812.5
R7           0     2     2    -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 
            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           2     2     0    -1  >=  69187.5
R5           0     0     1    -1  >=   5812.5
R6           2     0     2    -1  >=  53812.5
R7           0     2     2    -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             5 iter.
 
Optimal solution               -6875 after          6 iter.

Excellent numeric accuracy ||*|| = 1.45519e-11

 MEMO: lp_solve version 5.5.2.0 for 64 bit OS, with 64 bit LPSREAL variables.
      In the total iteration count 6, 0 (0.0%) were bound flips.
      There were 2 refactorizations, 0 triggered by time and 0 by density.
       ... on average 3.0 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 2, with a dynamic range of 2.
      Time to load data was 0.003 seconds, presolve used 0.000 seconds,
       ... 0.000 seconds in simplex solver, in total 0.003 seconds.
Model name: Nucleolus of a gains game 
            C1    C2    C3    C4             
Minimize     0     0     0    -1             
R1           0     0     0     0  >=        0
R2           1     0     0     0   =    53000
R3           0     1     0    -1  >=  17437.5
R4           2     2     0    -1  >=  69187.5
R5           0     0     1    -1  >=   5812.5
R6           2     0     2    -1  >=  53812.5
R7           0     2     2     0  >=    23875
R8           0     1     1     0   =    37000
Kind       Std   Std   Std   Std             
Type      Real  Real  Real  Real             
Upper      Inf   Inf   Inf   Inf             
Lower        0     0     0     0             
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               -6875 after          4 iter.

Excellent numeric accuracy ||*|| = 7.27596e-12

 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 2, with a dynamic range of 2.
      Time to load data was 0.006 seconds, presolve used 0.000 seconds,
       ... 0.000 seconds in simplex solver, in total 0.006 seconds.
Model name: Nucleolus of a gains game 
            C1    C2    C3    C4             
Minimize     0     0     0    -1             
R1           0     0     0     0  >=        0
R2           1     0     0     0   =    53000
R3           0     1     0     0   =  24312.5
R4           2     2     0    -1  >=  69187.5
R5           0     0     1    -1  >=   5812.5
R6           2     0     2     0  >=  46937.5
R7           0     2     2     0  >=    23875
R8           0     0     1     0   =  12687.5
Kind       Std   Std   Std   Std             
Type      Real  Real  Real  Real             
Upper      Inf   Inf   Inf   Inf             
Lower        0     0     0     0             
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               -6875 after          4 iter.

Excellent numeric accuracy ||*|| = 7.27596e-12

 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 2, with a dynamic range of 2.
      Time to load data was 0.006 seconds, presolve used 0.001 seconds,
       ... 0.000 seconds in simplex solver, in total 0.007 seconds.
> summary(LEMAIRENUCLEOLUS) 

Nucleolus of a Gains Game for the given coalitions 

     v(S)    x(S)    Ei
1 46125.0 53000.0 -6875
2 17437.5 24312.5 -6875
3  5812.5 12687.5 -6875
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>