On this page
When you prepare for competitive exams, mastering permutations means learning a few distinct frameworks. You might already use the bundle method for keeping letters together, or the gap method for keeping items apart. But what happens when a question asks for arrangements where *A always comes before B*?
The answer is remarkably simple: it happens exactly half the time.
If you are dealing with n distinct items, the total number of permutations is n! (n factorial). This combinatorial rule has been known since Bhaskara II's 1150 AD text *Lilavati* (Wikipedia). Out of those n! arrangements, exactly n! / 2 will have item A appearing somewhere before item B.
Here is why this symmetry works, and how to extend it to three or more items.
Why exactly half of all arrangements have A before B?
Imagine you are arranging three letters: A, B and C. The total number of permutations is 3! = 6.
If we list them out, we get two groups:
A comes before B: ABC, ACB, CAB
B comes before A: BAC, BCA, CBA
For every single arrangement in the first group, there is a mirror image in the second group created by simply swapping A and B. Because A and B are distinct, they can only exist in two relative states: either A is before B, or B is before A. There are no ties.
Because every valid permutation has exactly one mirror pair, the total arrangements split perfectly down the middle. This symmetry holds whether you are arranging three items, ten items or a hundred items. If you need a deeper intuition for mathematical symmetries, you can explore the Fermi Concept Library, which contains every concept in physics, chemistry, biology, mathematics and computing, each with its own lesson and its place in the map.
What happens when three or more items must keep their order?
What if the constraint involves three items? For example, "A must come before B, and B must come before C".
Let's look at just those three items. In any long sequence, the relative order of three specific items (A, B and C) can take 3! = 6 forms:
A B C
A C B
B A C
B C A
C A B
C B A
Out of these 6 possible relative orders, only one satisfies the rule "A before B before C". Because of the same symmetry principle, all 6 relative orders appear equally often across all permutations.
Therefore, exactly 1/6 of the total arrangements will have A, B and C in that specific order.
The General Rule: If you have n total items, and k specific items must appear in a fixed relative order, the number of valid arrangements is n! / k!.
How do you solve arrangements where A comes before B?
If you tackle these problems in the Fermi Problem Library, you can use the step-by-step solver that explains the reasoning rather than printing an answer. Let's look at two typical examples.
Example 1: The alphabet problem *In how many ways can the letters of the word EXAMIN be arranged such that the vowels (E, A, I) appear in alphabetical order?*
Count the total items: EXAMIN has 6 distinct letters. Total permutations = 6! = 720.
Identify the constrained items: The vowels E, A and I (3 items) must appear in the order A, E, I.
Apply the rule: Since 3 items have a fixed order, they divide the total by 3!.
Calculate: 720 / 6 = 120.
There are 120 valid arrangements.
Example 2: The race finish line *Five horses (A, B, C, D, E) run a race. In how many possible finish orders does horse A finish ahead of horse B?*
Total items: 5 horses. Total permutations = 5! = 120.
Constrained items: A and B (2 items). The order is fixed to A before B.
Apply the rule: Divide the total by 2! = 2.
Calculate: 120 / 2 = 60.
There are 60 possible finish orders.
These shortcuts are powerful because they bypass the need to count cases (such as "if A is first... if A is second..."). Just remember to check whether there are identical items in the full set, in which case you will also need to divide by the repeating item factorials using the MISSISSIPPI method.



