Slotting

For situations where we want objects to be separated, we can employ the slotting method.

Technique: the slotting method

Let us consider the example of rearranging five objects A,B,C,D and E, where A and B must be separated.

Step 1: Rearrange the remaining 3 objects (C,D,E) first: 3! ways.

slotting

Step 2: We observe that there are 4 “slots” that A and B can then go into if they are to be separated. Choosing 2 slots for them and rearranging among themselves, we have (42)×2! ways.

Hence the number of ways =3!×(42)×2!.

Slotting vs complement

In addition to the slotting method, the complement method can also be used. Take the earlier example of rearranging five objects A,B,C,D and E, where A and B must be separated. Using the slotting method gives us 3!×(42)×2!=72 ways.

If we consider the complement of A and B separated, that means A and B must be together. Then we can use the complement and grouping methods to get 5!4!×2!=12048=72 ways.

Unsurprising, both methods give us the same answer: they are simply two ways of counting the same event.

However, now let us consider a case of three objects A,B,C out of six A,B,C,D,E,F.

The slotting method gives us 3!×(43)×3!=144 ways.

The complement method gives us 6!(4!×3!)=576 ways.

They are different because the slotting method gives us a situation where A,B,C are separated/not next to one another.

slottingcomplement

Meanwhile, the complement method gives us a situation where A,B,C are not all together. We cannot have all three of them together but two of them together is allowed as well. This is in contrast to the slotting method where only the first case is allowed (and is thus a subset, giving us a smaller number).

Example: rearranging people

Question

A group of 6 people consists of 3 married couples. Find the number of different possible orders for the group to stand in a line if

  1. there are no restrictions,
  2. each married man stands next to his wife,
  3. no two woman is next to one another.

Solution

  1. Required number of ways 6!=720.

We group each couple, so we have 3 objects overall. We can also rearrange the couple among themselves for each couple.

Required number of ways 3!×2!×2!×2!=48.

We sit the men first. We then slot the 3 women into 4 “slots”.

Required number of ways =3!×(43)×3!=144.

Advanced technique: alternating arrangements

We can modify the slotting method to alternate objects.

For example, consider arranging 3 men and 3 women in a line such that they alternate. We arrange the men first just like before (3!). However, instead of having (43) ways to choose where the women can sit, alternating imposes a stricter condition: we can either have MWMWMW or WMWMWM. Thus there is only 2 ways to alternate.
Hence the number of ways to alternate the men and women =3!×2×3!.

If we have 3 men and 4 women, however, we don’t even have 2 ways to alternate like before. The arrangment must be WMWMWMW (1 way).
Hence the number of ways to alternate the men and women =4!×1×3!.