Learn R Programming

TUGLab (version 0.0.1)

plotcoreset: Plot core set

Description

Given a game with two, three or four players, this function plots its core set and set of imputations.

Usage

plotcoreset(
  v,
  binary = FALSE,
  imputations = TRUE,
  projected = FALSE,
  solutions = NULL,
  allocations = NULL,
  color = "blue"
)

Value

A core set plot with the specified features.

Arguments

v

A characteristic function, as a vector. The game represented by v is assumed to be a profit game (i.e., a game in which a greater allocation is a more desirable allocation), not a cost game (i.e., a game in which a smaller allocation is a more desirable allocation).

binary

A logical value. By default, binary=FALSE. Should be set to TRUE if v is introduced in binary order instead of lexicographic order.

imputations

A logical value. By default, imputations=TRUE. When set to imputations=FALSE, the set of imputations is not drawn.

projected

A logical value. By default, projected=FALSE. When set to projected=TRUE, for games with three or four players the function draws a projection of the core set (and a projection of the set of imputations, as long as imputations=TRUE) instead of a full-dimensional representation.

solutions

Optional. A character vector containing a solution or a series of solutions to be added to the plot. Valid solutions: "corecenter", "nucleolus", "nucleoluspc", "shapleyvalue", "tauvalue".

allocations

Optional. A matrix containing an allocation or a series of allocations to be added to the plot. The matrix should have as many columns as players in v and as many rows as allocations are introduced, so that each row contains an allocation.

color

The color in which the core set is to be drawn. By default, color="blue".

Details

The core of a game \(v\in G^N\) is the set of all its stable imputations: $$C(v)=\{x\in\mathbb{R}^n : x(N)=v(N), x(S)\ge v(S)\ \forall S \in 2^N\},$$ where \(x(S)=\sum_{i\in S} x_i\).

See Also

plotcoresets

Examples

Run this code
v1 <- claimsgame(E=8,d=c(3,5,6))
plotcoreset(v1,solutions=c("nucleolus","shapleyvalue"))

v2 <- c(0,0,0,0,0,0,0,0,1,4,1,3,6,8,10)
plotcoreset(v2,solutions=c("corecenter","nucleoluspc"))

Run the code above in your browser using DataLab