ToolJovia
Education

Combination and Ordered Selection Ranking

Rank or recover a combination or ordered selection by exact zero-based lexicographic index without enumerating all objects.

✓ Browser-local processing

Loading tool…

How to use Combination and Ordered Selection Ranking

The supplied universe defines the ordering. Binomial block sizes rank combinations; falling-factorial block sizes rank ordered selections without replacement. Unranking subtracts whole blocks until each selected position is located.

  1. Enter ordered universe json, selection length k, selection json (rank mode), zero-based integer rank (unrank mode).
  2. Choose the stated convention and check the units and supported model.
  3. Calculate, inspect the result, then copy or download it.

Good to know

  • 1–50 distinct universe labels;k is 0 through the universe size. Exact rank strings have at most 200 digits and must be less than the computed object count. A combination selection must already follow universe order; ordered selections preserve their entered order. No repeated labels, locale-based sorting, randomness or permutation of an unbounded list. Rank and unrank share one declared zero-based convention.
  • Local calculation only; no input persistence or external lookup. Text/JSON is limited to 30000 characters and output to 1000000 characters. Numeric model inputs and precision/work limits are stated on this page. Approximate JSON numbers retain full stored values; exact arithmetic outputs retain decimal or fraction strings. Unsupported states fail explicitly.

Common questions

What determines the lexicographic order?

The order of labels in your universe array does. No alphabetic or locale sorting is applied, so the same input order produces the same rank across browser languages.

Is the input uploaded or saved?

No. The tool calculates inside this browser tab and provides a local download; it does not persist your input.

Keep going with related tools

All education →