Learn R Programming

CoopGame (version 0.2.2)

costSharingGameVector: Compute game vector for a cost sharing game

Description

Coalition vector for a cost sharing game: For further information see costSharingGame

Usage

costSharingGameVector(n, Costs)

Arguments

n

represents the number of players

Costs

A vector containing the costs each coalition has to pay

Value

Game vector with cost-savings of each coalition S as compared to singleton coalitions.

References

Peleg B. and Sudhoelter P. (2007) Theory of cooperative games, 2nd Edition, Springer, pp. 14--16

Maschler M., Solan E. and Zamir S. (2013) Game Theory, Cambridge University Press, pp. 667--668

Examples

Run this code
# NOT RUN {
library(CoopGame)
costSharingGameVector(n=3, Costs=c(2,2,2,3,3,3,4))

# }
# NOT RUN {
#Example with 3 students sharing an appartment:
#-------------------------------
#| costs     |  A  |  B  |  C  |
#- -----------------------------
#|single     | 300 | 270 | 280 |
#|appartment |     |     |     |
#-------------------------------
#
#Appartment for 2 persons => costs: 410
#Appartment for 3 persons => costs: 550

#Savings for all combinations sharing appartments
library(CoopGame)
(v=costSharingGameVector(n=3, Costs=c(300,270,280,410,410,410,550)))
#Output: 
#[1]   0   0   0 160 170 140 300
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab