# Probability of getting a seat in the train car

A train has got five train cars, each one with N seats. There are 150 passengers who randomly choose one of the cars. What is the probability that everyone will get a seat?

I think that what is asking me is "what is the probability that each wagon is chosen by no more than N passengers"?

Given a wagon, the probability of having $n<N$ people in it is given by $$p_N=\sum\limits_{n=0}^N \binom{150}{n}0.2^n 0.8^{150-n}$$.

I thought of the answer being $p_N^5$.. but I think that the events

• wagon a is chosen by no more than N passengers
• wagon b is chosen by no more than N passengers
• wagon c is chosen by no more than N passengers
• wagon d is chosen by no more than N passengers
• wagon e is chosen by no more than N passengers

are far from being independent... So what could I do? Thanks a lot

• You might try inclusion / exclusion. – awkward Jan 13 '17 at 15:59
• @awkward could you point out how this relate to the question? – Surfer on the fall Jan 13 '17 at 16:05
• On an American train when seats are not assigned in advance, passengers can move between cars looking for seats. So it would be 5*150 passengers seeking out 5N seats. Are you thinking of a train in which passengers can't move between cars? – BruceET Jan 14 '17 at 5:15
• @BruceET yes, you're right – Surfer on the fall Jan 14 '17 at 7:38
• @Surferonthefall, the problem seems to ask for arrangements in which none of the cars is chosen by more than N passengers. So if we say an arrangement "has Property $i$" if car $i$ has too many passengers, we are asking for arrangements with none of the properties. PIE might work, but I have not worked out the details. – awkward Jan 19 '17 at 22:39

Let's ask two different questions: How many ways can 150 people be distributed among 5 train cars such that no more than 50 are on any given car?

If there were infinite seats on each train car, how many ways could 150 people be distributed amongst 5 train cars?

If each person is choosing independently of the other, then the answer would be the ratio of the first question over the second question.

The second problem is easy: It's 5^150.

The first problem is more interesting. Think partitions of n into k parts each less than or equal to d. However, we can get an easier sums by remembering the following facts:

• The number of people in three cars must be at least 50 and at most 150.

• The number of people in two cars can be any number from 0 to 100.

• We can treat the people as indistinguishable if we multiply the final result by the permutations of the people ($$50!$$).

Using these, we can split the train cars up into groups to get an easy sum.

Let's split into two cases: First, if there are no more than 50 people in the first two cars, we can write this as $$\sum_{x=a+b=0}^{50}(x+1)\sum_{c=50-x}^{50}(c+x-49)$$

In other words, we choose x people, up to 50 are in the first two cars, and there are $$x+1$$ ways to divide them between the two cars (from 0 in the first and x in the second to x in the first and 0 in the second). Then, with the remaining 150-x people, we pick a number for the third car $$c$$, which must be at least $$50-x$$. Once we've done that, since we have at most 100 people in the first three cars, we have at least 50 people to distribute between the last two. If there are 100 people, we have 1 way to distribute and if we have 50, we have 51 ways. This works out to $$101-p$$ ways to distribute $$p$$ people, which simplifies to $$c+x-49$$.

Second case: There are more than 50 people in the first two cars. Then we don't have to limit our choices on the last three cars, only on the second one. If there are $$a=1$$ to $$50$$ people in the first car, there must be at least $$b=51-a$$ people in the second car. We can pick any number for the third car. Then there are $$150-c-b-a$$ people to distribute between the last two cars, and we'll have to split our cases again.

Let $$y=150-a-b-c$$, the number of people we're putting into the last two cars. If $$100\geq y>50$$, then the number of ways to split the folks is $$101-y$$. If $$50\leq y$$, the number of ways to split the folks is $$y+1$$. So this gives us the following sum:

$$\sum_{a=1}^{50}\sum_{b=51-a}^{50}\left[\sum_{c=0}^{100-a-b} (a+b+c-49)+ \sum_{c=101-a-b}^{50} (151-a-b-c)\right]$$

Using summation tricks, both of these are evaluatable. Maple gives me a total of 3134001 for the two sums. Multiplying by $$50!$$ and dividing by the second question gives the probability: $$1.36*10^{(-34)}$$.