i need to make a barycentric plot including core vertices of the following TU cost game:








Can anyone provide me with a function or code which can do so?

BR Mads


1 Answer 1


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

Mma Package TuGames

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


From this vector one can define a TU game by

SavGame := DefineGame[T,svec];

After that you can compute the barycenter while calling


In the next step, we check first the existence of the core with


to get then the extreme points of the core while executing


Under Linux/MacOSX you can also invoke the Cddmathlink library by


There, you have also the possibility to plot the core by invoking


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


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.

  • $\begingroup$ Hi Holger, I'm not able to install your package successfully. I think it's because im on Windows. i get a window popup when trying to run Needs["TUG`"] after installing to "choose a Mathlink program to launch". I don't know how to get around this. $\endgroup$
    – MadsM
    May 15, 2020 at 12:05
  • $\begingroup$ Thank you for this information. In that case, you need to deactivate the Cddmathlink binaries in the file TuGames.wl. This file can be located by SystemOpen@Lookup[PacletObject["TUG"][All], "Location"] for Mma V12.1. Have a look for the phrase "If you plan to install these libraries somewhere else" at the README.md file of the project home at GitHub for more information how to do that. If you still have problems, send me an e-mail, and I will send you an adjusted file that overcome this issue. $\endgroup$ May 15, 2020 at 12:35
  • $\begingroup$ I supposed that this message is unproblematic of using the package, at least under Linux. Closing the popup window should be sufficient. Have you tried if the example given at GitHub works? $\endgroup$ May 15, 2020 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.