codebin2lex {TUGLab}R Documentation

Binary order position to lexicographic order position

Description

Given the binary order position of a coalition, this function returns the corresponding lexicographic order position.

Usage

codebin2lex(n, Nbin)

Arguments

n

Number of players, as an integer.

Nbin

A binary order position, as an integer between 1 and 2^{\code{n}}-1.

Details

The binary order position of a coalition S\in 2^N is given by \sum_{i\in S} 2^{i-1}. Lexicographic order arranges coalitions in ascending order according to size, and applies lexicographic order to break ties among coalitions of the same size.

Value

The corresponding lexicographic order position, as an integer between 1 and 2^{\code{n}}-1.

See Also

bin2lex, codelex2bin, lex2bin

Examples

codebin2lex(5, 4)

[Package TUGLab version 0.0.1 Index]