What is the Probability of someone meeting a person they know on a train?

My friends and I had a question to calculate the probability of meeting someone you know on the train. So we created a mathematical model question as follows:

A man 'A' travels from a place X to Y. There are three trains $T_1$,$T_2$ and $T_3$, of 9 seats each, which connect X and Y. A total of 27 people use the Trains to go from X to Y, these 27 people include our man 'A', the 4 people he knows ($B_1$,$B_2$,$B_2$ and $B_4$), and remaining 22 strangers to 'A' ($C_1$,$C_2$,... to $C_{22}$). The man 'A' meets only 3 people from the train he is in, during the journey, after which he doesn't meet anyone else. What is the probability that he had met at least one person that he knew?

so we had a few attempts at solving the question (listed below), and the solutions are all different approaches and give quite different final answers; it would be great if I could know which of the three solutions is correct, or if none are - then how I should go about the problem. Thanks!

Solution [1]:(Friend 1?)

In a general sense, let $p_k$ be the number of people 'A' knows, and $p_t$ be the total number of people using the Trains (not including 'A'), and p be the number of people 'A' meets. Then:

Probability of 'A' knowing a person he meets is $$ = (\frac{p_k}{p_t})$$ Probability of 'A' not knowing a person he meets is $$ = (1 - \frac{p_k}{p_t})$$ Probability of 'A' not knowing the first p people he meets is $$ = (1 - \frac{p_k}{p_t})^p$$ Probability of 'A' knowing at least one the first p people he meets is $$ = 1 - (1 - \frac{p_k}{p_t})^p$$ So in our case, $p_k$ = 4, $p_t$ = 26 (27 - 1 as it doesn't include 'A'), p = 3, and substitutution gives approximately Probability = 0.3942.

Solution [2]:(Friend 2?)

In a general sense, let $p_{dk}$ be the number of people 'A' doesn't know, and $p_t$ be the total number of people using the Trains (not including 'A'), and p be the number of people 'A' meets. Then:

Probability of 'A' not knowing a person he meets is $$ = (\frac{p_{dk}}{p_t})$$ Probability of 'A' not knowing even the second person he meets after the first is $$ = (\frac{p_{dk}}{p_t})(\frac{p_{dk}-1}{p_t-1})$$ Probability of 'A' not knowing even the $p^{th}$ person he meets is $$ = (\frac{p_{dk}}{p_t})(\frac{p_{dk}-1}{p_t-1})...(\frac{p_{dk}-p+1}{p_t-p+1})$$ Probability of 'A' knowing a person he meets is $$ = 1 - (\frac{p_{dk}}{p_t})(\frac{p_{dk}-1}{p_t-1})...(\frac{p_{dk}-p+1}{p_t-p+1})$$ So in our case, $p_{dk}$ = 26 - 4 = 22, $p_t$ = 26 (27 - 1 as it doesn't include 'A'), p = 3, and substitutution gives approximately Probability = 0.4077

Solution [3]:(This one's mine! But uses P&C :/)

  1. taking all possible cases into account (Cases 1 to 5 as denoted under point 2)

$N_{all}$ = $N_1 + N_2 + N_3 + N_4 + N_5$ (Where $N_1$ to $N_5$ are as denoted under point 2 for each case respectively)

  1. Let 'A' be on any one train, the remaining 8 members can show a demographic as:
  • Case 1: All 4 people ($B_1$,$B_2$,$B_2$ and $B_4$) that 'A' knows are on the same train, this can happen in $N_1$ ways. $N_1$ = $\binom{4}{4}\binom{22}{4}$
  • Case 2: some 3 of $B_1$,$B_2$,$B_2$ and $B_4$ are on the same train, this can happen in $N_2$ ways. $N_2$ = $\binom{4}{3}\binom{22}{5}$
  • Case 3: some 2 of $B_1$,$B_2$,$B_2$ and $B_4$ are on the same train, this can happen in $N_3$ ways. $N_3$ = $\binom{4}{2}\binom{22}{6}$
  • Case 4: some 1 of $B_1$,$B_2$,$B_2$ and $B_4$ is on the same train, this can happen in $N_4$ ways. $N_4$ = $\binom{4}{1}\binom{22}{7}$
  • Case 5: None of $B_1$,$B_2$,$B_2$ and $B_4$ are on the same train, this can happen in $N_5$ ways. $N_5$ = $\binom{4}{0}\binom{22}{8}$
  1. The probability of A meeting someone he knows out of the three people he meets in each case would be as follows:
  • Case 1: $P_1$ = $\frac{\binom{4}{1}\binom{4}{2} + \binom{4}{2}\binom{4}{1} + \binom{4}{3}\binom{4}{0}}{\binom{8}{3}}$
  • Case 2: $P_2$ = $\frac{\binom{3}{1}\binom{5}{2} + \binom{3}{2}\binom{5}{1} + \binom{3}{3}\binom{5}{0}}{\binom{8}{3}}$
  • Case 3: $P_3$ = $\frac{\binom{2}{1}\binom{6}{2} + \binom{2}{2}\binom{6}{1}}{\binom{8}{3}}$
  • Case 4: $P_4$ = $\frac{\binom{1}{1}\binom{7}{2}}{\binom{8}{3}}$
  • Case 5: $P_5$ = 0 (since there is no person that A knows on the train)
  1. Final expression for the probability would be

$$Probability (P) = \frac{N_1P_1 + N_2P_2 + N_3P_3 + N_4P_4 + N_5P_5}{N_{all}}$$ which on evaluation comes upto Probability(P) = 0.4096

Any Help would be highly appreciated! Thank you for taking the time to read this.


First off, notice that the size of the train doesn't matter - it only matters that he meets 3 people. I would approach the problem as, "How many arrangements of 26 objects are there, where first you choose 3 objects (in order) from a subset of 22 of those objects, then order the remaining 23 objects freely", divided by the number of arrangements of 26 objects. There are ${}^{22}P_3$ ways to choose the people sitting next to you if you don't know them, and once you remove those people, there are $23!$ ways to arrange the people not sitting next to you. So there are ${}^{22}P_3 \times 23!$ ways to arrange everyone so you're not sitting next to someone you know, out of $26!$ ways total, i.e. the probability you don't sit next to someone you know is \begin{align} \frac{{}^{22}P_3 \times 23!}{26!}=\frac{{}^{22}P_3}{{}^{26}P_3}\approx 0.5923, \end{align} and the probability you do sit next to someone you know is 0.4077. So your second friend is right.

Your first friend forgot that the probabilities aren't independent. If you don't know the person on your left, there are fewer other people you don't know available, so that increases the chances you know the person on your right.

I like counting permutations instead of combinations because I find it's easy to count different things in different places when I use combinations. In your case, your $N_{all}$ is the number of ways to choose people on the first or second train (including yourself, which isn't what I would normally do - I would normally label whichever train I was on as "Train 1"), but your $N_1$ to $N_5$ are only the number of ways to choose people on the same train as you. I suspect that if you replace your $N_{all}$ with $\binom{26}{8}$, you would get the right answer.