2. (10 points) Vasya has 9 different books by Arkady and Boris Strugatsky, each containing one work by the authors. Vasya wants to arrange these books on a shelf so that: a) the novels "The Beetle in the Anthill" and "Waves Extinguish the Wind" (in any order) are next to each other; b) the novellas "Anxiety" and "A Tale of Friendship and Enmity" (in any order) are next to each other. In how many ways can Vasya do this?
a) $4 \cdot 7!$;
b) 9 !;
c) $9!/ 4!$
d) $4!\cdot 7!$;
e) another answer.
Answer: a).

Solution: Let's write down the solution for the general case when there are $N$ different books. Vasya needs to arrange in a row $N-2$ objects: $N-4$ books not mentioned in points a) and b), and two pairs from a) and b). This can be done in $(N-2)!$ ways. In addition, within each pair, the books can be swapped, which increases the total number of options by 4 times. In the end, we get $4 \cdot (N-2)!$ ways.

For the case when there are initially 9 different books, we get $4 \cdot (9-2)! = 4 \cdot 7!$.