## Task 2 - 320522

In a cabinet, there are 11 checkered, 7 lined, and 12 unlined notepads, and no others. It is too dark to distinguish the notepads, and they are unordered. Someone wants to take out a number of notepads and only then determine how many notepads of each type they have taken.

a) What is the smallest number of notepads that must be taken out to ensure that among the taken notepads, there are also 5 checkered ones?

b) What is the smallest number of notepads that must be taken out to ensure that among the taken notepads, there are also 5 that are of the same type?

Justify your answers by showing each time that the number you specify, but no smaller number, guarantees the desired outcome!
a) If 24 blocks are taken out, then among them there can be at most 7 lined and at most 12 unlined (since there are no more of these types); therefore, the number of checked blocks taken out must be at least $24-7-12=5$.

If, on the other hand, 23 blocks or fewer are taken out, it is possible that among them there are only 4 or fewer checked ones; for the remaining at most 19 blocks can be lined or unlined (since there are this many of these types combined).

Thus, 24 is the smallest number sought in a).

b) If 13 blocks are taken out, it is not possible that among them there are only 4 blocks of each of the three types (since $3 \cdot 4$ is less than 13); i.e., then there must be 5 blocks among the taken out ones that are of the same type.

If, on the other hand, 12 blocks or fewer are taken out, it is possible that there are at most 4 blocks of each of the three types; for the available quantities of each type, which are all greater than 4, are sufficient for this.

Thus, 13 is the smallest number sought in b).