A combinatorial proof of a tantalizing symmetry on Catalan objects
We investigate a tantalizing symmetry on Catalan objects. In terms of Dyck paths, this symmetry is interpreted in the following way: if $w_{n,k,m}$ is the number of Dyck paths of semilength $n$ with $k$ occurrences of $UD$ and $m$ occurrences of $UUD$, then $w_{2k+1,k,m}=w_{2k+1,k,k+1-m}$. We give two proofs of this symmetry: an algebraic proof using generating functions, and a combinatorial proof which makes heavy use of the cycle lemma and an alternate interpretation of the numbers $w_{n,k,m}$ using plane trees. In particular, our combinatorial proof expresses the numbers $w_{2k+1,k,m}$ in terms of Narayana numbers, and we generalize this to a relationship between the numbers $w_{n,k,m}$ and a family of generalized Narayana numbers due to Callan. Some further generalizations and applications of our combinatorial proofs are explored. Finally, we investigate properties of the polynomials $W_{n,k}(t)= \sum_{m=0}^k w_{n,k,m} t^m$, including real-rootedness, $\gamma$-positivity, and a symmetric decomposition.
\section{Introduction}

Lattice path enumeration is an active area of investigation in combinatorics. 
A \emph{lattice path} is a path in the discrete integer lattice $\mathbb{Z}^n$ consisting of a sequence of steps from a prescribed \emph{step set} and satisfying prescribed restrictions.
Among classical lattice paths, Dyck paths are perhaps the most well-studied. 
A \emph{Dyck path} of \emph{semilength} $n$ is a path in $\mathbb{Z}^2$ with step set $S= \{ (1,1), (1,-1) \}$ that starts at the origin $(0,0)$, ends at $(2n,0)$, and never traverses below the horizontal axis. 
The steps $(1,1)$ are called \emph{up steps} and can be represented by the letter $U$, while the steps $(1,-1)$ are \emph{down steps} and denoted $D$. 
It is well known that the number of Dyck paths of semilength $n$ is the Catalan number $C_n=\binom{2n}{n}/(n+1)$. 

The number of Dyck paths of semilength $n$ that contain exactly $k$ places where a $U$ is immediately followed by a $D$---called $UD$-\emph{factors} (or \emph{peaks})---is equal to the \emph{Narayana number} $N_{n,k}$ defined by
\[N_{n,k} = \frac{1}{n}\binom{n}{k} \binom{n}{k-1} \]
for all $1 \leq k \leq n$ and by $N_{0,0} = 1$. Also, $N_{n,k}$ is the number of Dyck paths of semilength $n$ with $k-1$ $DU$-factors. The Narayana numbers are known to exhibit the symmetry $N_{n,k} = N_{n,n+1-k}$, which can be proved combinatorially via several involutions; see, for example, \cite{Kreweras1970, Kreweras1972, Lalanne1992}.

There is interest in counting Dyck paths (and other kinds of lattice paths) by the number of occurrences of longer factors, or even finding the \emph{joint distribution} of occurrences of multiple kinds of factors.
Two early works in this direction are \cite{Deutsch1999, sapounakis-tsoulas-tsikouras}. 
In \cite{wang}, Wang discusses a general technique that is useful for obtaining the relevant generating functions in many such cases; see also \cite{yam}.
Our work is concerned with the joint distribution of $UD$-factors and $UUD$-factors over Dyck paths, which does not seem to have been studied before, and is different from the instances discussed in the works cited above as the factor $UD$ is an ending segment of the factor $UUD$. We can also interpret these factors in terms of \emph{runs}---maximal consecutive subsequences of up steps---as the number of $UD$-factors is equal to the total number of runs, and the number of $UUD$-factors is equal to the number of runs of length at least 2.

Let $w_{n,k,m}$ be the number of Dyck paths of semilength $n$ with $k$ $UD$-factors and $m$ $UUD$-factors. Then we have the following tantalizing symmetry:
\begin{thm}
\label{th:main}
  For all $1 \leq m \leq k$, we have 
  $$
  w_{2k+1,k,m} = w_{2k+1,k, k+1-m}.
  $$
\end{thm}
\noindent In other words, among all Dyck paths of semilength $2k+1$ with $k$ $UD$-factors, the number of those with $m$ $UUD$-factors is equal to the number of those with $k+1-m$ $UUD$-factors. 
To prove this symmetry, the first and third authors used generating function techniques to derive the following closed formula for the numbers $w_{n,k,m}$, from which Theorem \ref{th:main} readily follows.

\begin{thm} \label{t-explicit} We have
\begin{equation*} 
w_{n,k,m} = \begin{cases}
    \displaystyle{\frac{1}{k}\binom{n}{k-1}\binom{n-k-1}{m-1}\binom{k}{m}}, & \text{ if } m>0, \, m\leq k, \, \text{and } k+m\leq n, \\
    1, & \text{ if } m = 0 \text{ and } n = k,\\
    0, & \text{ otherwise.}
\end{cases}
\end{equation*}
\end{thm}

Nonetheless, Theorem \ref{th:main} cries for combinatorial explanation, but a combinatorial proof eluded the first and third authors for several years.
The remaining authors joined this project in Summer 2022 as part of the AMS Mathematics Research Community \emph{Trees in Many Contexts}, during which we found a combinatorial proof for Theorem \ref{th:main}; this proof is the main focus of our paper.
To give a combinatorial proof for Theorem \ref{th:main}, we in fact give a combinatorial proof for the following identity relating the numbers $w_{2k+1,k,m}$ to Narayana numbers.
\begin{thm}
\label{th:relationNandW}
For all $k \geq 1$ and $m\geq 0$, we have
\begin{equation}
\label{eq:relNW}
w_{2k+1,k, m} = \binom{2k+1}{k-1} N_{k,m}.    
\end{equation}
\end{thm}
Observe that Theorem \ref{th:main} follows immediately from Theorem \ref{th:relationNandW} and the symmetry of the Narayana numbers. 
Our combinatorial proof of Theorem \ref{th:relationNandW} requires heavy use of the cycle lemma, as well as an alternate interpretation of the numbers $w_{n,k,m}$ in terms of plane trees.
We also generalize Theorem \ref{th:relationNandW} to a relationship between the $w_{n,k,m}$ and a family of generalized Narayana numbers introduced by Callan ~\cite{callan}. 
Along the way, we provide a combinatorial proof for our explicit formula for the numbers $w_{n,k,m}$ stated in Theorem ~\ref{t-explicit}. In fact, many of our results generalize to the numbers $w_{n, k_{1}, k_{2}, \ldots, k_{r}}$, defined to be the number of Dyck paths of semilength $n$ with $k_{1}$ $UD$-factors, $k_{2}$ $UUD$-factors,  \dots , and $k_{r}$ $U^{r}D$-factors.

This paper is structured as follows. 
In Section \ref{explicit_solution}, we present an algebraic proof (using generating functions) for the explicit formula in Theorem \ref{t-explicit}. Readers who are only interested in combinatorial proofs may skip to Section \ref{preliminaries}, which reviews background material needed for our combinatorial proofs. In Section \ref{combinatorial_proofs}, we present a combinatorial proof for Theorem ~\ref{th:relationNandW} as well as a variant of Theorem ~\ref{th:relationNandW} for the numbers $w_{2k-1,k,m}$.
Section \ref{s-generalized} provides a combinatorial proof of Theorem ~\ref{t-explicit} and presents generalizations of various results, including our generalized formula relating the $w_{n,k,m}$ to generalized Narayana numbers as well as results on the numbers $w_{n, k_{1}, k_{2}, \ldots, k_{r}}$. 
We conclude in Section \ref{polynomials} with some investigation of the polynomials $W_{n,k}(t)= \sum_{m=0}^k w_{n,k,m} t^m$, including real-rootedness and $\gamma$-positivity results, as well as a symmetric decomposition. Several conjectures on the polynomials $W_{n,k}(t)$ and their symmetric decomposition are given.






\section{The generating function approach}\label{explicit_solution}

The goal of this section is to present an algebraic proof of Theorem \ref{t-explicit}, which gives an explicit formula for the numbers $w_{n,k,m}$ and in turn implies the symmetry in Theorem \ref{th:main}. 
To do so, we need a functional equation satisfied by the generating function $W$ defined by
\[W=W(x,y,z)=\sum_{n,k,m}w_{n,k,m}\,x^ny^kz^m.\]
In other words, $W$ is the generating function of all Dyck paths, where the exponents of $x$, $y$, and $z$ encode the semilength, the number of $UD$-factors, and the number of $UUD$-factors, respectively. 



\begin{lemma}
The functional equation
\begin{equation}\label{func_eq-first}
(x-x^2y+x^2yz)W^2-(1+x-xy)W+1=0
\end{equation}
holds. 
\end{lemma}

\begin{proof}
Let us call a Dyck path of positive semilength \emph{irreducible} if it does not touch the horizontal axis, other than at its starting point and endpoint.
Then each nonempty Dyck path $P$ uniquely decomposes as the concatenation of an irreducible Dyck path and a Dyck path (in that order), where the latter is the empty path if $P$ itself is irreducible. 
If $V(x,y,z)$ is the generating function for irreducible Dyck paths defined similarly to $W(x,y,z)$ but only for irreducible paths, then this leads to the functional equation
\begin{equation} \label{funceq1}
W = 1+ VW.
\end{equation}

Let $I$ be an irreducible Dyck path; then $I$ must start with an up step, end with a down step, and consist of a Dyck path $P_1$ between the two.
If $P_1$ is empty, then $I$ is simply the path $UD$, contributing $xy$ to the generating function $V(x,y,z)$.
Otherwise, $I=UP_1D$, and $I$ has the same number of $UD$-factors as $P_1$, while its semilength is one longer.
The number of $UUD$-factors of $I$ compared with that of $P_1$, however, depends on whether $P_1$ begins with a $UD$, so let us consider these two cases separately: \vspace{5bp}
\begin{itemize}
\item If $P_1$ does begin with a $UD$, then $P_1$ is of the form $UDP_2$ and $I=UP_1D=UUDP_2D$ has one more $UUD$-factor than $P_1$.
Therefore, in this case, $I$ has one more $UD$-factor and one more $UUD$-factor than $P_2$, while its semilength is two longer.
Dyck paths of this type contribute $x^2yzW$ to $V$. \vspace{5bp}
\item If $P_1$ does not begin with a $UD$, then $I$ also has the same number of $UUD$-factors as $P_1$; Dyck paths of this type contribute $x(W-1-xyW)$ to the generating function $V$. \vspace{5bp}
\end{itemize}
Thus, we have the functional equation
\begin{equation} \label{funceq2}
  V= xy+ x^2yzW + x(W-1-xyW).
  \end{equation}
The proof of our claim is now routine by substituting the expression obtained for $V$ in \eqref{funceq2} into  (\ref{funceq1}) and rearranging.  
\end{proof}


\begin{proof}[Algebraic proof of Theorem ~\ref{t-explicit}]
Equation (\ref{func_eq-first}) can be rewritten as  
\begin{equation*}\label{func_eq2}
uW^2-vW+1=0, \quad {\text{where }} u=x-x^2y+x^2yz {\text{ and }} v=1+x-xy.
\end{equation*}
Solving for $W$ in this second degree equation, after elementary manipulations, gives
\begin{equation*}\label{quad_sol}
W=\frac{v-\sqrt{v^2-4u}}{2u}=\frac{v}{2u} \left(1-\sqrt{1-4 \frac{u}{v^2}}\right). 
\end{equation*}
Setting $t=u/v^2$ in the well known classical equation
\begin{equation*}
\frac{1-\sqrt{1-4t}}{2t}=\sum_{\nu \geq 0} C_\nu t^\nu,
\end{equation*}
where $C_\nu=\binom{2\nu}{\nu}/{(\nu+1)}$ is the $\nu^{th}$ Catalan number, we expand $W$ as
\begin{equation}\label{the_sum}
W=W(x,y,z)=\sum_{\nu \geq 0} C_\nu\, \frac{(x-x^2y+x^2yz)^\nu}{(1+x-xy)^{2\nu+1}},
\end{equation}
whose terms are rational functions in $x$, $y$, and $z$ and there are no square roots involved.
We now expand each term of (\ref{the_sum}) using a multinomial or negative binomial expansion.
First, the multinomial expansion of the numerator takes the form 
\begin{equation}\label{expansion1}
(x-x^2y+x^2yz)^\nu = \sum_{i+j+m=\nu}\frac{\nu!}{i!\, j!\, m!}x^i(-x^2y)^j(x^2yz)^m=\sum_{i+j+m=\nu}\frac{(-1)^j\nu!}{i!\, j!\, m!}x^{i+2j+2m}y^{j+m}z^m.
\end{equation}
Next, the negative binomial expansion applied to the denominator gives
\begin{equation}\label{expansion2}
(1+x-yx)^{-(2\nu+1)}=\sum_s \frac{(2\nu+s)!}{(2\nu)!\, s!} (-x+yx)^s= \sum_{\ell,r}\frac{(2\nu+\ell+r)!}{(2\nu)!\, \ell !\,  r!}(-1)^\ell y^rx^{\ell+r}.
\end{equation}
Then, multiplying (\ref{expansion1}) and (\ref{expansion2}), summing with respect to $\nu$, and taking into account that by (\ref{expansion1}) we have $\nu=i+j+m$, Equation (\ref{the_sum}) becomes 
\begin{equation}\label{long_expansion}
W(x,y,z)=\sum_{i,j,m,\ell,r} \frac{(2i+2j+2m+\ell+r)!}{(i+j+m+1)!\, i!\, j!\, m!\, \ell!\, r!}(-1)^{j+\ell}x^{i+2j+2m+\ell+r}y^{j+m+r}z^m.
\end{equation}
Collecting terms in (\ref{long_expansion}), we get
\begin{align}
w_{n,k,m} &= \!\!\!\sum_{\substack{i+2j+2m+\ell+r=n\\ j+m+r=k} } \frac{(2i+2j+2m+\ell+r)!}{(i+j+m+1)!\, i!\, j!\, m!\, \ell!\, r!}(-1)^{j+\ell} \nonumber \\
&=\frac{1}{m!}\!\sum_{\substack{i+2j+2m+\ell+r=n\\j+m+r=k}} \frac{(-1)^{j+\ell}(2i+2j+2m+\ell+r)!}{(i+j+m+1)!\, i!\, j!\, \ell!\, r!}.\label{w2}
\end{align} 
Now, solving the system $\{i+2j+2m+\ell+r=n, j+m+r=k\}$ for $\ell, r\geq0$, the indexes $\ell$ and $r$ must satisfy the conditions
\begin{equation}\label{cond_ell_r}
\ell=n-k-m-i-j \geq 0 \quad \text{and} \quad r=k-m-j \geq 0,
\end{equation}
while $i,j\geq 0$.
This implies that $n$, $k$, and $m$ must satisfy the inequalities
\begin{equation}\label{ineq}
m\leq k \quad \text{and} \quad k+m \leq n 
\end{equation}
(otherwise the sum is empty and has value $0$). 
Substituting in (\ref{w2}) the values of $\ell$ and $r$ given by (\ref{cond_ell_r}), the coefficient $w_{n,k,m}$ is expressed as the double sum
\begin{equation}\label{double_sum}
w_{n,k,m} = \frac{1}{m!}\sum_{\substack{i+j\leq n-k-m \\j \leq k-m}} \frac{(-1)^{n-k-m-i}(n+i)!}{(i+j+m+1)!\, i!\, j!\, (n-k-m-i-j)!\, (k-m-j)!}. 
\end{equation}
This double sum can be greatly simplified using the Maple procedure ``\texttt{sum}" as follows. 
Since the factorials in the denominators in (\ref{double_sum}) are $\pm \infty$ when $i,j$ are big enough to be out of range, the corresponding terms in the double sum vanish.
Hence, we can take the ranges {\texttt{i=0..infty}} and {\texttt{j=0..infty}} in the double sum. 
Typing the Maple command
\vspace{0.2cm}

\noindent \texttt{> w[n,k,m] = 1/m!*sum(((-1)**(n-k-m-i)*(i+n)!/i!)*\\
sum(1/(i+j+m+1)!/j!/(n-i-j-k-m)!/(k-m-j)!,j=0..infinity),i=0..infinity);}
\vspace{0.2cm}\\
\noindent produces the output
\begin{equation*}\label{output}
w_{n,k,m} = -{\frac { \left( -1 \right) ^{n-k-m}n!\, \left( m+1 \right) m\,\sin
 \left( \pi\,k-\pi\,n \right) }{m!\, \left( m+1 \right) !\, \left( n-k
-m \right) !\, \left( k-m \right) !\,\sin \left( \pi\,m \right) 
 \left( k-n \right)  \left( k-1-n \right) }},
 \end{equation*}
which we rewrite in the form
\begin{equation}\label{wmnp+}
w_{n,k,m} = {\frac { \left( -1 \right) ^{n-k-m}n!\, \left( m+1 \right)  }{m!\, \left( m+1 \right) !\, \left( n-k
-m \right) !\, \left( k-m \right) !\, \left( n-k+1 \right) }}\cdot q(n,k,m)
\end{equation}
where $q(n,k,m)$ takes the indeterminate form
 \begin{equation*}
