Learn R Programming

TUvalues (version 0.1.0)

egalitarian: Egalitarian value

Description

Calculate the egalitarian value

Usage

egalitarian(characteristic_func, n_players = 0)

Value

The egalitarian value for each player

Arguments

characteristic_func

The valued function defined on the subsets of the number of players

n_players

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

Examples

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

Run the code above in your browser using DataLab