bin2lex {TUGLab}R Documentation

Binary order to lexicographic order

Description

Given a characteristic function in binary order, this function returns the characteristic function in lexicographic order.

Usage

bin2lex(v)

Arguments

v

A characteristic function, as a vector in binary order.

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 characteristic function, as a vector in lexicographic order.

See Also

codebin2lex, codelex2bin, lex2bin

Examples

v <- seq(1:31)
bin2lex(v)
lex2bin(bin2lex(v))==v

[Package TUGLab version 0.0.1 Index]