drawing numbers game - probability of winning

125 Views Asked by At

Someone asked me this interview question he got recently, but I am not sure if I get it right.

A and B play a number drawing game. A can draw 3 numbers from 1-9 without replacement, but B can only draw 3 numbers from 1-8 without replacement. After numbers are drawn, they are sorted such that the 3-digit number formed by those 3 numbers are maximized, for example, if 3 numbers drawn are 1,3,8 then the number A/B will get is 831. what's the probability that A will have a greater number than B?

I tried to solve with conditional probability:

P(A wins) = P(A wins|9 is not selected)P(9 is not selected) + P(A wins|9 is selected)P(9 is selected)

P(A wins|9 is not selected)=1/2

P(9 is not selected)=C(8 choose 3)/C(9 choose 3) = 2/3

P(A wins|9 is selected)=1

P(9 is selected)=C(8 choose 2)/C(9 choose 3)=1/3

so P(A wins)=2/3. Am I correct?

1

There are 1 best solutions below

0
On BEST ANSWER

With probability $1/3$, A draws a $9$ and wins.

With probability $2/3$, his digits are drawn from $1$ to $8$, just as B's. But as noted in a comment, A only wins if his score is strictly greater than B's; in effect, B wins ties. The probability of a tie is $1/\binom{8}{3} = 1/56$. If there is no tie, A's and B's chances are equal, by symmetry. So if $A_W$ is the event that A wins in this case, $$P(A_W) + 1/56 + P(A_W) = 1$$ and solving, $P(A_W) = 55/112$.

So A's overall probability of winning is $$\frac{1}{3} + \frac{2}{3} \cdot \frac{55}{112} = \frac{222}{336} \approx 0.660714$$