Learn R Programming

TUGLab (version 0.0.1)

unanimitygame: Unanimity game

Description

This function returns the characteristic function of the unanimity game of a coalition.

Usage

unanimitygame(n, S, binary = FALSE)

Value

The characteristic function of the unanimity game of coalition S, as a vector in binary order if binary=TRUE and in lexicographic order otherwise.

Arguments

n

Number of players, as an integer.

S

The position of a coalition, as an integer.

binary

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

Details

The characteristic function of the unanimity game of a coalition \(S\in 2^N\) is defined, for each \(R\in 2^N\), as \(u_S(R)=1\) if \(S\subset R\) and \(u_S(R)=0\) otherwise.

Examples

Run this code
unanimitygame(n=4,S=7)

Run the code above in your browser using DataLab