powered by
Given a combination x, computes its position out of all lexicographically-ordered (n choose 2) combinations.
x
n
2
sub_to_nat(x, n)
matrix whose columns represent k-combinations.
k
numerator of the binomial coefficient
integer vector of the positions of the given combinations.
The mapping is done via an lexicographically-ordered combinadic mapping.
McCaffrey, J. D. "Generating the mth lexicographical element of a mathematical combination." MSDN Library (2004).