Characteristic function of a game.

1 | ```
characteristicfunction(n, game)
``` |

`n` |
Number of players |

`game` |
Matrix of two columns. The first column contains the coalitions. The second one, the values for each coalition. |

This function gives a matrix. The first *n* columns indicate a binary representation of the coalitions in a binary mode. The second one, the usual way. The last column gives the characteristic function.

1 2 3 4 5 6 7 8 9 10 11 | ```
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
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.