Learn R Programming

TUGLab (version 0.0.1)

harsanyidividend: Harsanyi dividend

Description

This function computes the Harsanyi dividend of the given coalition in the given game.

Usage

harsanyidividend(v, S, binary = FALSE)

Value

The Harsanyi dividend of the coalition that occupies the given position in the given order.

Arguments

v

A characteristic function, as a vector.

S

The position of a coalition, as an integer.

binary

A logical value. By default, binary=FALSE. Should be set to TRUE if v and S are introduced according to binary order instead of lexicographic order.

Details

The Harsanyi dividends of \(v\in G^N\) are the coordinates of the game in the base of unanimity games. They are defined, for all \(S\in 2^N\), by $$c_S=\sum_{S'\subset S}(-1)^{|S|-|S'|}v(S')$$.

References

Hammer, P.J., Peled, U.N., & Sorensen, S. (1977). Pseudo-boolean function and game theory I. Core elements and Shapley value. Cahiers du Centre d'Etudes de Recherche Opérationnelle, 19, 156-176.

See Also

unanimitygame

Examples

Run this code
n <- 3
v <- c(1, 5, 10, 7, 11, 15, 16) # introduced in lexicographic order

coalitionsvector<-character()
dividendsvector<-numeric()

for (i in 1:(2^n-1)){
  coalitionsvector <- c(coalitionsvector,
                        paste(getcoalition(i)[getcoalition(i) != 0],collapse = " "))
  dividendsvector <- c(dividendsvector,
                       harsanyidividend(v, codelex2bin(n,i), binary = FALSE))
}

data.frame(Coalition = coalitionsvector, Dividend = dividendsvector)
data.frame(Coalition = bin2lex(coalitionsvector), Dividend = bin2lex(dividendsvector))

Run the code above in your browser using DataLab