2. A new math teacher came to the class. He conducted a survey among the students of this class, asking if they love math. It turned out that $50 \%$ love math, and $50 \%$ do not. The teacher conducted the same survey at the end of the school year. This time, $60 \%$ of the students answered "yes," and $40 \%$ answered "no." Let $x \%$ of the students gave a different answer in the second survey compared to the first. Find the smallest and largest value of $x$.
Answer: $10 ; 90$.

Solution. Without loss of generality, we can assume that there are 100 students in the class. Let

- $a$ students answered "yes" both times,
- $b$ students answered "no" both times,
- $c$ students changed their answer from "no" to "yes",
- $d$ students changed their answer from "yes" to "no".

We need to find the smallest and largest value of $x=c+d$ given that $c+b=a+d=50, a+c=60, b+d=40$. We have

$$
c=50-b ; \quad d=40-b ; \quad x=c+d=90-2 b .
$$

From this, $0 \leqslant b \leqslant 40$, and $10 \leqslant x \leqslant 90$.

If $b=0$, then $c=50, d=40, a=10$.

If $b=40$, then $c=10, d=0, a=50$.

Thus, the smallest and largest values of $x$ are 10 and 90.

Grading. 12 points for a correct solution. If only one of the two values is found correctly, 3 points.