q(n,k,m)=\frac{m\sin(\pi (n-k))}{\sin(\pi m)(n-k)}=\frac{0}{0},
\end{equation*}
\noindent since $n$, $k$, and $m$ are positive integers. We ``lift" this indetermination by making use of the limits
\begin{align}
\lim_{t \rightarrow 0}\frac{t}{\sin(\pi t)}&=\frac{1}{\pi} \label{lim_i} \quad \text{and}\\ 
\lim_{t \rightarrow \pi}\frac{\sin(kt)}{\sin(\ell t)}&=(-1)^{k-\ell}\,\frac{k}{\ell}, \quad k \in \mathbb{Z}, \,\, 0\neq \ell \in \mathbb{Z}.\label{lim_ii}
\end{align}
To complete the proof, we break into cases: \vspace{5bp}
\begin{itemize}
    \item If $m=0$ and $k=n$, then using (\ref{lim_i}) twice, we get $q(k,k,0)=\frac{1}{\pi}\cdot \frac{\pi}{1}=1$. This implies, by (\ref{wmnp+}), that $w_{n,k,0}=1$ when $k=n$. \vspace{5bp}
    \item If $m=0$ and $k \neq n$, then by (\ref{ineq}) we need only to consider the case $k<n$. Hence, by (\ref{lim_i}) we get \[q(n,k,0)=\frac{1}{\pi}\cdot \frac{\sin(\pi(n-k))}{n-k}=0,\] since $\sin(\pi(n-k))=0$ and $n-k\neq 0$. This implies that $w_{k,0,n} = 0$ if $k \neq n$. \vspace{5bp}
    \item If $m>0$ and $k+m\leq n$, then we must have $k < n$. Thus, by (\ref{lim_ii}) with $k=n-k$ and $\ell=m$, we have
\begin{equation*}
q(n,k,m)=\frac{m}{n-k}\cdot \frac{\sin(\pi(n-k))}{\sin(\pi m)}=\frac{m}{n-k}\cdot (-1)^{n-k-m}.
\end{equation*}
Substituting this value into (\ref{wmnp+}) yields
\begin{equation*}
w_{n,k,m}={\frac {n!}{m!\, \left( m-1 \right) !\, \left( n-k-m \right) !\,
 \left( k-m \right) !\, \left( n-k \right)  \left( n-k+1 \right) }},
\end{equation*}
which is equivalent to the desired expression in Theorem ~\ref{t-explicit}. \qedhere
\end{itemize}
\end{proof}


In order to ``cross check" our formula in Theorem \ref{t-explicit}, we computed the first terms of $W(x,y,z)$ using two methods: 
firstly, by making use of the explicit expression for the coefficients given in Theorem \ref{t-explicit}, and 
secondly, by making use of the Maple ``\texttt{mtaylor}" command applied to (\ref{quad_sol}). 
Both methods gave the same results displayed in Table \ref{Tab_w}. 


\begin{table}[ht] 
\caption{The nonzero values of $w_{n,k,m}$ for $0\leq n\leq 10$.}\label{Tab_w}
\small
\begin{tabular}[t]{|c|c|}
\hline
$n,k,m$ & $w_{n,k,m}$\\ \hline \hline
0, 0, 0 & 1 \\ \hline
1, 1, 0 & 1 \\ \hline
2, 1, 1 & 1 \\ 
2, 2, 0 & 1 \\ \hline
3, 1, 1 & 1 \\
3, 2, 1 & 3 \\
3, 3, 0 & 1 \\ \hline
4, 1, 1 & 1 \\
4, 2, 1 & 4 \\
4, 2, 2 & 2 \\
4, 3, 1 & 6 \\
4, 4, 0 & 1 \\\hline
5, 1, 1 & 1 \\
5, 2, 1 & 5 \\
5, 2, 2 & 5 \\
5, 3, 1 & 10 \\
5, 3, 2 & 10 \\
5, 4, 1 & 10 \\
5, 5, 0 & 1 \\ \hline
6, 1, 1 & 1 \\
6, 2, 1 & 6 \\
6, 2, 2 & 9 \\
6, 3, 1 & 15 \\
6, 3, 2 & 30 \\
6, 3, 3 & 5 \\
6, 4, 1 & 20 \\
6, 4, 2 & 30 \\
6, 5, 1 & 15 \\
6, 6, 0 & 1 \\ \hline
\end{tabular}
\quad
\begin{tabular}[t]{|c|c|}
\hline
$n,k,m$ & $w_{n,k,m}$\\ \hline \hline
7, 1, 1 & 1 \\
7, 2, 1 & 7 \\
7, 2, 2 & 14 \\
7, 3, 1 & 21 \\
7, 3, 2 & 63 \\
7, 3, 3 & 21 \\
7, 4, 1 & 35 \\
7, 4, 2 & 105 \\
7, 4, 3 & 35 \\
7, 5, 1 & 35 \\
7, 5, 2 & 70 \\
7, 6, 1 & 21 \\
7, 7, 0 & 1 \\ \hline
8, 1, 1 & 1 \\
8, 2, 1 & 8 \\
8, 2, 2 & 20 \\
8, 3, 1 & 28 \\
8, 3, 2 & 112 \\
8, 3, 3 & 56 \\
8, 4, 1 & 56 \\
8, 4, 2 & 252 \\
8, 4, 3 & 168 \\
8, 4, 4 & 14 \\
8, 5, 1 & 70 \\
8, 5, 2 & 280 \\
8, 5, 3 & 140 \\
8, 6, 1 & 56 \\
8, 6, 2 & 140 \\
8, 7, 1 & 28 \\
8, 8, 0 & 1 \\ \hline
\end{tabular}
\quad 
\begin{tabular}[t]{|c|c|}
\hline
$n,k,m$ & $w_{n,k,m}$\\ \hline \hline
9, 1, 1 & 1 \\
9, 2, 1 & 9 \\
9, 2, 2 & 27 \\
9, 3, 1 & 36 \\
9, 3, 2 & 180 \\
9, 3, 3 & 120 \\
9, 4, 1 & 84 \\
9, 4, 2 & 504 \\
9, 4, 3 & 504 \\
9, 4, 4 & 84 \\
9, 5, 1 & 126 \\
9, 5, 2 & 756 \\
9, 5, 3 & 756 \\
9, 5, 4 & 126 \\
9, 6, 1 & 126 \\
9, 6, 2 & 630 \\
9, 6, 3 & 420 \\
9, 7, 1 & 84 \\
9, 7, 2 & 252 \\
9, 8, 1 & 36 \\
9, 9, 0 & 1 \\ \hline
\end{tabular} 
\quad
\begin{tabular}[t]{|c|c|}
\hline
$n,k,m$ & $w_{n,k,m}$\\ \hline \hline
10, 1, 1 & 1 \\
10, 2, 1 & 10 \\
10, 2, 2 & 35 \\
10, 3, 1 & 45 \\
10, 3, 2 & 270 \\
10, 3, 3 & 225 \\
10, 4, 1 & 120 \\
10, 4, 2 & 900 \\
10, 4, 3 & 1200 \\
10, 4, 4 & 300 \\
10, 5, 1 & 210 \\
10, 5, 2 & 1680 \\
10, 5, 3 & 2520 \\
10, 5, 4 & 840 \\
10, 5, 5 & 42 \\
10, 6, 1 & 252 \\
10, 6, 2 & 1890 \\
10, 6, 3 & 2520 \\
10, 6, 4 & 630 \\
10, 7, 1 & 210 \\
10, 7, 2 & 1260 \\
10, 7, 3 & 1050 \\
10, 8, 1 & 120 \\
10, 8, 2 & 420 \\
10, 9, 1 & 45 \\
10, 10, 0 & 1 \\ \hline
\end{tabular}\\ 
\end{table}

\section{Preliminaries for Combinatorial Proofs}\label{preliminaries}

In this section, we introduce the background material necessary for our combinatorial proofs in Sections 4--5.

\subsection{Dyck paths and plane trees}

Recall that a \emph{Dyck path} of \emph{semilength} $n$ is a path in $\mathbb{Z}^2$ that begins at the origin, ends at $(2n,0)$, never goes below the horizontal axis, and consists of a sequence of \emph{up steps} $(1,1)$ and \emph{down steps} $(1,-1)$. 
We can represent Dyck paths as \emph{Dyck words}: words $\pi$ on the alphabet $\{U,D\}$ with the same number of $U$s and $D$s, such that there are never more $D$s than $U$s in any prefix of $\pi$. 
When we refer to a $UD$- or $UUD$-factor in a Dyck path, we really mean a factor in the corresponding Dyck word.
As mentioned in the introduction, Dyck paths are a classical example of Catalan objects, as the number of Dyck paths of semilength $n$ is the $n$th Catalan number.

\begin{figure}[b]
\begin{subfigure}[b]{.4\linewidth}
    \centering
    \begin{tikzpicture}[scale = .5, auto=center]
	\draw[step=1.0, gray!100, thin] (0,0) grid (10, 4);
	\draw[black!80, line width=2pt] (0,0) -- (1,1) -- (2,0) -- (3,1) -- (4,2) -- (5,1) -- (6,2) -- (7,3) -- (8,2) -- (9,1) -- (10,0) ;
    \end{tikzpicture}
    \caption{Dyck path of semilength $5$ with $3$ $UD$-factors and $2$ $UUD$-factors.}
\end{subfigure}
\hspace{1cm}
\begin{subfigure}[b]{.4\linewidth}
    \centering
    \begin{tikzpicture}[scale=.5,auto=center, roundnode/.style={circle,fill=black!60, inner sep=1.5pt, minimum width=4pt}]
        \node[roundnode] (root) at (0,0) {};  
        \node[roundnode] (a1) at (-1.5,-1.5) {};  
        \node[roundnode] (a2) at (1.5,-1.5) {}; 
        \node[roundnode] (b1) at (0,-3) {};
        \node[roundnode] (b2) at (3,-3) {};
        \node[roundnode] (c1) at (3,-4.5) {};
        \node[circle,draw, color = red] at (0, -3) {};
        \node[circle,draw, color = red] at (3, -4.5) {};
        
        \draw (root) -- (a1);
        \draw (root) -- (a2);  
        \draw (a2) -- (b1);
        \draw (a2) -- (b2);
        \draw (b2) -- (c1);
    \end{tikzpicture}
    \caption{Plane tree on $5$ non-root vertices with $3$ leaves and $2$ good leaves (circled in red).}
\end{subfigure}

\caption{Dyck path and its corresponding plane tree under the map $\Phi$ defined in the proof of Proposition ~\ref{prop:reformulation}.}
\end{figure}

Another family of Catalan objects are \emph{plane trees}, defined recursively in the following way. 
In a plane tree $T$, one vertex $v$ of $T$ is designated as the \emph{root} of $T$, and $v$ is either the only vertex of $T$ or otherwise is connected to a sequence of subtrees $(T_1, T_2, \dots, T_j)$, each of which is a plane tree.
When drawing $T$, an edge is drawn from $v$ to the root of each of the subtrees $T_i$, with the $T_i$ drawn left-to-right in the order that they appear in the sequence $(T_1, T_2, \dots, T_j)$.
Then the number of plane trees with $n+1$ vertices (equivalently, $n$ non-root vertices) is the $n$th Catalan number.
We point out that every plane tree must have at least one vertex, namely the root.

Given a non-root vertex $v$ of a plane tree $T$, we say that $v$ is a \emph{leaf} of $T$ if it has no children. 
In particular, the root is not considered to be a leaf if $T$ is the plane tree consisting solely of the root.
We say that a leaf $v$ is a \emph{good leaf} if $v$ is the oldest child (i.e., the left-most child) of a non-root vertex.

We will need the following interpretation of the numbers $w_{n,k,m}$ in terms of plane trees.

\begin{prop} \label{prop:reformulation}
The number $w_{n,k,m}$ counts plane trees with $n$ non-root vertices, $k$ leaves, and $m$ good leaves.
\end{prop}

\begin{proof}

First, note that every Dyck word $\pi$ is either empty or can be recursively decomposed as \[U\pi_1 DU\pi_2 D\cdots U\pi_j D,\] where each $\pi_i$ is a Dyck word.
Note that every $D$ in the above decomposition results in the path returning to the horizontal axis.
Thus, we can translate Dyck words to plane trees by sending the empty path to the plane tree consisting of exactly one vertex (the root) and by recursively sending each subword $\pi_i$ to the subtree $T_i$. 
It is easily verified that this yields a bijective correspondence---call it $\Phi$---between Dyck words of semilength $n$ and plane trees with $n$ non-root vertices, so it remains to show that $\Phi$ preserves the appropriate parameters. 

Let us induct on the semilength $n$ of our Dyck word.
Note that the parameters are preserved when we have an empty Dyck word, so let us assume that the desired result holds for Dyck words of semilength up to some fixed $n\geq0$, and take a Dyck word $\pi = U\pi_1 DU\pi_2 D\cdots U\pi_j D$ of semilength $n+1$. 
In particular, this means that each $\pi_i$ has semilength at most $n$.
Let $(T_1,T_2,\dots,T_j)$ denote the sequence of subtrees in the corresponding plane tree $T=\Phi(\pi)$.

Observe that each $UD$-factor of $\pi$ is either a $UD$-factor in one of the $\pi_i$, or results from an empty $\pi_i$. 
By the induction hypothesis, $UD$-factors in any one of the $\pi_i$ correspond precisely to leaves in $T_i$. 
Furthermore, an empty $\pi_i$ is sent to a subtree $T_i$ consisting of only a root vertex, which is a leaf of $T$.
Every leaf of $T$ arises in one of these two ways, so the number of $UD$-factors is sent to the number of leaves. 
Similarly, it is easy to check that the reverse procedure sends the number of leaves to the number of $UD$-factors. 

Now, observe that each $UUD$-factor of $\pi$ is either a $UUD$-factor of one of the $\pi_i$, or results from a $\pi_i$ with a $UD$ prefix---that is, a $\pi_i$ beginning with a $UD$-factor.
By the induction hypothesis, $UUD$-factors in any one of the $\pi_i$ correspond precisely to good leaves in $T_i$.
Moreover, each $\pi_i$ with a $UD$ prefix is sent to a subtree $T_i$ in which the oldest child of the root of $T_i$ is a leaf, and is in fact a good leaf of $T$ because the root of $T_i$ is a non-root vertex of $T$. 
Every good leaf of $T$ arises in one of these two ways, and it is straightforward to verify that the reverse procedure sends the number of good leaves to the number of $UUD$-factors.
\end{proof}

It is worth noting that the inverse $\Phi^{-1}$ of the bijection $\Phi$ used in the proof of Proposition \ref{prop:reformulation} has a simple non-recursive description: We perform a preorder traversal of a plane tree $T$, and record a $U$ step whenever we go down and record a $D$ step whenever we go up; the result is the Dyck path which $\Phi$ sends to $T$.


\subsection{Cyclic compositions and the cycle lemma}

Given a sequence $p = p_1 p_2 \cdots p_n$, we say that a sequence $p^\prime$ is a \emph{cyclic shift} (or \emph{cyclic rotation}) of $p$ if $p^\prime$ is of the form
\[p^\prime = p_i p_{i+1} \cdots p_n p_1 p_2 \cdots p_{i-1}\]
for some $1 \leq i \leq n$.
Let us write $p \sim p^\prime$ whenever $p$ and $p^\prime$ are cyclic shifts of each other.

Let $\mathsf{Comp}_{n,k}$ denote the set of all compositions of $n$ into $k$ parts, i.e., a sequence of $k$ positive integers whose sum is $n$.
We define a \emph{cyclic composition} $[\mu]$ to be the equivalence class of a composition $\mu$ under cyclic shift.
Let $\mathsf{CComp}_{n,k}$ be the set of cyclic compositions consisting of compositions of $n$ into $k$ parts, which is well-defined because the number of parts of a composition and the sum of its parts are clearly invariant under cyclic shift. 
Let us say that an element of $\mathsf{CComp}_{n,k}$ is a cyclic composition of $n$ into $k$ parts.

We define the \emph{order} of a cyclic composition $[\mu]$, denoted by $\mathsf{ord}[\mu]$, to be the number of representatives of $[\mu]$---that is, the number of distinct compositions that can be obtained from cyclically shifting $\mu$.
Note that applying $\mathsf{ord}[\mu]$ number of cyclic shifts to $\mu$ will return back $\mu$.
If $[\mu] \in \mathsf{CComp}_{n,k}$ has order $k$, then we say that $[\mu]$ is \emph{primitive}. 

For any $[\mu] \in \mathsf{CComp}_{n,k}$, there exists a positive integer $d$ dividing both $n$ and $k$ such that $[\mu]$ is a \emph{concatenation} of $d$ copies of a primitive cyclic composition $[\nu] \in \mathsf{CComp}_{n/d,k/d}$, which means that there exists $\bar{\nu}\in[\nu]$ for which $\mu$ is a concatenation of $d$ copies of $\bar{\nu}$.
In this case, $\mathsf{ord}[\mu]=k/d=\mathsf{ord}[\nu]$. 
(If $d=1$, then $[\mu]$ itself is primitive and is a concatenation of itself.) 
For example, the cyclic composition $[1,2,1,1,2,1]$ is a concatenation of two copies of the primitive cyclic composition $[1,2,1]$, and both of these cyclic compositions have order 3.
It is easy to see that this decomposition of cyclic compositions into primitive cyclic compositions is unique.

\begin{lemma}\label{lemma:2k+1_primitive}
If $n$ and $k$ are relatively prime, then $[\mu] \in \mathsf{CComp}_{n,k}$ is primitive.
\end{lemma}
\begin{proof}
Let $[\mu] \in \mathsf{CComp}_{n,k}$. 
Then $[\mu]$ can be uniquely decomposed as a concatenation of $d$ copies of a primitive cyclic composition, where $d$ is a common divisor of $n$ and $k$.
Since $n$ and $k$ are relatively prime, it follows that $d=1$, whence it follows that $[\mu]$ itself is primitive.
\end{proof}


The cycle lemma will play an important role in our proofs.
Given a positive integer $k$ and a sequence $p = p_{1}p_{2}\cdots p_{l}$ consisting only of $U$s and $D$s, we say that $p$ is \emph{$k$-dominating} if every prefix of $p$---that is, every sequence $p_{1}p_{2}\cdots p_{i}$ where $1 \leq i \leq l$---has more copies of $U$ than $k$ times the number of copies of $D$.

\begin{lemma}[Cycle lemma \cite{dvoretzky-motzkin}]
\label{lemma:cycle}
Let $k$ be a positive integer.
For any sequence $p = p_{1}p_{2}\cdots p_{m+n}$ consisting of $m$ copies of $U$ and $n$ copies of $D$, there are exactly $m-kn$ cyclic shifts of $p$ that are $k$-dominating.
\end{lemma}

