Rayla vs. Probability
Get the context by watching the video:
As seen in the video, Ezran (the little kid) presses a bunch of stones on a wall, while calling it a Stone or a Rock (what's the difference anyway, though?). Don't call me acerbic, but I must say, it is amusing to watch him be intelligent enough to remember that combination along with stone/rock, but not smart or hygienic enough to wipe off or AT LEAST lick off the jelly on his hands. UGH!
Coming back to the story, we see Rayla (the elf) effortlessly cracking the combination, allegedly by "pressing all the stones with jelly handprints". If that's so, then there are only two explanations: (i) The security to that secret chamber is compromised as hell, which is unlikely, or (ii) Rayla got handsomely lucky (or beautifully lucky, in her case).
Here's why:
The lock consisted of pressing
This is similar to a situation where you know the digits of a number lock but do not know the order. Consider this keypad:
The circumstances allow for us to know the digits of the lock.
These are the digits required to open the lock:
For instance, these are the different numbers we can get using these digits (once) alone:
| 1468 | 4168 | 6148 | 8146 |
| 1486 | 4186 | 6184 | 8164 |
| 1648 | 4618 | 6418 | 8416 |
| 1684 | 4681 | 6481 | 8461 |
| 1846 | 4816 | 6814 | 8614 |
| 1864 | 4861 | 6841 | 8641 |
From the table, it can be observed that the
All good. But how lucky was she, numerically?
According to the data we have, we know that
ABCDEFGHI, ABCDEFGIH, ABCDEFHGI, ...
Oof, I'm tired and this thing feels so time-consuming and boring... Any way we could find out the number of such sequences possible instantly?
Heck yeah, boy, that's where Permutations come in!
A permutation means a specific sequence or order in which a list of things occur, be it digits, or letters, or just about any group of things. So, the various sequences of the letters A to I that can possibly occur, they are permutations. For example, ABCDEFGHI, and ABCDEFGIH are two permutations of the group of letters from A to I.
There is a very simple and logical (of course) way to calculate the total number of all possible permutations.
To understand this, consider a simple example. Take just three letters,
To begin with, you have
3 × 2 × 1 = 6
When you work the permutations out manually, you find that you get
| ABC | ACB | BAC |
| BCA | CAB | CBA |
Also for the keypad-password example above, you could use the same logic:
1st digit →
2nd digit →
3rd digit →
4th digit →
Mathematically:
4 × 3 × 2 × 1 = 24
Lookie what we've got:
There's a simpler way to express this pattern of multiplying numbers with their preceding numbers till
This is how factorials are expressed mathematically:
n! = n × (n − 1) × (n − 2) × ... × 1
For example,
3! = 3 × 2 × 1 = 6
4! = 4 × 3 × 2 × 1 = 24
Coming back to our original question, to work out the number of permutations we can obtain using the rocks, i.e., the letters
9! = 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 362,880
This is a neat trick to find out the number of permutations possible, but note, this is valid only for non-recurring digits in a sequence. If all digits could repeat themselves, it would be exponential. For example, if you could use the digits
So, to obtain a
3 × 3 × 3 = 3³ = 27
In such recurrable cases, we use exponents. If we have
Now to the original question (again): We're not done yet; remember that there was a specific Rock/Stone keyword attached with each stone pressed? This only magnifies the elf's luck now; using the above information, and the fact that there could be a Stone or Rock for each stone pressed, the number of permutations, now including both the sequence of rocks pressed AND Stone/Rock for each stone, increases. Calculating the new permutation again, we get:
There we go! A total of
So, to sum it up: either Rayla is impossibly lucky, or probability decided to take a personal day. In any case, I’ll stick to math (and science)— it’s the only thing that doesn’t depend on jelly consistency. And I'm second-guessing: Rayla didn’t just get lucky—she looked Probability dead in the eye and said, “Move.” And Probability did. Somewhere, a statistician just screamed into a pillow.