Problem 4 (Permutation Problem). In how many ways can 13 different math books be arranged on a bookshelf?

1) in any order;
2) so that 4 books on arithmetic are together (in any order);
3) so that 4 books on arithmetic are together (in any order) and 6 books on algebra are together (in any order);
4) so that 4 books on arithmetic are together (in any order), 6 books on algebra are together (in any order), and 3 books on geometry are together (in any order)?
Solution. 1) The number of ways to arrange 13 books in any order is equal to the number of permutations of 13 elements (objects): $P_{\mathrm{I} 3}=13!=6227020800$.

2) Imagine that the 4 books on arithmetic are tied together. Then this bundle (package) can be considered as one item, which means we need to arrange 10 items (9 other books and one package). This can be done in 10! ways. At the same time, the bundle (package) can be formed in 4! ways. We can apply the multiplication rule: the total number of ways to arrange all the books is $10!\cdot 4!=87091200$. Note that the books on arithmetic are simply standing next to each other, and the bundle is formed only mentally.
3) Imagine that from the 4 books on arithmetic and 6 books on algebra, two bundles are formed. Then we need to arrange 5 items (two bundles and three books). This can be done in 5! ways. In the first bundle, the books can be rearranged in 4! ways, and in the second bundle in 6! ways. We apply the multiplication rule for three objects (see note). The number of ways to arrange the books is $4!\cdot 6!\cdot 5!=$ 2073600.
4) In the bundles, we have 4!, 6!, 3! permutations, and the three bundles can be arranged on the shelf in 3! ways. The multiplication rule gives a total of $4!\cdot 6!\cdot 3!\cdot 3!=622080$ ways to arrange the books for four objects.

Answer. 1) 6227020800 ; 2) 87091200 ; 3) 2073600 ; 4) 622080.