7. (2b, 8-11) In a box, there are 2009 socks - blue and red. Can there be such a number of blue socks that the probability of randomly pulling out two socks of the same color is equal to $0.5$?
# Solution.

Let there be $n+m$ socks in the box, of which $n$ are of one color and $m$ are of another. Then the probability of pulling out two socks of the same color is the sum of the probabilities $\mathrm{P}_{11}+\mathrm{P}_{22}$ of pulling out two socks of the first and second colors.

$$
\begin{gathered}
\mathrm{P}_{11}=\frac{n}{n+m} \cdot \frac{n-1}{n+m-1} ; \mathrm{P}_{22}=\frac{m}{n+m} \cdot \frac{m-1}{n+m-1} \\
\mathrm{P}_{11}+\mathrm{P}_{22}=\frac{n^{2}-n+m^{2}-m}{(n+m)(n+m-1)}=\frac{1}{2}
\end{gathered}
$$

from which

$$
2 n^{2}+2 m^{2}-2(n+m)=n^{2}+2 m n+m^{2}-(n+m)
$$

$n^{2}-2 m n+m^{2}=n+m$ $(n-m)^{2}=n+m$.

From the condition, it follows that $n+m=2009$. The equation $(n-m)^{2}=2009$ has no integer solutions.

Answer: cannot.