There are 10 people in line to get into a theatre. Admission costs 50 cents. Of the 10 people, half of them have a 50-cent piece and the other half have a $1 bill. Suppose that the box office has an empty cash register, how many ways can the people line up so that whenever a person with a $1 dollar bill buys a ticket, the box office has a 50-cent piece in order to make change? (After every one is admitted, there will be 5 $1 dollar bills in the cash register.)
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
In order for there to always be sufficient change, the line-up must, at any point in the line (starting from the front of the line), have at least as many 5 0 cent holders as $ 1 bill holders.
So set up a 5 by 5 grid where the x -axis represents the number of 5 0 cent holders who have been admitted and the y -axis represents the number of $ 1 bill holders who have been admitted. We then need to count the number of grid paths, (where the path can only go up or to the right, one unit at a time), which never goes above the line x = y . These are known as Dyck paths , which are enumerated by the Catalan numbers . For n = 5 we have C 5 = 6 1 ( 5 1 0 ) = 4 2 paths.
Now for each of these 4 2 paths the five 5 0 cent holders can be ordered in 5 ! ways and the five $ 1 bill holders can be ordered in 5 ! ways. Thus the number of possible ways the people can line up so that there is always sufficient change is 4 2 ∗ ( 5 ! ) 2 = 6 0 4 8 0 0 .