23. C3 (COL) Let be a positive integer. A sequence of positive integers (not necessarily distinct) is called full if it satisfies the following condition: For each positive integer , if the number appears in the sequence, then so does the number , and moreover, the first occurrence of comes before the last occurrence of . For each , how many full sequences are there?
Solution
23. We claim that there are ! full sequences. To show this, we construct a bijection with the set of permutations of . Consider a full sequence , and let be the greatest of the numbers . Let , be the set of those indices for which . Then are nonempty and form a partition of the set . Now we write down the elements of in descending order, then the elements of in descending order and so on. This maps the full sequence to a permutation of . Moreover, this map is reversible, since each permutation uniquely breaks apart into decreasing sequences , so that . Therefore the full sequences are in bijection with the permutations of . Second solution. Let there be given a full sequence of length . Removing from it the first occurrence of the highest number, we obtain a full sequence of length . On the other hand, each full sequence of length can be obtained from exactly full sequences of length . Therefore, if is the number of full sequences of length , we deduce .