A theater has people waiting to buy a $5 ticket each. Exactly of them carry a single $5 bill and the other carry a single $10 bill, and the seller starts with no change. In a uniformly random order, what is the probability that everyone can be served, meaning the seller always has a $5 to give as change to a $10 customer?
Reveal solutionHide solution
#A walk that must stay non-negative
Let the number of $5 bills in the till walk up by one when a $5 customer pays and down by one when a $10 customer takes a five in change. Everyone is served exactly when this walk never falls below zero, since a $10 customer who arrives at an empty till cannot get change. With fives and tens, the order is a sequence of up-steps and down-steps.
#Count the good arrangements
Sequences of ups and downs that never dip below zero are Dyck paths, counted by the Catalan number . The total number of orders, choosing which positions hold the $10 customers, is .
#The probability
The clean answer hides the reflection argument behind the Catalan count, where every blocked order maps one to one onto an arrangement with one extra ten, and that bijection is what collapses the ratio to .