Combinatorial Number System - Finding The k-combination For A Given Number

Finding The k-combination For A Given Number

The given formula allows finding the place in the lexicographic ordering of a given k-combination immediately. The reverse process of finding the k-combination at a given place N requires somewhat more work, but is straightforward nonetheless. By the definition of the lexicographic ordering, two k-combinations that differ in their largest element ck will be ordered according to the comparison of those largest elements, from which it follows that all combinations with a fixed value of their largest element are contiguous in the list. Moreover the smallest combination with ck as largest element is, and it has ci = i − 1 for all i < k (for this combination all terms in the expression except are zero). Therefore ck is the largest number such that . If k > 1 the remaining elements of the k-combination form the k − 1-combination corresponding to the number in the combinatorial number system of degree k − 1, and can therefore be found by continuing in the same way for and k − 1 instead of N and k.

Read more about this topic:  Combinatorial Number System

Famous quotes containing the words finding the, finding and/or number:

    What affects men sharply about a foreign nation is not so much finding or not finding familiar things; it is rather not finding them in the familiar place.
    Gilbert Keith Chesterton (1874–1936)

    Again, the kingdom of heaven is like a merchant in search of fine pearls; on finding one pearl of great value, he went and sold all that he had and bought it.
    Bible: New Testament, Matthew 13:45,46.

    A great number of the disappointments and mishaps of the troubled world are the direct result of literature and the allied arts. It is our belief that no human being who devotes his life and energy to the manufacture of fantasies can be anything but fundamentally inadequate
    Christopher Hampton (b. 1946)