Grouping

We will often have constraints when rearranging objects. For example, we may want certain objects to be together.

Technique: the grouping method

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

Step 1: Consider A and B grouped together as if they are just one object. Then we have 4! ways to rearrange the four overall objects.

grouping diagram

Step 2: Rearrange A and B among themselves: 2! ways.

Hence the number of ways =4!×2!.

Example: grouping people

Question

5 J1s, 4 J2s and 2 teachers are to be seated in a row for a photo. How many ways are there to arrange them if

  1. there are no restrictions?
  2. the J1s must sit together, the J2s must sit together and the teachers must sit together?

Solution

  1. Number of ways =11!=39,916,800.
  2. Number of ways =3!×5!×4!×2!=34,560.