A person has three different bags and four different books. The number of ways, in which he can put these books in the bags so that no bag is empty, is:
Solution
Solution
Count onto maps from 4 books to 3 bags by inclusion–exclusion:
(Check another way: one bag gets two books, ways to pick them, then the three groups go into three distinct bags in ways: .)
Answer: 36.
Answer checked against the official answer key. The solution is our own working.