Help the Librarian!

The Library has just bought 3 identical Math Books, 3 identical Literature Books, 3 identical Science Books and 3 identical Novels.

The Librarian wants to arrange the books in the shelf so that, no 3 identical books stand in a row.

For example, he can arrange MMLLSSNNMLSN but he can't arrange SS MMM LLNNSLN.

In how many different ways can the Librarian arrange the books?


The answer is 308664.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Tran Quoc Dat
May 22, 2016

The total number of ways to arrange the books can be calculated by Permutations with Repetition : 12 ! ( 3 ! ) 4 = 369600 \dfrac{12!}{(3!)^4} = 369600 .

Now, we calculate how many ways there are to arrange the books such that there exists 3 identical books in a row . There are 4 4 ways to choose which kind of books to put them together, e.g. Math Books. Consider only 10 things: a group of Math Books and 9 other books. Again by Permutations with Repetition, there are 4 × 10 ! ( 3 ! ) 3 = 67200 4 \times \dfrac{10!}{(3!)^3} = 67200 ways . Now, we calculate how many ways there are to arrange the books such that there exists 2 groups of 3 identical books in a row . Similarily, there are ( 4 2 ) × 8 ! ( 3 ! ) 2 = 6720 {4 \choose 2} \times \dfrac{8!}{(3!)^2} = 6720 ways.

The number of ways to arrange the books such that there exists 3 groups of 3 identical books in a row is ( 4 3 ) × 6 ! 3 ! = 480 {4 \choose 3} \times \dfrac{6!}{3!}=480 . And for 4 groups, there are 4 ! = 24 4! = 24 ways.

Now using Principle of Inclusion and Exclusion , the number of ways which satisfies the problem's conditions is 369600 67200 + 6720 480 + 24 = 308664 369600 - 67200 + 6720 - 480 + 24 = \boxed{308664} .

I like this problem because it uses a lot of combinatorics functions.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...