Problem 2. A group of adventurers is showing off their loot. It is known that exactly 4 adventurers have rubies; exactly 10 have emeralds; exactly 6 have sapphires; exactly 14 have diamonds. Moreover, it is known that

- if an adventurer has rubies, then they have either emeralds or diamonds (but not both at the same time)
- if an adventurer has emeralds, then they have either rubies or sapphires (but not both at the same time).

What is the minimum number of adventurers that can be in such a group?
Answer: 18.

Solution. Note that the number of adventurers who have emeralds is equal to the total number of adventurers who have rubies or sapphires. Then, from the second condition, it follows that 4 adventurers have rubies and emeralds, and 6 have emeralds and sapphires. That is, every adventurer who has rubies must also have emeralds. Then, from the first condition, there cannot be an adventurer who has both rubies and diamonds. Therefore, there must be at least $4+14=18$ adventurers.

Indeed, there can be this many adventurers: suppose we have 4 adventurers who have emeralds and rubies, 6 adventurers who have diamonds, emeralds, and sapphires, and 10 adventurers who have only sapphires. One can verify that this example meets all the conditions.