[Math] In how many ways the letters of the word RAINBOW be arranged such that A is always before I and I is always before O.

permutations

I research some sites and books and i found these this approach helpful but could not understand a bit.

Approach:
All the 7 letters of the word can be arranged in 7! ways.

and 3particular letters can be arranged in 3! ways..But the given condition is satisfied by one out of 6 ways.
Here, i only know the 4 ways which are

1: A before I and I before O //only one way

2: A before I and I after O

3: A after I and I after O

4: A after I and I before O

the other 2 ways i couldn't figure out. eqn1

and said that the given condition is satisfied by 1 out of 6 ways
Hence,the required no of ways=7!/3!=840 eqn2

My Question is in //1, //2

//1 the Other 2 ways which i couldn't figure out?

//2 Why we Divide by 3! in 7!/3!?

Best Answer

An alternate approach would be to use combinations in addition to the traditional multiplication principle.

Step 1: Pick the three spaces used by the vowels $A, I, O$ simultaneously. There are $\binom{7}{3}$ ways to complete this step.

Now that the spaces have been picked, since we are only interested in those arrangements with $A$ before $I$ before $O$, we use those three spaces we picked to place $A$ in the earliest of the picked spaces, $I$ in the middle of the picked spaces, and $O$ in the final picked space.

Step 2-5: For each remaining space, pick one of the unused letters to occupy that spot. There are $4\cdot 3\cdot 2\cdot 1$ ways of completing these remaining steps.

By multiplication principle, there are then $\binom{7}{3}4!$ number of total arrangements with the property we sought.

Note: $\binom{7}{3}4!=\frac{7!}{3!}$