nucleoluspcvalue(c(1,5,10,6,11,15,16))
nucleoluspcvalue(c(0,0,0,30,30,80,100))
# Computing the per capita nucleolus of a random essential game:
n <- 10 # number of players in the game
v <- c(rep(0,n),runif(2^n-(n+1),min=10,max=20)) # random essential game
nucleoluspcvalue(v)
# What if the game is a cost game?
cost.v <- airfieldgame(c(1,5,10,15)) # cost game
-nucleoluspcvalue(-cost.v) # per capita nucleolus of the cost game
Run the code above in your browser using DataLab