# Difference between revisions of "1991 AIME Problems/Problem 13"

## Problem

A drawer contains a mixture of red socks and blue socks, at most 1991 in all. It so happens that, when two socks are selected randomly without replacement, there is a probability of exactly $\displaystyle \frac{1}{2}$ that both are red or both are blue. What is the largest possible number of red socks in the drawer that is consistent with this data?

## Solution

Let $r$ and $b$ denote the number of red and blue socks, respectively. Also, let $t=r+b$.

The probability $P$ that when two socks are drawn without replacement, both are red or both are blue is given by

$P=\frac{r(r-1)}{(r+b)(r+b-1)}+\frac{b(b-1)}{(r+b)(r+b-1)}=\frac{r(r-1)+(t-r)(t-r-1)}{t(t-1)}=\frac{1}{2}.$

Solving the resulting quadratic equation $r^{2}-rt+t(t-1)/4=0$ for $r$ in terms of $t$, one obtains that

$r=\frac{t\pm\sqrt{t}}{2}$