- #1

raminee

- 12

- 2

- TL;DR Summary
- How to come up with an index for a set of number selections in combination theory

Hello All,

Not sure if this belongs in general math but lets start here and see where it takes us.

In mathematics, a combination is

As an example , say we have digits 1 to 10. And we want to select 3 digits. A digit can not be repeated.

Combination theory tells us that there would be M! / ( (M-N)! * N! ). [ (!) means factorial]

So in this example we would get 10! / ( (10-3)! * 3! ) = 120 combinations of 3 different digit numbers.

Lets take the combination as an index indication of the 3 digits produced.

So if we have 120 possibilities then one could say :

digits 1,2,3 ==> index 1

digits 1,2,4 ==> index 2

digits 1,2,5 ==> index 3

---

----

digits 8,9,10 ==> index 120

My question or challenge is 2 folds:

A) Given 3 numbers how can one map it to one of the indices 1 to 120 ??

B) If an index is given how to recover the 3 digits mapped to this index ?

i.e. reverse of (A)

So to be clear I am looking for an algorithm that would define the process in A and B.

Thx

R.

Not sure if this belongs in general math but lets start here and see where it takes us.

In mathematics, a combination is

**a way of selecting items from a collection where the order of selection does not matter**.As an example , say we have digits 1 to 10. And we want to select 3 digits. A digit can not be repeated.

Combination theory tells us that there would be M! / ( (M-N)! * N! ). [ (!) means factorial]

So in this example we would get 10! / ( (10-3)! * 3! ) = 120 combinations of 3 different digit numbers.

Lets take the combination as an index indication of the 3 digits produced.

So if we have 120 possibilities then one could say :

digits 1,2,3 ==> index 1

digits 1,2,4 ==> index 2

digits 1,2,5 ==> index 3

---

----

digits 8,9,10 ==> index 120

My question or challenge is 2 folds:

A) Given 3 numbers how can one map it to one of the indices 1 to 120 ??

B) If an index is given how to recover the 3 digits mapped to this index ?

i.e. reverse of (A)

So to be clear I am looking for an algorithm that would define the process in A and B.

Thx

R.

Last edited: