Solveeit Logo

Question

Question: A drawer contains a mixture of red socks and blue socks, at most 17 in all. It so happens that when ...

A drawer contains a mixture of red socks and blue socks, at most 17 in all. It so happens that when two socks are selected randomly without replacement, there is a probability of exactly 1/2 that both are red or both are blue. The largest possible number of red socks in the drawer that is consistent with this data is.

Answer

10

Explanation

Solution

Let RR be the number of red socks and BB be the number of blue socks. The total number of socks is N=R+BN = R + B. We are given that N17N \le 17.

The number of ways to select two socks from NN is (N2)=N(N1)2\binom{N}{2} = \frac{N(N-1)}{2}.

The number of ways to select two red socks is (R2)=R(R1)2\binom{R}{2} = \frac{R(R-1)}{2}.

The number of ways to select two blue socks is (B2)=B(B1)2\binom{B}{2} = \frac{B(B-1)}{2}.

The probability that both socks are red or both socks are blue is given as 1/21/2.

This probability is P(both red)+P(both blue)=(R2)(N2)+(B2)(N2)P(\text{both red}) + P(\text{both blue}) = \frac{\binom{R}{2}}{\binom{N}{2}} + \frac{\binom{B}{2}}{\binom{N}{2}}.

R(R1)2+B(B1)2N(N1)2=12\frac{\frac{R(R-1)}{2} + \frac{B(B-1)}{2}}{\frac{N(N-1)}{2}} = \frac{1}{2}

R(R1)+B(B1)N(N1)=12\frac{R(R-1) + B(B-1)}{N(N-1)} = \frac{1}{2}

2[R(R1)+B(B1)]=N(N1)2[R(R-1) + B(B-1)] = N(N-1)

Substitute B=NRB = N-R:

2[R(R1)+(NR)(NR1)]=N(N1)2[R(R-1) + (N-R)(N-R-1)] = N(N-1)

2[R2R+(N2NRNNR+R2+R)]=N2N2[R^2 - R + (N^2 - NR - N - NR + R^2 + R)] = N^2 - N

2[2R22NR+N2N]=N2N2[2R^2 - 2NR + N^2 - N] = N^2 - N

4R24NR+2N22N=N2N4R^2 - 4NR + 2N^2 - 2N = N^2 - N

4R24NR+N2N=04R^2 - 4NR + N^2 - N = 0

We can solve this quadratic equation for RR:

R=(4N)±(4N)24(4)(N2N)2(4)=4N±16N216(N2N)8R = \frac{-(-4N) \pm \sqrt{(-4N)^2 - 4(4)(N^2 - N)}}{2(4)} = \frac{4N \pm \sqrt{16N^2 - 16(N^2 - N)}}{8}

R=4N±16N216N2+16N8=4N±16N8=4N±4N8=N±N2R = \frac{4N \pm \sqrt{16N^2 - 16N^2 + 16N}}{8} = \frac{4N \pm \sqrt{16N}}{8} = \frac{4N \pm 4\sqrt{N}}{8} = \frac{N \pm \sqrt{N}}{2}

For RR to be an integer, NN must be a perfect square, and N±NN \pm \sqrt{N} must be even. If N=k2N=k^2, then R=k2±k2=k(k±1)2R = \frac{k^2 \pm k}{2} = \frac{k(k \pm 1)}{2}. Since k(k±1)k(k \pm 1) is always even, RR is an integer if NN is a perfect square.

Also, we must have N2N \ge 2 for the selection of two socks to be possible, so (N2)>0\binom{N}{2} > 0.

The possible perfect squares for N17N \le 17 are 1,4,9,161, 4, 9, 16. Since N2N \ge 2, we consider N{4,9,16}N \in \{4, 9, 16\}.

Case 1: N=4N=4. R=4±42=4±22R = \frac{4 \pm \sqrt{4}}{2} = \frac{4 \pm 2}{2}. R1=4+22=3R_1 = \frac{4+2}{2} = 3. If R=3R=3, B=NR=43=1B=N-R=4-3=1. (R,B)=(3,1)(R, B) = (3, 1). R2=422=1R_2 = \frac{4-2}{2} = 1. If R=1R=1, B=NR=41=3B=N-R=4-1=3. (R,B)=(1,3)(R, B) = (1, 3). Both solutions are valid since R,B0R, B \ge 0. The possible values for RR are 1 and 3.

Case 2: N=9N=9. R=9±92=9±32R = \frac{9 \pm \sqrt{9}}{2} = \frac{9 \pm 3}{2}. R1=9+32=6R_1 = \frac{9+3}{2} = 6. If R=6R=6, B=NR=96=3B=N-R=9-6=3. (R,B)=(6,3)(R, B) = (6, 3). R2=932=3R_2 = \frac{9-3}{2} = 3. If R=3R=3, B=NR=93=6B=N-R=9-3=6. (R,B)=(3,6)(R, B) = (3, 6). Both solutions are valid since R,B0R, B \ge 0. The possible values for RR are 3 and 6.

Case 3: N=16N=16. R=16±162=16±42R = \frac{16 \pm \sqrt{16}}{2} = \frac{16 \pm 4}{2}. R1=16+42=10R_1 = \frac{16+4}{2} = 10. If R=10R=10, B=NR=1610=6B=N-R=16-10=6. (R,B)=(10,6)(R, B) = (10, 6). R2=1642=6R_2 = \frac{16-4}{2} = 6. If R=6R=6, B=NR=166=10B=N-R=16-6=10. (R,B)=(6,10)(R, B) = (6, 10). Both solutions are valid since R,B0R, B \ge 0. The possible values for RR are 6 and 10.

The possible values for the number of red socks RR are {1,3,6,10}\{1, 3, 6, 10\}.

We are looking for the largest possible number of red socks.

The largest value in the set {1,3,6,10}\{1, 3, 6, 10\} is 10.