Learn R Programming

TUGLab (version 0.0.1)

essentialcheck: Essential check

Description

This function checks if the given game is essential.

Usage

essentialcheck(v, binary = FALSE)

Value

TRUE if the game is essential, FALSE otherwise.

Arguments

v

A characteristic function, as a vector.

binary

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

Details

A game \(v\in G^N\) is essential if its set of imputations is non-empty, that is, if \(v(N)\ge \sum_{i \in N} v(i)\).

See Also

degeneratecheck

Examples

Run this code
v <- c(0, 0, 0, 2, 3, 4, 1)
essentialcheck(v, binary = TRUE)
essentialcheck(v, binary = FALSE)

# What if the game is a cost game?
cost.v <- c(2,2,2,3,4,4,5) # essential cost game
essentialcheck(-cost.v)

Run the code above in your browser using DataLab