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 21 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?
解析
Solutions
Solution 1
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 randomly, without replacement, both are red or both are blue is given by
(r+b)(r+b−1)r(r−1)+(r+b)(r+b−1)b(b−1)=t(t−1)r(r−1)+(t−r)(t−r−1)=21.
Solving the resulting quadratic equation r2−rt+t(t−1)/4=0, for r in terms of t, one obtains that
r=2t±t.
Now, since r and t are positive integers, it must be the case that t=n2, with n∈N. Hence, r=n(n±1)/2 would correspond to the general solution. For the present case t≤1991, and so one easily finds that n=44 is the largest possible integer satisfying the problem conditions.
In summary, the solution is that the maximum number of red socks is r=990.
Solution 2
Let r and b denote the number of red and blue socks such that r+b≤1991. Then by complementary counting, the number of ways to get a red and a blue sock must be equal to 1−21=21=(r+b)(r+b−1)2rb⟹4rb=(r+b)(r+b−1)=(r+b)2−(r+b)⟹r2+2rb+b2−r−b=4rb⟹r2−2rb+b2=(r−b)2=r+b, so r+b must be a perfect square k2. Clearly, r=2k2+k, so the larger k, the larger r: k2=442 is the largest perfect square below 1991, and our answer is 2442+44=21⋅44(44+1)=22⋅45=11⋅90=990.
Solution 3
Let r and b denote the number of red and blue socks, respectively. In addition, let t=r+b, the total number of socks in the drawer.
From the problem, it is clear that t(t−1)r(r−1)+t(t−1)b(b−1)=21
Expanding, we get t2−tr2+b2−r−b=21
Substituting t for r+b and cross multiplying, we get 2r2+2b2−2r−2b=r2+2br+b2−r−b
Combining terms, we get b2−2br+r2−b−r=0
To make this expression factorable, we add 2r to both sides, resulting in (b−r)2−1(b−r)=(b−r−1)(b−r)=2r
From this equation, we can test values for the expression (b−r−1)(b−r), which is the multiplication of two consecutive integers, until we find the highest value of b or r such that b+r≤1991.
By testing (b−r−1)=43 and (b−r)=44, we get that r=43(22)=946 and b=990. Testing values one integer higher, we get that r=990 and b=1035. Since 990+1035=2025 is greater than 1991, we conclude that (946,990) is our answer.
Since it doesn't matter whether the number of blue or red socks is 990, we take the lower value for r, thus the maximum number of red socks is r=990.
Solution 4
As above, let r, b, and t denote the number of red socks, the number of blue socks, and the total number of socks, respectively. We see that t(t−1)r(r−1)+t(t−1)b(b−1)=21, so r2+b2−r−b=2t(t−1)=r2+b2−t=2t2−2t.
Seeing that we can rewrite r2+b2 as (r+b)2−2rb, and remembering that r+b=t, we have 2t2−2t=t2−2rb−t, so 2rb=2t2−2t, which equals r2+b2−t.
We now have r2+b2−t=2rb, so r2−2rb+b2=t and r−b=±t. Adding this to r+b=t, we have 2r=t±t. To maximize r, we must use the positive square root and maximize t. The largest possible value of t is the largest perfect square less than 1991, which is 1936=442. Therefore, r=2t+t=21936+44=990.
Solution by Zeroman
Solution 5
Let r be the number of socks that are red, and t be the total number of socks. We get:
2(r(r−1)+(t−r)(t−r−1))=t(t−1) Expanding the left hand side and the right hand side, we get: 4r2−4rt+2t2−2t=t2−t
And, moving terms, we will get that: 4r2−4rt+t2=t
We notice that the left side is a perfect square. (2r−t)2=t
Thus t is a perfect square. And, the higher t is, the higher r will be. So, we should set t=442=1936
And, we see, 2r−1936=±44 We will use the positive root, to get that 2r−1936=44, 2r=1980, and r=990.
- AlexLikeMath
Solution 6
Let r and b denote the red socks and blue socks, respectively. Thus the equation in question is:
Because we wish to maximize r, we have r≥b and thus r−b≤44 as both r and b must be integers and 442=1936 is the largest square less than or equal to 1991. We now know that the maximum difference between the number of socks is 44. Now we return to an earlier equation:
⇒b≤946 (Here we use the positive sign to maximize r.)
Thus the optimal case would be b=946 as r increases only when b increases. In addition, 8b+1=87 as we are using the equality case. We then plug back in: