Let be a sequence of distinct integers sorted in ascending order. How many distinct pairs of sequences, and are there such that
- each is sorted in ascending order,
- has and has elements, and
- the result of merging and gives
View worked solution
Answer: C
Let the sorted sequence of distinct elements be represented as where .
We need to form two sequences, of size and of size , such that:
- Both and are sorted in ascending order.
- Merging and yields the original sequence .
Since the merge of and results in , the elements of and must partition the elements of . That is, and .
Because both and must be sorted in ascending order, the order of elements in each sequence is uniquely determined once the elements themselves are chosen. For example, if we choose any elements from to form , there is exactly one way to arrange them in ascending order. The remaining elements will form , and they also have exactly one valid ascending arrangement.
Thus, the number of distinct pairs of sequences is simply the number of ways to choose elements out of for sequence :
Therefore, there are distinct pairs of sequences.
Free practice · Your answers on this page are not saved.