We refer to \cite{dershowit-zaks} for a proof of the cycle lemma as well as some applications.
We note that Raney \cite{raney} showed that the cycle lemma is equivalent to the Lagrange inversion formula; Raney's proof was later generalized to the multivariate case by Bacher and Schaeffer \cite{bacher-schaeffer}.

\begin{cor}[of the cycle lemma]
\label{cor:reverse_cycle}
Any sequence of $k$ copies of $\bigcirc$ and $k+1$ copies of $\square$ has exactly one cyclic shift with no proper prefix having more $\square$s than $\bigcirc$s.
\end{cor}
\begin{proof}

Given any sequence $\lambda$ of $k$ copies of $\bigcirc$ and $k+1$ copies of $\square$, let $\tilde{\lambda}$ be the reverse sequence of $\lambda$---that is, the sequence consisting of the entries of $\lambda$ but in reverse order.
The cycle lemma guarantees that there is exactly one cyclic shift of $\tilde{\lambda}$ that is $1$-dominating. 
The reverse sequence of this $1$-dominating cyclic shift is the cyclic shift of $\lambda$ that has no proper prefix having more $\square$s than $\bigcirc$s.
\end{proof}


\section{Combinatorial proofs}\label{combinatorial_proofs}



\subsection{Combinatorial proof of Theorem \ref{th:relationNandW}}

Now, we focus our attention on finding a combinatorial proof of Theorem \ref{th:relationNandW}, which in turn will give a combinatorial proof of Theorem~\ref{th:main}. 
See Figure ~\ref{im:symmetry} for an example---using the plane tree interpretation of the numbers $w_{n,k,m}$---of the symmetry in Theorem~\ref{th:main} that we wish to prove.

