1. In an office, at various times during the day, the boss gives the secretary a letter to type, each time putting the letter on top of the pile in the secretary's in-box. When there is time, the secretary takes the top letter off the pile and types it. There are nine letters to be typed during the day and the boss delivers them in the order 1,2,3,4,5,6,7,8,9. While leaving for lunch, the secretary tells a colleague that letter 8 has already been typed, but says nothing else about the morning's typing. The colleague wonders which of the nine letters remain to be typed after lunch and in what order they will be typed. Based upon the information given, how many such after-lunch typing orders are possible? (There are no letters left to typed is one of the possibilities.)
I think I've got this question after some thought.
The question can be split up into 2 scenarios. The letter 9 arrives
before lunch break or it arrives
after lunch break.
Let the case of it arriving
before lunch break be

.
Let the case of it arriving
after lunch break be

.

If letter 9 arrived before lunch then that means letter 8 have been typed and we are not sure whether letters of the set

have been typed or not typed.
Some experimenting quickly leads to what we must count.
Say letter 1 arrives and the secretary immediately types it up, then letter 2 comes and the secretary does not have time to type it up, then letter 3,4,5,6,7 comes and she does not have the time to type them up until letter 8 comes which the secretary has time to type up and then finally letter 9 arrives which she does not type up.
This means after lunch she must type up the letter set

(The letter numbers are placed from the top letter in the box down to the bottom letter in the box) which is a subset of

Imagine another scenario, letter 1 comes and she types it up, letter 2 comes and she does not type it up. Letter 3, 4, 5 comes and she types all three up. Letter 6,7 come and she doesn't type up. 8 comes and she obviously types it up. 9 comes and she does not type it up.
This means after lunch she must type up the letter set

(The letter numbers are placed from the top letter in the box down to the bottom letter in the box) which again is a subset of

Now notice how the question also asks for the order of the typing, but the order of

and

is
fixed as the secretary has no choice what to type since she types the letter on the top till the one on the very bottom.
The aim is clear: we need to find all possible subsets of

which is found by

.


Now we ask what if the letter 9 comes after lunch?
Consider the set of letters that can be typed or not typed up before lunch in this case. It would be

Now to be consistent with our experimentation in

lets use the same example.
Letter 1 comes and she types it up, letter 2 comes and she does not type it up. Letter 3, 4, 5 comes and she types all three up. Letter 6,7 come and she doesn't type up. 8 comes and she obviously types it up. However this time letter 9 does not come, since it is still before lunch.
Now after the secretary comes back from lunch break she will have to type up

(The letter numbers are placed from the top letter in the box down to the bottom letter in the box).
However this time the boss can give her the letter 9 at any time. Say she just returns from lunch break and her boss gives her letter 9, then she would have to type up

.
If she already types up 7 and then her boss gives her letter 9, her typing order would now be

There are 2 more possibilities of when her boss can give her letter 9 namely:

and

All of those orderings are from the very top letter in the box down to the bottom letter in the box.
Now we notice something, if she just returns from lunch break and her boss gives her letter 9, then she would have to type up

, but the ordered group

is already counted in

which means we are only left with 3 ordered groups namely:

,

and

Again we notice something, if the subset of

contains 3 elements then there are 3 typing orders possible for that
one set.
How many 3 element subsets are there for

? Well there are

subsets which means there are a total of
)
typing orders for a subset with 3 elements.
Doing some more experimentation shows that for
a 2 element subsets there are 2 typing orders for that set. Which means there are
)
typing orders for a subset with 2 elements.
Thus we require this summation:
\binom{7}{j}\right) = \sum_{j=1}^7 \frac{(j)(7!)}{(7-j)!j!} = \sum_{j=1}^7 \frac{(j)(7!)}{(7-j)!(j)(j-1)!} = \sum_{j=1}^7 \frac{(7!)}{(7-j)!(j-1)!} = \sum_{j=1}^7 \frac{(7)((6)!)}{(7-j)!(j-1)!} = 7 \sum_{j=1}^7 \binom{6}{7-j} = 7 \left(\binom{6}{6} + \binom{6}{5} + ... + \binom{6}{0}\right) = 7(2^6))
(Notice we start from when

, ie when the subset of

contains only 1 element, since if it contains 0 elements it is already counted in

)
)
In total we have
 = 704)
typing orders!