TITLE: Occupying seats in a classroom
QUESTION [7 upvotes]: Here's a nice probability puzzle I have thought about for a class I'm TAing, I'm curious to see different solutions :) It goes like this:
We have a classroom with $n$ seats available and $m \leq n$ incoming students. Each student has an (ordered) list of $k \leq n$ preferences for the seat he is going to take, where $k$ is some fixed positive integer. If at the moment of his arrival, a person's $k$ favorite seats are already taken, then he randomly chooses a seat from the remaining $n-k$. What is the probability that everyone occupies one of his favorite $k$ seats?

REPLY [4 votes]: The students numbered $1$ to $k$ will always get a seat among their preferences.
For a student number $s$ with $s>k$, the probability that all $k$ of his preferred seats are taken is $\binom k {s-1}/\binom k n$. Because the lists of the next students are random, it doesn't matter which seat is taken, so the order in the list doesn't matter at all. The problem is the same if we pick sets of size $k$.
So the probability that every students seats in a preferred seat is $\prod_{s=k+1}^m \left(1 - \frac{(s-1)!(n-k)!}{(s-k-1)!n!}\right)$