Learn R Programming

TUGLab (version 0.0.1)

strategicallyequivalentcheck: Strategically equivalent check

Description

This function checks if two games are strategically equivalent.

Usage

strategicallyequivalentcheck(v, w, binary = FALSE, parameters = FALSE)

Value

TRUE if v and w are strategically equivalent, FALSE otherwise. If parameters=TRUE, whenever v and w are strategically equivalent, the function also returns k (a positive integer) and a (the characteristic function of an additive game, as a vector in binary order if binary=TRUE and in lexicographic order otherwise) such that \(\code{v} = \code{k} \code{w} + \code{a}\).

Arguments

v

A characteristic function, as a vector.

w

A characteristic function, as a vector.

binary

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

parameters

A logical value. By default, parameters=FALSE.

Details

Games \(v\in G^N\) and \(w\in G^N\) are strategically equivalent if there exist \(k>0\) and an additive game \(a\in G^N\) such that \(v(S)=k w(S)+a(S)\) for all \(S\in 2^N\).

See Also

additivegame, normalizedgame, zeronormalizedgame

Examples

Run this code
w <- c(1000, 0, 0, 2000, 3000, 2000, 4000)
v <- 4.5 * w + additivegame(c(4, 6, 1), binary = TRUE)
strategicallyequivalentcheck(v, w, binary = TRUE, parameters = TRUE)

Run the code above in your browser using DataLab