characteristicfunction(3,game=cbind(c(1,2,3,12,13,23,123),c(1,1,1,1,2,1,2)))
# 1 2 3 Coalition Cost
# 0 0 0 0 0
# 1 0 0 1 1
# 0 1 0 2 1
# 0 0 1 3 1
# 1 1 0 12 1
# 1 0 1 13 2
# 0 1 1 23 1
# 1 1 1 123 2
Run the code above in your browser using DataLab