I have 5 ring oscillators whose frequencies are f1, f2, ..., f5. Each ring oscillator (RO) has 5 inverters. For each RO, I just randomly pick 3 inverters out of 5 inverters. For example, in RO1, I pick inverter 1,3,5 (Notation: RO1(1,3,5)). So I have the following:
RO1(1,3,5) (I call this is the configuration of RO1)
RO2(1,2,4) (configuration of RO2)
RO3(2,4,5)
RO4(1,4,5)
RO5(2,3,4)
Let say f1 < f3 < f4 < f5 < f2 (I call this is a rank). So for this particular rank, I have:
{RO1(1,3,5), RO3(2,4,5), RO4(1,4,5), RO5(2,3,4), RO2(1,2,4)}
For a different rank, let say f1 < f2 < f3 < f4 < f5, I will have:
{RO1(1,3,5), RO2(1,2,4), RO3(2,4,5), RO4(1,4,5), RO5(2,3,4)}
So as you can see, the rank affects how things are arranged.
One trivial encoding is:
{RO1(1,3,5), RO3(2,4,5), RO4(1,4,5), RO5(2,3,4), RO2(1,2,4)} = 000...00 (all zeros)
{RO1(1,2,5), RO3(2,4,5), RO4(1,4,5), RO5(2,3,4), RO2(1,2,4)} = 000...01 (all zeros with a single 1)
etc ... (repeat the whole process until we exhaust all combinations for all configurations for all ranks).
This trivial encoding is NOT efficient because I need to store the entire mapping table in memory so that later on, I can use it for encoding.
My question is: Is there a better way to carry out the encoding without having access to the entire mapping table?
Clarification: For 5 ROs, there are 5! different possible ranks. So I will need ceiling(log(5!))=7 bits (log here is base-2) to encode 5! different ranks.
Each RO has (5 choose 3) different possible configurations. So for 5 ROs, there are (5 choose 3)^5=10^5 possible configuration combinations. Therefore, I will need ceiling(log(10^5))=17 bits to encode all possible combinations.
So let me re-state my question in a clearer way: Given a specific rank of 5 ROs and the configurations of 5 ROs, how can I efficiently encode those information into 24 bits?

Yes, there is. One such encoding follows.
To encode the rank, write out the order of the frequencies as bytes. For example, $f_1 < f_3 < f_4 < f_5 < f_2$ becomes
$$ 00000001\ 00000011\ 00000100\ 00000101\ 00000010. $$
To encode the configuration of each RO, put a $1$ in the $i^\text{th}$ position if inverter $i$ is one of the 3 inverters you picked, and $0$'s elsewhere. For example,
Now stick the bytes together end-to-end, so that you have a 10 byte sequence. Using your example of $(\operatorname{RO}_1(1,3,5), \operatorname{RO}_3(2,4,5), \operatorname{RO}_4(1,4,5), \operatorname{RO}_5(2,3,4), \operatorname{RO}_2(1,2,4))$, you'll get the following encoding: (ignore the line break)
$$ 00000001\ 00000011\ 00000100\ 00000101\ 00000010\\ 10101000\ 11010000\ 01011000\ 10011000\ 01110000. $$
Of course, your choice of encoding will depend on what you're doing with the data. Hopefully this was enough to get you started.