Subfield: Combinatorics


Question: An $\boldsymbol{n}$-label is a permutation of the numbers 1 through $n$. For example, $J=35214$ is a 5 -label and $K=132$ is a 3 -label. For a fixed positive integer $p$, where $p \leq n$, consider consecutive blocks of $p$ numbers in an $n$-label. For example, when $p=3$ and $L=263415$, the blocks are 263,634,341, and 415. We can associate to each of these blocks a $p$-label that corresponds to the relative order of the numbers in that block. For $L=263415$, we get the following:

$$
\underline{263} 415 \rightarrow 132 ; \quad 2 \underline{63415} \rightarrow 312 ; \quad 26 \underline{341} 5 \rightarrow 231 ; \quad 263 \underline{415} \rightarrow 213
$$

Moving from left to right in the $n$-label, there are $n-p+1$ such blocks, which means we obtain an $(n-p+1)$-tuple of $p$-labels. For $L=263415$, we get the 4 -tuple $(132,312,231,213)$. We will call this $(n-p+1)$-tuple the $\boldsymbol{p}$-signature of $L$ (or signature, if $p$ is clear from the context) and denote it by $S_{p}[L]$; the $p$-labels in the signature are called windows. For $L=263415$, the windows are $132,312,231$, and 213 , and we write

$$
S_{3}[263415]=(132,312,231,213)
$$

More generally, we will call any $(n-p+1)$-tuple of $p$-labels a $p$-signature, even if we do not know of an $n$-label to which it corresponds (and even if no such label exists). A signature that occurs for exactly one $n$-label is called unique, and a signature that doesn't occur for any $n$-labels is called impossible. A possible signature is one that occurs for at least one $n$-label.

In this power question, you will be asked to analyze some of the properties of labels and signatures.


We can associate a shape to a given 2-signature: a diagram of up and down steps that indicates the relative order of adjacent numbers. For example, the following shape corresponds to the 2-signature $(12,12,12,21,12,21)$ :

![](https://cdn.mathpix.com/cropped/2023_12_21_793ce3b512229d118445g-1.jpg?height=236&width=442&top_left_y=2213&top_left_x=836)



A 7-label with this 2-signature corresponds to placing the numbers 1 through 7 at the nodes above so that numbers increase with each up step and decrease with each down step. The 7-label 2347165 is shown below:

![](https://cdn.mathpix.com/cropped/2023_12_21_54786ae6b210123098f4g-1.jpg?height=257&width=464&top_left_y=419&top_left_x=825)
Determine the number of 9-labels with 2-signature

$$
(12,21,12,21,12,21,12,21) \text {. }
$$

Justify your answer.

Solution:
The answer is 7936. The shape of this 2-signature has four peaks and three intermediate valleys:

![](https://cdn.mathpix.com/cropped/2023_12_21_b4f25e2667a6f4e35f44g-1.jpg?height=176&width=1152&top_left_y=535&top_left_x=579)

We will solve this problem by building up from smaller examples. Let $f_{n}$ equal the number of $(2 n+1)$-labels whose 2 -signature consists of $n$ peaks and $n-1$ intermediate valleys. In part (b) we showed that $f_{2}=16$. In the case where we have one peak, $f_{1}=2$. For the trivial case (no peaks), we get $f_{0}=1$. These cases are shown below.

1

![](https://cdn.mathpix.com/cropped/2023_12_21_b4f25e2667a6f4e35f44g-1.jpg?height=219&width=357&top_left_y=1037&top_left_x=835)

![](https://cdn.mathpix.com/cropped/2023_12_21_b4f25e2667a6f4e35f44g-1.jpg?height=214&width=350&top_left_y=1037&top_left_x=1251)

Suppose we know the peak on which the largest number, $2 n+1$, is placed. Then that splits our picture into two shapes with fewer peaks. Once we choose which numbers from $1,2, \ldots, 2 n$ to place each shape, we can compute the number of arrangements of the numbers on each shape, and then take the product. For example, if we place the 9 at the second peak, as shown below, we get a 1-peak shape on the left and a 2-peak shape on the right.

![](https://cdn.mathpix.com/cropped/2023_12_21_b4f25e2667a6f4e35f44g-1.jpg?height=220&width=1155&top_left_y=1755&top_left_x=577)

For the above shape, there are $\left(\begin{array}{l}8 \\ 3\end{array}\right)$ ways to pick the three numbers to place on the left-hand side, $f_{1}=2$ ways to place them, and $f_{2}=16$ ways to place the remaining five numbers on the right.

This argument works for any $n>1$, so we have shown the following:

$$
f_{n}=\sum_{k=1}^{n}\left(\begin{array}{c}
2 n \\
2 k-1
\end{array}\right) f_{k-1} f_{n-k}
$$



So we have:

$$
\begin{aligned}
& f_{1}=\left(\begin{array}{l}
2 \\
1
\end{array}\right) f_{0}^{2}=2 \\
& f_{2}=\left(\begin{array}{l}
4 \\
1
\end{array}\right) f_{0} f_{1}+\left(\begin{array}{l}
4 \\
3
\end{array}\right) f_{1} f_{0}=16 \\
& f_{3}=\left(\begin{array}{l}
6 \\
1
\end{array}\right) f_{0} f_{2}+\left(\begin{array}{l}
6 \\
3
\end{array}\right) f_{1}^{2}+\left(\begin{array}{l}
6 \\
5
\end{array}\right) f_{2} f_{0}=272 \\
& f_{4}=\left(\begin{array}{l}
8 \\
1
\end{array}\right) f_{0} f_{3}+\left(\begin{array}{l}
8 \\
3
\end{array}\right) f_{1} f_{2}+\left(\begin{array}{l}
8 \\
5
\end{array}\right) f_{2} f_{1}+\left(\begin{array}{l}
8 \\
7
\end{array}\right) f_{3} f_{0}=7936 .
\end{aligned}
$$

Final answer: 7936