The Foata-Fuchs proof of Cayley's formula, and its probabilistic uses

Abstract: We present a very simple bijective proof of Cayley's formula due to Foata and Fuchs (1970). This bijection turns out to be very useful when seen through a probabilistic lens; we explain some of the ways in which it can be used to derive probabilistic identities, bounds, and growth procedures for random trees with given degrees, including random d-ary trees. We also introduce a partial order on the degree sequences of rooted trees, and conjecture that it induces a stochastic partial order on heights of random rooted trees with given degrees.

\section{Introduction}\label{sec:intro}

A rooted tree is a triple $\mathrm{t}=(V,E,\rho)$ where $(V,E)$ is a tree and $\rho \in V$. We write
\[
\mathscr{T}_n = \{\mathrm{t}=(V,E,\rho): \mathrm{t}\mbox{ is a rooted tree with }V=[n]\}
\]
for the set of rooted trees with vertex set $[n]:=\{1,\ldots,n\}$.
{\em Cayley's formula} (which to the best of current knowledge was first established by \citet{MR1579119}) provides a very simple formula for $|\mathscr{T}_n|$.
\begin{thm}[Cayley's formula]\label{thm:cayley}
$|\mathscr{T}_n| = n^{n-1}$.
\end{thm}
There are numerous proofs of Cayley's formula in the literature. The 1967 survey by \citet{MR0214515} presents ten such proofs, including the proof via so-called {\em Pr\"ufer codes}, which is probably the one most frequently presented in undergraduate texts. More recent proofs include those discovered by \citet[Section 2.2]{MR633783}, which considers doubly-rooted trees; by \citet{MR1673928}, which analyzes a coalescent process for building rooted labeled trees; and by \citet[Section 3.6]{MR3617364}, which uses the connection between random labeled trees and conditioned Poisson branching processes.

In this work, we present a new proof of Cayley's formula, via a so-called {\em line-breaking} construction. We believe this is the simplest proof of Cayley's formula yet discovered. We discuss related constructions for unrooted trees, rooted trees with marked vertices and rooted forests in  Section~\ref{sec:relatedconstr}.  The bijection is also extremely useful for the analysis of random combinatorial trees; Section~\ref{sec:random} of this paper discusses some of its probabilistic implications. In that section, we also define an algorithm for growing random rooted trees with given vertex degrees. When applied to regular trees, the algorithm yields a sequence $(\mathrm{T}_m,m \ge 1)$, where for each $m \ge 1$, $\mathrm{T}_m$ is a uniformly random rooted, leaf-labeled $d$-ary tree with $m$ internal nodes, and $\mathrm{T}_{m+1}$ is generated from $\mathrm{T}_m$ by local regrafting.
Our algorithm is somewhat similar in spirit to R\'emy's algorithm \cite{remy}, which generates a sequence of uniform binary leaf-labeled trees.

Before giving the proof of Cayley's formula, we introduce some terminology.
Suppose $\mathrm{t}$ is a tree, $S$ is a connected subset of its vertices, and
$x$ is a vertex.
The \textit{path from $S$ to $x$ in $\mathrm{t}$} is the unique path in $\mathrm{t}$ which
starts at a vertex of $S$, does not visit any other vertex of $S$, and ends at
$x$. If $P$ is a path, we may also write $P$ to denote the set of vertices of the path.
Finally, a \textit{leaf} of $\mathrm{t}$ is a non-root vertex of $\mathrm{t}$ with no children.

\begin{figure}%
\includegraphics[width=0.3\textwidth]{bijection}
  \caption{A tree $\mathrm{t}$ and the corresponding sequence $\sequence{v}(\mathrm{t})$.}
  \label{mfig:cayley_bijection}
\end{figure}

\begin{proof}[Proof of Cayley's formula]
	The term $n^{n-1}$ counts sequences $\sequence{v}=(v_1,\ldots,v_{n-1})\in [n]^{n-1}$. We prove the theorem by introducing a bijection between $ \mathscr{T}_n$ and $[n]^{n-1}$.
		\begin{tcolorbox}[title=Bijection]
		For a tree $\mathrm{t}$ on $[n]$ with root $\rho$:
		\begin{itemize}
			\item Let $\ell_1<\ell_2<\dots<\ell_k$ be the leaves of $t$.
			\item
			Let $S_0=\{\rho\}$.
			\item
			Recursively, for $i=1,\dots, k$, let $P_i$ be the path
			in $\mathrm{t}$ from $S_{i-1}$ to $\ell_i$, and let $S_i=S_{i-1}\cup P_i$.
			Let $P_i^*$ be $P_i$ omitting its final point.
			\item
			Let $\sequence{v}(\mathrm{t})$ be the concatenation of $P_1^*$, $P_2^*,\dots,P_k^*$.
		\end{itemize}
	\end{tcolorbox}
	We claim that $\sequence{v}(\mathrm{t})\in [n]^{n-1}$. Indeed, by definition, for each $i$, $P_i^*\subset [n]$. Moreover, note that $P_1$, $P_2,\dots,P_k$ forms a partition of the edge set of $\mathrm{t}$, and for each $i$, $|P_i^*|$ equals the number of edges in $P_i$. This implies that the length of $\sequence{v}(\mathrm{t})$ is equal to the number of edges in $\mathrm{t}$, which equals $n-1$.

	To show that the above construction is a bijection, we describe its inverse.
	For a sequence $\sequence{v}=v_1, v_2, \dots, v_m$,
	we say that $j\in \{2,\dots, m\}$ is the location of a repeat of $\sequence{v}$ if
	$v_j=v_i$ for some $i<j$.
	\begin{tcolorbox}[title=Inverse of the bijection]
		Given a sequence $\sequence{v}=(v_1, v_2, \dots, v_{n-1})\in [n]^{n-1}$:
		\begin{itemize}
			\item Let $j(0)=1$, let $j(1)<j(2)<\dots<j(k-1)$ be the locations of the repeats
			of the sequence $\sequence{v}$, and let $j(k)=n$.
			\item Let $\ell_1<\ell_2<\dots<\ell_k$ be the elements of $[n]$ not occurring
			in $\sequence{v}$.
			\item For $i=1,\dots, k$, let $P_i$ be the path
			$(v_{j(i-1)}, \dots, v_{j(i)-1}, \ell_i)$ with $j(i) - j(i-1)$ edges.
			\item Let $\mathrm{t}(\sequence{v})$ be the graph with vertex set $[n]$, with root $v_1$
			and with edge set given by the union of the edges of the paths
			$P_1, P_2, \dots, P_k$.
		\end{itemize}
	\end{tcolorbox}
	We claim that $\mathrm{t}(\sequence{v})$ is a rooted tree with vertex set $[n]$.
	By construction,
for $i=2,\dots, k$, the set of vertices $\cup_{m<i} P_m$ and the path $P_i$
intersect at a single point (namely $v_{j_{i-1}}$, the first point of $P_i$).
Hence, by induction, for each $i$ the union of the edges of the paths
$P_1, \dots, P_i$ is a tree, and in particular taking $i=k$ we have that $\mathrm{t}(\sequence{v})$
is a tree.
Since for $i=1,\dots, k$, the final point of $P_i$ is $\ell_i$, and since no element $\ell_i$
appears as the first point of any other path $P_m$, we have that the leaves
of $\mathrm{t}(\sequence{v})$ are
	$\ell_1,\ldots, \ell_k$.

	We will argue that if $\sequence{v}\in [n]^{n-1}$, then $\sequence{v}(\mathrm{t}(\sequence{v}))= \sequence{v}$. Let $k$, $P_1,\dots, P_k$, $\ell_1,\dots, \ell_k$, and  $v_1,v_{j_1},\dots, v_{j_k}$ be defined as in the inverse of the bijection applied to $\sequence{v}$.  By definition, $v_1$ is the root in $\mathrm{t}(\sequence{v})$.
Note that $P_1$ is a path contained in $\mathrm{t}(\sequence{v})$ with endpoints $v_1$ and $\ell_1$. The fact that  $\mathrm{t}(\sequence{v})$ is a tree implies that $P_1$ is the unique path from $v_1$ to $\ell_1$ in $\mathrm{t}(\sequence{v})$.
Similarly, for $1<1\leq k$, $P_i$ is a path contained in $\mathrm{t}(\sequence{v})$ with endpoints
$v_{j_{i-1}}$ and $\ell_i$, and with
$P_i\cap \cup_{m<i}P_m=\{v_{j_{i-1}}\}$, so that $P_i$ is the unique path
in $\mathrm{t}(\sequence{v})$ from the union of $P_1,\dots,P_{i-1}$ to $\ell_i$. Hence  $\sequence{v}(\mathrm{t}(\sequence{v}))$ is the concatenation of $P^*_1,\dots, P^*_k$, giving $\sequence{v}(\mathrm{t}(\sequence{v}))= \sequence{v}$ as desired.
\end{proof}

\section{Extensions and related constructions}\label{sec:relatedconstr}

\subsection{Unrooted trees}  A simple trick allows us to directly study unrooted trees with our bijection by considering vertex $1$ as the root and removing the leading $1$ of the corresponding coding sequence.  This gives a proof of the more well-known form of Cayley's formula which states that there are $n^{n-2}$ unrooted trees of size $n$.

There is another way to adapt our bijection to encode unrooted labeled trees of size $n$ by sequences in $[n]^{n-2}$. It consists of letting $P^*_1$ be the path between the first and second-lowest-labeled vertices of degree 1 (excluding both endpoints) and continuing as in the bijection for rooted trees.

\subsection{Trees with given degrees.}
Our bijection has the property that for a given tree $\mathrm{t}$, in the associated sequence $\sequence{v}$ the number of times a given integer $k$ appears is precisely the number of children of the vertex with label $k$ in $\mathrm{t}$.

The {\em type} of a rooted tree $\mathrm{t}$ is the vector $\sequence{n}=(n_c,c \ge 0)$, where $n_c$ is the number of vertices of $\mathrm{t}$ with exactly $c$ children.
Writing $n = \sum_{c \ge 0} n_c$ and
\[
\mathscr{T}(\sequence{n}) = \{\mathrm{t} \in \mathscr{T}_n: \mathrm{t}\mbox{ has type }\sequence{n}\}\, ,
\]
then
\[
|\mathscr{T}(\sequence{n})| = {n \choose n_c,c \ge 0} \cdot \frac{(n-1)!}{\prod_{c \ge 0} (c!)^{n_c}}.
\]
This identity (also found in \cite[Theorem 1.5]{MR1630413} and \cite[Corollary 3.5]{MR1676282}) follows from the specializations of our bijection to trees of a given type: the right-hand side counts the number of ways to first choose the labels of the vertices with $c$ children for each $c \ge 0$, then choose a sequence of length $n-1$ in which the label of each vertex with $c$ children appears exactly $c$ times.

\subsection{Rooted trees with marked vertices}
Our bijection can also be modified to encode rooted labeled trees with $r\geq 1$
distinguishable marks on the vertices, $(t,m_1,\ldots,m_r) \in \mathscr{T}_n \times [n]^{r}$, by sequences in $[n]^{n+r-1}$.
The modification consists of changing the definition of $P_i^*$ in the recursive step slightly when constructing the sequence from the tree:
for $i=1,...,r$, $P_i^*$ is the path from $S_{i-1}$ to the $i$-th marked point (including the final point of this path), and for $i=1,\ldots,k$, $P_{r+i}^*$ is the path from $S_{r+i-1}$ to the $i$-th unmarked leaf $\ell_i$ (excluding its final point). Here the number of appearances of a vertex in the coding sequence is the sum of its number of children and its number of marks.

By taking the $r\to\infty$ limit of this bijection and applying it to an i.i.d. sequence of elements of $[n]$, one recovers the construction of the so-called {\em p-trees} from \cite{MR1741774}.

\subsection{Rooted forests}

The bijection above also extends to forests. Given a set $S \subset [n]$, write $\mathscr{F}_n^S$ for the set of forests $F$ with vertex set $[n]$ and root set $S$. Setting $s=|S|$, we describe a bijection between $\mathscr{F}_n^S$ and the set
\[
\{\sequence{v}=(v_1,\ldots,v_{n-s})\in [n]^{n-s}: v_1 \in S\}\, ,
\]
which has cardinality $sn^{n-s-1}$. The analogue of the ``inverse bijection'' is the easiest to describe, so we begin with that. To construct a sequence $(v_1,\ldots,v_{n-s})$ from $F \in \mathscr{F}_n^S$, proceed just as in our proof of Cayley's formula, but start from the $s$-vertex forest $F_0$ containing only the root vertices $S$, and at each step append the labels along the path to the smallest labeled leaf not already in the current forest (excluding the leaf itself).

Conversely, here is how to construct a forest $F \in \mathscr{F}_n^S$ from a sequence $\sequence{v}=(v_1,\ldots,v_{n-s})$ with $v_1 \in S$. Say that $i$ is
the location of a repeat if $i > 1$ and either $v_i \in S$ or there is $1 \le j < i$ such that $v_i =v_j$.
Denote the locations of repeats of $\sequence{v}$ by $j(1),\dots, j(k-1)$ in increasing order,
and let $j(k)=n-s+1$.
List the integers from $[n]\setminus S$ which do not appear in $\sequence{v}$ as $\ell_1,\ldots,\ell_{k}$ in increasing order.

Form a graph $F_S=F_S(\sequence{v})$ with vertices $[n]$, root set $S$, and edge set
\[
\big\{v_iv_{i+1}: i \in [n-s-1], i+1 \not \in \{j(1),\ldots,j(k)\}\big\} \cup \{v_{j(i)-1}\ell_i,1 \le i \le k\}.
\]
Essentially the same argument as in our proof of Cayley's formula shows that the connected components of $F_S$ are trees and that there are $s$ components of $F_S$, each containing exactly one vertex of $S$. Thus, rooting each component of $F_S$ at its unique element of $S$ turns $F_S$ into an element of $\mathscr{F}_n^S$.

Since the construction is bijective, this yields the following  extension of Cayley's formula (which is in fact stated by both \citet{MR1579119} and \citet{cayley}):
\[
|\mathscr{F}_n^S|=|\{\sequence{v}=(v_1,\ldots,v_{n-s})\in [n]^{n-s}: v_1 \in S\}|= sn^{n-s-1}\, .
\]
This extension of the bijection can also be specialized to count forests with fixed types.

\subsection{Other coding sequences of trees}
A variant of Pr\"ufer codes for rooted trees, first described by Neville \cite{MR54936}, gives another bijection between $\mathscr{T}_n$ and $[n]^{n-1}$. It coincides with the original Pr\"ufer code if one sees vertex $n$ as the root and then removes the resulting trailing $n$. Deo and Micikevicius \cite{MR1887428} found that reading the rooted Pr\"ufer code in reverse leads to a simpler description of the bijection, which shares some features of the bijection presented in this paper.
This bijection was independently discovered by Seo and Shin \cite{MR2353128} under the name \textit{Reverse-Pr\"ufer codes} to study leader vertices in trees, and also by Fleiner \cite{Fleiner},
who remarked that it can be used to describe the law of the height of a uniformly sampled vertex in a random labeled tree (see Proposition \ref{prop:distance_vtx}, below).

\section{Random trees}\label{sec:random}
The bijection above has numerous consequences for random trees. This section first explains how the bijection can be used to study typical and extreme distances in random trees, then discusses how it can be used to define growth procedures for random trees, somewhat in the spirit of R\'emy's algorithm \cite{remy} for growing uniformly random leaf-labeled binary trees.

For a finite set $\mathcal{S}$, we will write $X\in_u \cS$ to mean that $X$
is chosen uniformly at random from the set $\cS$.

\subsection{Distances in random trees}
For a tree $\mathrm{t}=(V,E,\rho)$ and vertices $u,v \in V$, write $[u,v]=[u,v]_{\mathrm{t}}$ for the unique path from $u$ to $v$ in $\mathrm{t}$, and $\ensuremath{\mathrm{dist}}_\mathrm{t}(u,v)$ for the distance from $u$ to $v$ in $t$, which equals the number of edges of $[u,v]$. Also, write $|v|$ for the graph distance from $\rho$ to $v$.

\begin{prop}\label{prop:leaf_identity}
Let $\mathrm{T} \in_u \mathscr{T}_n$ and let $L$ be a uniformly random leaf of $\mathrm{T}$. Also, let $\sequence{V}=(V_i,i \ge 1)$ be a sequence of independent uniformly random elements of $[n]$ and let $I = \min(i \ge 2: V_i \in \{V_1,\ldots,V_{i-1}\})$ be the index of the first repeated element of $\sequence{V}$. Then
$|L|+1 \ensuremath{\stackrel{\mathrm{d}}{=}} \min(I,n)$.
\end{prop}
\begin{proof}
Write $\sequence{V}=(V_1,\ldots,V_{n-1}) \in_u [n]^{n-1}$. Then $\mathrm{T}=\mathrm{t}(\sequence{V}) \in_u \mathscr{T}_n$. Moreover, recalling that the repeated entries of $(V_1,\ldots,V_{n-1})$ are $j(1),\ldots,j(k-1)$ and that $j(k)=n$, we have $\min(I,n)=j(1)$. The first leaf $\ell_1(\mathrm{T})$ is a child of $V_{i(1)-1}$, so
\[
|\ell_1(\mathrm{T})|=|V_{j(1)-1}|+1 = j(1)-1=\min(I,n)-1.
\]
But since $\mathrm{T}$ is a uniformly random tree, randomly permuting its leaf labels does not change its distribution, so $|\ell_1(\mathrm{T})|$ has the same distribution as $|L|$ for $L$ a uniformly random leaf of $\mathrm{T}$.
\end{proof}

One can also use the version of the bijection for rooted trees with one marked vertex to show the following similar result, whose proof is left to the reader.
\begin{prop}
	Let $\mathrm{T} \in_u \mathscr{T}_n$ and let $U \in_u [n]$ be independent of $\mathrm{T}$.
	Then $|U| \ensuremath{\stackrel{\mathrm{d}}{=}} I-2$, where $I$ is as in Proposition~\ref{prop:leaf_identity}.
	\label{prop:distance_vtx}
\end{prop}
These propositions in particular imply that if $D_n$ is the distance from the root to a uniformly random vertex (or leaf) in $\mathrm{T}_n \in_u \mathscr{T}_n$, then $n^{-1/2} D_n \ensuremath{\stackrel{\mathrm{d}}{\rightarrow}} R$, where $R$ is Rayleigh distributed: $\p{R \ge x} = e^{-(x^2/2)\I{x \ge 0}}$.
It is not hard to build on these statements in order to precisely characterize the joint distribution of the lengths of the branches to the $k$ smallest labeled leaves (using our bijection) or to $k$ uniform vertices (using its extension to trees with $k$ marked vertices). One thereby recovers the asymptotic {\em line-breaking construction} of uniformly random trees, proposed by Aldous \cite{aldous91continuum1}.

These distributional identities also make it possible to compare the distributions of typical distances in different trees. Define a partial order $\prec$ on type sequences $\sequence{n}=(n_c,c \ge 0)$ with $\sum_{c \ge 0} n_c = n$
and $\sum_{c\geq 0} c n_c=n-1$
by the following covering\footnote{
For a partially ordered set $(\mathcal{P},\prec)$, $y \in\mathcal{P}$ covers $x \in \mathcal{P}$ if $x \prec y$ and for all $z \in \mathcal{P}$, if $x \preceq z \preceq y$ then $z \in \{x,y\}$.
}
 relation: $\sequence{m}=(m_c,c \ge 0)$ covers $\sum_{c \ge 0} n_c$ if there are positive integers $a,b$ such that $m_a=n_a+1, m_b=n_b+1$ and $m_0=n_0-1, m_{a+b}=n_{a+b}-1$. (In words, to obtain $\sequence{m}$ from $\sequence{n}$ we replace one vertex with $a+b$ children by two vertices, one with $a$ children and one with $b$ children, and reduce the number of leaves accordingly; then $\sequence{n} \prec \sequence{m}$.)

Given type $\sequence{n}$, $\sequence{m}$ related as in the previous paragraph, we may couple the constructions of random trees with types $\sequence{n}$ and $\sequence{m}$ as follows. Let $\sequence{V}_{\sequence{n}}=(V_1,\ldots,V_{n-1})$ be a uniformly random sequence of elements of $[n]$
subject to the constraint that for each $c\geq 0$, the number of values from $[n]$
which occur precisely $c$ times in the sequence is $n_c$.
Conditionally on $\sequence{V}_{\sequence{n}}$, choose $X \in [n]$ uniformly at random from among those integers in $[n]$ which appear exactly $d$ times in $\sequence{V}_{\sequence{n}}$, and independently choose $Y$ uniformly at random from among those integers in $[n]$ which do not appear in $\sequence{V}_{\sequence{n}}$. Choose $a$ of the instances where $X$ appears in $\sequence{V}_{\sequence{n}}$, uniformly at random, and replace each them by the integer $Y$; call the resulting sequence $\sequence{V}_{\sequence{m}}$. Then the trees $\mathrm{T}_{\sequence{n}}$ and $\mathrm{T}_{\sequence{m}}$ corresponding to $\sequence{V}_{\sequence{n}}$ and $\sequence{V}_{\sequence{m}}$ under our bijection are uniformly random elements of $\mathscr{T}(\sequence{n})$ and $\mathscr{T}(\sequence{m})$, respectively. Moreover, the index of the first repeated element of $\sequence{V}_{\sequence{n}}$ is at most that of the first repeated element of $\sequence{V}_{\sequence{m}}$, so the distance from the root to the smallest labeled leaf in $\mathrm{T}_{\sequence{n}}$ is at most the corresponding distance in $\mathrm{T}_{\sequence{m}}$.

It follows from this coupling that for any types $\sequence{n}$ and $\sequence{m}$ with $\sequence{n} \preceq \sequence{m}$, if $\mathrm{T}_{\sequence{n}} \in_u \mathscr{T}(\sequence{n})$ and $\mathrm{T}_{\sequence{m}} \in_u \mathscr{T}(\sequence{m})$, and $L_{\sequence{n}}$ and $L_{\sequence{m}}$ are uniformly random leaves of $\mathrm{T}_{\sequence{n}}$ and $\mathrm{T}_{\sequence{m}}$, respectively, then $|L_{\sequence{n}}|$ is stochastically dominated by $|L_{\sequence{m}}|$, by which we mean that $\p{|L_{\sequence{n}}| \le t} \ge \p{|L_{\sequence{m}}| \le t}$ for all $t \in \R$; we denote this relation by
$|L_{\sequence{n}}| \preceq_{\mathrm{st}} |L_{\sequence{m}}|$.
We conjecture that this stochastic relation also holds for the heights of the trees: writing $\ensuremath{\mathrm{ht}}(\mathrm{t}):=\max(|v|,v \mbox{ is a vertex of }\mathrm{t})$, then
\[
\ensuremath{\mathrm{ht}}(\mathrm{T}_{\sequence{n}}) \preceq_{\mathrm{st}} \ensuremath{\mathrm{ht}}(\mathrm{T}_{\sequence{m}}),
\]
whenever $\mathrm{T}_{\sequence{n}} \in_u \mathscr{T}(\sequence{n})$ and $\mathrm{T}_{\sequence{m}} \in_u \mathscr{T}(\sequence{m})$ and $\sequence{n} \preceq \sequence{m}$.

In forthcoming work, \citet{blanc} uses the bijection in order to prove convergence toward inhomogeneous continuum random trees for random combinatorial trees with given types, in great generality; he also proves exponential upper tail bounds for the heights of such random trees, which are tight up to constant factors in many cases. In other forthcoming work, \citet{us} use the bijection in order to prove several conjectures from \cite{MR3077536} and \cite{MR2908619}, regarding the asymptotic behaviour of the height of random trees; the latter work \cite{us}  in particular shows that {\em all} random combinatorial trees with $n$ nodes have typical height $O(n^{1/2})$, unless they are extremely ``path-like'', possessing $n-o(n)$ nodes with exactly one child. Our bijection can also be adapted to study the structure of random graphs which are not trees (see \cite[Chapter 1]{abnotes}), and we expect that it will prove useful in proving convergence results in such settings as well.

\subsection{Growth procedures for rooted trees with a given degree sequence}

In this section, we present a growth procedure for rooted trees with a given degree sequence --- and in particular for $d$-ary trees --- which is built from a version of the inverse bijection
presented in the proof of Theorem~\ref{thm:cayley}.

Fix an abstract set $\{\ell_i,i \ge 1\}$ of leaf labels.
Let $\mathbf{d}=(d_1,\dots,d_m)$ be a sequence of positive integers, and let
$L_{\mathbf d}=1+\sum_{i=1}^m (d_i-1)\geq 1$.
Let $\cT_\mathbf{d}$ denote the set of rooted trees $\mathrm{t}$ with vertex set $[m]\cup \{\ell_1,\dots, \ell_{L_{\mathbf d}}\}$ such that for each $i\in [m]$, $i$ has $d_i$ children in $\mathrm{t}$ (and $\ell_1,\ldots,\ell_{L_{\mathbf d}}$ are leaves of $\mathrm{t}$).  Also, write
\[
\cS_{\mathbf{d}}:=\left\{(v_1,\dots, v_{m + L_{\mathbf d} - 1}):|\{k:v_k=i\}|=d_i\text{ for all }i\in [m]\right\}
\]
Then the following modification of the inverse bijection from Theorem~\ref{thm:cayley} gives a bijection between $\cS_{\mathbf d}$ and $\cT_{\mathbf d}$.
Fix $\sequence{v}=(v_1,\dots, v_{m + L_{\mathbf d} - 1}) \in \cS_{\mathbf d}$.
	\begin{tcolorbox}[title=Bijection between $\cS_{\mathbf d}$ and $\cT_{\mathbf d}$.]
		\begin{itemize}
			\item Let $j(0)=1$, let $j(1)<j(2)<\dots<j(L_{\mathbf d}-1)$ be the locations of the repeats
			of the sequence $\sequence{v}$, and let $j(L_{\mathbf d})=m+L_{\mathbf d}$.
			\item For $i=1,\dots, L_{\mathbf d}$, let $P_i$ be the path
			$(v_{j(i-1)}, \dots, v_{j(i)-1}, \ell_i)$.
			\item Let $\mathrm{t}(\sequence{v}) \in \cT_{\mathbf d}$ have root $v_1$ and edge set given by the union of the edges of the paths
			$P_1, P_2, \dots, P_{L_{\mathrm d}}$.
		\end{itemize}
\end{tcolorbox}
In the above bijection, the path $P_i$ ends with the leaf $\ell_i$. However, any other fixed ordering of $\ell_1,\ldots,\ell_{L_{\mathbf d}}$ would also yield a bijective correspondence. In fact, this is even true if the choice of leaf ordering depends on the sequence $\sequence{v}$, provided that the leaf-ordering rule still has the property that different sequences result in different trees. We exploit this flexibility below, in order to design a simple growth procedure.

Write $\preceq$ for the total ordering of the vertices of $\mathrm{t}(\sequence{v})$ which is the order the vertices first appear along the paths $P_1,\ldots,P_{L_{\mathrm d}}$.

For $d\in\N$ and $\mathbf{d}':=(d_1,\dots,d_m,d)$, note that we can construct an element of $\cS_{\mathbf{d}'}$  starting from an element $S_\mathbf{d} \in \cS_{\mathbf{d}}$ by inserting $d$ repeats of integer $m+1$. (Later, we also write $\mathbf{d}'=(d_1,\ldots,d_m,d_{m+1})$, so $d_{m+1}=d$.) This corresponds to choosing $S_\mathbf{d} \in \cS_{\mathbf{d}}$ and a multiset of size $d$ with elements in $[m + L_{\mathbf d}]$, or equivalently, $T_{\mathbf d} \in \cT_{\mathbf d}$ and a multiset of $d$ vertices of $T_{\mathbf d}$, where we use the convention that $i\in [m+ L_{\mathbf d}]$ corresponds to the $i^{th}$ vertex in the total ordering $\preceq$ of the vertices of $T_{\mathbf d}$ defined above.
The following growth procedure provides a way to sample a uniform random element of $\cT_\mathbf{d'}$ given $\mathrm{T}_{\mathbf d} \in_u \cT_{\mathbf{d}}$ and an independent uniform random multiset of size $d$ of vertices of $\mathrm{T}_{\mathbf d}$.
It yields the same shape of tree that one would obtain starting from $\mathrm{T}_{\mathbf d}$ by first transforming the sequence $S_d$ corresponding to $\mathrm{T}_{\mathbf d}$ under the above bijection as just described, then applying the bijection to the resulting sequence. However, it yields a different labelling of the leaves.

\begin{tcolorbox}[title = Constructing a tree $T_{\mathbf d'}\in \cT_\mathbf{d'}$ from a tree $T_{\mathbf d}\in \cT_\mathbf{d}$ and a multiset of $d$ vertices of $T_{\mathbf d}$]
	Denote the multiset as $\{w_1,\dots,w_d\}$, where $w_1 \preceq w_2 \preceq \ldots \preceq w_d$.
	Then $T_{\mathbf{d}'}$ is obtained from $T_{\mathbf{d}}$ by adding vertices $m+1, \ell_{L_{\mathbf d}+1}, \ldots, \ell_{L_{\mathbf d}+d-1}$ and modifying the edge-set as follows.
	\begin{enumerate}
		\item If $w_1$ was the root of $T_{\mathbf d}$, connect $m+1$ to $w_1$ and re-root the tree at $m+1$. Otherwise, replace the edge $vw_1$ that connects $w_1$ to its parent $v$ with two edges $v(m+1)$ and $(m+1)w_1$.
		\item For $j = 2,\ldots,d$,
		\begin{enumerate}
			\item if $w_j = w_{j-1}$, add an edge from $m+1$ to $\ell_{L_{\mathbf d}+j-1}$,
			\item if $w_j \neq w_{j-1}$, remove the edge from $w_j$ to its parent $v$, then add edges from $v$ to $\ell_{L_{\mathbf d}+j-1}$ and from $m+1$ to $w_j$.
		\end{enumerate}
	\end{enumerate}
\end{tcolorbox}
\begin{figure}[hbt]
	\includegraphics[width=0.9\textwidth]{images/growth_4ary.pdf}
	\caption{The growth procedure is used to add one internal vertex to the quarternary tree $T_{\mathbf{d}}$. Here, $(w_1,w_2,w_3,w_4)=(3,3,1,\ell_4)$.
		\label{fig:growth_4ary}}
\end{figure}

An example is provided in Figure \ref{fig:growth_4ary}. In the example, the coding sequence of $T_{\mathbf{d}}$ under the bijection presented above is $(2,2,3,2,4,4,1,1,2,1,3,4,3,4,1,3)$.
The total ordering $\preceq$ of vertices of $T_{\mathbf d}$ is
\[
2 \prec \ell_1 \prec 3 \prec \ell_2 \prec 4 \prec \ell_3 \prec 1 \prec \ell_4 \prec \ell_5 \prec \ell_6  \prec \ldots \prec \ell_{13}\, .
\]
The chosen multiset $(3,3,1,\ell_4)$ of vertices of $T_{\mathbf d}$ corresponds to the multiset $(3,3,7,8)$, of elements of $[m+L_{\mathbf{d}}]$, and thence to transforming the coding sequence into
\[
(2,2,\mathbf{5},\mathbf{5},3,2,4,4,\mathbf{5},1,\mathbf{5},1,2,1,3,4,3,4,1,3).
\]
The new sequence gives $T_{\mathbf{d}'}$ if we modify the bijection so that the new leaves $\ell_{14},
\ell_{15},\ell_{16}$ are inserted when the repeats of $5$ occur, and the other leaves are inserted according to their original ordering. In general, the growth procedure yields a modified bijection which reads as follows. With $\mathbf{d}'$ as above, fix $\sequence{v}'=(v_1',\dots, v'_{m+L_{\mathbf{d}'}}) \in \cS_{\mathbf{d}'}$, and note that $L_{\mathbf{d}'}=L_{\mathbf d}+d-1$.

\begin{tcolorbox}[title=Modified bijection between $\cS_{\mathbf{d}'}$ and $\cT_{\mathbf{d}'}$.]
		\begin{itemize}
			\item Let $j(0)=1$, let $j(1)<j(2)<\dots<j(L_{\mathbf{d}'}-1)$ be the locations of the repeats of the sequence $\sequence{v}'$, and let $j(L_{\mathbf{d}'})=m+1+L_{\mathbf{d}'}$.
			\item Reorder $\ell_1,\ldots,\ell_{L_{\mathbf{d}'}}$ as $\hat{\ell}_1,\ldots,\hat{\ell}_{L_{\mathbf{d}'}}$ as follows. For $1 \le i \le L_{\mathbf{d}'}-1$:
			\begin{itemize}
			\item If $v'_{j(i)}$ is the $(k+1)$'st appearance of $(m+1)$ then let $\hat{\ell}_i=\ell_{L_{\mathbf{d}}+k}$.
			\item If $v'_{j(i)}$ is the $k$'th repeated entry which is not equal to $(m+1)$ then let $\hat{\ell}_i=\ell_k$. \end{itemize}
		 	Let $\hat{\ell}_{L_{\mathbf{d}'}} = \ell_{L_{\mathbf{d}}}$.
			\item For $i=1,\dots, L_{\mathbf{d}'}$, let $P_i'$ be the path
			$(v_{j(i-1)}, \dots, v_{j(i)-1}, \hat{\ell}_i)$.
			\item Let $\mathrm{t}'(\sequence{v}') \in \cT_{\mathbf d'}$ have root $v'_1$ and edge set given by the union of the edges of the paths
			$P'_1, P'_2, \dots, P'_{L_{\mathbf{d}'}}$.
		\end{itemize}
\end{tcolorbox}
We now describe the inverse of the modified bijection, which takes as input a tree
$\mathrm{t}' \in \cT_{\mathbf{d}'}$
--- i.e., a tree $\mathrm{t}'$ with vertex set $[m+1]\cup \{\ell_1,\dots, \ell_{L_{\mathbf{d}'}}\}$ such that for each $i\in [m+1]$, $i$ has $d_i$ children, and $\ell_1,\ldots,\ell_{L_{\mathbf{d}'}}$ are leaves ---  and outputs a sequence $\sequence{v}'=(v'_1,\ldots,v'_{m+L_{\mathbf{d}'}}) \in \cS_{\mathbf{d}'}$. We leave it to the reader to verify that the two procedures are indeed inverses. This justifies the fact that the above growth procedure
takes the uniform distribution on $\cT_{\mathbf{d}}$ to the uniform distribution on $\cT_{\mathbf{d}'}$.

	\begin{tcolorbox}[title=Inverse of the modified bijection]
		\begin{itemize}
		\item  Let $\sequence{v}'_{m+L_{\mathbf{d}'}}$ be equal to the parent of $\ell_{L_{\mathbf{d}}}$ in $\mathrm{t}'$.
 Say that $\ell_{L_{\mathbf d}}$ is used, and that $\ell_1,\dots,\ell_{L_{\mathbf{d}}-1}$ and  $\ell_{L_{\mathbf{d}}+1},\dots,\ell_{L_{\mathbf{d}'}}$ are unused.
		\item For
	$j=m+L_{\mathbf{d}'}-1,\ldots,2,1$:
		\begin{itemize}
		\item If the number of occurrences of $\sequence{v}'_{j+1}$ in $\big(\sequence{v}'_{j+1},\dots, \sequence{v}'_{m+L_{\mathbf{d}'}}\big)$ is equal to the number of children of $\sequence{v}'_{j+1}$ in $\mathrm{t}'$, then let $\sequence{v}'_{j}$ be equal to the parent of $\sequence{v}'_{j+1}$ in $\mathrm{t}'$.
		\item Otherwise, define $\sequence{v}'_{j}$ as follows.
		\begin{itemize}
		\item If $\sequence{v}'_{j+1}=m+1$, let $i^*$ be the maximum $L_{\mathbf{d}}+1\leq i\leq L_{\mathbf{d}'}$ such that $\ell_i$ is unused.
		\item If $\sequence{v}'_{j+1}\ne m+1$, let $i^*$ be the maximum $1\leq i\leq L_{\mathbf{d}}-1$ such that $\ell_i$ is unused.
		\end{itemize}
		Let $\sequence{v}'_{j}$ be equal to the parent of $\ell_{i^*}$ in $\mathrm{t}'$. Say that $\ell_{i^*}$ is used.
		\end{itemize}
		\end{itemize}
	\end{tcolorbox}
We conclude the paper by justifying the assertion from Section~\ref{sec:intro} that the growth procedure yields an algorithm for sampling a sequence of random $d$-ary leaf-labeled trees. For this, let $\mathbf{d}^{(m)}=(d,d,\ldots,d)$ have length $m$. Starting from the unique tree $\mathrm{T}^{(1)} \in_u \cT_{\mathbf{d}^{(1)}}$, for each $m \ge 1$ let $\mathrm{T}^{(m+1)}$ be constructed from $\mathrm{T}^{(m)}$ according to the above procedure. Now let $\mathrm{T}_m$ be obtained from $\mathrm{T}^{(m)}$ by unlabeling the non-leaf vertices; then $\mathrm{T}_m$ is a uniformly random leaf-labeled $d$-ary tree with $m$ internal nodes, and $(\mathrm{T}_m,m \ge 1)$ is the random sequence alluded to in the introduction. (In fact, given a multiset of size $d$ of vertices of $\mathrm{T}^{(m)}$, its ordering, as defined in the construction of $\mathrm{T}^{(m+1)}$ from  $\mathrm{T}^{(m)}$,  does not depend on the labels of the internal vertices. Therefore, it is straightforward to define the pushforward of the growth procedure directly on leaf-labeled trees.)
Then, given  $\mathrm{T}_{m+1}$, the non-leaf vertex that was added to obtain $\mathrm{T}_{m+1}$ from $\mathrm{T}_m$ is a uniformly random non-leaf vertex of $\mathrm{T}_{m+1}$. In the binary case, this distinguishes the procedure from R\'emy's algorithm, for which, given the shape of $\mathrm{T}_{m+1}$, the non-leaf vertex that was added is instead the parent of a uniformly random leaf of $\mathrm{T}_{m+1}$.

\section{Acknowledgements}
We thank Arthur Blanc-R\'enaudie and Nicolas Broutin for useful discussions.

\bibliographystyle{plainnat}

Combinatorics (math.CO); Probability (math.PR)


A sufficient condition for existence of iterative roots of PM functions without the characteristic endpoints condition

Abstract: For PM functions of height 1, the existence of continuous iterative roots of any order was obtained under the characteristic endpoints condition. This raises an open problem about iterative roots without this condition, called characteristic endpoints problem. This problem is solved almost completely when the number of forts is equal to or less than the order. In this paper, we study the case that the number of forts is greater than the order and give a sufficient condition for existence of continuous iterative roots of order $2$ with height 2, answering the characteristic endpoints problem partially.

\section{Introduction}
Let $I:=[a,b]\subset\mathbb{R}$ be a compact interval. Given a continuous function $F:I\to I$, if there exists a continuous function $f:I\to I$ such that
\begin{equation}
f^n(x)=F(x),~~~~~\forall x\in I,
\end{equation}
where $n>1$ is an integer, $f^n$ is $n$-th iterate of $f$ and defined recursively by $f^n(x):=f(f^{n-1}(x))$ and $f^0(x):=x$ for all $x\in I$,  then we call that $f$ is a continuous {\it iterative root} of $F$ of order $n$.

In the theory of dynamical systems, embedding flow is an important problem which is a bridge between discrete and continuous dynamical systems (\cite{Baron-Jar,Fort,Irwin,PM,TS,Zdun-Solarz}). As a weak vision of embedding flow, iterative roots are studied extensively, especially in 1-dimensional case (see \cite{Babbage,Kuczma61,Solarz,ZY,LYZ,LJLZ} and references therein).

It is known that there are plentiful results on iterative roots of continuous monotone self-mappings (\cite{Kuczma,KCG}). As a generalization of monotone functions, a kind of non-monotone functions with finite non-monotone points was studied since 80's (\cite{ZY,Zhang97}). A continuous self-mapping $F:I\to I$ is said to be a {\it piecewise monotone function} (abbreviated as {\it PM function}) if $F$ has finitely many non-monotone points (or forts), named by $\{c_i\}_{i=1}^{v}$ for some $v\in \mathbb{N}$ such that
$$
c_0:=a<c_1<c_2<\cdots<c_v<c_{v+1}:=b.
$$
Clearly, $F$ is strictly monotone on each subinterval $[c_i,c_{i+1}]$ for  $0\le i\le v$ and such subinterval $[c_i,c_{i+1}]$ is called a {\it lap} of $F$. Let $N(F)$ be the number of forts of $F$. It is proved (\cite{ZY,Zhang97}) that the sequence $\{N(F^i)\}_{i\in \mathbb{N}}$ is nondecreasing, that is,
$$
0=N(F^0)\le N(F)\le N(F^2)\le \cdots \le N(F^i)\le \cdots.
$$
Furthermore, if $N(F^{i_0})=N(F^{i_0+1})$ for some integer $i_0\ge0$, then $N(F^{i_0})=N(F^{i_0+j})$ for all integers $j\ge1$. The smallest integer $i_0\in \mathbb{N}$ such that $N(F^{i_0})=N(F^{i_0+1})$ is called {\it nonmonotonicity height} $H(F)$ (simply {\it height}) of $F$ if such a $i_0$ exists and $H(F)=\infty$ otherwise. We denote the set of all piecewise monotone functions  by ${\cal PM}(I,I)$.
One can prove that there exists a lap, called {\it characteristic interval} $K(F)$ of $F$, that covers the range of $F$ if and only if $H(F) =1$. An important result about continuous iterative roots of PM functions with height 1 is the following.
\begin{center}
\begin{minipage}{128mm}
\noindent
{\bf Theorem A} (Theorem 4 in \cite{Zhang97}).
{\it
Let $F\in {\cal PM}(I,I)$ be of
height 1. Suppose that
\begin{description}
\item [(K$^+$) ] $F$ is strictly increasing
on its characteristic interval $K(F)=[a',b']$, and that

\item[(K$^+_0$)] $F$ on $I$ cannot reach $a'$ and $b'$ unless $F(a')=a'$ or
$F(b')=b'$.
\end{description}
Then,
for any integer $n>1$, $F$ has continuous iterative roots of order $n$.
Conversely,
conditions {\bf  (K$^+$)} and {\bf  (K$^+_0$)} are necessary for $n>N(F)+1$.
}
\end{minipage}
\end{center}
The converse part of this theorem suggests an open problem
(see \cite{ZY} or \cite{Zhang97}):
{\it Does a function $F\in {\cal PM}(I,I)$ with $H(F)= 1$ have an iterative root of an order $n\leq N(F)+1$
if condition {\bf  (K$^+_0$)}, called  `characteristic endpoints condition', is not satisfied?
}
The open problem is answered by the second author and Zhang (\cite{LZ}) in many cases. They discussed existence and nonexistence results of continuous iterative roots, which are shown in Table \ref{TnoCECI}.
\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}
\begin{table}
	\centering
	\renewcommand\arraystretch{1.5}
	\begin{tabular}{|c|c|c|}
		\hline
		Order &  Properties of $f$ & \tabincell{c}{Existence or\\ Nonexistence} \\
		\hline
	\multirow{2}*{$n= 2$}
		 & $f$  on $[a',b'] \uparrow$, $H(f)=1$ & Nonexistence \\ \cline{2-3}
		&  $f$  on $[a',b'] \downarrow$, $H(f)=1$ & Existence
		\\
		\hline
	\multirow{2}*{$2<n<N(F)$}
		 & $f$  on $[a',b'] \uparrow$, $H(f)<n$ & Nonexistence
		\\
		\cline{2-3}
		 & $f$  on $[a',b'] \downarrow$, $H(f)<n-1$ & Nonexistence
		\\
		\hline
		\multirow{3}*{$n=N(F)$}
		 & $f$  on $[a',b'] \uparrow$, $H(f)\le n$ &  Nonexistence
		\\
		\cline{2-3}
		 & $f$  on $[a',b'] \downarrow$, $H(f)<n-1$ & Nonexistence
		\\
		\cline{2-3}
	 & $f$  on $[a',b'] \downarrow$, $H(f)=n$ & Existence
		\\
		\hline
	\multirow{2}*{$n=N(F)+1$}
	 & $f$  on $[a',b'] \uparrow$, $H(f)\le n$ &Nonexistence
		\\
	\cline{2-3}
 & $f$  on $[a',b'] \downarrow$, $H(f)<n-1$ & Nonexistence
		\\
		\hline
	\end{tabular}
	\caption{The results of iterative roots for $F$ being strictly increasing on $[a',b']$  without the characteristic endpoints condition, where the symbols $\uparrow$ and $\downarrow$ denote strictly increasing and strictly decreasing, respectively.}
	\label{TnoCECI}
\end{table}

In this paper, because of complexity of iteration, we continue to study the open problem only in the case of order $n=2$. According to \cite[Lemma 2]{LYZ}, we only need to consider the case $H(f)=n=2$. Moreover, the number $N(F)$ of forts of $F$ must be greater than $2$. In fact, when $N(F)=1$, if $F$ has a continuous iterative roots of order $2$, then we get $N(F)=N(f^2)>N(f)\ge 1$, implying that $N(F)\ge 2$, a contradiction to the fact that $N(F)=1$. As shown in Table \ref{TnoCECI}, case $N(F)=n=2$ is solved completely. Thus, the case we studied is $H(f)=n=2<N(F)$,
 which is not  considered in \cite{LZ}.

This paper is organised as follows. In section 2, we
give  a sufficient condition for existence of continuous iterative roots which are  strictly increasing on $K(F)$
and also give a sufficient condition for  existence of continuous ones
which are  strictly decreasing on $K(F)$.
Section 3 is devoted to present
some auxiliary lemmas. Finally, we give the proofs of our Theorems in section 4.

\section{Main results}

When $F$ is strictly increasing on its characteristic interval $[a',b']$, it has two classes of continuous iterative roots: strictly increasing on $[a',b']$ and strictly decreasing on $[a',b']$. We will discuss these two classes of  iterative roots of order $2$ with height 2 in the following two subsections, separately. We only give our results in this section and put their proofs in section 4.

\subsection{Roots increasing on characteristic interval}
The following Theorem \ref{LI} deals with case the characteristic interval of $F$ is  the first lap, that is, $K(F)=[c_0,c_1]$.

\begin{thm}
Let $F\in {\cal PM}(I,I)$ with $H(F)=1$ and $K(F)=[c_0,c_1]$ such that {\bf  (K$^+$)} holds. Suppose that $F(c_3)= \max_{x\in[c_0,c_u]}F(x)$, where $c_u\in \{c_4,c_5,...,c_{v+1}\}$ is the smallest point such that $F(c_u)=c_0$, and  that $F$ satisfies either
\begin{align}
F(c_2)=c_0=F(c_0),~~~~~ &F(c_1)<F(c_3)<c_1=M~~\text{or},
\label{lf01}\\
c_0<F(c_2)<F(c_0),~~~~~ &F(c_3)=c_1=F(c_1)~~\text{or},
\label{lf02}
\\
c_0<F(c_2)<F(c_0),~~~~~ &F(c_1)<F(c_3)<c_1,
\label{lf04}
\end{align}
where $M=\max_{x\in I} F(x)$. Then $F$ has a continuous iterative root $f$ of order $2$ with
$H(f)=2$ such that $f$ is strictly increasing on $[c_0,c_1]$.
\label{LI}
\end{thm}

Clearly, $F$ satisfying one of conditions (\ref{lf01})-(\ref{lf04}) with condition $F(c_u)=c_0$ for $c_u\in \{c_4,c_5,...,c_{v+1}\}$ in Theorem~\ref{LI} does not satisfy {\bf  (K$^+_0$)}. In order to illustrate these conditions in Theorem~\ref{LI}, we give an example in Figure 1. From Figure 1, it is easy to see that $F\in {\cal PM}(I,I)$, $H(F)=1$, $K(F)=[c_0,c_1]$, and $F$ is strictly increasing on $[c_0,c_1]$. Furthermore, $F$ satisfies condition \eqref{lf04} and $c_6$ is the smallest point in $\{c_4,c_5,...,c_8\}$ such that $F(c_6)=c_0$ and $F(c_3)=\max F|_{[c_0,c_6]}$. Therefore, $F$ shown in Figure \ref{ilf} satisfies the conditions of Theorem \ref{LI}.

\begin{figure}[H]
	\begin{minipage}[t]{0.5\textwidth}
		\includegraphics[scale=0.3]{IL.png}
		\caption{$F$ satisfies conditions of \protect\\Theorem \ref{LI}.}
		\label{ilf}
	\end{minipage}
	\begin{minipage}[t]{0.5\textwidth}
		\includegraphics[scale=0.3]{IM.png}
		\caption{$F$ satisfies conditions of \protect\\ both Theorems \ref{MI} and \ref{MD}.}
		\label{imf}
	\end{minipage}
\end{figure}

When the characteristic interval of $F$ is the last lap, that is, $K(F)=[c_v,c_{v+1}]$, by a change of coordinates $\varphi(x)=-x+a+b$, we get a transformed map $G:=\varphi^{-1}\circ F\circ \varphi.$ Clearly, $G\in{\cal PM}(I,I)$, $H(G)=1$ and the  characteristic interval of $G$ is the first lap of $G$. Thus, according to Theorem \ref{LI}, by imposing corresponding conditions on $G$, the function $G$ has a continuous iterative root $g$ of order $2$ with $H(f)=2$ such that $g$ is strictly increasing on the characteristic interval of $G$. Then
$H(\varphi\circ g\circ \varphi^{-1})=2$, $\varphi\circ g\circ \varphi^{-1}$ is strictly increasing on $[c_v,c_{v+1}]$ and is a continuous iterative root of order $2$ of $F$.

Next, we consider the case that the characteristic interval of $F$ neither is the first lap nor the last one, that is, $K(F)=[c_k,c_{k+1}]$ for some $1\le k\le v-1$.

\begin{thm}
Let $F\in{\cal PM}(I,I)$ with $H(F)=1$ and $K(F)=[c_k,c_{k+1}]$ for some $1\le k\le v-1$ such that {\bf  (K$^+$)} holds but  {\bf  (K$^+_0$)} does not hold. Suppose that $F$ satisfies either
\begin{align}
&c_k<F(c_{k+2})<F(c_k),~~~F(c_{k-1})=c_{k+1}=F(c_{k+1}),~~\text{or}
			\label{f_01}
			\\
			&c_k=F(c_k)=F(c_{k+2}), ~~~F(c_{k+1})<F(c_{k-1})<c_{k+1},~~\text{or}
			\label{f_02}
			\\
			&c_k<F(c_{k+2})<F(c_k), ~~~F(c_{k+1})<F(c_{k-1})<c_{k+1}.
			\label{f_03}
			\end{align}
Suppose further that there exist forts
			\begin{equation}
\label{cc}
			c_{\ell_0}:=c_{k-1}>c_{\ell_1}>c_{\ell_2}>\cdots>c_{\ell_s}> c_{\ell_{s+1}}:=c_0
			\end{equation}
			such that
\begin{equation}
			F(c_{\ell_j})=\begin{cases}
			F(c_{k-1})~~~&\text{for}~~~ j\equiv 0 ~\text{or}~ 1(\!\!\!\!\mod 4),\\
			F(c_{k+2})~~~&\text{for}~~~ j\equiv 2 ~\text{or}~ 3(\!\!\!\!\mod 4),
			\end{cases}
			\label{jointp}
			\end{equation}
except for $j=s+1$,
			\begin{align}
			&\max_{x\in [c_{\ell_{j+1}},c_{\ell_j}]} F(x) =F(c_{k-1})~~\text{for}~~ j\equiv 0,1 ~\text{or}~ 3(\!\!\!\!\mod 4),
			\label{upexten1}
			\\&
	\max_{x\in [c_{\ell_{j+1}},c_{\ell_j}]} F(x)=F(c_{k+2})~~\text{for}~~ j\equiv 1,2 ~\text{or}~ 3(\!\!\!\!\mod 4),
			\label{midexten}
			\end{align}
and forts
			\begin{equation}
			c_{r_0}:=c_{k+2}<c_{r_1}<c_{r_2}<\cdots<c_{r_t}<c_{r_{t+1}}:=c_{n+1}
			\end{equation}
			such that
			\begin{equation}
			F(c_{r_j})=\begin{cases}
			F(c_{k+2})~~~&\text{for}~~~ j\equiv 0 ~\text{or}~ 1(\!\!\!\!\mod 4),\\
			F(c_{k-1})~~~&\text{for}~~~ j\equiv 2 ~\text{or}~ 3(\!\!\!\!\mod 4),
			\end{cases}
			\label{extenck+2cr1}
			\end{equation}
			except for $j=t+1$,
\begin{align}
			&\min_{x\in [c_{r_j},c_{r_{j+1}}]} F(x)=F(c_{k+2})~~\text{for}~~ j\equiv0, 1 ~\text{or}~ 3(\!\!\!\!\mod 4),
			\label{midextenr1}
			\\&
\min_{x\in [c_{r_j},c_{r_{j+1}}]} F(x)=F(c_{k-1})~~\text{for}~~ j\equiv1, 2~\text{or}~ 3(\!\!\!\!\mod 4).
			\label{midextenr2}
			\end{align}
			Then $F$ has a continuous  iterative root $f$ of order $2$ with $H(f)=2$ such that $f$ is strictly increasing on $[c_k,c_{k+1}]$.
			\label{MI}
		\end{thm}

In order to illustrate these conditions in Theorem~\ref{MI}, we also give an example in Figure 2. From Figure 2, one can check that $F\in{\cal PM}(I,I), H(F)=1, K(F)=[c_7,c_8]$ and $F$ is strictly increasing on $[c_7,c_8]$. Since $F(c_5)=F(c_{15})=c_7<F(c_7)$ and $F(c_2)=F(c_{10})=c_8>F(c_8)$, we conclude that $F$ does not satisfy the characteristic endpoints condition. Moreover, it is easy to see that $F$ satisfies  \eqref{f_03} and there exist forts
\begin{equation*}
c_{\ell_0}:=c_6>c_{\ell_1}:=c_4>c_{\ell_2}:=c_3>c_{\ell_3}:=c_1> c_{\ell_4}:=c_0
\end{equation*}
such that $F(c_4)=F(c_6), F(c_1)=F(c_3)=F(c_9)$,
\begin{align*}
&\max_{x\in [c_0,c_1]} F(x)=\max_{x\in [c_3,c_4]} F(x)=\max_{x\in [c_4,c_6]} F(x)=F(c_6),\\
&\min_{x\in [c_0,c_1]} F(x)=\min_{x\in [c_1,c_3]} F(x)=\min_{x\in [c_3,c_4]} F(x)=F(c_9),
\end{align*}
and forts
\begin{equation*}
c_{r_0}:=c_9<c_{r_1}:=c_{11}<c_{r_2}:=c_{14}<c_{r_3}:=c_{16}<c_{r_4}:=c_{17}<c_{r_5}:=c_{19}
\end{equation*}
such that $F(c_9)=F(c_{11})=F(c_{17}), F(c_6)=F(c_{14})=F(c_{16})$,
\begin{align*}
&\min_{x\in[c_9,c_{11}]} F(x)=\min_{x\in[c_{11},c_{14}] }F(x)=\min_{x\in[c_{16},c_{17}]} F(x)=\min_{x\in[c_{17},c_{19}]} F(x)=F(c_9),\\
&\max_{x\in[c_{11},c_{14}]} F(x)=\max_{x\in[c_{14},c_{16}]} F(x)=\max_{x\in[c_{16},c_{17}]} F(x)=F(c_6).
\end{align*}
The discussion above shows that $F$ whose graph given in Figure \ref{imf} satisfies the conditions of Theorem \ref{MI}.

\subsection{Roots decreasing on characteristic interval}

Before presenting main results in this subsection, we introduce the concept of reversing-correspondence, which can be found in \cite{Kuczma,LJLZ}.
\begin{defn}
Let $[\alpha,\beta]\subset\mathbb{R}$ be a compact interval. A strictly increasing continuous function $\phi:[\alpha,\beta]\to[\alpha,\beta]$  is said to be reversing-correspondence if
\begin{description}
\item [(i)] there exists a point $\xi\in Fix\phi$ and a strictly decreasing map $\omega$ mapping $Fix\phi$ onto itself such that $\omega(\xi)=\xi$, where $Fix\phi$ denotes the set of all fixed points of $\phi$,
\item[(ii)] $\alpha$ and $\beta$ both belong to $Fix\phi$ or not,
\item[(iii)] for every pair of consecutive fixed points $\xi_1$ and $\xi_2$ such that $\xi_1<\xi_2\le \xi$, we have $(\phi(x)-x)(\phi(y)-y)<0$ for $(x,y)\in(\xi_1,\xi_2)\times(\omega(\xi_2),\omega(\xi_1))$.
\end{description}
\end{defn}

Same as discussion for roots increasing on characteristic interval, we first consider the case that the first lap is the characteristic interval, that is, $K(F)=[c_0,c_1]$.

\begin{thm}
Let $F\in {\cal PM}(I,I)$ with $H(F)=1$ and $K(F)=[c_0,c_1]$ such that {\bf  (K$^+$)} holds.  Suppose that $F$ is  reversing-correspondence on $[c_0,c_1]$ and that
\begin{equation}
F(c_0)>c_0, ~~~F(c_1)<c_1~~~ and~~~ F(c_2)=c_0.
\label{ldc}
\end{equation}
Then $F$ has a continuous iterative root $f$ of order $2$ with $H(f)=2$ such that $f$ is strictly decreasing on $[c_0,c_1]$.
	\label{LD}
\end{thm}

According to condition \eqref{ldc}, it is easy to see that $F$ in Theorem \ref{LD} does not satisfy  {\bf  (K$^+_0$)}. We also give an example in Figure 3, which satisfies all conditions of Theorem \ref{LD}.

Similarly, when the last lap $[c_v,c_{v+1}]$ is the characteristic interval of $F$, by a change of coordinates $\varphi(x)=-x+a+b$, Theorem \ref{LD} can be applied to the map $G:=\varphi^{-1}\circ F\circ \varphi$, whose characteristic interval is the first lap.  Then, we can employ iterative roots of $G$ to give iterative roots of $F$.

\begin{figure}[H]
	\centering
	\includegraphics[scale=0.53]{DL.png}
	\caption{$F$ satisfies conditions of  Theorem \ref{LD}. }
	\label{dlf}
\end{figure}

Next, we consider the case that $K(F)=[c_k,c_{k+1}]$ for some $1\le k\le v-1$.

\begin{thm}
Let $F\in{\cal PM}(I,I)$ with $H(F)=1$ and $K(F)=[c_k,c_{k+1}]$ for some $1\le k\le v-1$ such that {\bf  (K$^+$)} holds but  {\bf  (K$^+_0$)} does not hold. Suppose that $F$ is  reversing-correspondence on $[c_k,c_{k+1}]$.
Suppose further that $F$ satisfies either
\begin{align}
c_k=F(c_{k+2})&<F(c_k)<F(c_{k+1})=F(c_{k-1})<c_{k+1},~~~\text{or}
\label{mdc}
\\
c_k<F(c_{k+2})&<F(c_k)<F(c_{k+1})<F(c_{k-1})<c_{k+1},~~~\text{or}
\label{mdc2}
\\
c_k<F(c_{k+2})&=F(c_k)<F(c_{k+1})<F(c_{k-1})=c_{k+1}.
\label{mdc3}
\end{align}
Then $F$ has a continuous iterative root $f$ of order $2$ with $H(f)=2$  such that $f$ is strictly decreasing on $[c_k,c_{k+1}]$ if the conditions \eqref{cc}-\eqref{midextenr2} in Theorem $\ref{MI}$ hold.
\label{MD}
\end{thm}

One can check that the PM function $F$ given in Figure \ref{imf} also satisfies conditions of Theorem \ref{MD}. In fact, from Figure 2, we see that $F(c_7)>c_7$, $F(c_8)<c_8$ and $F$ has only one fixed point on $[c_7,c_8]$, implying that $F|_{[c_7,c_8]}$ is reversing-correspondence on $[c_7,c_8]$ by Definition $1$. Furthermore, note that $F(c_9)<F(c_7)<F(c_8)<F(c_6)$, that is, $F$ satisfies \eqref{mdc2}. Finally, as shown in the paragraph just after Theorem \ref{MI}, $F$ satisfies the conditions \eqref{cc}-\eqref{midextenr2}.

\section{Auxiliary lemmas}

In this section, we give some lemmas that are helpful to our proofs in section 4.

\begin{lm}
	Let $\varPhi:[\alpha,\beta]\to[\alpha,\beta]$, where $\alpha,\beta\in \mathbb{R}$, be a continuous and strictly increasing function.
	If $\varPhi(x)> x ~(resp.~ \varPhi(x)< x)$ for all $x\in [\alpha,\beta) ~(resp. ~x\in (\alpha,\beta])$, then, for any $x_*\in(\alpha,\varPhi(\alpha))~(resp.~ y_*\in(\varPhi(\beta),\beta))$, the function	$\varPhi$ has a continuous and strictly increasing iterative root $\varphi$ of order $2$ such that $\varphi(\alpha)=x_*~(resp.~ \varphi(\beta)=y_*)$.
	\label{iev}
\end{lm}

\begin{proof}[\bf Proof]
We only prove the case that $\varPhi(x)> x $ for all $x\in [\alpha,\beta)$ because the proof for the other case $\varPhi(x)< x $ is similar.
	Let $x_0:=\alpha$, $x_1:=x_*$ and $\varPhi^i(x_0)=x_{2i}$, $\varPhi^i(x_1)=x_{2i+1}$ for $i\ge 1$. Since $\varPhi$ is strictly increasing and $\varPhi(x)>x$	for all $x\in[\alpha,\beta)$, the sequence $\{x_i\}_{i\ge0}$ is also strictly increasing. Note that $\varPhi$ is continuous, it follows that $\varPhi(\beta)=\beta$, implying $x_i\to \beta$ as $i\to +\infty$. Fix a strictly increasing and continuous bijection $\varphi_0:[x_0,x_1] \to [x_1,x_2]$. Then $\varphi_0$ can be extended to a strictly increasing and continuous  iterative root $\varphi$ of order $2$ of $\varPhi$ on $[\alpha,\beta]$ uniquely. In fact, the iterative root $\varphi:[\alpha,\beta]\to [\alpha,\beta]$ of order $2$ can be defined as
	\begin{equation}
	\varphi(x):=\begin{cases}
	\varphi_i(x),~~~&x\in [x_i,x_{i+1}],~i\ge0,\\
	\beta,~~~&x=\beta,
	\end{cases}
	\end{equation}
	where $\varphi_i: [x_i,x_{i+1}]\to [x_{i+1},x_{i+2}]$ is defined recursively by
	$$
	\varphi_i(x):=\varPhi\circ \varphi_{i-1}^{-1}(x) ~~~\text{for}~~~x\in[x_i,x_{i+1}],~i\ge1.
	$$
	The proof is completed.
\end{proof}

\begin{lm}
	Let $\varPhi:[\alpha,\beta]\cup[\eta,\xi] \to [\alpha,\beta]\cup[\eta,\xi]$ be a continuous and strictly increasing function, where $\alpha, \beta, \eta, \xi\in \mathbb{R}$ and $\beta\le\eta$. Suppose that $\varPhi(\alpha)>\alpha,\varPhi(\beta)=\beta,\varPhi(\eta)=\eta$ and $\varPhi(\xi)<\xi$. Then, for any $(x_*,y_*)\in \{ (\varPhi(\alpha),\xi)\}\cup (\alpha,\varPhi(\alpha)) \times (\varPhi(\xi),\xi) \cup \{(\alpha,\varPhi(\xi)) \}$, the function $\varPhi$ has a continuous and strictly decreasing iterative root $\varphi$ of order $2$ such that $\varphi(\alpha)=y_*$, $\varphi(\beta)=\eta$ and $\varphi(\xi) =x_*$.
	\label{diteendps}
\end{lm}

\begin{proof}[\bf Proof.]
	We only give a proof for $(x_*,y_*)\in(\alpha,\varPhi(\alpha)) \times (\varPhi(\xi),\xi)$ because the discussion for the remaining two cases is similar.
	Fix a continuous and strictly decreasing function $\varphi_0:[\alpha,\varPhi(\alpha)]\to[\varPhi(y_*),y_*]$ such that
	\begin{equation}
	\varphi_0(\alpha)=y_*,~~~\varphi_0(\varPhi(\alpha))=\varPhi(y_*) ,~~~\varphi_0(x_*)=\varPhi(\xi).
	\label{endcondi}
	\end{equation}
	Clearly, $\varphi_0$ is well defined because $x_*\in (\alpha,\varPhi(\alpha))$ and $\varPhi(\xi)\in (\varPhi(y_*),y_*)$.
	With the aid of [\cite{KCG}, Theorem 5.3.1], the function $\varphi_0$ can be extended to a continuous and strictly decreasing solution $\widehat{\varphi}:[\alpha,\beta]\to[\eta,y_*]$ of the equation
	\begin{equation}
	\widehat{\varphi}(\varPhi(x))=\varPhi(\widehat{\varphi}(x)),~~~x\in [\alpha,\beta],
	\label{exchaequa}
	\end{equation}
	satisfying $\widehat{\varphi}(\beta)=\eta$. In order to make the proof more readable, we give a detail of the extension as follows. For every $x\in[\varPhi^i(\alpha),\varPhi^{i+1}(\alpha)]$, $i\ge1$, define
	\begin{equation}
	\varphi_i(x):=\varPhi^i\circ \varphi_0\circ \varPhi^{-i}(x).
	\end{equation}
	Clearly, $\varphi_i$'s are continuous and strictly decreasing for all $i\ge1$. By \eqref{endcondi}, one can check that
	$\varphi_i(\varPhi^i(\alpha))=\varPhi^i(y_*)$ and $\varphi_i(\varPhi^{i+1}(\alpha))=\varPhi^{i+1}(y_*)$ for all $i\ge1$. Thus, the function
	\begin{equation}
	\widehat{\varphi}(x):=
	\begin{cases}
	\varphi_i(x),~~~& x\in [\varPhi^i(\alpha),\varPhi^{i+1}(\alpha)],~i\ge1,\\
	\eta,~~~&x=\beta,
	\end{cases}
	\label{hatf}
	\end{equation}
	is well defined and continuous on $[\alpha,\beta]$. Note that for every $x\in[\alpha,\beta)$, there exists an integer $i$ such that $x\in[\varPhi^i(\alpha),\varPhi^{i+1}(\alpha)]$ and then
	\begin{equation*}
	\widehat{\varphi}(\varPhi(x)) = \varphi_{i+1}(\varPhi(x))=\varPhi^{i+1}\circ \varphi_0\circ \varPhi^{-i-1}(\varPhi(x))=\varPhi(\varPhi^i\circ \varphi_0\circ \varPhi^{-i}(x))=\varPhi(\widehat{\varphi}(x)).
	\end{equation*}
	Moreover, $\widehat{\varphi}(\varPhi(\beta))=\widehat{\varphi}(\beta)=\eta=\varPhi(\widehat{\varphi}(\beta))$. This proves that $\widehat{\varphi}$ defined by \eqref{hatf} is a continuous and strictly decreasing solution of equation \eqref{exchaequa}.

	Now, we define a function as desired in this Lemma. Let
	\begin{equation}
	\varphi(x):=\begin{cases}
	\widehat{\varphi}(x),~~~&x\in [\alpha,\beta],\\
	\widehat{\varphi}^{-1}\circ \varPhi(x),~~~&x\in [\eta,\xi].
	\end{cases}
	\label{df}
	\end{equation}
	Clearly, $\widehat{\varphi}^{-1}\circ \varPhi$ is continuous and strictly decreasing from $[\eta,\xi]$ to $[x_*,\beta]$. For every $x\in[\alpha,\beta]$, by \eqref{exchaequa} and \eqref{df} we have $\varphi^2(x)=\widehat{\varphi}^{-1}\circ \varPhi\circ \widehat{\varphi}(x) =\widehat{\varphi}^{-1}\circ\widehat{\varphi}\circ \varPhi(x)=\varPhi(x)$. For every $x\in[\eta,\xi]$, by \eqref{df} we have $\varphi^2(x)=\widehat{\varphi}\circ\widehat{\varphi}^{-1}\circ \varPhi(x)=\varPhi(x)$. It is shown that the function $\varphi$ defined in \eqref{df} is a continuous and strictly decreasing iterative root of $\varPhi$ of order $2$. From \eqref{df}, \eqref{hatf} and the first equality of \eqref{endcondi}, we have $\varphi(\alpha)=y_*$ and $\varphi(\beta)=\eta$. Moreover, by the third equality of \eqref{endcondi}, we obtain
	$$
	\varphi(\xi)=\widehat{\varphi}^{-1}\circ \varPhi(\xi)=\varphi_0^{-1}\circ \varPhi(\xi)=x_*.
	$$
	The proof is completed.
\end{proof}

\begin{lm}[Lemma 3.1 in \cite{LC}]
	Let $F\in{\cal PM}(I,I)$ and $H(F)=m\in (0,+\infty)$. Then $m$ is the smallest nonnegative integer such that $F^m(I) \subset K(F^m)$, where $K(F^m)$ denotes the characteristic interval of $F^m$.
	\label{height}
\end{lm}

\section{Proofs of Theorems}
In this section, we prove Theorems~\ref{LI}-\ref{MD}, as given in section $2$.
\begin{proof}[\bf Proof of Theorem \ref{LI}]

{\it Step 1}: Construct a continuous and strictly increasing  iterative root of order $2$ of $F$ on $[c_0,c_1]$.

Under condition  \eqref{lf01}, \eqref{lf02} or \eqref{lf04}, by \cite[Theorem $15.7$]{Kuczma} and Lemma \ref{iev}, we can construct
	a continuous and strictly increasing function $f_0:[c_0,c_1]\to[c_0,c_1]$ satisfying
	\begin{equation}
	f_0(c_0)=F(c_2),~~~~~ f_0(c_1)=F(c_3)
	\label{extencon}
	\end{equation}
	such that $f_0^2(x)=F(x)$ for all $x\in [c_0,c_1]$.

{\it Step 2}: Define functions $f_i$ on each $[c_i,c_{i+1}]$ for $1\le i\le v$.

For $i=1,2,$ define
$f_i:[c_i,c_{i+1}]\to [c_0,c_1]$ by
	\begin{equation}
	f_i(x):=f_0^{-1}\circ F(x),~~~~~x\in[c_i,c_{i+1}].
	\label{f12}
	\end{equation}
	By \eqref{extencon}, one can check that $F([c_i,c_{i+1}])(i=1,2)$ are both included in the range of $f_0$ because $F(c_3)>F(c_1)$, implying that $f_i (i=1,2)$ are well defined.
	Clearly, $f_1$ and $f_2$ are both continuous and strictly monotone on their domains. Moreover,
	by \eqref{extencon} we have
	\begin{align}
	&f_1(c_1)=f_0^{-1}\circ F(c_1)=f_0^{-1}\circ f_0^2(c_1)=f_0(c_1),
	\label{f1c1}
	\\
	&f_1(c_2) =f_2(c_2)= f_0^{-1}\circ F(c_2)= c_0,
	\label{f1c2}
	\\
	&f_2(c_3)=f_0^{-1}\circ F(c_3)=c_1.
	\label{f2c3}
	\end{align}
	For $3\le i\le u-1$, define $f_i:[c_i,c_{i+1}]\to [c_1,c_2]$ by
	\begin{equation}
	f_i(x):=f_1^{-1}\circ F(x),~~~~~x\in[c_i,c_{i+1}].
	\label{f1f}
	\end{equation}
	Since $F(c_3)=\max_{x\in[c_0,c_u]} F(x)$, we have $$F([c_i,c_{i+1}])\subseteq [c_0,F(c_3)]=[f_1(c_2),f_1(c_1)]
	$$ for each $i=3,\cdots,u-1$ by \eqref{extencon}, \eqref{f1c1} and \eqref{f1c2}, that is, $F([c_i,c_{i+1}])$ is included in the range of $f_1$ for $i=3,\cdots,u-1$. Thus, $f_i$ is well defined for each $i=3,\cdots,u-1$.
	For $u\le i\le n$,
	define $f_i:[c_i,c_{i+1}]\to [c_2,c_3]$ by
	\begin{equation}
	f_i(x):=f_2^{-1}\circ F(x),~~~~~x\in[c_i,c_{i+1}].
	\label{f2f}
	\end{equation}
Since $H(F)=1$ and $K(F)=[c_0,c_1]$, we get $F(I)\subseteq [c_0,c_1]$. In particular, $F([c_i,c_{i+1}])\subset[c_0,c_1]$ for each $u\le i\le v$.	By \eqref{f1c2} and \eqref{f2c3}, we see that the range of $f_2$ is $[c_0,c_1]$. Hence, $F([c_i,c_{i+1}])$ is included in range of $f_2$. This implies that $f_i$ in \eqref{f2f} is well defined for each $u\le i\le v$.

{\it Step 3}: Joint $f_i ~(0\le i\le n)$ to get a continuous iterative root of order $2$ as desired in Theorem \ref{LI}.

Let $f: I \to I$ be defined by $f(x):=f_i(x)$ on each $[c_i,c_{i+1}]$ for $i=0,\cdots,v$.
	We claim that $f$ is a continuous  iterative root of order $2$ of $F$ such that $f$ is strictly increasing on $[c_0,c_1]$ and $H(f)=2$. In fact, it is easy to see that $f_i$ is continuous on its domain for each $i=0,\cdots,v$.
	By \eqref{extencon}, \eqref{f1c1}, \eqref{f2c3}, \eqref{f1f} and \eqref{f2f}, we have
	\begin{align*}
	&f_3(c_3)=f_1^{-1}\circ F(c_3)=f_1^{-1}\circ f_0(c_1)=f_1^{-1}\circ f_1(c_1)=c_1=f_2(c_3),
	\\
	&f_i(c_{i+1})=f_1^{-1}\circ F(c_{i+1})=f_{i+1}(c_{i+1})~~ \text{for}~~3\le i\le u-2,
	\\
	&f_{u-1}(c_u) =f_1^{-1}\circ F(c_u)=f_1^{-1}(c_0)=c_2=f_2^{-1}(c_0)=f_2^{-1}\circ F(c_u)=f_u(c_u),
	\\
	&f_i(c_{i+1})=f_2^{-1}\circ F(c_{i+1})=f_{i+1}(c_{i+1})~~ \text{for}~~u\le i\le v.
	\end{align*}
Together with \eqref{f1c1} and \eqref{f1c2}, it follows that $f$ is continuous on $I$. On the other hand, $f^2(x)=F(x)$ for $x\in[c_0,c_1]$ since $f(x)=f_0(x)$.
	By \eqref{f12}, we have
	\begin{equation*}
	f^2(x) = f\circ f_0^{-1}\circ F(x)=f_0\circ f_0^{-1}\circ F(x)=F(x) ~~\text{for}~~x\in[c_1,c_3].
	\end{equation*}
	According to \eqref{f1f}, we get
	\begin{equation*}
	f^2(x) = f\circ f_1^{-1}\circ F(x)=f_1\circ f_1^{-1}\circ F(x)=F(x) ~~\text{for}~~x\in[c_3,c_u].
	\end{equation*}
	By \eqref{f2f}, we further obtain
	\begin{equation*}
	f^2(x) = f\circ f_2^{-1}\circ F(x)=f_2\circ f_2^{-1}\circ F(x)=F(x) ~~\text{for}~~x\in[c_u,c_{v+1}].
	\end{equation*}
	The above discussion implies that $f$ is an iterative root of order $2$ of $F$. Moreover, $f=f_0$ on $[c_0,c_1]$ is strictly increasing. Finally, noting  that $f([c_i,c_{i+1}])\subset [c_0,c_1]$ for $i=1,2$, $f([c_i,c_{i+1}])\subset [c_1,c_2]$ for $i=3,\cdots,u-1$ and $f([c_i,c_{i+1}])\subset [c_2,c_3]$ for $i=u,\cdots,v$, we have $f(I)\not\subset[c_0,c_1]$ but $f^2(I)\subset[c_0,c_1]$. This gives that $H(f)=2$ by Lemma \ref{height}. We complete the proof of Theorem~\ref{LI}.
\end{proof}

\begin{proof}[\bf Proof of Theorem \ref{MI}]

	{\it Step 1}: Construct a continuous and strictly increasing iterative root of $F$ of order $2$ on $[c_k,c_{k+1}]$.

Under condition \eqref{f_01}, \eqref{f_02} or \eqref{f_03}, using \cite[Theorem $15.7$]{Kuczma} and Lemma \ref{iev} again, we can construct a continuous strictly increasing function $f_k:[c_k,c_{k+1}]\to [c_k,c_{k+1}]$ such that
	\begin{equation}
	f_k(c_k)=F(c_{k+2}),~~~~~ f_k(c_{k+1})=F(c_{k-1}),
	\label{extenmid}
	\end{equation}
	and $f_k^2(x)=F(x)$ for all $x\in[c_k,c_{k+1}]$.

	{\it Step 2}: Define functions on intervals $[c_{k-1},c_k]$ and $[c_{k+1},c_{k+2}]$, respectively.

	For $i=k-1,k+1$, we define $f_i:[c_i,c_{i+1}]\to [c_k,c_{k+1}]$ by
	\begin{equation}
	f_i(x):=f_k^{-1}\circ F(x),~~~~~~x\in [c_i,c_{i+1}].
	\label{firexten}
	\end{equation}
	Note that $F(c_k)=F(c_{k+2})\ge f_k(c_k)$ and $F(c_{k+1})=F(c_{k-1})\le f_k(c_{k+1})$. Thus, by \eqref{extenmid}, $F([c_i,c_{i+1}])$ ($i=k-1,k+1$) are both included in the range of $f_k$ since $F$ is monotone on $[c_i,c_{i+1}]$ for $i=k-1,k+1$. This implies that $f_i~(i=k-1,k+1)$ in \eqref{firexten} are well defined.
	Since $f_k$ is strictly increasing and $F|_{[c_i,c_{i+1}]}$ ($i=k-1,k+1$) are  strictly decreasing, we get that $f_i$ ($i=k-1,k+1$) are both strictly decreasing. Clearly, $f_i$ ($i=k-1,k+1$) are continuous. Moreover, by \eqref{extenmid} and \eqref{firexten}, we have
	\begin{align}
	&f_{k-1}(c_{k-1})=f_k^{-1}\circ F(c_{k-1})=c_{k+1},
	\label{fk-1ck-1}
	\\
	&f_{k-1}(c_k)=f_k^{-1}\circ F(c_k)=f_k^{-1}\circ f_k^2(c_k)=f_k(c_k),
	\label{fk-1ck}
	\\
	&f_{k+1}(c_{k+1})=f_k^{-1}\circ F(c_{k+1})=f_k^{-1}\circ f_k^2(c_{k+1})=f_k(c_{k+1}),
	\label{fk+1l}
	\\
	&f_{k+1}(c_{k+2})=f_k^{-1}\circ F(c_{k+2})=c_k.
	\label{fk+1ck+2}
	\end{align}

	{\it Step 3}: Define a function on interval $[c_0,c_{k-1}]$.

	For $\ell_{j+1}\le i\le \ell_j-1$ with
	$j\equiv 0(\!\!\mod 4)$, we define
	$f_i:[c_i,c_{i+1}]\to[c_{k+1},c_{k+2}]$ as
	\begin{equation}
	f_i(x):=f_{k+1}^{-1}\circ F(x),~~~~~ x\in [c_i,c_{i+1}].
	\label{fcl1}
	\end{equation}
	By \eqref{upexten1}, \eqref{fk+1l}, \eqref{fk+1ck+2} and \eqref{extenmid}, we have $F([c_{\ell_{j+1}},c_{\ell_j}])\subset[c_k,F(c_{k-1})]=[c_k,f_k(c_{k+1})]=[c_k,f_{k+1}(c_{k+1})]$, that is, $F([c_{\ell_{j+1}},c_{\ell_j}])$ is included in the range of $f_{k+1}$, implying $f_i$ in \eqref{fcl1} is well defined.

	For $\ell_{j+1}\le i\le \ell_j-1$ with
	$j\equiv 1~\text{or}~3(\!\!\mod 4)$, we define
	$f_i:[c_i,c_{i+1}]\to[c_k,c_{k+1}]$ as
	\begin{equation}
	f_i(x):=f_k^{-1}\circ F(x),~~~~~ x\in [c_i,c_{i+1}].
	\label{ficlj13}
	\end{equation}
	By \eqref{midexten} and \eqref{extenmid}, we see that $F([c_{\ell_{j+1}},c_{\ell_j}])$ is included in the range of $f_k$. This means that each $f_i$ of \eqref{ficlj13} is well defined.

	For $\ell_{j+1}\le i\le \ell_j-1$ with
	$j\equiv 2(\!\!\mod 4)$,
	we define
	$f_i:[c_i,c_{i+1}]\to[c_{k-1},c_k]$ as
	\begin{equation}
	f_i(x):=f_{k-1}^{-1}\circ F(x),~~~~~ x\in [c_i,c_{i+1}].
	\label{ficlj2}
	\end{equation}
	One can check that each $f_i$ of \eqref{ficlj2} is well defined by \eqref{midexten}, \eqref{fk-1ck-1}, \eqref{fk-1ck} and \eqref{extenmid}.

	{\it Step 4}: Define a function on interval $[c_{k+2},c_{v+1}]$.

	For $r_j \le i\le r_{j+1}-1$ with
	$j\equiv 0(\!\!\mod 4)$, we define $f_i:[c_i,c_{i+1}]\to[c_{k-1},c_k]$ as in
	\eqref{ficlj2}.
 For $r_j \le i\le r_{j+1}-1$ with
 $j\equiv 1~\text{or}~3(\!\!\mod 4)$, define
 $f_i:[c_i,c_{i+1}]\to[c_k,c_{k+1}]$ as in
 \eqref{ficlj13}.
 For $r_j \le i\le r_{j+1}-1$ with
 	$j\equiv 2(\!\!\mod 4)$, define $f_i:[c_i,c_{i+1}]\to[c_{k+1},c_{k+2}]$ as in
 	\eqref{fcl1}.
	By \eqref{midextenr1}, \eqref{midextenr2}, \eqref{fk-1ck-1}-\eqref{fk+1ck+2} and  \eqref{extenmid}, it is easy to verify that $f_i$ is well defined for each $k+2\le i\le v$.

	{\it Step 5}: Define a continuous  iterative root of order $2$ by jointing $f_i~(0\le i\le v)$.

	Let $f: I\to I$ be identical with $f_i$ on each $[c_i,c_{i+1}]$ for $0\le i\le v$.
	We claim that the function $f$ is a continuous iterative root of order $2$ of $F$ such that $f$ is strictly increasing on $[c_k,c_{k+1}]$ and $H(f)=2$. In fact, $f_i$ is continuous on its domain for every $0\le i\le v$. From \eqref{fk-1ck} and \eqref{fk+1l} we get that $f$ is continuous at $c_k$ and $c_{k+1}$. Thus, in order to prove the continuity of $f$ on $I$, it suffices to show  that $f$ is continuous at points $\{c_i\}_{i=1}^{n}\setminus\{c_k,c_{k+1}\}$. For each $\ell_{j+1}\le i\le \ell_j-2$, $0\le j\le s$, and each  $r_j\le i\le r_{j+1}-1$, $0\le j\le t$, we get
	\begin{equation*}
	f_i(c_{i+1})=f_{i+1}(c_{i+1})
	\end{equation*}
	 because $f_i$ and $f_{i+1}$ have the same expression, which is one of \eqref{fcl1}, \eqref{ficlj13} and \eqref{ficlj2}. It follows that $f$ is continuous at points
	 \begin{equation*}
\cup_{0\le j\le s} \{c_i\}_{i=\ell_{j+1}+1}^{\ell_j-1}~~~\text{and}~~~\cup_{0\le j\le t} \{c_i\}_{i=r_j+1}^{r_{j+1}-1}.
	 \end{equation*}
In order to show the continuity of $f$, it remains to prove that $f$ is continuous at points $\{c_{\ell_j}\}_{j=0}^s$	 and $\{c_{r_j}\}_{j=0}^t$.
	Note that $f_{k+1}(c_{k+1})=f_k(c_{k+1})=F(c_{k-1})$ by \eqref{fk+1l} and \eqref{extenmid}, implying that
	\begin{equation}
	f_{k+1}^{-1}\circ F(c_{k-1})=f_k^{-1}\circ F(c_{k-1})=c_{k+1},
	\label{ck+1}
	\end{equation}
	and $f_{k-1}(c_k)=f_k(c_k)=F(c_{k+2})$ by \eqref{fk-1ck} and  \eqref{extenmid}, implying that
	\begin{equation}
	f_{k-1}^{-1}\circ F(c_{k+2})=f_k^{-1}\circ F(c_{k+2})=c_k.
	\label{ck}
	\end{equation}
Thus, for each $0\le j\le s$ with $j\equiv0(\mod4)$, we get
\begin{align}
f_{\ell_j-1}(c_{\ell_j})&=f_{k+1}^{-1}\circ F(c_{\ell_j})=f_{k+1}^{-1}\circ F(c_{k-1})=c_{k+1},
\label{conti0l}
\\
f_{\ell_j}(c_{\ell_j})&=\begin{cases}
f_{k-1}(c_{k-1})=c_{k+1}~~~& \text{for}~ j=0,\\
f_k^{-1}\circ F(c_{\ell_j}) = f_k^{-1}\circ F(c_{k-1})=c_{k+1}& \text{for}~ j>0.
\end{cases}
\label{conti0r}
\end{align}
Actually, \eqref{conti0l} is obtained by \eqref{fcl1}, \eqref{jointp} and \eqref{ck+1}, and \eqref{conti0r} is obtained by \eqref{fk-1ck-1}, \eqref{ficlj13}, \eqref{jointp} and \eqref{ck}.
This implies that $f$ is continuous at $c_{\ell_j}$, where $j\equiv0(\!\!\mod4)$.
For $0\le j\le s$ with $j\equiv1(\!\!\mod4)$, we have
\begin{align*}
f_{\ell_j-1}(c_{\ell_j})=f_k^{-1}\circ F(c_{\ell_j}) = f_k^{-1}\circ F(c_{k-1})=c_{k+1}~~&\text{by}~~\eqref{ficlj13}, \eqref{jointp}, \eqref{ck+1},
\\ f_{\ell_j}(c_{\ell_j})=f_{k+1}^{-1}\circ F(c_{\ell_j})= f_{k+1}^{-1}\circ F(c_{k-1})=c_{k+1}~~&\text{by}~~\eqref{fcl1}, \eqref{jointp}, \eqref{ck+1}.
\end{align*}
This shows that $f$ is continuous at $c_{\ell_j}$, where $j\equiv1(\!\!\mod4)$.
For $0\le j\le s$ with $j\equiv2(\!\!\mod4)$, we have
\begin{align*}
f_{\ell_j-1}(c_{\ell_j})=f_{k-1}^{-1}\circ F(c_{\ell_j})=f_{k-1}^{-1}\circ F(c_{k+2})=c_k~~&\text{by}~~\eqref{ficlj2}, \eqref{jointp}, \eqref{ck},
\\
f_{\ell_j}(c_{\ell_j})=f_k^{-1}\circ F(c_{\ell_j})= f_k^{-1}\circ F(c_{k+2})=c_k~~&\text{by}~~\eqref{ficlj13}, \eqref{jointp}, \eqref{ck}.
\end{align*}
This shows that $f$ is continuous at $c_{\ell_j}$, where $j\equiv2(\!\!\mod4)$.
For $0\le j\le s$ with $j\equiv3(\!\!\mod4)$, we get
\begin{align*}
f_{\ell_j-1}(c_{\ell_j})=f_k^{-1}\circ F(c_{\ell_j})= f_k^{-1}\circ F(c_{k+2})=c_k~~&\text{by}~~\eqref{ficlj13}, \eqref{jointp}, \eqref{ck},
\\
f_{\ell_j}(c_{\ell_j})=f_{k-1}^{-1}\circ F(c_{\ell_j})= f_{k-1}^{-1}\circ F(c_{k+2})=c_k~~&\text{by}~~ \eqref{ficlj2}, \eqref{jointp}, \eqref{ck}.
\end{align*}
This shows that $f$ is continuous at $c_{\ell_j}$, where $j\equiv3(\!\!\mod4)$.
Similarly, by \eqref{extenck+2cr1}, \eqref{fcl1}-\eqref{ficlj2}, \eqref{ck+1} and \eqref{ck}, we can prove that $f$ is continuous at $c_{r_j}$ for all $0\le j\le t$.
Thus, $f$ is continuous on $I$.

Now, we show that $f$ is an iterative roots of order $2$ of $F$. For every $x\in [c_k,c_{k+1}]$, we have $f^2(x)=F(x)$ because $f=f_k$ and $f_k$ is an  iterative root of order $2$ of $F|_{[c_k,c_{k+1}]}$. For $x\in[c_i,c_{i+1}]$ and $i=k-1,k+1,\ell_{j-1},\cdots,\ell_j-1~\text{with}~j\equiv1~\text{or}~3\\(\!\!\mod 4)$ and  $r_j,\cdots,r_{j+1}-1~\text{with}~j\equiv1~\text{or}~3(\!\!\mod 4)$, we have
	\begin{equation*}
	f^2(x)= f_k\circ f_k^{-1}\circ F(x)=F(x).
	\end{equation*}
	For $x\in[c_i,c_{i+1}]$, $i=\ell_{j-1},\cdots,\ell_j-1$ with $j\equiv2(\!\!\mod4)$ and $ r_j,\cdots,r_{j+1}-1$ with $j\equiv0(\!\!\mod4)$, we have
	\begin{equation*}
	f^2(x)=f_{k-1} \circ f_{k-1}^{-1}\circ F(x)=F(x).
	\end{equation*}
	For $x\in[c_i,c_{i+1}]$, $i=\ell_{j-1},\cdots,\ell_j-1$ with $j\equiv0(\!\!\mod4), r_j,\cdots,r_{j+1}-1$ with $j\equiv2(\!\!\mod4)$, we have
	\begin{equation*}
	f^2(x)=f_{k+1}\circ f_{k+1}^{-1} \circ F(x)=F(x).
	\end{equation*}
Thus, it is proved that $f$ is an iterative root of order $2$ of $F$. Clearly, $f=f_k$ on $[c_k,c_{k+1}]$ is strictly increasing. Finally, by \eqref{firexten} and
\eqref{ficlj13}, $f([c_i,c_{i+1}]) \subset [c_k,c_{k+1}]$ for $i=k-1,k+1,\ell_{j-1},\cdots,\ell_j-1~\text{with}~j\equiv1~\text{or}~3(\!\!\mod 4), r_j,\cdots,r_{j+1}-1~\text{with}~j\equiv1~\text{or}~3(\!\!\mod 4)$, $f([c_i,c_{i+1}]) \subset [c_{k-1},c_k]$ for $i=\ell_{j-1},\cdots,\ell_j-1$ with $j\equiv2(\!\!\mod4)$, $ r_j,\cdots,r_{j+1}-1$ with $j\equiv0(\!\!\mod4)$ by \eqref{ficlj2} and $f([c_i,c_{i+1}]) \subset [c_{k+1},c_{k+2}]$ for $i=\ell_{j-1},\cdots,\ell_j-1$ with $j\equiv0(\!\!\mod4), r_j,\cdots,r_{j+1}-1$ with $j\equiv2(\!\!\mod4)$ by \eqref{fcl1}. Thus, $H(f)=2$ by Lemma \ref{height}. This proves the claim and we complete the whole proof.
\end{proof}

\begin{proof}[\bf Proof of Theorem \ref{LD}]
{\it Step 1:} Construct a continuous and strictly decreasing iterative root $f_0$ of order $2$ of $F$ on $[c_0,c_1]$.

Since $F$ is reversing-correspondence on $[c_0,c_1]$, by \eqref{ldc}, Theorem $15.9$ of \cite{Kuczma} and Lemma \ref{diteendps}, we can construct a continuous and strictly decreasing function $f_0:[c_0,c_1]\to[c_0,c_1]$ such that
\begin{equation}
f_0(c_0)=F(c_1),~~~~~f_0(c_1)=c_0,
\label{f0endps}
\end{equation}
and $f_0^2(x)=F(x)$ for all $x\in[c_0,c_1]$.

{\it Step 2}: Define a function on $[c_1,c_2]$.

Define $f_1:[c_1,c_2]\to[c_0,c_1]$ by
\begin{equation}
f_1(x):=f_0^{-1}\circ F(x),~~~~~ x\in [c_1,c_2].
\label{ldf1}
\end{equation}
Since $f_0$ is strictly decreasing on $[c_0,c_1]$ and $F$ is strictly decreasing on $[c_1,c_2]$, by \eqref{ldc} and \eqref{f0endps} we have $F([c_1,c_2])=[c_0,F(c_1)] = [f_0(c_1),f_0(c_0)]$, that is, $F([c_1,c_2])$ is included in the range of $f_0$, implying that $f_1$ in \eqref{ldf1} is well defined.

{\it Step 3}: Define a function on each $[c_i,c_{i+1}]$ for $2\le i\le v$.

For each $2\le i\le v$, define a function $f_i:[c_i,c_{i+1}]\to[c_1,c_2]$ by
\begin{equation}
f_i(x):=f_1^{-1}\circ F(x),~~~~~x\in[c_i,c_{i+1}].
\label{ldfi}
\end{equation}
Note that $f_1$ is strictly increasing, $f_1(c_1)=c_0$ and $f_1(c_2)=c_1$. This implies that $f_i$ in \eqref{ldfi} is well defined since $F([c_i,c_{i+1}])\subset[c_0,c_1]$.

{\it Step 4}: Joint $f_i~(0\le i\le v)$ to give an iterative root of order $2$ as desired in Theorem \ref{LD}.

Let $f(x):=f_i(x)$ for all $x\in[x_i,x_{i+1}]$ and $0\le i\le v$. Now we check that $f$ is a continuous  iterative root of order $2$ of $F$ such that $f$ is strictly decreasing on $[c_0,c_1]$ and $H(f)=2$. Clearly, $f_i$ is continuous on its domain for all $0\le i\le v$. In order to prove the continuity of $f$ on $I$, it remains to show that $f$ is continuous at points $\{c_i\}_{i=1}^v$. Hence, by \eqref{f0endps} and \eqref{ldf1}, we get $f_1(c_1)=f_0^{-1}\circ F(c_1)=c_0=f_0(c_1)$. This implies that $f$ is continuous at $c_1$. Furthermore, by \eqref{ldf1}, \eqref{ldc} and \eqref{ldfi}, we have
$$
f_1(c_2)=f_0^{-1}\circ F(c_2)=f_0^{-1}(c_0)=c_1=f_1^{-1}(c_0)=f_1^{-1}\circ F(c_2)=f_2(c_2).
$$
This shows that $f$ is continuous at $c_2$. Note that  \eqref{ldfi} yields $f_i(c_{i+1})=f_1^{-1}\circ F(c_{i+1})=f_{i+1}(c_{i+1})$ for every $2\le i\le v-1$. It follows that $f$ is continuous at $\{c_i\}_{i=3}^v$. Hence, we proved the continuity of  $f$ on $I$.

On the other hand, it is easy to see that $f^2(x)=F(x)$ for all $x\in[c_0,c_1]$ since $f=f_0$ and $f_0$ is an iterative root of order $2$ of $F$ on $[c_0,c_1]$, as shown in {\it Step 1}. For every $x\in [c_1,c_2]$, by \eqref{ldf1} we have
$$
f^2(x)=f_0\circ f_0^{-1}\circ F(x) =F(x).
$$
For $x\in [x_2,c_{v+1}]$, we have
$$
f^2(x)=f_1\circ f_1^{-1}\circ F(x) =F(x)
$$
by \eqref{ldfi}. This proves that $f$ is an iterative root of order $2$ of $F$.

Note that $f$ is strictly decreasing on $[c_0,c_1]$ since $f=f_0$ on $[c_0,c_1]$.
By \eqref{ldf1} and  \eqref{ldfi}, we have $f([c_1,c_2])\subset[c_0,c_1]$ and $f([c_i,c_{i+1}])\subset[c_1,c_2]$ for all $2\le i\le v$, yielding that $f^2(I)\subset[c_0,c_1]$ but $f(I)\not\subset[c_0,c_1]$. It follows that $H(f)=2$ by Lemma \ref{height}. The proof is completed.
\end{proof}

\begin{proof}[\bf Proof of Theorem 2.4]
{\it Step1}: Construct a continuous and strictly decreasing iterative root $f_k$ of order $2$ of $F$ on $[c_k,c_{k+1}]$.

Note that $F$ is reversing-correspondence on $[c_k,c_{k+1}]$. Under \eqref{mdc}, \eqref{mdc2} or \eqref{mdc3}, we infer from Theorem $15.9$ of \cite{Kuczma} and Lemma \ref{diteendps} that there exists a continuous and strictly decreasing function $f_k:[c_k,c_{k+1}]\to[c_k,c_{k+1}]$ such that
\begin{equation}
f_k(c_k)=F(c_{k-1}),~~~~~f_k(c_{k+1})=F(c_{k+2}),
\end{equation}
and $f_k^2(x)=F(x)$ for all $x\in[c_k,c_{k+1}]$.

{\it Step 2}: Define functions on intervals $[c_{k-1},c_k]$ and $[c_{k+1},c_{k+2}]$, respectively.

{\it Step 3}: Define a function on interval $[c_0,c_{k-1}]$.

{\it Step 4}: Define a function on interval $[c_{k+2},c_{v+1}]$.

{\it Step 5}: Define a continuous  iterative root of order $2$ by jointing above functions. Since {\it Step 2} -{\it Step 5} are similar to those in the proof of Theorem \ref{MI}, we omit their details. The proof of Theorem \ref{MD} is completed.
\end{proof}