| centroid | R Documentation |
Calculate the centroid of the core of the game if it exists.
centroid(
characteristic_func,
n_players = 0,
method = "exact",
n_rep = 500,
echo = TRUE,
arithmetic = c("double", "rational"),
tol = 1e-10
)
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
|
n_players |
Only used if |
method |
Method used to calculate the core. Valid methods are:
|
n_rep |
Only used if |
echo |
Only used if |
arithmetic |
Only used if |
tol |
Only used if |
The centroid of the core if it exists.
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.
v <- c(2,3,5,5,7,8,10)
centroid(v, method = "exact")
centroid(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)
}
}
centroid(v, n, method = "exact")
centroid(v, n, method = "appro", n_rep = 200)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.