codelex2bin {TUGLab} | R Documentation |
Lexicographic order position to binary order position
Description
Given the lexicographic order position of a coalition, this function returns the corresponding binary order position.
Usage
codelex2bin(n, Nlex)
Arguments
n |
Number of players. |
Nlex |
A lexicographic order position, as an integer between 1 and |
Details
Lexicographic order arranges coalitions in ascending order according to size, and applies lexicographic order to break ties among coalitions of the same size. The binary order position of a coalition S\in 2^N
is given by \sum_{i\in S} 2^{i-1}
.
Value
The corresponding binary order position, as an integer between 1 and 2^{\code{n}}-1
.
See Also
Examples
codelex2bin(5, 4)
[Package TUGLab version 0.0.1 Index]