communication_game: Communication game

View source: R/communication_game.R

communication_gameR Documentation

Communication game

Description

Build the communication (graph-restricted) game of a communication situation, in which only connected players can cooperate (Myerson, 1977).

Usage

communication_game(characteristic_func, graph_edges, n_players = 0)

Arguments

characteristic_func

The characteristic function of the game. It can be a numeric vector with the value of every coalition, in the order given by coalitions: of length 2^n - 1, without the empty coalition (whose value is taken as 0), or of length 2^n, with the empty coalition first. Vectors support up to 30 players. It can also be a function that receives a coalition (a vector of players) and returns its value; in that case there is no limit on the number of players.

graph_edges

Edges of the communication graph of the game: a list of pairs of players (for example list(c(1, 2), c(2, 3))), or a two-column matrix or data frame. Each edge must join two different players.

n_players

Only used if characteristic_func is a function. The number of players in the game.

Details

The worth of a coalition S in the communication game is the sum of the worths of the connected components of the subgraph induced by S:

v^G(S) = \sum_{C \in C^G(S)} v(C).

The Myerson value is the Shapley value of this game, so shapley(communication_game(v, graph_edges)) equals myerson(v, graph_edges).

The value of the empty coalition is taken as 0.

Value

If characteristic_func is a vector, a vector with the value of every nonempty coalition of the communication game, in the order given by coalitions. If characteristic_func is a function, a function that receives a coalition (a vector of players) and returns its value in the communication game. It evaluates characteristic_func only on the connected components of the coalitions it receives, so there is no limit on the number of players, and it can be passed directly to the other functions of the package.

References

Myerson, R. B. (1977). Graphs and Cooperation in Games. Mathematics of Operations Research, 2(3), 225–229. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1287/moor.2.3.225")}

See Also

myerson, myerson_unions

Examples

v <- c(1, 2, 3, 10, 20, 30, 100)
communication_game(v, graph_edges = list(c(1, 3)))

v <- function(coalition) length(coalition)^2
graph_edges <- list(c(1, 2), c(2, 3))
vG <- communication_game(v, graph_edges, n_players = 4)
vG(c(1, 2, 4))
shapley(vG, n_players = 4)
myerson(v, graph_edges, n_players = 4)


TUvalues documentation built on Nov. 8, 2026, 1:19 a.m.