i need to make a barycentric plot including core vertices of the following TU cost game:
c(1)<=150
c(2)<=100
c(3)<=100
c(1,2)<=200
c(1,3)<=200
c(2,3)<=200
c(1,2,3)<=200
Can anyone provide me with a function or code which can do so?
BR Mads
To compute the barycenter of the extreme points of the core, I recommend to apply my Mathematica Package TuGames that can be downloaded from the following URL
To install the package for Mma Version 11.3 or later just execute in a notebook
ResourceFunction["GitHubInstall"]["himeinhardt", "TuGames"]
otherwise you need to follow one of the alternative custom installation procedure.
Note that the package cannot handle cost games directly, you have to transcribe it into a cost-savings game. This can be accomplished for the above example by
T=Range[3];
svec=CostSaving[{0,150,100,100,200,200,200,200},T]
From this vector one can define a TU game by
SavGame := DefineGame[T,svec];
After that you can compute the barycenter while calling
bc=BaryCenter[SavGame]
In the next step, we check first the existence of the core with
CoreQ[SavGame]
to get then the extreme points of the core while executing
crv=VerticesCore[SavGame]
Under Linux/MacOSX you can also invoke the Cddmathlink library by
crv2=CddVerticesCore[SavGame]
There, you have also the possibility to plot the core by invoking
FilledCoreV6[SavGame]
Windows users need to compile the Cddmathlink by themselves for plotting the core. Moreover, plotting the barycenter directly is at the moment not possible for three person games. For four person it is, see the documentation of TuGames for more information. However, one can project the point to the two-dimensional simplex with
bcprj2=Vec3DToSimplex[bc]
To finally combine the core plot with that of the barycenter. See the Mma documentation for more information of plotting a point and how to combine graphics. Alternatively, contact me by e-mail for getting a core plot with that of the barycenter.