Take a test Sign in 中文
← Exercise 527 →
Search
Go to
{{searchResults.length}} {{searchResults.length === 1 ? 'result' : 'results'}} for “{{searchWords}}” No results found for “{{searchWords}}” × back to contents
Contents · by chapter
Basic Counting (147)
Balls in Boxes (6)
Probability (142)

Exercises and their solutions

Exercise 527
A row of $9$ lockers is numbered $1$ through $9$ from left to right, and all of them are closed. A janitor opens the lockers one at a time until all $9$ are open. The first locker opened is locker $4$, and after that each locker opened must be next to a locker that is already open. In how many different orders can the janitor open the lockers?
← Back to Problem 527
Solution
  1. The open lockers always form a block of consecutive lockers: each newly opened locker is next to the block, so it extends the block by one to the left ($L$) or to the right ($R$). For example, the order $4,5,3,2,6,7,1,8,9$ corresponds to $R\,L\,L\,R\,R\,L\,R\,R$.
  2. Starting from locker $4$, the block must grow left $3$ times (to reach locker $1$) and right $5$ times (to reach locker $9$), in some order. Every such arrangement of $3$ $L$'s and $5$ $R$'s gives exactly one valid order, and vice versa.
  3. So the number of orders is the number of ways to choose which $3$ of the $8$ steps are $L$: $\binom83=\boxed{56}$.
Search Go to Prev      Next

Contact Us

Thanks! Your message has been sent.
By year