subgame {TUGLab} | R Documentation |
Subgame of a coalition
Description
Given a game and a coalition, this function returns the characteristic function of the subgame of the given coalition.
Usage
subgame(v, S, binary = FALSE)
Arguments
v |
A characteristic function, as a vector. |
S |
The position of a coalition, as an integer. |
binary |
A logical value. By default, |
Details
Given v\in G^N
, the subgame of coalition S \in 2^{N}
is defined by
v_S(T)=v(T)
for all T\in 2^S
.
Value
The characteristic function of the subgame of the given coalition, as a vector in binary order if binary=TRUE
and in lexicographic order otherwise.
Examples
v <- c(0, 0, 0, 0, 2, 3, 4, 5, 6, 9, 1, 15, 20, 30, 100)
S <- 13
subgame(v, S)
n <- 4
for (i in 1 : (2^n-1)) {
cat("[", i, "]", paste(subgame(v,i)), "\n")
}
subgame(v,15)==v
[Package TUGLab version 0.0.1 Index]