equal_surplus_division: Equal Surplus Division value

View source: R/equal_surplus_division.R

equal_surplus_divisionR Documentation

Equal Surplus Division value

Description

Calculate the equal surplus division value

Usage

equal_surplus_division(characteristic_func, n_players = 0)

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.

Value

The equal surplus division value for each player

Examples

n <- 10
v <- function(coalition) {
  if (length(coalition) > n/2) {
    return(1)
  } else {
    return(0)
  }
}
equal_surplus_division(v,n)

v <- c(1,1,2,1,2,2,2)
equal_surplus_division(v)


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