Till now, we had identical objects of only one type. That is, only the red balls were identical, and the rest were all different.

This lesson will consider a couple of more cases, which involve identical objects of more than one type. For example, 3 red balls and 2 green balls. Or 2 red, 3 green and 4 other different colored balls.

Suppose we have to arrange 5 balls in a row of which 3 are red and the other 2 are green. How many different arrangements are possible?

We’ll designate 5 spaces as before, each of which is to be filled by one ball.

First, we’ll place the red balls in any 3 of the 5 spaces. This can be done in ^{5}C_{3} ways. Here’s one of them.

Next, in the remaining 2 boxes, we’ll place the remaining 2 balls. This can be done in only 1 way (as both of them are identical)

And that’s it. The total number of arrangements will be ^{5}C_{3} x 1 or \( \frac{5!}{3!2!} \)

We could also have places the green balls first, in ^{5}C_{2} ways (select 2 out the 5 spaces and put one ball in each), and then place the red balls in the remaining spaces. The number of arrangements remains the same: ^{5}C_{2} or \( \frac{5!}{2!3!} \)

Now let’s take another case: 7 balls of which 3 are red, 2 are green and the remaining are of different colors.

We begin by placing the red balls, in ^{7}C_{3} ways.

Then place the green ones, in ^{4}C_{2} ways. (As we have 4 boxes remaining of which have to select 2)

Finally, we’ll place the remaining distinct balls. This time we have 2! ways, because the arrangements of these 2 balls matter.

The total number of arrangements are ^{7}C_{3} x ^{4}C_{2} x 2! = \( \frac{7!}{3!4!} \times \frac{4!}{2!2!} \times 2! = \frac{7!}{3!2!} \)

Do you see a pattern? In the first case we had 5 balls, of which 3 were red and 2 were green. The number of arrangements came out to be \( \frac{5!}{3!2!} \)

Had all of the 5 balls been distinct, our answer would have been 5!. Now if 3 of them were replaced with identical red balls, the answer changed to 5!/3!, and if the remaining 2 were also replaced with identical green balls, the number of arrangements changed to \( \frac{5!}{3!2!} \)

In the second case we had 7 balls of which 3 were red, 2 were green and the others different. The number of arrangements came out to be \( \frac{7!}{3!2!} \)

Now, let’s generalize. Suppose there are n objects, of which ‘p’ objects are identical and of a particular type (e.g. colors in case of balls), and ‘q’ objects are identical and of another type, and the remaining are distinct, then number of arrangements of these n objects in a row, will be \( \frac{n!}{p!q!} \)

Further, if ‘r’ objects are also identical and of a third type, then the number of arrangements will change to \( \frac{n!}{p!q!r!} \), and so on.

## Lesson Summary

- The number of ways of arranging n objects in a row, of which p objects are identical, and of type 1, q other objects are identical and of type 2, ‘r’ other objects are also identical and of type 3, and the remaining are distinct, is given by \( \frac{n!}{p!q!r!} \)

That’s it for this lesson. I’ll cover a few examples related to this concept in the next lesson.