| check_core | R Documentation |
Check whether an allocation belongs to the core of the game, that is,
whether it is efficient (the players share exactly v(N)) and
coalitionally rational (every coalition S receives at least
v(S)).
check_core(allocation, characteristic_func, details = FALSE)
allocation |
Numeric vector with the payoff of each player. Its length is the number of players of the game. |
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
|
details |
If |
All comparisons are exact: integer allocations are summed exactly in double
precision and any other allocation is handled with exact rational
arithmetic (package rcdd). Values are interpreted as the binary
numbers stored by R. The value of the empty coalition is taken as 0.
When characteristic_func is a function, there is no limit on the
number of players, but up to 2^n coalitions must be evaluated.
If details is FALSE, TRUE if the allocation
belongs to the core and FALSE otherwise. If details is
TRUE, a list with:
in_core |
Whether the allocation belongs to the core. |
efficient |
Whether the allocation is efficient. |
coalitionally_rational |
Whether every coalition receives at least its value. |
violations |
The rows of |
constraints |
A |
v <- c(0, 0, 0, 2, 2, 2, 3)
check_core(c(1, 1, 1), v)
check_core(c(0, 1, 2), v)
check_core(c(0, 1, 2), v, details = TRUE)
v <- function(coalition) length(coalition)^2
check_core(rep(4, 4), v)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.