## Task B-2.5.

Petar has a set of 9 sports t-shirts. Each t-shirt has one of the numbers from the set $\{1,2,3,4,5,6,7,8,9\}$ printed on it, and all the numbers on the t-shirts are different. Petar is going on a trip and wants to take 5 t-shirts with him, such that at least three of them have an even number printed on them. In how many ways can Petar choose 5 t-shirts to take on his trip?
## First solution.

We are actually asking how many ways we can choose five numbers from the given set so that at least three of them are even, or how many five-element subsets of the set $\{1,2,3,4,5,6,7,8,9\}$ contain at least three even numbers.

Note that the order of the numbers within the subset does not matter. (What matters is which T-shirts Petar will wear.) For example, $\{1,2,3,4,5\}=\{2,4,1,3,5\}$.

We have the following two cases depending on how many even numbers will be among the five chosen:

1. three even, two odd,
2. four even, one odd.

In the first case:

The three even numbers we will take can be chosen in the same number of ways as one even number that we will not take from the given set, which can be done in 4 ways.

The first odd number can be chosen in 5 ways, the second in 4 ways, which is a total of $5 \cdot 4=20$ ways. However, this way we have counted all pairs of numbers $\{a, b\}$ and $\{b, a\}$ which as subsets we do not distinguish. Each such pair has been counted twice, so the obtained number must be divided by 2.

Thus, two odd numbers can be chosen in 10 ways.

For each of the 4 ways to choose three even numbers, we have 10 ways to choose the odd ones, which is a total of $4 \cdot 10=40$ ways to choose three even and two odd numbers.

## In the second case:

Four even numbers can be chosen in one way, and one odd number can be chosen in 5 ways, which is a total of $1 \cdot 5=5$ ways.

In total, there are $4 \cdot 10 + 1 \cdot 5 = 45$ different subsets with at least three even numbers.