\begin{figure}[ht]
\begin{subfigure}[c]{.5\linewidth}
\centering
    \begin{tikzpicture}
        [scale=.4, auto = center, roundnode/.style={circle,fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (root) at (0,0) {}; 
        \node[roundnode] (a1) at (-1, -1.5) {};
        \node[roundnode] (a2) at (1,-1.5)  {};  
        \node[roundnode] (a3) at (1,-3) {};  
        \node[roundnode] (a4) at (1,-4.5) {};
        \node[roundnode] (a5) at (1,-6) {};
        \node[circle,draw, color = red] at (1, -6) {};
        
        \draw (root) -- (a1);
        \draw (root) -- (a2);
        \draw (a2) -- (a3);
        \draw (a3) -- (a4);
        \draw (a4) -- (a5);

        \begin{scope}[shift={(3.5,0)}]
            \node[roundnode] (root) at (0,0) {}; 
            \node[roundnode] (a1) at (1, -1.5) {};
            \node[roundnode] (a2) at (-1,-1.5)  {};  
            \node[roundnode] (a3) at (-1,-3) {};  
            \node[roundnode] (a4) at (-1,-4.5) {};
            \node[roundnode] (a5) at (-1,-6) {};
            \node[circle,draw, color = red] at (-1, -6) {};
        
            \draw (root) -- (a1);
            \draw (root) -- (a2);
            \draw (a2) -- (a3);
            \draw (a3) -- (a4);
            \draw (a4) -- (a5);
        \end{scope}

        \begin{scope}[shift={(7,0)}]
            \node[roundnode] (root) at (0,0) {}; 
            \node[roundnode] (a1) at (0, -1.5) {};
            \node[roundnode] (a2) at (-1,-3)  {};  
            \node[roundnode] (a3) at (1,-3) {};  
            \node[roundnode] (a4) at (-1,-4.5) {};
            \node[roundnode] (a5) at (-1,-6) {};
            \node[circle,draw, color = red] at (-1, -6) {};
        
            \draw (root) -- (a1);
            \draw (a1) -- (a2);
            \draw (a1) -- (a3);
            \draw (a2) -- (a4);
            \draw (a4) -- (a5);
        \end{scope}

        \begin{scope}[shift={(10.5,0)}]
            \node[roundnode] (root) at (0,0) {}; 
            \node[roundnode] (a1) at (0, -1.5) {};
            \node[roundnode] (a2) at (0,-3)  {};  
            \node[roundnode] (a3) at (-1,-4.5) {};  
            \node[roundnode] (a4) at (1,-4.5) {};
            \node[roundnode] (a5) at (-1,-6) {};
            \node[circle,draw, color = red] at (-1, -6) {};
        
            \draw (root) -- (a1);
            \draw (a1) -- (a2);
            \draw (a2) -- (a3);
            \draw (a2) -- (a4);
            \draw (a3) -- (a5);
        \end{scope}

        \begin{scope}[shift={(14,0)}]
            \node[roundnode] (root) at (0,0) {}; 
            \node[roundnode] (a1) at (0, -1.5) {};
            \node[roundnode] (a2) at (0,-3)  {};  
            \node[roundnode] (a3) at (0,-4.5) {};  
            \node[roundnode] (a4) at (-1,-6) {};
            \node[roundnode] (a5) at (1,-6) {};
            \node[circle,draw, color = red] at (-1, -6) {};
        
            \draw (root) -- (a1);
            \draw (a1) -- (a2);
            \draw (a2) -- (a3);
            \draw (a3) -- (a4);
            \draw (a3) -- (a5);
        \end{scope}
    \end{tikzpicture}
    \caption{$w_{5, 2, 1} = 5$}
\end{subfigure}
\begin{subfigure}[c]{.45\linewidth}
\centering
    \begin{tikzpicture}
        [scale=.4, auto = center, roundnode/.style={circle,fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (root) at (0,0) {}; 
        \node[roundnode] (a1) at (-1, -1.5) {};
        \node[roundnode] (a2) at (1,-1.5)  {};  
        \node[roundnode] (a3) at (-1,-3) {};  
        \node[roundnode] (a4) at (1,-3) {};
        \node[roundnode] (a5) at (1,-4.5) {};
        \node[circle,draw, color = red] at (-1, -3) {};
        \node[circle,draw, color = red] at (1, -4.5) {};
        
        \draw (root) -- (a1);
        \draw (root) -- (a2);
        \draw (a1) -- (a3);
        \draw (a2) -- (a4);
        \draw (a4) -- (a5);

        \begin{scope}[shift={(3.5,0)}]
            \node[roundnode] (root) at (0,0) {}; 
            \node[roundnode] (a1) at (1, -1.5) {};
            \node[roundnode] (a2) at (-1,-1.5)  {};  
            \node[roundnode] (a3) at (1,-3) {};  
            \node[roundnode] (a4) at (-1,-3) {};
            \node[roundnode] (a5) at (-1,-4.5) {};
            \node[circle,draw, color = red] at (1, -3) {};
            \node[circle,draw, color = red] at (-1, -4.5) {};
        
            \draw (root) -- (a1);
            \draw (root) -- (a2);
            \draw (a1) -- (a3);
            \draw (a2) -- (a4);
            \draw (a4) -- (a5);
        \end{scope}

        \begin{scope}[shift={(7,0)}]
            \node[roundnode] (root) at (0,0) {}; 
            \node[roundnode] (a1) at (0, -1.5) {};
            \node[roundnode] (a2) at (-1,-3)  {};  
            \node[roundnode] (a3) at (1, -3) {};  
            \node[roundnode] (a4) at (-1,-4.5) {};
            \node[roundnode] (a5) at (1,-4.5) {};
            \node[circle,draw, color = red] at (-1, -4.5) {};
            \node[circle,draw, color = red] at (1, -4.5) {};
        
            \draw (root) -- (a1);
            \draw (a1) -- (a2);
            \draw (a1) -- (a3);
            \draw (a2) -- (a4);
            \draw (a3) -- (a5);
        \end{scope}

        \begin{scope}[shift={(10.5,0)}]
            \node[roundnode] (root) at (0,0) {}; 
            \node[roundnode] (a1) at (0, -1.5) {};
            \node[roundnode] (a2) at (-1,-3)  {};  
            \node[roundnode] (a3) at (1,-3) {};  
            \node[roundnode] (a4) at (1,-4.5) {};
            \node[roundnode] (a5) at (1,-6) {};
            \node[circle,draw, color = red] at (-1, -3) {};
            \node[circle,draw, color = red] at (1, -6) {};
        
            \draw (root) -- (a1);
            \draw (a1) -- (a2);
            \draw (a1) -- (a3);
            \draw (a3) -- (a4);
            \draw (a4) -- (a5);
        \end{scope}

        \begin{scope}[shift={(14,0)}]
            \node[roundnode] (root) at (0,0) {}; 
            \node[roundnode] (a1) at (0, -1.5) {};
            \node[roundnode] (a2) at (0,-3)  {};  
            \node[roundnode] (a3) at (-1,-4.5) {};  
            \node[roundnode] (a4) at (1,-4.5) {};
            \node[roundnode] (a5) at (1,-6) {};
            \node[circle,draw, color = red] at (-1, -4.5) {};
            \node[circle,draw, color = red] at (1, -6) {};
        
            \draw (root) -- (a1);
            \draw (a1) -- (a2);
            \draw (a2) -- (a3);
            \draw (a2) -- (a4);
            \draw (a4) -- (a5);
        \end{scope}
    \end{tikzpicture}
    \caption{$w_{5, 2, 2} = 5$.}
\end{subfigure}
\caption{Plane trees on $5$ non-root vertices with $2$ leaves with the good leaves circled.}
\label{im:symmetry}
\end{figure}

Our proof will mostly rely on two important lemmas.
The first lemma gives a combinatorial interpretation for Narayana numbers in terms of cyclic compositions.

\begin{lemma}
\label{lemma:part1_path}
Let $k \geq 1$ and $m \geq 0$.
Then the Narayana number $N_{k,m}$ is the number of cyclic compositions of $2k+1$ into $k$ parts such that exactly $m$ parts are at least 2.
\end{lemma}

\begin{proof}
We will give a bijective map that takes a cyclic composition of $2k+1$ into $k$ parts, exactly $m$ of which are at least $2$, to a Dyck path of semilength $k$ with $m$ $UD$-factors, which are counted by the Narayana numbers $N_{k,m}$. 

Given a cyclic composition $[\mu_{1},\mu_{2},\ldots, \mu_{k}]$ of $2k+1$ with exactly $m$ parts that are at least $2$, consider the word $U^{\mu_1-1}D U^{\mu_2-1}D \cdots U^{\mu_k-1}D$, which has $k+1$ copies of $U$ and $k$ copies of $D$. 
By the cycle lemma, there is exactly one cyclic shift of this word that is $1$-dominating---that is, with more $U$s than $D$s in every prefix.
Then the first two entries of this $1$-dominating sequence are necessarily $U$s. 
Removing the first $U$, we obtain a Dyck path of semilength $k$ with exactly $m$ $UD$-factors.

It is easily verified that the inverse procedure is given by the following: from a semilength $k$ Dyck path with $m$ $UD$-factors, we get a sequence $(a_1, a_2, \dots a_k)$ where $a_i$ is the number of $U$s that immediately precede the $i$th $D$.
For example, from $UDUUDDUD$ we get the sequence $(1,2,0,1)$. 
Then we add $2$ to $a_1$ and $1$ to each other $a_i$, forming a composition $\mu$ of $2k+1$ into $k$ parts, exactly $m$ of which are at least $2$.
Taking the cyclic composition $[\mu]$ completes the inverse.
\end{proof}

We note that the map used in the proof of Lemma \ref{lemma:part1_path} is related to the standard bijection between \L ukasiewicz paths and Dyck paths. 
A \emph{\L ukasiewicz path} of length $n$ is a path in $\mathbb{Z}^2$ with step set $\{(1,-1),(1,0),(1,1),(1,2), \ldots \}$, starting from $(0,0)$ and ending at $(n,0)$, that never traverses below the $x$-axis; these paths were introduced in relation to the preorder degree sequence of a plane tree, which determines the tree unambiguously \cite[Chapter 1.5]{flajolet-sedgewick}.

The statement and proof of our second lemma are more involved, and will require the notion of ``extended leaves'' and the decomposition of a plane tree into extended leaves.

\begin{dfn}
An \emph{extended leaf} is an unlabeled path graph with exactly one end-vertex designated as the \emph{leaf}.\footnote{A path graph has two end-vertices, both of which are typically considered leaves, but in an extended leaf, we only think of one of them as being a leaf.} 
The length of an extended leaf $E$, denoted by $\ell(E)$, is the number of edges in $E$.
\end{dfn}

Let $v_i$ be the $i$th leaf, as read from left to right, of a plane tree $T$ with $k$ leaves. 
Let us now describe the \emph{extended leaf decomposition} of $T$, which is obtained as follows.
For each leaf $v_i$, we trace the path from $v_i$ to the closer of the two:  
\begin{enumerate}
\item the root, or
\item the closest ancestor of $v_i$ that has two or more children, and $v_i$ is not the oldest of those children nor a descendent of the oldest child.
\end{enumerate}
This path is the extended leaf $E_i$.
In other words, to find $E_i$, we start at the leaf $v_i$ and then trace the path from $v_i$ toward the root until we reach a vertex $a$ that has another child to the left of the path; if no such $a$ exists, we take $a$ to be the root.
The path from $v_i$ to $a$ is the extended leaf $E_i$. 
The sequence $E_1E_2\cdots E_k$ is the extended leaf decomposition of $T$; it is not difficult to see that this decomposition is unique.

\begin{figure}[ht]
\begin{center}
\begin{subfigure}[c]{.2\textwidth}
    \begin{tikzpicture}[scale=.44, auto = center, roundnode/.style={circle,fill=black!60, inner sep=1.5pt, minimum width=4pt}]
        \node[roundnode] (root) at (0,0) {}; 
        \node[roundnode] (a1) at (0, -1.5) {};
        \node[roundnode] (b1) at (-2,-3)  {};  
        \node[roundnode] (b2) at (2,-3) {};  
        \node[roundnode] (c1) at (-3,-4.5) {};
        \node[roundnode] (c2) at (-1,-4.5) {};
        \node[roundnode] (c3) at (1,-4.5) {};
        \node[roundnode] (c4) at (3,-4.5) {};
        \node[roundnode] (d1) at (-1,-6) {};
        \node[roundnode] (d2) at (1,-6) {};
        \node (v1) at (-3.5, -5) {$v_{1}$};
        \node (v2) at (-1.5, -6.5) {$v_{2}$};
        \node (v3) at (1.5, -6.5) {$v_{3}$};
        \node (v4) at (3.5, -5) {$v_{4}$};
        
        \draw (root) -- (a1);
        \draw (a1) -- (b1); 
        \draw (b1) -- (c1);
        \draw (b1) -- (c2);
        \draw (c2) -- (d1);
        \draw (a1) -- (b2);
        \draw (b2) -- (c3);
        \draw (c3) -- (d2);
        \draw (b2) -- (c4);
    \end{tikzpicture}
\end{subfigure}
\hspace{.1cm} $\longrightarrow$ 
\begin{subfigure}[c]{.2\textwidth}
    \begin{tikzpicture}[scale=.44, auto = center, roundnode/.style={circle,fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (root) at (0,0) {}; 
        \node[roundnode] (a1) at (0, -1.5) {};
        \node[roundnode] (b1) at (-2,-3)  {};  
        \node[roundnode] (b2) at (2,-3) {};  
        \node[triangnode] (c1) at (-3,-4.5) {};
        \node[roundnode] (c2) at (-1,-4.5) {};
        \node[roundnode] (c3) at (1,-4.5) {};
        \node[triangnode] (c4) at (3,-4.5) {};
        \node[triangnode] (d1) at (-1,-6) {};
        \node[triangnode] (d2) at (1,-6) {};
        \node (v1) at (-3.5, -5) {$v_{1}$};
        \node (v2) at (-1.5, -6.5) {$v_{2}$};
        \node (v3) at (1.5, -6.5) {$v_{3}$};
        \node (v4) at (3.5, -5) {$v_{4}$};

      
        
        \draw[color = red] (root) -- (a1);
        \draw[color = red] (a1) -- (b1); 
        \draw[color = red] (b1) -- (c1);
        \draw[color = yellow!80] (b1) -- (c2);
        \draw[color = yellow!80] (c2) -- (d1);
        \draw[color = cyan] (a1) -- (b2);
        \draw[color = cyan] (b2) -- (c3);
        \draw[color = cyan] (c3) -- (d2);
        \draw[color = teal] (b2) -- (c4);
    \end{tikzpicture}
\end{subfigure}
\hspace{.3cm} $\longrightarrow$ \hspace{.2cm}
\begin{subfigure}[c]{.25\textwidth}
    \begin{tikzpicture}[scale=.44,auto=center, roundnode/.style={circle, fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (a1) at (0,0) {}; 
        \node[roundnode] (a2) at (0, -1.5) {};
        \node[roundnode] (a3) at (0,-3)  {};  
        \node[triangnode] (a4) at (0,-4.5) {};
        

        \node[roundnode] (b1) at (2,0) {}; 
        \node[roundnode] (b2) at (2, -1.5) {};
        \node[triangnode] (b3) at (2,-3)  {};

        \node[roundnode] (c1) at (4,0) {};
        \node[roundnode] (c2) at (4,-1.5) {};
        \node[roundnode] (c3) at (4,-3) {};
        \node[triangnode] (c4) at (4,-4.5) {};
       
        
        \node[roundnode] (d1) at (6,0) {};
        \node[triangnode] (d2) at (6,-1.5) {};
        
        \node (v1) at (0, -5.2) {$E_{1}$};
        \node (v2) at (2, -3.7) {$E_{2}$};
        \node (v3) at (4, -5.2) {$E_{3}$};
        \node (v4) at (6, -2.2) {$E_{4}$};
        
        \draw[color = red] (a1) -- (a2) -- (a3) -- (a4);
        \draw[color = yellow!80] (b1) -- (b2) -- (b3);
        \draw[color = cyan] (c1) -- (c2) -- (c3) -- (c4);
        \draw[color = teal] (d1) -- (d2);
        
    \end{tikzpicture}
\end{subfigure}
\end{center}    
    \caption{Decomposition of a plane tree into its extended leaves.}
    \label{im:ext_leaf}
\end{figure}


\begin{exm}
Figure \ref{im:ext_leaf} shows a decomposition of a plane tree into $4$ extended leaves, $E_1$ (red), $E_2$ (orange), $E_3$ (blue), and $E_4$ (green), ordered from left to right with $\ell(E_1)=3$, $\ell(E_2)=2$, $\ell(E_3)=3$, and $\ell(E_4)=1$. 
The triangular nodes represent the leaves of the extended leaves. 
\end{exm}


We define a \emph{necklace of extended leaves} (or simply a \emph{necklace}) to be the equivalence class of a sequence of extended leaves under cyclic shift. 
Often it is more convenient for us to view a necklace as simply a collection of extended leaves with a given cyclic order; it will be clear from context when we do so.
Let $\mathsf{Neck}_{n,k}$ denote the set of all necklaces with $k$ extended leaves and a total of $n$ non-leaf vertices.
Note that the total number of edges in each of those necklaces is also $n$. 

Let $\psi$ be the map taking a composition $(\mu_1,\mu_2,\dots,\mu_k)$ of $n$ to the sequence $E_1 E_2\cdots E_k$ of extended leaves where $\ell(E_i)=\mu_i$ for each $i$.
It is easy to see that $\psi$ is a bijection between compositions of $n$ with $k$ parts and sequences of $k$ extended leaves with a total of $n$ edges; moreover, $\psi$ induces a bijection---which we also denote $\psi$ by a slight abuse of notation---from $\mathsf{CComp}_{n,k}$ to $\mathsf{Neck}_{n,k}$.
To be precise, the necklace $\psi[\mu]$ is the equivalence class of $\psi(\bar{\mu})$ for any $\bar{\mu} \in [\mu]$, which clearly does not depend on the choice of representative. 

We define a \emph{marking} of a necklace of extended leaves $[E_{1}, \ldots, E_{k}]$ to be the necklace $[E_{1}, \ldots, E_{k}]$ with $k-1$ non-leaf vertices marked.
If $[\mu]$ is primitive---that is, if $\mathsf{ord}[\mu]=k$---then it is easy to see that the necklace $\psi[\mu]$ has $\binom{n}{k-1}$ distinct markings.\footnote{The skeptical reader may wish to visit Lemma \ref{lemma:markednecksize} proven later, which is a more general result from which this claim follows as a special case.}


\begin{lemma}\label{lemma:part2_trees}
Let $k\geq 1$. Given a cyclic composition $[\mu] \in \mathsf{CComp}_{2k+1,k}$, there are exactly $\binom{2k+1}{k-1}$ plane trees whose extended leaf decomposition belongs to the necklace $\psi[\mu] \in \mathsf{Neck}_{2k+1,k}$.
\end{lemma}


\begin{proof}
Let $[\mu]=[\mu_1,\mu_2,\dots,\mu_k] \in \mathsf{CComp}_{2k+1,k}$ so that  $\psi[\mu]=[E_1,E_2,\ldots,E_k]$ is a necklace of $k$ extended leaves with $\ell(E_i)=\mu_i$ for each $i$ and with a total of $2k+1$ non-leaf vertices. 
Since $2k+1$ and $k$ are relatively prime, Lemma \ref{lemma:2k+1_primitive} implies that $[\mu]$ is primitive, so $\psi[\mu]$ has $\binom{2k+1}{k-1}$ distinct markings. 
We will show that each marking of $\psi[\mu]$ determines a unique plane tree whose extended leaf decomposition belongs to the necklace $\psi[\mu]$.
Consequently, we will have $\binom{2k+1}{k-1}$ plane trees that correspond to $\psi[\mu]$.
Given a marking of $\psi[\mu]$, we record the $k-1$ marked vertices and $k$ extended leaves using a sequence of $\bigcirc$s and $\square$s as follows.
We start with any extended leaf in the necklace $\psi[\mu]$.
First record a $\bigcirc$ for each marked vertex on this extended leaf, and then record a $\square$ for this extended leaf. 
We do the same for the next extended leaf in the cyclic order of $\psi[\mu]$, and this process is repeated until we have traversed through all the marked vertices and extended leaves in $\psi[\mu]$. 

We now have a sequence of $k-1$ copies of $\bigcirc$ and $k$ copies of $\square$.
It then follows from Corollary~\ref{cor:reverse_cycle} that there is exactly one cyclic shift $\sigma=\sigma_1 \sigma_2 \cdots \sigma_{2k-1}$ of this sequence whose every proper prefix has at least as many $\bigcirc$s as the number of $\square$s.
Note that $\sigma_1=\bigcirc$ and $\sigma_{2k-2}\sigma_{2k-1}=\square\square$. 
Then we obtain from $\sigma$ a sequence $E_1E_2\cdots E_k$ of extended leaves by taking $E_1$ to be the extended leaf containing the marked vertex corresponding to $\sigma_1$, and proceeding in accordance with the cyclic order of $\psi[\mu]$.


We will build a plane tree using the sequence $E_1E_2\cdots E_k$ in the following manner. 
Henceforth, we make use of the term ``\emph{top vertex}'' to refer to the vertex on an extended leaf furthest from its leaf, i.e., the other end-vertex of that extended leaf.
\begin{enumerate}
    \item Take the root of our tree to be the top vertex of $E_1$.
    \item Take the marked vertex on $E_1$ that is furthest from the root---call it $v_1$---and attach the next extended leaf $E_2$ to $E_1$ by identifying the top vertex of $E_2$ with $v_1$.
    \item Remove the mark of $v_1$. The partially-built tree currently has two extended leaves $E_1$ and $E_2$. 
    \item Attach the next extended leaf $E_i$ to the tree by identifying the top vertex of $E_i$ with the unused marked vertex that is furthest from the root on the current partially-built tree. 
    \item Remove the mark of that vertex after attaching $E_i$.
    \item Repeat $(4)$ and $(5)$ until we have attached all $k$ extended leaves.
\end{enumerate}

\noindent There will always be at least one unused marked vertex on a partially-built tree to indicate where the next extended leaf should be attached, because the number of marked vertices (the $\bigcirc$s) will always be at least the number of extended leaves (the $\square$s) that need attaching. 
Also, note that since we always use the marked vertex that is furthest from the root, there can only be marked vertices on the shortest path connecting the root and the right-most leaf on a partially-built tree at any stage; thus, there must be a unique marked vertex that is furthest from the root.
The $k-1$ marked vertices determine how the extended leaves $E_1, E_2,\dots, E_k$ are put together, forming a plane tree $T$ having the extended leaf decomposition $E_1E_2\cdots E_k$, which belongs to the necklace $\psi[\mu]$.




\begin{figure}[ht]
\begin{center}
\begin{subfigure}[c]{.3\textwidth}
    \begin{tikzpicture}[scale=.4, roundnode/.style={circle, fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (a1) at (0,0) {}; 
        \node[roundnode] (a2) at (0, -1.5) {};
        \node[roundnode] (a3) at (0,-3)  {};  
        \node[triangnode] (a4) at (0,-4.5) {};
        \node[circle,draw, color = red] at (0, 0) {};
        \node[circle,draw, color = red] at (0, -1.5) {};

        \node[roundnode] (b1) at (2,0) {}; 
        \node[roundnode] (b2) at (2, -1.5) {};
        \node[triangnode] (b3) at (2,-3)  {};
        \node[circle,draw, color = red] at (2, -1.5) {};
        
        \node[roundnode] (c1) at (4,0) {};
        \node[roundnode] (c2) at (4,-1.5) {};
        \node[roundnode] (c3) at (4,-3) {};
        \node[triangnode] (c4) at (4,-4.5) {};
        
        \node[roundnode] (d1) at (6,0) {};
        \node[triangnode] (d2) at (6,-1.5) {};
        
        \node (v1) at (0, -5.2) {$E_{1}$};
        \node (v2) at (2, -3.7) {$E_{2}$};
        \node (v3) at (4, -5.2) {$E_{3}$};
        \node (v4) at (6, -2.2) {$E_{4}$};
        
        \draw[color = red] (a1) -- (a2) -- (a3) -- (a4);
        \draw[color = yellow!80] (b1) -- (b2) -- (b3);
        \draw[color = cyan] (c1) -- (c2) -- (c3) -- (c4);
        \draw[color = teal] (d1) -- (d2);
        \draw[dashed, gray!80, thin, ->] (6.5, -.75) to [out= 10,in=0, min distance = 2.5cm, looseness = 2] (3, 2);
        \draw[dashed, gray!80, thin] (3, 2) to [out= 180,in=170, min distance = 2.5cm, looseness = 2] (-.5, -.75);
        \draw[dashed, gray!80, thin] (.5, -.75) -- (1.5, -.75);
        \draw[dashed, gray!80, thin] (2.5, -.75) -- (3.5, -.75);
        \draw[dashed, gray!80, thin] (4.5, -.75) -- (5.5, -.75);
    \end{tikzpicture}
\end{subfigure}
 $\longrightarrow$ \hspace{.2cm}
\begin{subfigure}[c]{.07\textwidth}
    \begin{tikzpicture}[scale=.4, roundnode/.style={circle,fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (a1) at (0,0) {}; 
        \node[roundnode] (a2) at (0, -1.5) {};
        \node[roundnode] (a3) at (-1,-3)  {};  
        \node[triangnode] (a4) at (-1,-4.5) {};
        \node[roundnode] (b2) at (1,-3) {};
        \node[triangnode] (b3) at (1,-4.5) {};

        \node[circle,draw, color = red] at (0, 0) {};
        \node[circle,draw, color = red] at (1, -3) {};
        
        \draw[color = red] (a1) -- (a2);
        \draw[color = red] (a2) -- (a3); 
        \draw[color = red] (a3) -- (a4);
        \draw[color = yellow!80] (a2) -- (b2);
        \draw[color = yellow!80] (b2) -- (b3);
    \end{tikzpicture}
\end{subfigure}
\hspace{.1cm} $\longrightarrow$ \hspace{.2cm}
\begin{subfigure}[c]{.1\textwidth}
    \begin{tikzpicture}[scale=.4, auto = center, roundnode/.style={circle,fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (a1) at (0,0) {}; 
        \node[roundnode] (a2) at (0, -1.5) {};
        \node[roundnode] (a3) at (-1,-3)  {};  
        \node[triangnode] (a4) at (-1,-4.5) {};
        \node[roundnode] (b2) at (1.5,-3) {};
        \node[triangnode] (b3) at (.75,-4.5) {};
        \node[roundnode] (c2) at (2.25,-4.5) {};
        \node[roundnode] (c3) at (2.25,-6) {};
        \node[triangnode] (c4) at (2.25,-7.5) {};
        
        \node[circle,draw, color = red] at (0, 0) {};
        
        \draw[color = red] (a1) -- (a2);
        \draw[color = red] (a2) -- (a3); 
        \draw[color = red] (a3) -- (a4);
        \draw[color = yellow!80] (a2) -- (b2);
        \draw[color = yellow!80] (b2) -- (b3);
        \draw[color = cyan] (b2) -- (c2);
        \draw[color = cyan] (c2) -- (c3);
        \draw[color = cyan] (c3) -- (c4);
    \end{tikzpicture}
\end{subfigure}
\hspace{.1cm} $\longrightarrow$ \hspace{.2cm}
\begin{subfigure}[c]{.1\textwidth}
    \begin{tikzpicture}[scale=.4, auto = center, roundnode/.style={circle,fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (a1) at (1,0) {}; 
        \node[roundnode] (a2) at (0, -1.5) {};
        \node[roundnode] (a3) at (-1,-3)  {};  
        \node[triangnode] (a4) at (-1,-4.5) {};
        \node[roundnode] (b2) at (1.5,-3) {};
        \node[triangnode] (b3) at (.75,-4.5) {};
        \node[roundnode] (c2) at (2.25,-4.5) {};
        \node[roundnode] (c3) at (2.25,-6) {};
        \node[triangnode] (c4) at (2.25,-7.5) {};
        \node[triangnode] (d2) at (2,-1.5) {};
        
        
        \draw[color = red] (a1) -- (a2);
        \draw[color = red] (a2) -- (a3); 
        \draw[color = red] (a3) -- (a4);
        \draw[color = yellow!80] (a2) -- (b2);
        \draw[color = yellow!80] (b2) -- (b3);
        \draw[color = cyan] (b2) -- (c2);
        \draw[color = cyan] (c2) -- (c3);
        \draw[color = cyan] (c3) -- (c4);
        \draw[color = teal] (a1) -- (d2);
    \end{tikzpicture}
\end{subfigure}
\end{center}    
    \caption{Building a plane tree using a marked necklace of extendend leaves.}
    \label{im:buildtree}
\end{figure}

Figure \ref{im:buildtree} illustrates the process of building a tree from a marking of a necklace with four extended leaves. 
On the left is a marked necklace. 
The marked vertices are circled and the leaf of each $E_i$ is denoted by a triangular node. 
The top vertex of $E_1$ will be the root of this tree. Then $E_2$ is attached to the marked vertex on $E_1$ that is furthest from the root, and we remove the mark after attaching $E_2$ (see the second step in Figure \ref{im:buildtree}). 
Now on the partially-built tree consisting of $E_1$ and $E_2$, the furthest unused marked vertex from the root is the one on $E_2$.
In the third step, $E_3$ is attached to that marked vertex, leaving only one unused marked vertex, which is where we attach $E_4$ in the last step. Because the choice of $E_1$ is unique, we can only build one plane tree from our marked necklace.



Conversely, consider a plane tree whose extended leaf decomposition $E_1E_2\cdots E_k$ belongs to $\psi[\mu] \in \mathsf{Neck}_{2k+1,k}$. 
Following the detaching process that is described below, one can retrieve a unique marking of $\psi[\mu]$, which is the marked necklace that determines this tree via the procedure already described above. 
We detach extended leaves one-by-one from the last (right-most) extended leaf to the first (left-most) extended leaf.
For each $E_i$, let $j$ be the largest index less than $i$ such that $E_j$ and $E_i$ share a common vertex. 
When $E_i$ is detached, the vertex on $E_j$ that is shared with $E_i$ is marked on $E_j$.
Note that this shared vertex is necessarily the top vertex of $E_i$. 
All marked vertices are kept on the extended leaf when detaching that extended leaf.
We will mark one vertex when detaching each of the $k-1$ extended leaves $E_2, E_3,\ldots, E_k$, which yields a marking of the necklace $\psi[\mu]$.


\begin{figure}[ht]
\begin{center}
\begin{subfigure}[c]{.16\textwidth}
    \begin{tikzpicture}[scale=.4, roundnode/.style={circle,fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (a1) at (0,0) {}; 
        \node[roundnode] (a2) at (0, -1.5) {};
        \node[roundnode] (a3) at (-2.5,-3)  {};  
        \node[triangnode] (a4) at (-2.5,-4.5) {};
        \node[roundnode] (b2) at (0,-3) {};
        \node[triangnode] (b3) at (-1,-4.5) {};
        \node[roundnode] (c2) at (1,-4.5) {};
        \node[triangnode] (c3) at (1,-6) {};
        \node[triangnode] (d2) at (2.5,-3) {};
        
        \draw[color = red] (a1) -- (a2);
        \draw[color = red] (a2) -- (a3); 
        \draw[color = red] (a3) -- (a4);
        \draw[color = yellow!80] (a2) -- (b2);
        \draw[color = yellow!80] (b2) -- (b3);
        \draw[color = cyan] (b2) -- (c2);
        \draw[color = cyan] (c2) -- (c3);
        \draw[color = teal] (a2) -- (d2);
    \end{tikzpicture}
\end{subfigure}
$\longrightarrow$ \hspace{.1cm}
\begin{subfigure}[c]{.14\textwidth}
    \begin{tikzpicture}[scale=.4, roundnode/.style={circle,fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (a1) at (0,0) {}; 
        \node[roundnode] (a2) at (0, -1.5) {};
        \node[roundnode] (a3) at (-2.5,-3)  {};  
        \node[triangnode] (a4) at (-2.5,-4.5) {};
        \node[roundnode] (b2) at (0,-3) {};
        \node[triangnode] (b3) at (-1,-4.5) {};
        \node[roundnode] (c2) at (1,-4.5) {};
        \node[triangnode] (c3) at (1,-6) {};
        \node[roundnode] (d1) at (1.5,0) {};
        \node[triangnode] (d2) at (1.5,-1.5) {};

        \node[circle,draw, color = red] at (0, -1.5) {};
        
        \draw[color = red] (a1) -- (a2);
        \draw[color = red] (a2) -- (a3); 
        \draw[color = red] (a3) -- (a4);
        \draw[color = yellow!80] (a2) -- (b2);
        \draw[color = yellow!80] (b2) -- (b3);
        \draw[color = cyan] (b2) -- (c2);
        \draw[color = cyan] (c2) -- (c3);
        \draw[color = teal] (d1) -- (d2);
    \end{tikzpicture}
\end{subfigure}
 $\longrightarrow$ \hspace{.13cm}
\begin{subfigure}{.18\textwidth}
    \begin{tikzpicture}[scale=.4, roundnode/.style={circle,fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (a1) at (0,0) {}; 
        \node[roundnode] (a2) at (0, -1.5) {};
        \node[roundnode] (a3) at (-2.5,-3)  {};  
        \node[triangnode] (a4) at (-2.5,-4.5) {};
        \node[roundnode] (b2) at (0,-3) {};
        \node[triangnode] (b3) at (-1,-4.5) {};
        \node[roundnode] (c1) at (1.5,0) {};
        \node[roundnode] (c2) at (1.5,-1.5) {};
        \node[triangnode] (c3) at (1.5,-3) {};
        \node[roundnode] (d1) at (3,0) {};
        \node[triangnode] (d2) at (3,-1.5) {};

        \node[circle,draw, color = red] at (0, -1.5) {};
        \node[circle,draw, color = red] at (0, -3) {};
        
        \draw[color = red] (a1) -- (a2);
        \draw[color = red] (a2) -- (a3); 
        \draw[color = red] (a3) -- (a4);
        \draw[color = yellow!80] (a2) -- (b2);
        \draw[color = yellow!80] (b2) -- (b3);
        \draw[color = cyan] (c1) -- (c2);
        \draw[color = cyan] (c2) -- (c3);
        \draw[color = teal] (d1) -- (d2);
    \end{tikzpicture}
\end{subfigure}
\hspace{.1cm} $\longrightarrow$
\begin{subfigure}[c]{.25\textwidth}
    \begin{tikzpicture}[scale=.4, roundnode/.style={circle, fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (a1) at (0,0) {}; 
        \node[roundnode] (a2) at (0, -1.5) {};
        \node[roundnode] (a3) at (0,-3)  {};  
        \node[triangnode] (a4) at (0,-4.5) {};
        \node[circle,draw, color = red] at (0, -1.5) {};

        \node[roundnode] (b1) at (2,0) {}; 
        \node[roundnode] (b2) at (2, -1.5) {};
        \node[triangnode] (b3) at (2,-3)  {};
        \node[circle,draw, color = red] at (2, 0) {};
        \node[circle,draw, color = red] at (2, -1.5) {};
        
        \node[roundnode] (c1) at (4,0) {};
        \node[roundnode] (c2) at (4,-1.5) {};
        \node[roundnode] (c3) at (4,-3) {};
        \node[triangnode] (c4) at (4,-4.5) {};
        
        \node[roundnode] (d1) at (6,0) {};
        \node[triangnode] (d2) at (6,-1.5) {};
        
        \node (v1) at (0, -5.2) {$E_{1}$};
        \node (v2) at (2, -3.7) {$E_{2}$};
        \node (v3) at (4, -5.2) {$E_{3}$};
        \node (v4) at (6, -2.2) {$E_{4}$};
        
        \draw[color = red] (a1) -- (a2) -- (a3) -- (a4);
        \draw[color = yellow!80] (b1) -- (b2) -- (b3);
        \draw[color = cyan] (c1) -- (c2) -- (c3) -- (c4);
        \draw[color = teal] (d1) -- (d2);
        \draw[dashed, gray!80, thin, ->] (6.5, -.75) to [out= 10,in=0, looseness = 1.5] (3, 2);
        \draw[dashed, gray!80, thin] (3, 2) to [out= 180,in=170, looseness = 1.5] (-.5, -.75);
        \draw[dashed, gray!80, thin] (.5, -.75) -- (1.5, -.75);
        \draw[dashed, gray!80, thin] (2.5, -.75) -- (3.5, -.75);
        \draw[dashed, gray!80, thin] (4.5, -.75) -- (5.5, -.75);
    \end{tikzpicture}
\end{subfigure}
\end{center}    
    \caption{Retrieving marked vertices from a plane tree.}
    \label{im:treetoleaf}
\end{figure}

As shown in Figure \ref{im:treetoleaf}, when $E_4$ is detached, we mark the vertex on $E_2$ that is common to $E_2$ and $E_4$. 
This vertex is marked on $E_2$ not $E_1$ because $2>1$. 
In other words, $E_2$ is the closest extended leaf to $E_4$ that is still on the left of $E_4$ and shares a common vertex with $E_4$. 
Then we detach $E_3$ and mark the vertex on $E_2$ that is shared with $E_3$. 
When $E_2$ is detached, the two marked vertices are kept on $E_2$, and a vertex on $E_1$ is marked.

It is straightforward to verify that the two procedures described above are inverse bijections between markings of a necklace $\psi[\mu] \in \mathsf{Neck}_{2k+1,k}$ and plane trees whose extended leaf decompositions belong to $\psi[\mu]$.
Since there are exactly $\binom{2k+1}{k-1}$ such markings, the conclusion follows.
\end{proof}

We are now ready to complete our combinatorial proof of Theorem \ref{th:relationNandW}.

\begin{proof}[Proof of Theorem \ref{th:relationNandW}]
Recall that $w_{2k+1, k, m}$ counts plane trees with $2k+1$ non-root vertices, $k$ leaves, and $m$ good leaves; these are precisely the plane trees with $2k+1$ non-root vertices whose extended leaf decomposition has $k$ extended leaves, exactly $m$ of which have length at least 2. 
These extended leaf decompositions belong to necklaces corresponding to cyclic compositions of $2k+1$ into $k$ total parts and $m$ parts at least 2, which are counted by $N_{k,m}$ as established in Lemma \ref{lemma:part1_path}.
Furthermore, by Lemma \ref{lemma:part2_trees}, there are exactly $\binom{2k+1}{k-1}$ plane trees corresponding to each necklace.
It follows that $w_{2k+1, k, m} = \binom{2k+1}{k-1} N_{k,m}$ as desired.
\end{proof}

From the proofs of Lemmas ~\ref{lemma:part1_path} and ~\ref{lemma:part2_trees} we implicitly obtain a bijection that demonstrates the symmetry $w_{2k+1, k, m} = w_{2k+1, k, k+1-m}$.
For the sake of completeness, we explicitly write out the bijection that we obtain and give an example in Figure ~\ref{im:bijection}.

\begin{dfn} \label{dfn:bijection}
Let $T$ be a plane tree with $2k+1$ non-root vertices, $k$ leaves, and $m$ good leaves. 
Construct a plane tree $T'$ on $2k+1$ non-root vertices, $k$ leaves, and $k+1-m$ good leaves via the following algorithm:
\begin{enumerate}
    \item Set $M$ to be the marked necklace of extended leaves associated to $T$ via Lemma ~\ref{lemma:part2_trees}.
    \item Decompose $M$ into a pair consisting of its underlying unmarked necklace of extended leaves $N$ and a $(k-1)$-subset $S$ of $[2k+1] = \{1,2,\dots,2k+1\}$ containing the positions of the non-leaf vertices marked in $M$.
    \item Set $P$ to be the Dyck path of semilength $k$ with $m$ $UD$-factors that is associated to $N$ via the bijective map in Lemma ~\ref{lemma:part1_path}.
    \item Set $P'$ to be a Dyck path of semilength $k$ with $k+1-m$ $UD$-factors obtained via any bijection demonstrating the Narayana symmetry \textup{(}see \cite{Kreweras1970, Kreweras1972, Lalanne1992} for example\textup{)}. Perhaps the simplest and most intuitive is the one in terms of non-crossing set partitions in \cite{Kreweras1972}, where the author proved the stronger fact that the lattice of non-crossing partitions is self-dual.
    \item Set $N'$ to be the necklace of extended leaves associated to $P'$ via Lemma~\ref{lemma:part1_path}.
    \item  Set $M'$ to be the marked necklace of extended leaves obtained from the necklace $N'$ and subset $S$.
    \item Set $T'$ to be the plane tree with $2k+1$ non-root vertices, $k$ leaves, and $k+1-m$ good leaves associated to $M'$ via Lemma~\ref{lemma:part2_trees}.
\end{enumerate}
\end{dfn}

\begin{rmk}
In Steps \textup{(}2\textup{)} and \textup{(}6\textup{)}, there is some choice of how to label the positions of the non-leaf vertices in a necklace $N\in \mathsf{Neck}_{2k+1,k}$ such that one can pass from a marked necklace to a pair consisting of its underlying unmarked necklace and a $(k-1)$-subset of $[2k+1]$ and vice versa.
We detail a choice of labelling that we deem to be canonical.
By Lemma ~\ref{lemma:part1_path}, there is a unique ordering $(E_1, E_2, \ldots, E_k)$ of the extended leaves in $N$ such that $U^{\mu_{1}-1}DU^{\mu_{2}-1}D\cdots U^{\mu_{k}-1}D$ is $1$-dominating where $\mu_i = \ell(E_{i})$. 
Starting from the vertex furthest away from the leaf and moving inwards, label the non-leaf vertices in $E_1$ with the numbers $1, 2, \ldots, \mu_1$, label the non-leaf vertices in $E_2$ with the numbers $\mu_1+1, \ldots, \mu_1+\mu_2$, and so on.
\end{rmk}

\begin{figure}[ht]
\begin{center}
\begin{subfigure}[c]{.13\textwidth}
    \begin{tikzpicture}[scale=.35, roundnode/.style={circle,fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (a1) at (0,0) {}; 
        \node[roundnode] (a2) at (-2, -1.5) {};
        \node[roundnode] (a3) at (-3,-3)  {};  
        \node[roundnode] (a4) at (-3,-4.5) {};
        \node[roundnode] (b2) at (-1,-3) {};
        \node[roundnode] (c2) at (0,-1.5) {};
        \node[roundnode] (c3) at (0,-3) {};
        \node[roundnode] (c4) at (0,-4.5) {};
        \node[roundnode] (d2) at (2,-1.5) {};
        \node[roundnode] (d3) at (2,-3) {};
        
        \draw (a1) -- (a2);
        \draw (a2) -- (a3); 
        \draw (a3) -- (a4);
        \draw (a2) -- (b2);
        \draw (a1) -- (c2);
        \draw (c2) -- (c3);
        \draw (c3) -- (c4);
        \draw (a1) -- (d2);
        \draw (d2) -- (d3);
    \end{tikzpicture}
\end{subfigure}
\hspace{.1cm} $\longrightarrow$ 
\begin{subfigure}[c]{.25\textwidth}
    \begin{tikzpicture}[scale=.35, roundnode/.style={circle, fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (a1) at (0,0) {}; 
        \node[roundnode] (a2) at (0, -1.5) {};
        \node[roundnode] (a3) at (0,-3)  {};  
        \node[triangnode] (a4) at (0,-4.5) {};
        \node[circle,draw, color = red] at (0, 0) {};
        \node[circle,draw, color = red] at (0, -1.5) {};
    
        \node[roundnode] (b1) at (2,0) {};
        \node[triangnode] (b2) at (2,-1.5) {};
        
        \node[roundnode] (c1) at (4,0) {};
        \node[roundnode] (c2) at (4,-1.5) {};
        \node[roundnode] (c3) at (4,-3) {};
        \node[triangnode] (c4) at (4,-4.5) {};
        \node[circle,draw, color = red] at (4, 0) {};
        
        \node[roundnode] (d1) at (6,0) {}; 
        \node[roundnode] (d2) at (6, -1.5) {};
        \node[triangnode] (d3) at (6,-3)  {};
        
        \draw (a1) -- (a2) -- (a3) -- (a4);
        \draw (b1) -- (b2);
        \draw (c1) -- (c2) -- (c3) -- (c4);
        \draw (d1) -- (d2) -- (d3);
        \draw[dashed, gray!80, thin, ->] (6.5, -.75) to [out= 10,in=0, looseness = 1.5] (3, 2);
        \draw[dashed, gray!80, thin] (3, 2) to [out= 180,in=170, looseness = 1.5] (-.5, -.75);
        \draw[dashed, gray!80, thin] (.5, -.75) -- (1.5, -.75);
        \draw[dashed, gray!80, thin] (2.5, -.75) -- (3.5, -.75);
        \draw[dashed, gray!80, thin] (4.5, -.75) -- (5.5, -.75);
    \end{tikzpicture}
\end{subfigure}
 $\longrightarrow$ 
\begin{subfigure}[c]{.33\textwidth}
    \begin{tikzpicture}[scale=.35, roundnode/.style={circle, fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node at (-2, -1.3) {$\Big ($};
        
        \node[roundnode] (a1) at (0,0) {}; 
        \node[roundnode] (a2) at (0, -1.5) {};
        \node[roundnode] (a3) at (0,-3)  {};  
        \node[triangnode] (a4) at (0,-4.5) {};

        \node[roundnode] (b1) at (2,0) {}; 
        \node[roundnode] (b2) at (2, -1.5) {};
        \node[triangnode] (b3) at (2,-3)  {};
        
        \node[roundnode] (c1) at (4,0) {};
        \node[roundnode] (c2) at (4,-1.5) {};
        \node[roundnode] (c3) at (4,-3) {};
        \node[triangnode] (c4) at (4,-4.5) {};
        
        \node[roundnode] (d1) at (6,0) {};
        \node[triangnode] (d2) at (6,-1.5) {};

        \node at (6.9, -1.8) {,};
        \node at (10,-1.3) {$\{ 1, 6, 7\} \Big)$};
        
        \draw (a1) -- (a2) -- (a3) -- (a4);
        \draw (b1) -- (b2) -- (b3);
        \draw (c1) -- (c2) -- (c3) -- (c4);
        \draw (d1) -- (d2);
        \draw[dashed, gray!80, thin, ->] (6.5, -.75) to [out= 10,in=0, looseness = 1.5] (3, 2);
        \draw[dashed, gray!80, thin] (3, 2) to [out= 180,in=170, looseness = 1.5] (-.5, -.75);
        \draw[dashed, gray!80, thin] (.5, -.75) -- (1.5, -.75);
        \draw[dashed, gray!80, thin] (2.5, -.75) -- (3.5, -.75);
        \draw[dashed, gray!80, thin] (4.5, -.75) -- (5.5, -.75);
    \end{tikzpicture}
\end{subfigure}
 $\longrightarrow$ 
\\[.1cm]
$\longrightarrow$
\begin{subfigure}[c]{.29\textwidth}
    \begin{tikzpicture}[scale = .3, auto=center]
        \node at (-1, 1.5) {$\Big($};
	\draw[step=1.0, gray!100, thin] (0,0) grid (8, 3);
	\draw[black!80, line width=2pt] (0,0) -- (1,1) -- (2,0) -- (3,1) -- (4,0) -- (5,1) -- (6,2) -- (7,1) -- (8,0);
        \node at (8.3, 1) {,};
        \node at (11.4, 1.5) {$\{1, 6, 7\} \Big)$};
    \end{tikzpicture}
\end{subfigure}
$\longrightarrow$
\begin{subfigure}[c]{.29\textwidth}
    \begin{tikzpicture}[scale = .3, auto=center]
        \node at (-1, 1.5) {$\Big($};
	\draw[step=1.0, gray!100, thin] (0,0) grid (8, 3);
	\draw[black!80, line width=2pt] (0,0) -- (1,1) -- (2,2) -- (3,3) -- (4,2) -- (5,1) -- (6,0) -- (7,1) -- (8,0);
        \node at (8.3, 1) {,};
        \node at (11.4, 1.5) {$\{1, 6, 7\} \Big)$};
    \end{tikzpicture}
\end{subfigure}
$\longrightarrow$
\\[.1cm]
$\longrightarrow$
\begin{subfigure}[c]{.3\textwidth}
    \begin{tikzpicture}[scale=.3, roundnode/.style={circle, fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node at (-2, -2.8) {$\Big ($};
        
        \node[roundnode] (a1) at (0,0) {}; 
        \node[roundnode] (a2) at (0, -1.5) {};
        \node[roundnode] (a3) at (0,-3)  {};  
        \node[roundnode] (a4) at (0,-4.5) {};
        \node[roundnode] (a5) at (0,-6) {};
        \node[triangnode] (a6) at (0,-7.5) {};

        \node[roundnode] (b1) at (2,0) {}; 
        \node[triangnode] (b2) at (2, -1.5) {};
        
        \node[roundnode] (c1) at (4,0) {};
        \node[triangnode] (c2) at (4,-1.5) {};
        
        \node[roundnode] (d1) at (6,0) {};
        \node[roundnode] (d2) at (6,-1.5) {};
        \node[triangnode] (d3) at (6,-3) {};

        \node at (6.9, -3.3) {,};
        \node at (10,-2.8) {$\{ 1, 6, 7\} \Big)$};
        
        \draw (a1) -- (a2) -- (a3) -- (a4) -- (a5) -- (a6);
        \draw (b1) -- (b2);
        \draw (c1) -- (c2);
        \draw (d1) -- (d2) -- (d3);
        \draw[dashed, gray!80, thin, ->] (6.5, -.75) to [out= 10,in=0, looseness = 1.5] (3, 2);
        \draw[dashed, gray!80, thin] (3, 2) to [out= 180,in=170, looseness = 1.5] (-.5, -.75);
        \draw[dashed, gray!80, thin] (.5, -.75) -- (1.5, -.75);
        \draw[dashed, gray!80, thin] (2.5, -.75) -- (3.5, -.75);
        \draw[dashed, gray!80, thin] (4.5, -.75) -- (5.5, -.75);
    \end{tikzpicture}
\end{subfigure}
\hspace{.15cm} $\longrightarrow$ 
\begin{subfigure}[c]{.22\textwidth}
    \begin{tikzpicture}[scale=.3, roundnode/.style={circle, fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (a1) at (0,0) {}; 
        \node[roundnode] (a2) at (0, -1.5) {};
        \node[roundnode] (a3) at (0,-3)  {};  
        \node[roundnode] (a4) at (0,-4.5) {};
        \node[roundnode] (a5) at (0,-6) {};
        \node[triangnode] (a6) at (0,-7.5) {};
        \node[circle,draw, color = red] at (0, 0) {};

        \node[roundnode] (b1) at (2,0) {}; 
        \node[triangnode] (b2) at (2, -1.5) {};
        \node[circle,draw, color = red] at (2, 0) {};
        
        \node[roundnode] (c1) at (4,0) {};
        \node[triangnode] (c2) at (4,-1.5) {};
        \node[circle,draw, color = red] at (4, 0) {};
        
        \node[roundnode] (d1) at (6,0) {};
        \node[roundnode] (d2) at (6,-1.5) {};
        \node[triangnode] (d3) at (6,-3) {};
        
        \draw (a1) -- (a2) -- (a3) -- (a4) -- (a5) -- (a6);
        \draw (b1) -- (b2);
        \draw (c1) -- (c2);
        \draw (d1) -- (d2) -- (d3);
        \draw[dashed, gray!80, thin, ->] (6.5, -.75) to [out= 10,in=0, looseness = 1.5] (3, 2);
        \draw[dashed, gray!80, thin] (3, 2) to [out= 180,in=170, looseness = 1.5] (-.5, -.75);
        \draw[dashed, gray!80, thin] (.5, -.75) -- (1.5, -.75);
        \draw[dashed, gray!80, thin] (2.5, -.75) -- (3.5, -.75);
        \draw[dashed, gray!80, thin] (4.5, -.75) -- (5.5, -.75);
    \end{tikzpicture}
\end{subfigure}
$\longrightarrow$ \hspace{.3cm}
\begin{subfigure}[c]{.15\textwidth}
    \begin{tikzpicture}[scale=.35, roundnode/.style={circle,fill=black!60, inner sep=1.5pt, minimum width=4pt}, triangnode/.style={regular polygon,regular polygon sides=3, fill=black!60, inner sep=1.5pt, outer sep = 0pt}]
        \node[roundnode] (a1) at (0,0) {}; 
        \node[roundnode] (a2) at (-2, -1.5) {};
        \node[roundnode] (a3) at (-2,-3)  {};
        \node[roundnode] (a4) at (-2,-4.5)  {};
        \node[roundnode] (a5) at (-2,-6)  {};
        \node[roundnode] (a6) at (-2,-7.5)  {};
        \node[roundnode] (b2) at (-.75,-1.5) {};
        \node[roundnode] (c2) at (.75,-1.5) {};
        \node[roundnode] (d2) at (2,-1.5) {};
        \node[roundnode] (d3) at (2,-3) {};
        
        \draw (a1) -- (a2) -- (a3) -- (a4) -- (a5) -- (a6);
        \draw (a1) -- (b2);
        \draw (a1) -- (c2);
        \draw (a1) -- (d2) -- (d3);
    \end{tikzpicture}
\end{subfigure}
\end{center}
    \caption{Example of the bijection given in Definition ~\ref{dfn:bijection} for $k = 4$ where the Lalanne-Kreweras involution \cite{Kreweras1970, Lalanne1992} is used in Step (4). }
    \label{im:bijection}
\end{figure}


\subsection{Combinatorial proof of a related symmetry}

In addition to the symmetry in Theorem~\ref{th:main}, it can also be observed that $w_{2k-1, k, m} = w_{2k-1, k, k-m}$ for all $1 \leq m \leq k$, which is a consequence of the following variation of Theorem~\ref{th:relationNandW}.

\begin{thm}
For all $k \geq 1$ and $m \geq 0$, we have
\label{th:relationNandW2}
\begin{equation}
\label{eq:relNW2}
w_{2k-1, k, m} = \binom{2k-1}{k-1} N_{k-1,m}.    
\end{equation}
\end{thm}

Theorem~\ref{th:relationNandW2} can be proven in a way that is completely analogous to our combinatorial proof of Theorem~\ref{th:relationNandW}, but relying on Lemmas \ref{lemma:part1_path2} and \ref{cor:part2_trees2k-1} below. 

\begin{lemma}
\label{lemma:part1_path2}
Let $k\geq 1$ and $m \geq 0$. Then the Narayana number $N_{k-1,m}$ is the number of cyclic compositions of $2k-1$ into $k$ parts such that exactly $m$ parts are at least 2.
\end{lemma}    

\begin{proof}
We follow the proof of Lemma \ref{lemma:part1_path} closely.
Given a cyclic composition $[\mu_{1},\mu_{2},\ldots, \mu_{k}]$ of $2k-1$ with exactly $m$ parts that are at least $2$, we build a sequence consisting of $k-1$ copies of $U$ and $k$ copies of $D$ in the same way as in the proof of Lemma \ref{lemma:part1_path}. 
By Corollary \ref{cor:reverse_cycle}, there is exactly one cyclic shift of this sequence such that any proper prefix of the sequence contains at least as many $U$s as the number of $D$s. 
Then the last entry of this cyclic shift is a $D$; removing this last $D$, we obtain a Dyck path of semilength $k-1$ and exactly $m$ $UD$-factors.

Conversely, consider a Dyck path of semilength $k-1$ with exactly $m$ $UD$-factors. 
We append a $D$ to the corresponding Dyck word, and form the sequence $a_1, a_2, \dots, a_k$, where $a_i$ is the number of $U$s that immediately precede the $i$th $D$.
We then add $1$ to every number in this sequence and take the equivalence class of its cyclic shifts, yielding a cyclic composition of $2k-1$ into $k$ parts, exactly $m$ of which are at least $2$.
\end{proof}

\begin{lemma}
\label{cor:part2_trees2k-1}
Let $k\geq 1$. Given a cyclic composition $[\mu] \in \mathsf{CComp}_{2k-1,k}$, there are exactly $\binom{2k-1}{k-1}$ plane trees whose extended leaf decomposition belongs to the necklace $\psi[\mu] \in \mathsf{Neck}_{2k-1,k}$.
\end{lemma}

\begin{proof}
The proof of Lemma \ref{lemma:part2_trees} can be readily adapted to prove Lemma \ref{cor:part2_trees2k-1}; we omit the details.
\end{proof}

\section{Combinatorial proofs of generalized formulas} \label{s-generalized}


\subsection{Combinatorial proof of generalized formulas for \texorpdfstring{$w_{n,k,m}$}{w n,k,m}} \label{ss-generalized}

We have demonstrated a combinatorial proof of Theorem ~\ref{th:relationNandW}, which expresses the numbers $w_{2k+1,k,m}$ in terms of the Narayana numbers. 
In fact, the numbers $w_{n,k,m}$, for any $n\neq 2k$, can be expressed in terms of a family of generalized Narayana numbers due to Callan ~\cite{callan}, and the purpose of this section is to describe how our combinatorial proof for Theorem ~\ref{th:relationNandW} can be adapted to prove this more general result. 
Along the way, we will give a combinatorial proof for our explicit formula for the numbers $w_{n,k,m}$ stated in Theorem \ref{t-explicit}.

Given $[\mu] \in \mathsf{CComp}_{n,k}$, let $\mathsf{MNeck}[\mu]$ be the set of all marked necklaces of extended leaves corresponding to the cyclic composition $[\mu]$. 
In the proof of Lemma~\ref{lemma:part2_trees}, we used the fact that $\lvert \mathsf{MNeck}[\mu] \rvert = \binom{n}{k-1}$ when $[\mu]$ is primitive. 
More generally, we have the following:

\begin{lemma} \label{lemma:markednecksize}
Given $[\mu] \in \mathsf{CComp}_{n,k}$, we have
\begin{equation*}
    \lvert \mathsf{MNeck}[\mu] \rvert = \frac{\mathsf{ord}[\mu]}{k}\binom{n}{k-1}.
\end{equation*}
\end{lemma}

\begin{proof}
Let $N$ denote the necklace of extended leaves corresponding to $[\mu]$, and fix a sequence $E_1 E_2 \cdots E_k \in N$ of extended leaves. 
Then there are $\binom{n}{k-1}$ ways to choose the $k-1$ non-leaf vertices to be marked in $E_1 E_2 \cdots E_k$. 
Upon taking all $k$ cyclic shifts of $E_1 E_2 \cdots E_k$, observe that each cyclic shift appears $k/\mathsf{ord}[\mu]$ times; accordingly, each of the markings counted by $\binom{n}{k-1}$ is $k/\mathsf{ord}[\mu]$ times the number of markings in $\mathsf{MNeck}[\mu]$.
In other words, we have 
\begin{equation*}
    \frac{k}{\mathsf{ord}[\mu]} \lvert \mathsf{MNeck}[\mu] \rvert = \binom{n}{k-1},
\end{equation*}
which is equivalent to our desired conclusion.
\end{proof}


A Dyck word $\pi = \pi_{1} \cdots \pi_{2n}$ with exactly $k$ $UD$-factors can be expressed uniquely in the form $\pi = U^{a_{1}}D^{b_{1}} \cdots U^{a_{k}}D^{b_{k}}$, where $(a_{1}, \ldots, a_{k})$ and $(b_{1}, \ldots, b_{k})$ are both compositions of $n$.
Let us call $(a_{1}, \ldots, a_{k})$ the \emph{rise composition} of $\pi$.
Given a cyclic composition $[\mu]$, denote by $\mathsf{D}[\mu]$ the set of all Dyck words with rise composition contained in the equivalence class $[\mu]$.

\begin{lemma} \label{lemma:risecompsize}
Given $[\mu] \in \mathsf{CComp}_{n,k}$, we have
\begin{equation}
    \lvert \mathsf{D}[\mu] \rvert = \frac{\mathsf{ord}[\mu]}{k}\binom{n}{k-1}.
\end{equation}
\end{lemma}

\begin{proof}
From Lemma ~\ref{lemma:markednecksize}, it suffices to find a bijection from $D[\mu]$ to $\mathsf{MNeck}[\mu]$. 
Once again, we appeal to the plane tree interpretation of Dyck paths from which the bijection to $\mathsf{MNeck}[\mu]$ follows similarly to that of Lemma ~\ref{lemma:part2_trees}.
\end{proof}

Let $\mathsf{Comp}_{n,k,m}$ denote the set of all compositions in $\mathsf{Comp}_{n,k}$ with exactly $m$ parts at least $2$ and let $\mathsf{CComp}_{n,k,m}$ be its cyclic counterpart. 
Using Lemma ~\ref{lemma:risecompsize}, we obtain a combinatorial proof for Theorem ~\ref{t-explicit}.  The proof of the nontrivial case is given below.


\begin{proof}[Combinatorial proof of Theorem ~\ref{t-explicit}]
First, we take the Dyck paths counted by $w_{n,k,m}$ and partition them by the cyclic equivalence classes of their rise compositions.
Then we have 
\begin{equation} \label{e-needthislater}
    w_{n,k,m} = \sum_{[\mu] \in \mathsf{CComp}_{n,k,m}} \lvert D[\mu] \rvert
    = \sum_{[\mu] \in \mathsf{CComp}_{n,k,m}} \frac{\mathsf{ord}[\mu]}{k} \binom{n}{k-1}
\end{equation}
upon applying Lemma  ~\ref{lemma:risecompsize}.
Next, recall that every cyclic composition $[\mu]\in\mathsf{CComp}_{n,k,m}$ contains $\mathsf{ord}[\mu]$ distinct compositions in $\mathsf{Comp}_{n,k,m}$, so we have 
\begin{equation} \label{e-wcomp}
    w_{n,k,m} = \sum_{\mu \in \mathsf{Comp}_{n,k,m}} \frac{1}{\mathsf{ord}[\mu]}\frac{\mathsf{ord}[\mu]}{k} \binom{n}{k-1}
    = \frac{1}{k} \binom{n}{k-1} \lvert \mathsf{Comp}_{n,k,m} \rvert.
\end{equation}
Finally, we claim that
\begin{equation} \label{e-compbin}
\lvert \mathsf{Comp}_{n,k,m} \rvert = \binom{n-k-1}{m-1}\binom{k}{m};
\end{equation}
indeed, we can uniquely generate all compositions of $n$ into $k$ parts with exactly $m$ parts at least 2 using the following process:
\begin{enumerate}
    \item Take the composition $(1^k)$ consisting of $k$ copies of 1, and choose $m$ positions $1\leq i_1<i_2<\cdots<i_m \leq k$ within this composition; there are $\binom{k}{m}$ ways to do this.
    \item Choose a composition $\mu=(\mu_1,\mu_2,\dots,\mu_m)$ of $n-k$ into $m$ parts; there are $\binom{n-k-1}{m-1}$ ways to do this.
    \item For each $1 \leq j \leq m$, add $\mu_j$ to the $i_j$th entry of $(1^k)$. The result is a composition of $n$ into $k$ parts with exactly $m$ parts at least 2.
\end{enumerate}
Substituting \eqref{e-compbin} into \eqref{e-wcomp} completes the proof.
\end{proof}

Given $0 \leq r \leq n$ and $0 \leq k \leq n-r$, define the \emph{$r$-generalized Narayana number} $N_{n, k}^{(r)}$ by
\[N_{n, k}^{(r)} = \frac{r+1}{n+1} \binom{n+1}{k} \binom{n-r-1}{k-1}.\]
Observe that the usual Narayana numbers $N_{n,k}$ can be obtained by setting $r = 0$ in $N_{n, k}^{(r)}$.
For $k <0$, we use the convention that $\binom{n}{k} = 0$ except for the special case when $n = k = -1$, where we define $\binom{-1}{-1}$ to be $1$. 

The following is a generalization of Theorems \ref{th:relationNandW} and \ref{th:relationNandW2}.

\begin{thm}
 \label{thm:simplify}
For all $j,k \geq 1$ and $m\geq 0$, we have
\begin{equation*}
    w_{2k+j,k,m} = \frac{1}{j}\binom{2k+j}{k-1}N^{(j-1)}_{k+j-1,m}
\end{equation*}
and for all $1 \leq j \leq k$ and $m\geq 0$, we have
\begin{equation*}
    w_{2k-j,k,m} = \frac{1}{j}\binom{2k-j}{k-1}N^{(j-1)}_{k-1,m}.
\end{equation*}
\end{thm}

Before proving Theorem ~\ref{thm:simplify}, we first introduce a generalization of Dyck paths and prove a useful lemma.
Consider paths in $\mathbb{Z}^2$ from $(0,0)$ to $(2n-r, r)$, consisting of $n$ up steps $(1,1)$ and $n-r$ down steps $(1,-1)$, that never pass below the horizontal axis.
Denote by $D^{(r)}_{n,k}$ the set of words on the alphabet $\{U, D \}$ corresponding to such paths with exactly $k$ $UD$-factors. 
As shown by Callan and Schulte ~\cite{callan}, $N_{n, k}^{(r)}$ is the cardinality of $D^{(r)}_{n,k}$.

For $\omega, \nu \in D^{(r)}_{n,k}$, let us write $\omega \sim \nu$ if the words $U \omega$ and $U \nu$ are cyclic shifts of each other. 
The relation $\sim$ is an equivalence relation on $D^{(r)}_{n,k}$, and we denote the set of its equivalence classes by $\tilde{D}^{(r)}_{n,k}$. 
For $[\omega] \in \tilde{D}^{(r)}_{n,k}$, let $\mathsf{ord}[\omega]$ be the number of distinct elements of $D^{(r)}_{n,k}$ contained within the equivalence class $[\omega]$.

\begin{dfn}
For $j,k \geq 1$, let $\phi_{j,k}$ be the map from $\mathsf{CComp}_{2k+j, k, m}$ to $\tilde{D}^{(j-1)}_{k+j-1, m}$ where $\phi_{j,k}[\mu]$ is obtained via the following algorithm:
\begin{enumerate}
    \item For $[\mu] = [\mu_{1}, \ldots, \mu_{k}] \in \mathsf{CComp}_{2k+j, k,m}$, set $\omega = U^{\mu_{1}-1}DU^{\mu_{2}-1}D \cdots U^{\mu_{k}-1}D$.
    \item Let $\nu = \nu_{1} \nu_{2} \cdots \nu_{2k+j}$ be any cyclic shift of $\omega$ that is $1$-dominating.
    \item Set $\phi_{j,k}[\mu]$ to be the equivalence class of the subword $\nu_{2} \cdots \nu_{2k+j}$.
\end{enumerate}
\end{dfn}

It is not immediately clear from the above definition whether the map $\phi_{j,k}$ is well-defined, but this will be established in the proof of the following lemma.

\begin{lemma} \label{lemma:genbijection}
For all $j,k \geq 1$, the map $\phi_{j,k}$ is a bijection. Moreover, for all $[\mu] \in \mathsf{CComp}_{2k+j,k,m}$, we have
\begin{equation*}
    \frac{\mathsf{ord}(\phi_{j,k}[\mu])}{\mathsf{ord}[\mu]} = \frac{j}{k}.
\end{equation*}
\end{lemma}
\begin{proof}
We first prove that $\phi_{j,k}$ is well-defined. 
Since $\omega$ contains $k+j$ copies of $U$ and $k$ copies of $D$, the cycle lemma guarantees that at least one cyclic shift of $\omega$ is $1$-dominating. 
By construction of $\omega$, the word $\nu$ must contain exactly $m$ $UD$-factors. 
The fact that $\nu$ is $1$-dominating and contains $m$ $UD$-factors implies that its subword $\nu_{2} \cdots \nu_{2k+j}$ is an element of $D^{(j-1)}_{k+j-1, m}$.
From the definition of $\sim$ on $D^{(j-1)}_{k+j-1, m}$, any $1$-dominating cyclic shift of $\omega$ will be sent to the same equivalence class in $\tilde{D}^{(j-1)}_{k+j-1, m}$. 
This same argument also implies that $\phi_{j,k}[\mu]$ does not depend on the representative of $[\mu]$ that is chosen.

Injectivity and surjectivity are straightforward to check from the definition of $\phi_{j,k}$.
By the cycle lemma, there are exactly $j$ cyclic shifts of $\omega$ that are $1$-dominating; among these $j$ words, there are $j \cdot \mathsf{ord}[\mu]/k$ \emph{distinct} cyclic shifts as each of them appears $k/\mathsf{ord}[\mu]$ times.
These $1$-dominating sequences are in bijection with paths in the equivalence class of $\phi_{j,k}[\mu]$ by removing the first $U$ from the sequence. 
Thus, $\mathsf{ord}(\phi_{j,k}[\mu]) = j \cdot \mathsf{ord}[\mu]/k$.
\end{proof}

We are now ready to prove Theorem ~\ref{thm:simplify}.

\begin{proof} [Proof of Theorem ~\ref{thm:simplify}]
From Lemma ~\ref{lemma:genbijection}, we have 
\begin{equation*}
\lvert \mathsf{Comp}_{2k+j, k, m} \rvert = \frac{k}{j}\lvert D^{(j-1)}_{k+j-1,m} \rvert = \frac{k}{j} N^{(j-1)}_{k+j-1,m}.
\end{equation*}
Plugging this into ~\eqref{e-wcomp} gives the desired result
\begin{equation*}
    w_{2k+j, k, m} = \frac{1}{j} \binom{2k+j}{k-1} N^{(j-1)}_{k+j-1,m}.
\end{equation*}

The proof for $w_{2k-j,k,m}$ follows similarly by defining an analogous map $\varphi_{j,k}$ from $\mathsf{CComp}_{2k-j, k, m}$ to $\tilde{D}^{(j-1)}_{k-1, m}$ and reproving Lemma ~\ref{lemma:genbijection} for $\varphi_{j,k}$.
\end{proof}


\subsection{Further generalizations and applications} We now detail several interesting generalizations and applications that can be obtained from our results in Section ~\ref{ss-generalized}.

First, we obtain a formula for the Catalan numbers $C_n$ in terms of primitive cyclic compositions via Lemma ~\ref{lemma:risecompsize}.

\begin{cor}
For all $n\geq 1$, we have
\begin{equation*}
    C_n = \frac{1}{n+1} \binom{2n}{n} = \sum_{d|n} \sum_{\substack{\mathcal{[\mu]} \in \mathsf{CComp}_{n/d}\\
    \mathrm{primitive}}} \frac{1}{d}\binom{n}{\mathsf{ord}[\mu]\cdot d-1},
\end{equation*}
where $\mathsf{CComp}_{n}$ is the set of all cyclic compositions of $n$.
\end{cor}
\begin{proof}
Grouping Dyck paths by their cyclic rise composition, we have 
\begin{equation*}
C_{n} = \sum_{[\mu]\in \mathsf{CComp}_{n}} D[\mu].
\end{equation*}
Recall that every cyclic composition of $n$ can be uniquely expressed as the concatenation of $d$ copies of a primitive cyclic composition of $n/d$ for some divisor $d$ of $n$. 
Similarly, for every divisor $d$ of $n$, each primitive cyclic composition of $n/d$ can be made into a cyclic composition of $n$ by concatenating $d$ copies. 
This gives us
\begin{equation*}
C_n = \sum_{[\mu]\in \mathsf{CComp}_{n}} D[\mu] = \sum_{d|n}\sum_{\substack{[\mu] \in \mathsf{CComp}_{n/d}\\ \text{primitive}}} D([\mu]^d)
\end{equation*}
where $[\mu]^d$ is the concatenation of $d$ copies of $[\mu]$.
From Lemma ~\ref{lemma:risecompsize}, this gives us precisely
\begin{equation*}
C_n = \sum_{d|n}\sum_{\substack{[\mu] \in \mathsf{CComp}_{n/d}\\ \text{primitive}}} D([\mu]^d) = \sum_{d|n} \sum_{\substack{\mathcal{[\mu]} \in \mathsf{CComp}_{n/d}\\
    \text{primitive}}} \frac{1}{d}\binom{n}{\mathsf{ord}[\mu]\cdot d-1}. \qedhere
\end{equation*}
\end{proof}

Next, Lemma ~\ref{lemma:genbijection} naturally leads to the following generalization of Lemmas ~\ref{lemma:part1_path} and ~\ref{lemma:part1_path2}, which expresses the number of cyclic compositions in $\mathsf{CComp}_{2k\pm j, k,m}$ in terms of $r$-generalized Narayana numbers. 
Below, $\varphi$ denotes Euler's totient function.

\begin{prop} \label{p-ccomp}
    Let $k \geq 1$ and $m,j\geq 0$, and let $d = \mathsf{gcd}(k,m,j)$.\footnote{If $m=0$ or $j=0$, then $\mathsf{gcd}(k,m,j)$ is defined to be the greatest common divisor of the nonzero numbers among $k$, $m$, and $j$.}\vspace{5bp}
    \begin{enumerate}
    \item[(a)] If $j \geq 1$, we have $\displaystyle{\lvert \mathsf{CComp}_{2k+j, k, m} \rvert = \frac{1}{j} \sum_{s\mid d} \varphi(s)N^{(j/s-1)}_{(k+j)/s-1, \, m/s}}$.\vspace{5bp}
    \item[(b)] If $j=0$, we have $\displaystyle{\lvert \mathsf{CComp}_{2k, k, m} \rvert = \frac{1}{k} \sum_{s\mid d} \varphi(s) \binom{\frac{k}{s}-1}{\frac{m}{s}-1}\binom{\frac{k}{s}}{\frac{m}{s}}}$.
    \vspace{5bp}
    \item[(c)] If $1 \leq j \leq k$, we have $\displaystyle{\lvert \mathsf{CComp}_{2k-j, k, m} \rvert = \frac{1}{j} \sum_{s\mid d} \varphi(s)N^{(j/s-1)}_{k/s-1,\, m/s}}$.
    \end{enumerate}
\end{prop}
\begin{proof}
    Let us call an (ordinary) composition $\mu$ \emph{primitive} if $[\mu]$ is primitive, and let $\mathsf{PComp}_{n,k,m}$ denote the set of primitive compositions of $n$ with $k$ parts with exactly $m$ parts at least two.
    Let $1\leq k \leq m$ and $j\geq 0$, and let $d = \mathsf{gcd}(k,m,j)$.
    Given $\ell \mid d$, define
    $$f(\ell) = \lvert \mathsf{Comp}_{(2k+j)\ell/d, \, k\ell/d, \, m\ell/ d} \rvert \quad \text{and} \quad g(\ell) = \lvert \mathsf{PComp}_{(2k+j)\ell/d,\, k\ell/d,\, m\ell /d} \rvert.$$
    Every composition can be uniquely decomposed as a concatenation of one or more copies of a primitive composition, which leads to the formula $f(\ell) = \sum_{s\mid \ell} g(s)$.
    By M\"obius inversion, we then have $g(\ell) = \sum_{s\mid \ell} \mathsf{M\ddot{o}b}(s) f(\ell/s)$ where $\mathsf{M\ddot{o}b}$ is the M\"obius function.
    Observe that 
    \begin{equation*}
    \lvert \mathsf{CComp}_{2k+j, k, m} \rvert = \sum_{\ell\mid d} \frac{\ell}{k} \lvert \mathsf{PComp}_{(2k+j)/\ell, \, k/\ell, \, m/\ell} \rvert;
    \end{equation*}
    after all, every cyclic composition in $\mathsf{CComp}_{2k+j, k, m}$ is a concatenation of $\ell$ copies of a primitive cyclic composition with $k/\ell$ parts for some $\ell$ dividing $d$, and this primitive cyclic composition is the cyclic equivalence class of $k/\ell$ elements of $\mathsf{PComp}_{(2k+j)/\ell, \,k/\ell , \,m/\ell}$. We then have
    {\allowdisplaybreaks\begin{align*}
    \lvert \mathsf{CComp}_{2k+j, k, m} \rvert &= \sum_{\ell\mid d} \frac{\ell}{k} \lvert \mathsf{PComp}_{(2k+j)/\ell, \, k/\ell, \, m/\ell} \rvert \\
    &= \sum_{\ell\mid d} \frac{\ell}{k} g\Big(\frac{d}{\ell}\Big) \\
    &= \frac{1}{k}\sum_{\ell\mid d} \sum_{q\mid (d/\ell)} \mathsf{M\ddot{o}b}(q) \ell f\Big(\frac{d}{\ell q} \Big) \\
    &= \frac{1}{k}\sum_{s\mid d} \sum_{\ell q = s} \mathsf{M\ddot{o}b}(q) \frac{s}{q} f\Big(\frac{d}{s}\Big). \\
    &= \frac{1}{k}\sum_{s\mid d} \varphi(s) f\Big(\frac{d}{s}\Big),
    \end{align*}}where the last step uses the well-known identity $\varphi(s) = \sum_{q\mid s} \mathsf{M\ddot{o}b}(q) s/q$.
    If $j\geq 1$, then we have 
    $$f\Big(\frac{d}{s} \Big) = \lvert \mathsf{Comp}_{2(k/s)+j/s,\, k/s,\, m/s} \rvert = \frac{k}{j} N^{(j/s-1)}_{(k+j)/s-1,\, m/s}$$ 
    by Lemma ~\ref{lemma:genbijection}, and if $j=0$, then we instead have
    $$f\Big(\frac{d}{s} \Big) = \lvert \mathsf{Comp}_{2(k/s),\, k/s,\, m/s} \rvert = \binom{\frac{k}{s}-1}{\frac{m}{s}-1}\binom{\frac{k}{s}}{\frac{m}{s}}$$
    by \eqref{e-compbin}; substituting appropriately completes the proof of parts (a) and (b). 
    We omit the proof of (c) as it is similar to that of (a).
\end{proof}

\begin{rmk}
    Proposition ~\ref{p-ccomp} has an interesting interpretation related to permutation enumeration, as $\lvert \mathsf{CComp}_{n, k, m} \rvert$ is the number of distinct cyclic descent sets among cyclic permutations of length $n$ with $k$ cyclic descents and $m$ cyclic peaks \textup{(}for all $1 \leq k<n$\textup{)}; see \cite{sagan2, sagan1, liang, sagan3} for definitions.
    In particular, when $j\neq 0$ and $\mathsf{gcd}(k,j,m) = 1$, the number of cyclic descent classes among such cyclic permutations of length $2k+j$ is equal to a generalized Narayana number divided by $j$.
    The case $j=\pm 1$ \textup{(}Lemmas ~\ref{lemma:part1_path} and ~\ref{lemma:part1_path2}\textup{)} yields a new interpretation of the \textup{(}ordinary\textup{)} Narayana numbers $N_{k,m}$ in terms of cyclic descent classes.
\end{rmk}

Finally, many of our results can be generalized to the numbers $w_{n, k_{1}, k_{2}, \ldots, k_{r}}$ which count Dyck paths of semilength $n$ with $k_{1}$ $UD$-factors, $k_{2}$ $UUD$-factors,  \dots , and $k_{r}$ $U^{r}D$-factors.  Let $\mathsf{Comp}_{n, k_1, k_2, \ldots, k_r}$ denote the set of compositions of $n$ with $k_{1}$ parts, exactly $k_{2}$ parts larger than $1$, $\ldots$, and exactly $k_{r}$ parts larger than $r-1$, and let $\mathsf{CComp}_{n,k_1, k_2, \ldots, k_r}$ be the set of corresponding cyclic compositions.
Using Lemma ~\ref{lemma:risecompsize} and the proofs of Lemmas ~\ref{lemma:part1_path} and \ref{lemma:part1_path2}, we obtain the following symmetries for $w_{n,k_1, k_2, \ldots, k_r}$.

\begin{cor} \label{c-evenmoretantalizing}
For all $r\geq 1$ and $1\leq m \leq k$, taking $k_1 = k_2 = \cdots = k_{r-1} = k$, we have
\begin{equation*}
w_{rk+1, k_1, k_2, \ldots, k_{r-1}, m} = w_{rk+1, k_{1}, k_{2}, \ldots, k_{r-1}, k+1-m}
\end{equation*}
and
\begin{equation*}
w_{rk-1, k_1, k_2, \ldots, k_{r-1}, m} = w_{rk-1, k_1, k_2, \ldots, k_{r-1}, k-m}
\end{equation*}
\end{cor}

\begin{proof}
Let $\mu \in \mathsf{CComp}_{rk+1, k, k, \ldots, k, m}$. From Lemma ~\ref{lemma:risecompsize}, we have $D[\mu] = \binom{rk+1}{k-1}$ as $[\mu]$ must be primitive. Note that $\lvert \mathsf{CComp}_{rk+1, k, k, \ldots, k, m} \rvert = N_{k,m}$ which can be shown via an argument analogous to that in the proof of Lemma ~\ref{lemma:part1_path}. Thus, we have $w_{rk+1, k, k, \ldots, k, m} = \binom{n}{k-1}N_{k,m}$, which gives the desired symmetry in light of the Narayana symmetry. The symmetry for the numbers $w_{rk-1, k, k, \ldots, k, m}$ can be proven similarly.
\end{proof}

Note that the $r=1$ case of Corollary ~\ref{c-evenmoretantalizing} is the Narayana symmetry $N_{n,k} = N_{n,n+1-k}$, whereas setting $r=2$ recovers our symmetries for the numbers $w_{2k\pm 1,k,m}$.

In addition, as a direct consequence of our combinatorial proof for Theorem ~\ref{t-explicit}, we have the following formula for $w_{n, k_{1}, k_{2}, \ldots, k_{r}}$.

\begin{cor}\label{c-wr}
Let $r\geq 1$, $k_1 \geq k_2 \geq \cdots \geq k_r \geq 0$, and $n \geq k_1 + k_2 + \cdots + k_r$. 
For convenience, write $\hat{k} = k_1 + k_2 + \cdots + k_{r-1}$. Then
\begin{multline*}
w_{n,k_1,k_2, \ldots, k_r} = \\
\begin{cases}
   
    \displaystyle{\frac{1}{k_{1}}\binom{n}{k_{1}-1} \binom{n-\hat{k}-1}{k_r-1} \binom{k_{1}}{k_1-k_2, k_2-k_3, \ldots, k_{r-1}-k_{r}, k_r }}, & \text{ if } k_r>0, \\[10bp]
   
    \displaystyle{\frac{1}{k_{1}}\binom{n}{k_{1}-1}\binom{k_{1}}{k_1-k_2, k_2-k_3, \ldots, k_{r-1}-k_{r}, k_r }}, & \text{ if } k_{r} = 0 \text{ and } n = \hat{k}, \\[2bp]
    0, & \text{ otherwise.}
\end{cases}
\end{multline*}
\end{cor}

Corollary \ref{c-wr} specializes to the formula for Narayana numbers upon setting $r=1$, and to Theorem \ref{t-explicit} for $r=2$.


\section{Polynomials}\label{polynomials}


\subsection{Real-rootedness}
A natural question is whether or not the sequence $\{ w_{n,k,m} \}_{0 \leq m \leq k}$, for a fixed $n$ and $k$, is unimodal. 
In other words, for fixed $n$ and $k$, does there always exist $0 \leq j \leq k$ such that 
$$w_{n,k,0} \leq w_{n,k, 1} \leq \cdots \leq w_{n,k,j} \geq w_{n, k, j+1} \geq \cdots \geq w_{n,k,k}?$$
One powerful way to prove unimodality results in combinatorics is through real-rootedness. 
A polynomial with coefficients in $\mathbb{R}$ is said to be \emph{real-rooted} if all of its roots are in $\mathbb{R}$. 
(We use the convention that constant polynomials are also real-rooted.)
It is well known that if a polynomial with non-negative coefficients is real-rooted, then the sequence of its coefficients are unimodal (see ~\cite{Branden2015}, for example). 

Let $W_{n,k}(t)$ be the polynomial defined by
\begin{align*}
    W_{n,k}(t) = \sum_{m=0}^{k} w_{n,k,m}t^m.
\end{align*}
In what follows, we prove that the polynomials $W_{n,k}(t)$ are real-rooted, thus implying the unimodality of the sequences $\{ w_{n,k,m} \}_{0 \leq m \leq k}$.

We begin with a simple result involving the roots of $W_{n,k}(t)$.

\begin{prop}\label{prop:reflection}
For all $1 \leq k \leq n-1$, the polynomials $W_{n,k}(t)$ and $W_{n,n-k}(t)$ have the same roots. 
\end{prop}
\begin{proof}
This follows from the fact that $w_{n,k,m}= \frac{k(k+1)}{(n-k)(n-k+1)} w_{n,n-k,m}$, which is readily verified from Theorem ~\ref{t-explicit}.
\end{proof}

To prove the real-rootedness of the $W_{n,k}(t)$, we make use of Malo's result regarding the roots of the Hadamard product of two real-rooted polynomials.

\begin{thm}[\cite{malo}]\label{thm:Malo} 
Let $f(t) = \sum_{i = 0}^{m} a_{i} t^{i}$ and $g(t) = \sum_{i=0}^{n} b_{i} t^{i}$ be real-rooted polynomials in $\mathbb{R}[t]$ such that all the roots of $g$ have the same sign. 
Then their Hadamard product
$$f\ast g = \sum_{i = 0}^{\ell} a_{i}b_{i} t^{i},$$ 
where $\ell = \min\{m,n\}$, is real-rooted.
\end{thm}

\begin{thm}\label{thm:real-rooted}
For all $n, k \geq 0$, the polynomials $W_{n,k}(t)$ are real-rooted.
\end{thm}
\begin{proof}
From Theorem ~\ref{t-explicit}, we have
\begin{equation}
W_{n,k}(t) = \begin{cases}
    0, & \text{ if } n < k,\\
    1, & \text{ if } n = k,\\
    \frac{1}{k}\binom{n}{k-1}\sum_{m = 1}^{\text{min}\{k, n-k \}} \binom{n-k-1}{m-1} \binom{k}{m} t^m, & \text{ if } n > k.
\end{cases}
\end{equation}
Thus it suffices to check that the polynomial $\sum_{m = 1}^{\text{min}\{k, n-k\}} \binom{n-k-1}{m-1}\binom{k}{m} t^m$ is real-rooted, which follows from applying Theorem ~\ref{thm:Malo} to $f(t) = t(t-1)^{n-k-1}$ and $g(t) = (t-1)^k$.
\end{proof}

More generally, we conjecture the polynomials $W_{n,k}(t)$ satisfy stronger conditions which we presently define. 
For two real-rooted polynomials $f$ and $g$, let $\{u_i\}$ be the roots of $f$ and $\{v_i\}$ the roots of $g$, both in non-increasing order. We say that $g$ \emph{interlaces} $f$, denoted by $g \rightarrow f$, if either $\deg(f) = \deg(g)+1  = d$ and 
$$u_{d} \leq v_{d-1} \leq u_{d-1} \leq \cdots \leq v_{1} \leq u_{1},$$
or if $\deg(f) = \deg(g)  = d$ and 
$$v_{d} \leq u_{d} \leq v_{d-1} \leq u_{d-1} \leq \cdots \leq v_{1} \leq u_{1}.$$
(By convention, we assume that a constant polynomial interlaces with every real-rooted polynomial.)
We say that a sequence of real-rooted polynomials $f_{1}, f_{2}, \ldots$ is a \emph{Sturm sequence} if $f_{1} \rightarrow f_{2} \rightarrow \cdots.$
Moreover, a finite sequence of real-rooted polynomials $f_{1}, f_{2}, \ldots, f_{n}$ is said to be \emph{Sturm-unimodal} if there exists $1 \leq j \leq n$ such that 
$$f_{1} \rightarrow f_{2} \rightarrow \cdots \rightarrow\ f_{j} \leftarrow f_{j+1} \leftarrow \cdots \leftarrow f_{n}.$$

\begin{conj}
    For any fixed $k \geq 1$, the polynomials $\{W_{n,k}(t)\}_{n \geq k}$ form a Sturm sequence.
\end{conj}

\begin{conj}
    For any fixed $n \geq 1$, the sequence $\{W_{n,k}(t)\}_{1\leq k \leq n}$ is Sturm-unimodal.
\end{conj}

Our result expressing the numbers $w_{n,k,m}$ in terms of generalized Narayana numbers has a natural polynomial analogue. Let $\operatorname{Nar}^{(r)}_k(t)$ denote the $k$th \textit{$r$-generalized Narayana polynomial} defined by
$$\operatorname{Nar}^{(r)}_k(t)=\sum_{m=0}^{k-r}N^{(r)}_{k,m}t^m=\frac{r+1}{k+1}\sum_{m=0}^{k-r}\binom{k+1}{m}\binom{k-r-1}{m-1}t^m.$$
Setting $r=0$ recovers the usual \emph{Narayana polynomials} $\operatorname{Nar}_{k}(t) = \sum_{m = 0}^{k} N_{k,m} t^m$. 
From Theorem ~\ref{thm:simplify} and straightforward computations, we have the following expressions for $W_{n,k}(t)$.

\begin{prop} \label{prop:polysimplify}
Let $k\geq 1$.\vspace{5bp}
\begin{enumerate}
    \item[(a)] For all $j\geq1$, we have $\displaystyle{W_{2k+j,k}(t)= \frac{1}{j}\binom{2k+j}{k-1}\operatorname{Nar}^{(j-1)}_{k+j-1}(t)}$.\vspace{5bp}
    \item[(b)] We have $\displaystyle{W_{2k,k}(t) = C_k \sum_{m=1}^{k}\binom{k-1}{m-1}\binom{k}{m}t^m}$ where $C_{k}$ denotes the $k$th Catalan number.\vspace{5bp}
    \item[(c)] For all $1\leq j\leq k$, we have $\displaystyle{W_{2k-j,k}(t)= \frac{1}{j}\binom{2k-j}{k-1}\operatorname{Nar}^{(j-1)}_{k-1}(t)}$.
\end{enumerate}
\end{prop}

The real-rootedness of the $r$-generalized Narayana polynomials was recently shown in \cite{chen-yang-zhao} using a different approach; Proposition \ref{prop:polysimplify} shows that the real-rootedness of the $W_{n,k}(t)$ implies the real-rootedness of  the $\operatorname{Nar}^{(r)}_{k}(t)$, thus giving an alternative proof of this result.


\subsection{Symmetry, \texorpdfstring{$\gamma$}{gamma}-positivity, and a symmetric decomposition} It is fitting that we end this paper by returning full circle to the topic of symmetry. First, we note that our symmetries for the numbers $w_{2k+1,k,m}$ and $w_{2k-1,k,m}$ immediately imply the following:

\begin{prop}\label{prop:symmetric}
The polynomials $W_{2k+1,k}(t)$ and $W_{2k-1,k}(t)$ are symmetric.
\end{prop}

A symmetric polynomial of degree $d$ can be written uniquely as a linear combination of the polynomials $\{ t^j(1+t)^{d-2j} \}_{0 \leq j \leq \lfloor d/2 \rfloor}$, referred to as the \emph{gamma basis}. A symmetric polynomial is called \emph{$\gamma$-positive} if its coefficients in the gamma basis are nonnegative. Gamma-positivity has shown up in many combinatorial and geometric contexts; see \cite{Athanasiadis2018} for a thorough survey. It is well known that the coefficients of a $\gamma$-positive polynomial form a unimodal sequence, and that $\gamma$-positivity is connected to real-rootedness in the following manner:

\begin{thm}[\cite{Branden2004}] \label{thm:gammapositive}
    If $f$ is a real-rooted, symmetric polynomial with nonnegative coefficients, then $f$ is $\gamma$-positive.
\end{thm}

The $\gamma$-positivity of the polynomials $W_{2k+1,k}(t)$ and $W_{2k-1,k}(t)$ then follows directly from Theorem ~\ref{thm:real-rooted}, Proposition \ref{prop:symmetric}, and Theorem \ref{thm:gammapositive}. Furthermore, we can get explicit formulas for their gamma coefficients by exploiting their connection to the Narayana polynomials.

\begin{prop}\label{cor:gamma-positivity}
The polynomials $W_{2k+1,k}(t)$ and $W_{2k-1,k}(t)$ are $\gamma$-positive for all $k\geq 1$. More precisely, we have the following gamma expansions:
\vspace{5bp}
\begin{enumerate}
\item[(a)] $\displaystyle{W_{2k+1,k}(t)=\sum_{j=1}^{\lfloor \frac{k+1}{2}\rfloor} \binom{2k+1}{k-1} \frac{(k-1)!}{(k-2j+1)!\, (j-1)!\, j!} \, t^j(1+t)^{k+1-2j}}$ for all $k\geq 1$\textup{;} \vspace{5bp}
\item[(b)] $\displaystyle{W_{2k-1,k}(t)=\sum_{j=1}^{\lfloor \frac{k+1}{2}\rfloor} \binom{2k-1}{k-1} \frac{(k-2)!}{(k-2j)!\, (j-1)!\, j!} \, t^j(1+t)^{k+1-2j}}$ for all $k\geq 2$.
\end{enumerate}
\end{prop}

\begin{proof}
The Narayana polynomials are known to be $\gamma$-positive with gamma expansion
$$\operatorname{Nar}_k (t)=\sum_{j=1}^{\lfloor \frac{k+1}{2} \rfloor}  \frac{(k-1)!}{(k-2j+1)!\, (j-1)!\, j!} \, t^j(1+t)^{k+1-2j}$$
for all $k\geq 1$ \cite[Theorem 2.32]{Athanasiadis2018}, and this implies the desired result by the $j=1$ case of Proposition ~\ref{prop:polysimplify} (a) and (c).
\end{proof}

\begin{rmk}
The gamma coefficients of the Narayana polynomials have a nice combinatorial interpretation in terms of lattice paths: $\frac{(k-1)!}{(k-2j+1)!\, (j-1)!\, j!}$ is the number of Motzkin paths of length $k-1$ with $j-1$ up steps \cite{blanco}. We can use this fact to give combinatorial interpretations of the gamma coefficients of $W_{2k+1,k}(t)$ and $W_{2k-1,k}(t)$. It would be interesting to find a combinatorial proof for Proposition ~\ref{cor:gamma-positivity} using Motzkin paths, perhaps in the vein of  the ``valley-hopping'' proof for the $\gamma$-positivity of Narayana polynomials \cite{hoppityhophop}.
\end{rmk}

While the polynomials $W_{n,k}(t)$ are not symmetric in general, it turns out that we can always express $W_{n,k}(t)$ as the sum of two symmetric polynomials.

\begin{thm}\label{conj:symmetric_decomposition}
Let $1\leq k \leq n$, and let $\widetilde{m}=\operatorname{deg}W_{n,k}(t)$. Then there exist symmetric polynomials $W_{n,k}^+(t)$ and $W_{n,k}^-(t)$, both with nonnegative coefficients, such that:
\begin{enumerate}
    \item[(a)] if $n=\widetilde{m}+k$ and $\widetilde{m}\neq k$, then $W_{n,k}(t)= W_{n,k}^+(t) -tW_{n,k}^-(t)$;
    \item[(b)] if $n=\widetilde{m}+k$ and $\widetilde{m}=k$, then $W_{n,k}(t)= W_{n,k}^+(t) + tW_{n,k}^-(t)$;
    \item[(c)] and if $n>\widetilde{m}+k$, then $W_{n,k}(t)= -W_{n,k}^+(t)+tW_{n,k}^-(t)$.
\end{enumerate}
\end{thm}


\begin{proof}
Since $n$ and $k$ are fixed, let us simplify notation by writing $w_m$ in place of $w_{n,k,m}$, so that $W_{n,k}(t)=\sum_{m=0}^k w_m t^m$. Let
\begin{equation}\label{w+}
    w^+_{i+1}=\Big( \sum_{j=0}^{i+1} w_j \Big) - \Big( \sum_{j=0}^{i} w_{k-j} \Big)
    \quad \text{and} \quad
    w^-_{i}= - \Big( \sum_{j=0}^{i} w_j \Big) + \Big( \sum_{j=0}^{i} w_{k-j} \Big)
\end{equation}
for all $1 \leq i \leq k$; also take $w^+_0=1$ when $k=n$ and $w^+_0=0$ otherwise. Observe that
\begin{align}
w^+_i+ w^-_{i-1} &= \Big( \sum_{j=0}^{i} w_j \Big) - \Big( \sum_{j=0}^{i-1} w_{k-j} \Big) - \Big( \sum_{j=0}^{i-1} w_j \Big) + \Big( \sum_{j=0}^{i-1} w_{k-j} \Big) = w_i, \label{eq:sum} \\
w^+_i-w^+_{k-i} &= \Big( \sum_{j=0}^{i} w_j \Big) - \Big( \sum_{j=0}^{i-1} w_{k-j} \Big) - \Big( \sum_{j=0}^{k-i} w_j \Big) + \Big( \sum_{j=0}^{k-i-1} w_{k-j} \Big) = 0, \quad \text{and} \label{eq:sym1} \\
w^-_{i-1}-w^-_{k-i} &= - \Big( \sum_{j=0}^{i-1} w_j \Big) + \Big( \sum_{j=0}^{i-1} w_{k-j} \Big) + \Big( \sum_{j=0}^{k-i} w_j \Big) - \Big( \sum_{j=0}^{k-i} w_{k-j} \Big) = 0. \label{eq:sym2}
 \end{align}
A standard induction argument utilizing the explicit formula in Theorem ~\ref{t-explicit} yields the following:
\begin{itemize}
    \item the $w_i^+$ are positive when $n=\widetilde{m}+k$,
    \item the $w_i^+$ are negative when $n>\widetilde{m}+k$,
    \item the $w_i^-$ are positive when $n=\widetilde{m}+k$ for $\widetilde{m}=k$ and when $n>\widetilde{m}+k$, and 
    \item the $w_i^-$ are negative when $n=\widetilde{m}+k$ for $\widetilde{m}\neq k$.
\end{itemize}
Define the polynomials $W_{n,k}^{+}(t)$ and $W_{n,k}^{-}(t)$ by
\begin{align*}
W_{n,k}^{+}(t) = \sum_{i=0}^{\widetilde{m}}|w_i^{+}|\, t^{i}\quad\text{and}\quad W_{n,k}^{-}(t)=\sum_{i=0}^{k}|w_i^{-}|\, t^{i},
\end{align*}
respectively. These polynomials are symmetric by (\ref{eq:sym1}) and (\ref{eq:sym2}), and the decompositions given in (a)--(c) hold by construction in light of (\ref{eq:sum}).
\end{proof}

We end with a couple conjectures concerning the polynomials $W_{n,k}^{+}(t)$ and $W_{n,k}^{-}(t)$ arising from our symmetric decomposition. Our first conjecture, concerning real-rootedness, has been numerically verified for all $n\leq100$. 
\pagebreak
\begin{conj}
The following completely characterizes when $W_{n,k}^{+}(t)$ and
$W_{n,k}^{-}(t)$ are both real-rooted\textup{:}
\begin{enumerate}
\item [(a)] If $n=1$ or $n=2$, then $W_{n,k}^{+}(t)$ and $W_{n,k}^{-}(t)$ are both real-rooted if and only if $k=1$.
\item [(b)] If $n>1$ and $n \equiv 1 \textup{ (mod 4)}$, then $W_{n,k}^{+}(t)$ and $W_{n,k}^{-}(t)$ are both real-rooted if and only if $k=1,2,\left\lfloor n/2\right\rfloor -1,\left\lfloor n/2\right\rfloor ,\text{or }\left\lfloor n/2\right\rfloor +1$.
\item [(c)] If $n \equiv 3 \textup{ (mod 4)}$, then $W_{n,k}^{+}(t)$ and $W_{n,k}^{-}(t)$ are both real-rooted if and only if $k=1,2,\left\lfloor n/2\right\rfloor -1,\left\lfloor n/2\right\rfloor ,\left\lfloor n/2\right\rfloor +1,\text{or }\left\lfloor n/2\right\rfloor +2$.
\item [(d)] If $n$ is even and not equal to $2$, $10$, $12$, or $16$, then $W_{n,k}^{+}(t)$ and $W_{n,k}^{-}(t)$ are both real-rooted if and only if $k=1,2,n/2-1,n/2,\text{or }n/2+1$.
\item [(e)] If $n=10$, $12$, or $16$, then $W_{n,k}^{+}(t)$ and $W_{n,k}^{-}(t)$ are both real-rooted if and only if $k=1,2,n/2-2,n/2-1,n/2,\text{or }n/2+1$.
\end{enumerate}
\end{conj}

To establish real-rootedness, it would be helpful to have formulas for the polynomials $W_{n,k}^{+}(t)$ or $W_{n,k}^{-}(t)$. Our next conjecture gives formulas for $W_{2k,k}^{+}(t)$, $W_{2k,k}^{-}(t)$, $W_{2k,k+1}^{-}(t)$, and $W_{2k,k-1}^{+}(t)$. Unfortunately, we do not have conjectured formulas for any of the other polynomials.



\begin{conj} \label{conj-W2k} 
Let $k\geq 1$.
\begin{enumerate}
\item[(a)] We have
\[
W_{2k,k}^{+}(t)=(k-1)C_{k}\Nar_{k-1}(t)\quad\text{and}\quad W_{2k,k}^{-}(t)=C_{k}\sum_{i=0}^{k-1}\binom{k-1}{i}^{2}t^{i}.
\]
\item[(b)] If $k\geq 2$, we have 
\[
W_{2k,k+1}^{-}(t)=\binom{2k}{k}\Nar_{k-1}(t) \quad \text{and} \quad
W_{2k,k-1}^{+}(t)=-\frac{t}{2}\binom{2k}{k-2}\overline{\Nar}_{k-2}^{(1)}(t)
\]
where $\overline{\Nar}_{k}^{(j)}(t)=\sum_{i=0}^{k-j}\frac{j+1}{k+1}\binom{k+1}{i}\binom{k+1}{i+j+1}t^{i}$.
\end{enumerate}
\end{conj}

The $\overline{\Nar}_{k}^{(j)}(t)$ defined in Conjecture \ref{conj-W2k} form a family of generalized Narayana polynomials \cite{yang} different from Callan's.

\iffalse 
Since we have shown that $W_{2k,k}(t)=C_{k}\sum_{m=1}^{k}\binom{k-1}{m-1}\binom{k}{m}t^{m}$,
this conjecture implies the identity
\[
\binom{k-1}{m-1}\binom{k}{m}=(k-1)N_{k-1,m}+\binom{k-1}{m-1}^{2}\qquad(1\leq m\leq k).
\]

The following is a conjectured formula for $W_{2k,k+1}^{-}(t)$.
\begin{conj}
Suppose that $k\geq2$. 
Then $W_{2k,k+1}^{-}(t)=\binom{2k}{k}\Nar_{k-1}(t)$.
\end{conj}



Now, recall that $\Nar_{k}^{(j)}(t)$ denotes the generalized Narayana polynomials introduced by Callan. 
In the next conjecture, we will see an appearance of a different family of generalized Narayana polynomials, which we denote $\overline{\Nar}_{k}^{(j)}(t)$ and is defined by 
\[
\overline{\Nar}_{k}^{(j)}(t)\coloneqq\sum_{i=0}^{k-j}\frac{j+1}{k+1}\binom{k+1}{i}\binom{k+1}{i+j+1}t^{i}.
\]

\begin{conj}
Suppose that $k\geq2$.
Then $W_{2k,k-1}^{+}(t)=-\frac{t}{2}\binom{2k}{k-2}\overline{\Nar}_{k-2}^{(1)}(t)$.
\end{conj}
\fi 


\section*{Acknowledgments}
The authors thank the American Mathematical Society and the organizers of the MRC on Trees in Many Contexts, where this work was initiated, as well as David Callan for helpful discussions.
This material is based upon work supported by the National Science Foundation under Grant Number DMS-1641020. 



\bibliographystyle{plain}

2022-12-22T02:00:20.000
2212
2212.10586
en
https://arxiv.org/abs/2212.10586
We investigate a tantalizing symmetry on Catalan objects. In terms of Dyck paths, this symmetry is interpreted in the following way: if $w_{n,k,m}$ is the number of Dyck paths of semilength $n$ with $k$ occurrences of $UD$ and $m$ occurrences of $UUD$, then $w_{2k+1,k,m}=w_{2k+1,k,k+1-m}$. We give two proofs of this symmetry: an algebraic proof using generating functions, and a combinatorial proof which makes heavy use of the cycle lemma and an alternate interpretation of the numbers $w_{n,k,m}$ using plane trees. In particular, our combinatorial proof expresses the numbers $w_{2k+1,k,m}$ in terms of Narayana numbers, and we generalize this to a relationship between the numbers $w_{n,k,m}$ and a family of generalized Narayana numbers due to Callan. Some further generalizations and applications of our combinatorial proofs are explored. Finally, we investigate properties of the polynomials $W_{n,k}(t)= \sum_{m=0}^k w_{n,k,m} t^m$, including real-rootedness, $\gamma$-positivity, and a symmetric decomposition.
Combinatorics (math.CO)
A combinatorial proof of a tantalizing symmetry on Catalan objects
Qwen/Qwen-72B
1. YES
2. YES