coreVertex: Vertices of the core of the game

View source: R/coreVertex.R

coreVertexR Documentation

Vertices of the core of the game

Description

Calculate the vertices of the core of the game if it exists.

Usage

coreVertex(
  characteristic_func,
  n_players = 0,
  method = "exact",
  n_rep = 500,
  echo = TRUE,
  arithmetic = c("double", "rational"),
  tol = 1e-10
)

Arguments

characteristic_func

The characteristic function of the game. It can be a numeric vector with the value of every coalition, in the order given by coalitions: of length 2^n - 1, without the empty coalition (whose value is taken as 0), or of length 2^n, with the empty coalition first. Vectors support up to 30 players. It can also be a function that receives a coalition (a vector of players) and returns its value; in that case there is no limit on the number of players.

n_players

Only used if characteristic_func is a function. The number of players in the game.

method

Method used to calculate the core. Valid methods are: exact for the exact calculation or appro for approximated core based on Camacho et al. (2025).

n_rep

Only used if method is appro. The number of iterations to perform in the approximated calculation.

echo

Only used if method is appro. Show progress of the approximated calculation.

arithmetic

Only used if method is exact. Arithmetic used in the vertex enumeration: "double" (floating point) or "rational" (exact rational arithmetic).

tol

Only used if method is exact. Positive tolerance used in floating point comparisons.

Value

The vertices of the core if it exists.

References

Camacho, J., Gonçalves-Dosantos, J. C., & Sánchez-Soriano, J. (2025). A Linear Programming Approach to Estimate the Core in Cooperative Games. arXiv preprint arXiv:2510.01766.

Examples

v <- c(2,3,5,5,7,8,10)
coreVertex(v, method = "exact")
coreVertex(v, method = "appro", n_rep = 100)

n <- 3
v <- function(coalition) {
 size <- length(coalition)
 if (size <= 1) {
   return(0)
 } else if (size == 2) {
   return(10)
 } else if (size == 3) {
   return(24)
 } else {
   return(0)
 }
}
coreVertex(v, n, method = "exact")
coreVertex(v, n, method = "appro", n_rep = 200)


TUvalues documentation built on Nov. 8, 2026, 1:19 a.m.