Learn R Programming

TUGLab (version 0.0.1)

additivecheck: Additive check

Description

This function checks if the given game is additive.

Usage

additivecheck(v, binary = FALSE, instance = FALSE)

Value

TRUE if the game defined by v is additive, FALSE otherwise. If instance=TRUE and the game is not additive, the position (binary order position if binary=TRUE; lexicographic order position otherwise) of a coalition for which additivity is violated is also returned.

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.

instance

A logical value. By default, instance=FALSE.

Details

A game \(v\in G^N\) is additive if \(v(S)=\sum_{i\in S}v(i)\) for all \(S\in 2^N\).

See Also

additivegame, superadditivecheck

Examples

Run this code
v <- c(1, 5, 40, 100, 6, 41, 101, 45, 105, 140, 46, 106, 141, 145, 146)
additivecheck(v)
additivecheck(v, binary = TRUE, instance = TRUE)

Run the code above in your browser using DataLab