2
$\begingroup$

I want to map the various combinations to an unique index: For a given $n$ and $r$, we would have $\binom{n}{r}$ arrangement for values:$[0,\dots,n)$:

Ex: For n = 6, r = 3
[012,
013,
014,
015,
...,
345]
So, for any given arrangement [012] the index would 0 as its the very first element.
Similarly, the index for arrangement for [015] should be 3. Trying to come up a formula to determine the correct index for a given arrangement.

$\endgroup$
3
  • 2
  • 1
    $\begingroup$ @D.W. Now the question has become unanswerable. Why not convert your comment to an answer? $\endgroup$ – Yuval Filmus Feb 12 '16 at 18:49
  • $\begingroup$ @YuvalFilmus, I don't understand why the question has become unanswerable. I don't have time right now to write up a full answer, but anyone else who would like to is welcome to do so. $\endgroup$ – D.W. Feb 12 '16 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.