Pay Before You Enter

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.)


The answer is 604800.

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.

1 solution

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 50 50 cent holders as $ 1 1 bill holders.

So set up a 5 5 by 5 5 grid where the x x -axis represents the number of 50 50 cent holders who have been admitted and the y y -axis represents the number of $ 1 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 x = y . These are known as Dyck paths , which are enumerated by the Catalan numbers . For n = 5 n = 5 we have C 5 = 1 6 ( 10 5 ) = 42 C_{5} = \frac{1}{6} \binom{10}{5} = 42 paths.

Now for each of these 42 42 paths the five 50 50 cent holders can be ordered in 5 ! 5! ways and the five $ 1 1 bill holders can be ordered in 5 ! 5! ways. Thus the number of possible ways the people can line up so that there is always sufficient change is 42 ( 5 ! ) 2 = 604800 42*(5!)^{2} = \boxed{604800} .

@Marc Vince Casimiro I appreciate your new byline, but in reality the list of problems I can't solve is at least a million times longer than the list of problems I can solve. My goal is to create a problem that @Jon Haussmann cannot solve. :)

Brian Charlesworth - 6 years, 6 months ago

Log in to reply

Here's a problem that he (and you) can't solve: World hunger.

:)

Calvin Lin Staff - 6 years, 6 months ago

Log in to reply

Indeed. And it's such a tragic and frustrating problem because although there is enough food produced to feed everyone, intractable problems with distribution, income and waste prevent hundreds of millions from getting adequate nourishment. And then there's the issue of inadequate water supplies/quality and the myriad consequences of that .....

If only math could solve everything ...... :(

Brian Charlesworth - 6 years, 6 months ago

I was expecting that last line :) Nice Solution though.

Marc Vince Casimiro - 6 years, 6 months ago

Log in to reply

Thanks, Marc. Good question. :)

Brian Charlesworth - 6 years, 6 months ago

hey brian can u suggest another method other than this cause this dyck path and catalan numbers went over my head. thanks in advance

Neil Vij - 5 years, 7 months ago

Log in to reply

Check out Bertrand's Ballot Problem . Dyck paths is a special case of Bertrand's Ballot Problem . When I didn't knew about Bertrand's Ballot Problem , I solve this problem manually, if you want check my solution there. I haven't given much explanation there, but if you ever come across pascal's triangle, you would understand the solution.

Abhisek Panigrahi - 3 years, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...