Average mixing matrix of trees

Abstract: We investigate the rank of the average mixing matrix of trees, with all eigenvalues distinct. The rank of the average mixing matrix of a tree on $n$ vertices with $n$ distinct eigenvalues is upper-bounded by $\frac{n}{2}$. Computations on trees up to $20$ vertices suggest that the rank attains this upper bound most of the times. We give an infinite family of trees whose average mixing matrices have ranks which are bounded away from this upper bound. We also give a lower bound on the rank of the average mixing matrix of a tree.

\section{Introduction}
\label{sec:intro}
We investigate the rank of the average mixing matrix of continuous time quantum walks on trees with simple eigenvalues.

The continuous-time quantum walk is an universal computational primitive \cite{ChildsUniversalQComputation}. Introduced in \cite{FarhiGutmann}, many properties of quantum walks have been studied. Some topics include state transfer \cite{KayReviewPST,GodsilStateTransfer12,CoutinhoGodsilGuoVanhove2,VinetZhedanovHowTo} and uniform mixing \cite{AdaChanComplexHadamardIUMPST,GodsilMullinRoy,TamonAdamczakUniformMixingCycles}.

Let $X$ be a graph and let $A$ be the adjacency matrix of $X$. The \textsl{transition matrix} of a continuous-time quantum walk on $X$ is a matrix-valued function in time, denoted $U(t)$, and is given as follows:
\[ U(t) = \exp(itA)
\]
Unlike a classical random walk on a connected graph, a continuous quantum walk does not reach a stationary distribution. For example, the transition of the complete graph $K_n$ is a periodic function of $t$. The average mixing matrix is, intuitively, a distribution that the quantum walk adheres to, on average, over time, and thus may be thought of as a replacement for a stationary distribution. The average mixing matrix has been studied in \cite{GodsilAverageMixing,TamonAdamzackAverageMixing, CoGdGuZh17}.  We will now proceed with a few preliminary definitions.

The mixing matrix $M(t)$ of the quantum walk, given by
\[
	M(t) = U(t) \circ \comp{U(t)}.
\]
where $\circ$ denotes the Schur (also known as the Hadamard or element-wise product) of two matrices. The \textsl{average mixing matrix}, denoted $\mxm$, is defined as follows:
\begin{equation}
	\label{eq:mxmdef}
	\mxm = \lim_{T\to\infty}\frac1T \int_0^T M(t)\,dt.
\end{equation}

A tree is a connected graph with no cycles. The class of trees is a natural class of graphs to study. The rank of the average mixing matrix of a tree on $n$ vertices with $n$ distinct eigenvalues is at most $\nicefrac{n}{2}$, see \cite{CoGdGuZh17}. We computed the rank of the average mixing matrix of all trees up to $20$ vertices; the computational results suggest that the rank of $\mxm$ of a tree with all simple eigenvalues attains the upper bound most of the time. We give an infinite family of trees whose average mixing matrices have ranks which are bounded away from this upper bound.

\begin{theorem*}
For every positive real number $c$, there exists a tree $T$ on $n$ vertices with simple eigenvalues such that
\[
\left\lceil \frac{n}{2} \right\rceil -  \rk(\mxm(T)) > c.
\]
\end{theorem*}

We then give the following lower bound on the rank of the average mixing matrix of a tree:

\begin{theorem*}
If $T$ is a tree with simple eigenvalues on at least four vertices and is not isomorphic to $P_4$, then $\rk(\mxm(T))\geq 3$.
\end{theorem*}

We give some preliminary results about the average mixing matrix in Section \ref{sec:prelim}. We also find the ranks and traces of the average mixing matrices of star graphs, as an example. In Section \ref{sec:rootprod}, we define the rooted product of graphs and we find the average mixing matrix of a graph $X$ with $K_2$ in terms of the eigenprojectors of $X$, which we use in Section \ref{sec:upperbd} to give a family of trees whose average mixing matrices have ranks which are upper-bounded away from the maximum. In Section \ref{sec:lowerbd}, we prove the lower bound on the ranks of the average mixing matrices of trees which are not isomorphic to the path on four vertices.

\section{Preliminaries and examples}\label{sec:prelim}

Let $X$ be a graph on $n$ vertices and let $A$ be the adjacency matrix of $X$. Let $\theta_1, \ldots, \theta_d$ be the distinct eigenvalues of $A$ and, for $r=1,\ldots,d$, let $E_r$ be the idempotent projection onto the $\theta_r$ eigenspace of $A$; the spectral decomposition of $A$ is as follows:
\[
A = \sum_{r=1}^d \theta_r E_r.
\]
The following is an important theorem as it allows us to understand the average mixing matrix.

\begin{theorem}\cite{GodsilAverageMixing}
Let $X$ be a graph and let $A$ be the adjacency matrix of $X$. Let $A = \sum_{r=1}^d \theta_r E_r$ be the spectral decomposition of $A$. The mixing matrix of $X$ is \[
\mxm = \sum_{r=1}^d E_r \circ E_r . \qed \]
\end{theorem}

As an example, we find the average mixing matrix of the star and deduce that it always has full rank.

\begin{lemma}
The average mixing matrix of the star graph $K_{1,n}$ has full rank and has
\[
\tr(\mxm) = \begin{cases}\frac{2n^2 + \frac{5}{2}n}{(2n-1)^2} , & \text{if }n \text{ is even;} \\
\frac{2n^2 + 3n}{(2n-1)^2} , & \text{if }n \text{ is odd.} \end{cases}
\]
\end{lemma}

\proof We will proceed by finding an explicit expression for
$\mxm(K_{1,n})$. Observe that the eigenvalues of $K_{1,n}$ are $\pm \sqrt{n}$ and $0$ with multiplicity $n-1$. We give the spectral idempotent matrices  as follows:
\[
E_{\sqrt{n}} = \frac{n}{2n-1} \pmat{1 & \frac{1}{\sqrt{n}} \ones^T \\
\frac{1}{\sqrt{n}} \ones & \frac{1}{n}J} , \quad
E_{-\sqrt{n}} = \frac{n}{2n-1} \pmat{1 & -\frac{1}{\sqrt{n}} \ones^T \\
-\frac{1}{\sqrt{n}} \ones & \frac{1}{n}J}
\]
and
\[
E_0 = \frac{1}{2} \pmat{0 & 0 \\ 0 & I -R}
\]
where $I$ is the $n\times n$ identity matrix and $R$ is the $n\times n$ matrix with all ones on the back diagonal. Note that $I-R$ always has rank $n-1$. Thus we have that
\[
\mxm(K_{1,n}) = E_{\sqrt{n}}^{\circ 2} + E_{-\sqrt{n}}^{\circ 2} + E_0^{\circ 2} = \frac{2}{(2n-1)^2}\pmat{n^2 & n\ones^T\\ n\ones & J + \frac{1}{4}I + \frac{1}{4}R}.
\]
Observe that this matrix has full rank.\qed

\begin{figure}[ht]
    \centering
    \includegraphics[scale=0.8]{avgtrees6.pdf}
    \caption{All trees on $6$ vertices, organized by the rank of their average mixing matrices.     \label{fig:trees6}}
\end{figure}

The path graphs $P_2$ and $P_3$ are the only trees on two and three vertices, respectively. There are six trees on six vertices; three of them have simple eigenvalues and rank $3$, two have rank $4$ and one graph (the star graph) of full rank. They are shown in Figure \ref{fig:trees6}.

\section{Rooted products} \label{sec:rootprod}

Let $X$ be a graph with vertices $\{v_1,\ldots, v_n\}$ and let $Y$ be a disjoint union of rooted graphs $Y_1, \ldots, Y_n$, rooted at $y_1,\ldots, y_n$, respectively. The \textsl{rooted product} of $X$ and $Y$, denoted $X(Y)$, is the graph obtain by identifying $v_i$ with the root vertex of $Y_i$. The rooted product was first introduced by Godsil and McKay in \cite{GoMc78}. Let $B(X,Y)$ be the matrix given as follows:
\[
B(X,Y)_{i,j} = \begin{cases} \phi(Y_i, t), &\text{ if }i=j;\\
- \phi(Y_i \setminus y_i,t), &\text{ if }i\sim j; \\ \text{ and,}
0, & \text{ otherwise.}\end{cases}
\]
\begin{theorem}\cite{GoMc78}
$\phi(X(Y), t) = \det(B)$. \qed
\end{theorem}

In particular, we will consider the special case where $Y$ is a sequence of $n$ copies of $K_2$. In this case, we will write $X(K_2)$ to denote the rooted product and  the following is found in \cite{GoMc78}  as a consequence of the above theorem
\begin{equation} \label{eq:rootcharpoly}
\phi(X(K_2),t) = t^n \phi\left(H, t - \frac{1}{t}\right)
\end{equation}

The following lemma follows directly from \eqref{eq:rootcharpoly}.
\begin{lemma} \label{lem:rootedsimp}
Let $X$ be a graph with simple eigenvalues. The rooted product $X(K_2)$ also has simple eigenvalues which are roots of
\[
t^2 - \lambda t - 1 =0,
\]
for $\lambda$ an eigenvalue of $X$. \qed
\end{lemma}

\begin{lemma}
Let $X$ be a graph with simple eigenvalues and let $\{\Zv_1,\ldots,\Zv_n\}$ be an orthonormal eigenbasis of $A(X)$ with eigenvalues $\lambda_1,\ldots, \lambda_n$, respectively. For $i = 1,\ldots, n$, let $\mu_i$ and $\nu_{i}$ be the two roots of $t^2 - \lambda_i t - 1 =0$. Then
\[
\left\{\frac{1}{\sqrt{\mu_i^2 + 1}} \pmat{\mu_i \Zv_i \\  \Zv_i}, \frac{1}{\sqrt{\nu_i^2 + 1}} \pmat{\nu_i\Zv_i \\  \Zv_i} \mid i = 1,\ldots,n \right\}
\]
is an orthonormal eigenbasis for $X(K_2)$.
\end{lemma}

\proof We may write the adjacency matrix of $X(K_2)$ as follows:
\[
A(X(K_2)) = \pmat{A(X) & I \\ I & 0} .
\]
For $i \in [n]$ and $\mu \in \{\mu_i,\nu_i\}$, we see that $\mu \neq 0$ and $\mu^2 = \lambda\mu + 1$. We obtain that
\[ \pmat{A(X) & I \\ I & 0} \pmat{ \mu\Zv_i \\ \Zv_i} = \pmat{\lambda_i\mu\Zv_i + \Zv_i \\ \mu \Zv_i} = \pmat{\mu^2 \Zv_i \\ \mu \Zv_i} =  \mu \pmat{ \mu\Zv_i \\ \Zv_i} ,
\]
and the lemma follows. \qed

\begin{theorem} \label{thm:rootedmhat}
Let $X$ be a graph with simple eigenvalues and let $F_1,\ldots,F_n$ the orthogonal projections onto the eigenspaces of $A(X)$ with corresponding eigenvalues $\lambda_1,\ldots, \lambda_n$. Then
\[
\mxm(X(K_2)) = \pmat{\mxm(X) - N & N \\ N & \mxm(X) - N}
\]
where
\[ N =  \sum_{i=1}^n  \left(\frac{2}{\lambda_i^2 + 4}\right)(F_i\circ F_i).
\]
\end{theorem}

\proof Following the notation of the previous lemma, we see that $F_i = \Zv_i \Zv_i^T$. For $i\in [n]$, let $\mu \in \{\mu_i,\nu_i\}$. The orthogonal projection $E_{\mu} $ onto the $\mu$ eigenspace of $A(X(K_2)$ is given by
\[
\frac{1}{\mu^2\! + \!1} \pmat{\mu \Zv_i \\  \Zv_i} \pmat{\mu \Zv_i^T &  \Zv_i^T} = \frac{1}{\mu^2\! +\! 1} \pmat{\mu^2 \Zv_i\Zv_i^T & \mu \Zv_i\Zv_i^T \\ \mu \Zv_i\Zv_i^T & \Zv_i\Zv_i^T  } = \frac{1}{\mu^2\! +\! 1} \pmat{\mu^2 F_i & \mu F_i\\ \mu F_i & F_i  }.
\]
Thus
\[
E_{\mu_i} \circ E_{\mu_i} + E_{\nu_i} \circ E_{\nu_i}\! =  \!
\pmat{\left(\!\frac{\mu_i^4 }{\left(\!\mu_i^2\! +\! 1\!\right)^2} + \frac{\nu_i^4 }{\left(\!\nu_i^2\! +\! 1\!\right)^2} \! \right)\! (F_i \!\circ\! F_i)
& \left(\!\frac{\mu_i^2}{\left(\!\mu_i^2\! +\! 1\!\right)^2} + \frac{\nu_i^2}{\left(\nu_i^2\! +\! 1\right)^2} \!\right)\!(F_i\!\circ\! F_i)\\
\left(\!\frac{\mu_i^2}{\left(\!\mu_i^2\! +\! 1\!\right)^2}+ \frac{\nu_i^2}{\left(\nu_i^2\! +\! 1\right)^2}\!\right)\!(F_i\!\circ \!F_i)
&  \left(\!\frac{1}{\left(\!\mu_i^2\! +\! 1\!\right)^2} + \frac{1}{\left(\nu_i^2\! +\! 1\right)^2}\!\right) \!(F_i\! \circ \!F_i) } .
\]
Observe that $\mu_i + \nu_i = -\lambda_i$ and $\mu_i\nu_i = -1$, and so
\[
\mu_i^2 + \nu_i^2 = (\mu_i+\nu_i)^2- 2\mu_i\nu_i = \lambda_i^2 +2
\]
and
\[
\mu_i^4 + \nu_i^4 = \lambda_i^4 + 4\mu_i^2 + 4\nu_i^2 - 6 = \lambda_i^4 + 4 \lambda_i^2 + 2 .
\]We obtain that
\[
\begin{split}
\frac{\mu_i^4 }{\left(\mu_i^2\! +\! 1\right)^2} + \frac{\nu_i^4 }{\left(\nu_i^2\! +\! 1\right)^2}  &= \frac{\mu_i^4\left(\nu_i^2\! +\! 1\right)^2 + \nu_i^4  \left(\mu_i^2\! +\! 1\right)^2}{\left(\mu_i^2\! +\! 1\right)^2\left(\nu_i^2\! +\! 1\right)^2}\\
&= \frac{\lambda_i^4 + 6\mu_i^2 +6\nu_i^2 -4}{\left(\lambda_i^2 + 4\right)^2}
= \frac{\lambda_i^2 + 2}{\lambda_i^2 + 4}
\end{split}
\]
and
\[
\frac{\mu_i^2 }{\left(\mu_i^2\! +\! 1\right)^2} + \frac{\nu_i^2 }{\left(\nu_i^2\! +\! 1\right)^2}  = \frac{\mu_i^2\left(\nu_i^2\! +\! 1\right)^2 + \nu_i^2  \left(\mu_i^2\! +\! 1\right)^2}{\left(\mu_i^2\! +\! 1\right)^2\left(\nu_i^2\! +\! 1\right)^2}
= \frac{2\lambda_i^2 +8}{\left(\lambda_i^2 + 4\right)^2}
= \frac{2}{\lambda_i^2 + 4}
\]
and
\[
\frac{1 }{\left(\mu_i^2\! +\! 1\right)^2} + \frac{1 }{\left(\nu_i^2\! +\! 1\right)^2}  = \frac{\left(\nu_i^2\! +\! 1\right)^2 +  \left(\mu_i^2\! +\! 1\right)^2}{\left(\mu_i^2\! +\! 1\right)^2\left(\nu_i^2\! +\! 1\right)^2}
= \frac{\lambda_i^2 + 2}{\lambda_i^2 + 4} .
\]
Thus
\[
E_{\mu_i} \circ E_{\mu_i} + E_{\nu_i} \circ E_{\nu_i} =
\pmat{\left(\frac{\lambda_i^2 + 2}{\lambda_i^2 + 4}  \right) (F_i \circ F_i)
& \left(\frac{2}{\lambda_i^2 + 4}\right)(F_i\circ F_i)\\
\left(\frac{2}{\lambda_i^2 + 4} \right)(F_i\circ F_i)
&  \left(\frac{\lambda_i^2 + 2}{\lambda_i^2 + 4}\right) (F_i \circ F_i) } .
\]
Let \[ N =  \sum_{i=1}^n  \left(\frac{2}{\lambda_i^2 + 4}\right)(F_i\circ F_i).
\]
We can see that \[
\mxm(X(K_2)) = \pmat{\mxm(X) - N & N \\ N & \mxm(X) - N}
\]
and the lemma follows. \qed

We observe that $N$ and $\mxm$ have the same kernel.

\section{Trees with simple eigenvalues with $\rk(\mxm)$ bounded away from $\lceil \nicefrac{n}{2} \rceil$ } \label{sec:upperbd}

The following lemma is found in \cite{CoGdGuZh17}.

\begin{lemma}\cite{CoGdGuZh17} If $X$ is a bipartite graph on $n$ vertices with $n$ distinct eigenvalues, then $rk(\mxm(X)) \leq \lceil \nicefrac{n}{2} \rceil$. \qed \end{lemma}

In this section, we will give a construction for trees on $n$ vertices with simple eigenvalues where $\rk(\mxm)$ is bounded away from $\lceil \nicefrac{n}{2} \rceil$. A computer search finds that for $n = 1,\ldots, 17, 19,20$, every trees on $n$ vertices with simple eigenvalues has $\rk(\mxm) = \lceil \nicefrac{n}{2} \rceil$. Up to isomorphism, there is one tree $T^*$ on $18$ vertices such that $\rk(\mxm(T^*)) = 8$, which is given in Figure \ref{fig:thetree}. We will retain the notation of $T^*$ to denote this for the rest of this section.

\begin{figure}[htbp]
    \centering
    \includegraphics{thetree}
    \caption{The tree $T^*$ on $18$ vertices such that $\mxm(T^*) = 8$. \label{fig:thetree}}
\end{figure}

We will need the following technical lemma.

\begin{lemma} \label{lem:kerM}
Let $X$ be a graph with adjacency matrix  $A$. Suppose the spectral decomposition $A(X)= \sum_{r=0}^d \theta_r E_r$. Let $\mxm$ be the average mixing matrix of $X$. We have that
\[  \ker(\mxm) = \bigcap_{r=0}^d \ker (E_r \circ E_r).\]
\end{lemma}

\proof Let $v \in \ker(\mxm)$. We see that
\[
0= \Zv^TM\Zv = \sum_{r=0}^d \Zv^T E_r \circ E_r \Zv.
\]
Since $E_r \circ E_r$ is a principal submatrix of $E_r \otimes E_r$ and is hence positive semi-definite, we see that
\[
\Zv^T E_r \circ E_r \Zv \geq 0
\]
for all $r$. Since the sum of non-negative real number is equal to zero, every term must be zero and thus
\[  \ker(\mxm) \subseteq \bigcap_{r=0}^d \ker (E_r \circ E_r).\]
Containment in the other direction is clear. \qed

We will use Lemma \ref{lem:kerM} to bound the rank of iterated rooted products of $T^*$ with $K_2$. We note that Lemma \ref{lem:kerM} implies that vertices $u$ and $v$ are strongly cospectral in $X$ if and only if $\mxm e_u = \mxm e_v$, which is also proven in \cite{GodsilAverageMixing}.

The characteristic polynomial of $T^*$ is
\[
\begin{split}
\phi(T,x) = &(x - 1)  (x + 1) \left(x^2 - x - 1\right)\left(x^2 + x - 1]\right)\left(x^3 - x^2 - 2x + 1\right) \\
&\left(x^3 + x^2 - 2x - 1\right)\left(x^6 - 8x^4 + 12x^2 - 1\right)
\end{split}
\]
which has all simple roots.

Let $X_0 = T^*$ and $X_{i+1} = X_i(K_2)$ for $i >0$.

\begin{lemma} For $i\geq 0$, the graph $X_i$ has simple eigenvalues and
\[ \rk(\mxm(X_i)) \leq 2^{i+3}. \]\end{lemma}

 \proof We proceed by induction on $i$. We computed that $\rk(\mxm(T^*)) = 8$ and $T^*$ has simple eigenvalues. Suppose the statement is true for $i >1$. By Lemma \ref{lem:rootedsimp}, the graph $X_{i+1}$ has simple eigenvalues. For simplicity, let $n = 2^i18$, the number of vertices of $X_i$. Let $F_1,\ldots,F_n$ be  the orthogonal projections onto the eigenspaces of $A(X_i)$ with corresponding eigenvalues $\lambda_1,\ldots, \lambda_n$. Theorem \ref{thm:rootedmhat} gives that
\[
\mxm(X_{i+1}) = \pmat{\mxm(X_i) - N & N \\ N & \mxm(X_i) - N}
\]
where
\[ N =  \sum_{j=1}^n  \left(\frac{2}{\lambda_j^2 + 4}\right)(F_j\circ F_j).
\]
Let $\Zv \in \ker(\mxm(X_i))$. By Lemma \ref{lem:kerM}, we see that $\Zv \in \ker(F_j\circ F_j)$ for all $j$, and thus $N\Zv = 0$. Let $0_m$ denote the $m$ dimensional all zero vector.  We have
\[
\mxm(X_{i+1}) \pmat{\Zv \\ 0_n} = \pmat{\mxm(X_i) - N & N \\ N & \mxm(X_i) - N}\pmat{\Zv \\ 0_n} = 0_{2n}
\]
and
\[
\mxm(X_{i+1}) \pmat{0_n \\ \Zv} = \pmat{\mxm(X_i) - N & N \\ N & \mxm(X_i) - N}\pmat{0_n \\ \Zv}  = 0_{2n}.
\]
Thus, if $\{\Zv_k\}_{k}$ is an orthogonal basis for $\ker(\mxm(X_i))$, then
\[
 \left\{ \pmat{\Zv_k \\ 0_n},\pmat{0_n \\ \Zv_k} \right\}_{k}
\]
is a set of $2 \dim \ker(\mxm(X_i))$ vectors in $\ker(\mxm(X_{i+1}))$ and the statement follows.\qed

\begin{theorem}
For every positive real number $c$, there exists a tree $T$ with simple eigenvalues such that
\[
\left\lceil \frac{|V(T)|}{2} \right\rceil -  \rk(\mxm(T)) > c.
\]
\end{theorem}

\proof Note that $X_i$ as construct above is a tree on $2^i18$ vertices such that
\[
\left\lceil  \frac{|V(X_i)|}{2} \right\rceil  -  \rk(\mxm(X_i)) \geq 2^{i-1}18 - 2^i8 = 2^{i}.
\]
For any $c>0$, we pick $i$ such that $2^i >c$ and the result follows. \qed

\section{Lower bound on rank}\label{sec:lowerbd}

We denote by $X\diff u$ the graph obtaine from $X$ by deleting vertex $u$. The \textsl{coefficient matrix} of a graph $X$ is the matrix $C$ with rows indexed by the vertices of $X$ and columns indexed by integers $[n]$ such  that the $(u,r)$ entry of $C$ is the coefficient of $t^{r-1}$ in the characteristic polynomial $\phi(X\diff u,t)$. We will see that for graphs with simple eigenvalues, the coefficient matrix is useful in studying the average mixing matrix. The following lemma appears in the proof of \cite[Theorem 3.2]{GodsilAverageMixing}.

\begin{lemma}\cite{GodsilAverageMixing} Let $X$ be a graph on $n$ vertices with $n$ distinct eigenvalues $\theta_1, \ldots, \theta_n$. Let $\Delta$ be the $n × n$ diagonal matrix whose $r$-th diagonal entry is $\phi'(X,\theta_r)$. Let $V$ be the
$n ×n$ Vandermonde matrix with $ij$-entry equal to $\theta^{i-1}_j$. Then
\[
\mxm(X) = CV\Delta^{-2}V^TC^T.
\] \qed
\end{lemma}

 From this, we derive the following corollary as a direct consequence.

\begin{corollary}\label{lem:coef}
If $X$ is a graph with simple eigenvalues, then $\rk ( \mxm(X))$ is equal to the rank of the coefficient matrix.
\end{corollary}

We will also use this standard fact, which can be found in \cite{GodsilAlgebraicCombinatorics}, for example.

\begin{lemma}\label{lem:charpoly=matchpoly}
If $T$ is a tree, then the characteristic polynomial of $T$ is equal to the matching polynomial of $T$. \qed
\end{lemma}

Lemma~\ref{lem:submatrixfullrank} is Corollary 8.9.2 in \cite{GR}.

\begin{lemma}\cite{GR}\label{lem:submatrixfullrank} If $A$ is a symmetric matrix of rank $r$, then it has a principal submatrix of full rank. \qed
\end{lemma}

Corollary~\ref{cor:perfect} follows from Lemma~\ref{lem:submatrixfullrank} and the fact that a tree has a perfect matching if and only if its adjacency matrix has full rank.

\begin{corollary}\label{cor:perfect} If $T$ is a tree with simple eigenvalues, then either $T$ has a perfect matching or there exists a vertex $v$ such that $T\diff v$ has a perfect matching.
\end{corollary}

\proof
If $T$ is a tree with simple eigenvalues, then zero can have multiplicity at most one.  If the multiplicity of zero is zero, then $T$ has a perfect matching.  If the multiplicity of zero is one, then the rank of $A(T)$ is $|T|-1$.  Thus, by Lemma~\ref{lem:submatrixfullrank}, $A(T)$ has $(|T|-1)\times (|T|-1)$ principal submatrix of full rank.  Thus, there exists a vertex $v$ such that $A(T\diff v)$ has full rank.  It follows that $T\diff v$ has a perfect matching.
\qed

\begin{lemma}\label{lem:degtwo}
If $T$ is a tree with simple eigenvalues, $|T|\geq 3$, then $T$ has a leaf adjacent to a vertex of degree two.
\end{lemma}

\proof
 The path on three vertices satisfies the conclusion of the lemma.  Let $T$ be a tree with simple eigenvalues and $|T|\geq 4$. Consider a diametrical path $P=\{v_0,\ldots, v_d\}$ of $T$.  Since the star on $n\geq 4$ vertices does not have simple eigenvalues, $d\geq 3$.

Since $P$ is a diametrical path of length at least three, $v_1$ and $v_{d-1}$ are distinct and adjacent to exactly one non leaf vertex of $T$.  If either $v_1$ or $v_{d-1}$ has degree two, then we are done.  Suppose by way of contradiction, that both vertices have degree greater than two.  Deleting $v_1$ and $v_{d-1}$ from $T$ yields a graph with at least four isolated vertices. As each isolated vertex contributes a zero eigenvalue, the multiplicity of zero is at least four.  Since the eigenvalues of induced subgraphs interlace, the multiplicity of the zero eigenvalue of $T$ is at least 2. This contradicts that $T$ has simple eigenvalues. \qed

\begin{theorem}
If $T$ is a tree with simple eigenvalues on at least four vertices and is not isomorphic to $P_4$, then $\rk\left(\mxm(T)\right)\geq 3$.
\end{theorem}

\proof In light of Corollary~\ref{lem:coef}, it is sufficient to show that the rank of the coefficient matrix of a tree is at least three.  By Lemma~\ref{lem:degtwo}, $T$ has a leaf $u$ adjacent to a vertex $v$ of degree two.  Let $w$ be the non leaf neighbor of $v$ with $\deg(w)=\ell$.  Let $m_{\alpha}(T)$ denote the number of matchings of size $\alpha$ in $T$. By Lemma~\ref{lem:charpoly=matchpoly}, the $i$th row of the coefficient matrix of $T$ can be expressed in terms of $m_\alpha(T\diff i)$ for the appropriate value of $\alpha$.
\medskip

\noindent \textbf{Case 1:}  $T$ has a perfect matching.

\medskip
As $T$ has a perfect matching, $n=|T|$ is even. The only tree on four vertices with a perfect matching is $P_4$.  It has two pairs of cospectral vertices and thus $\rk (\mxm(P_4))=2$. For the remainder of this case, assume that $n\geq 6$.  Consider the $3\times 3$ submatrix $C_1$ of the coefficient matrix of $T$ with rows corresponding to $u,v,w$ and columns corresponding to $t, t^{n-3}$, and $t^{n-1}$. For simplicity in the notation let $k=\nicefrac{n}{2}$.  Then

\[C_1=
\pmat{
(-1)^{k-1}m_{k-1}(T\diff u) & -m_1(T\diff u) & m_0(T\diff u)\\
(-1)^{k-1}m_{k-1}(T\diff v) & -m_1(T\diff v) & m_0(T\diff v)\\
(-1)^{k-1}m_{k-1}(T\diff w) & -m_1(T\diff w) & m_0(T\diff w)\\
}
\]

As $m_0(T\diff i)$ is defined to be 1 and $m_1(T\diff i)$ is the number of edges in $T\diff i$, it remains to determine the values of the first column.

In $T\diff u$, the set of matchings of size $k-1$ can be partitioned into two sets: the $k-1$ matchings which use edge $vw$ and those that do not.  Thus $$m_{k-1}(T\diff u)=m_{k-2}(T\diff \{u,v,w\})+m_{k-1}(T\diff \{u,v\}).$$

Since $T$ has a perfect matching and every perfect matching of $T$ contains the edge $uv$, we have that $T\diff \{u,v\}$ also contains a perfect matching.  Thus $m_{k-1}(T\diff \{u,v\})=1$.  Similarly, $m_{k-1}(T\diff v)=1$.

Since $T\diff w$ has $uv$ as a component and any matching of size $k-1$ uses $uv$, we see that \[m_{k-1}(T\diff w)=m_{k-2}(T\diff \{u,v,w\}.\]  Letting $q=m_{k-2}(T\diff \{u,v,w\})$,  we obtain
\[C_1=\pmat{
(-1)^{k-1}(q+1) & -(n-2) & 1\\
(-1)^{k-1} & -(n-3) & 1\\
(-1)^{k-1}q & -(n-\ell-1) & 1\\
} \]
and $$\det C_1=(-1)^{k-1}(1+q(1-\ell)).$$
Note that $\det C_1=0$ if and only if $\ell=1+\nicefrac{1}{q}$.  As $\ell\in\mathbb{N}$, this occurs if and only if $q=1$ and  $\ell=2$. We claim that if $\ell=2$, then $q\geq 2$. Let $y$ be the other neighbor of $w$.  Since $T$ has a perfect matching, so does $T\diff \{u,v,w,y\}$.  Thus $m_{k-2}(T\diff \{u,v,w,y\})=1$ and $T\diff \{u,v,w\}$ has a $k-2$ matching which uses no edge incident to $y$.  Since $n\geq 6$, $\deg(y)\geq 2$.  Thus $T\diff \{u,v,w\}$ has at least one $k-2$ matching which uses an edge incident to $y$.  Therefore $q=m_{k-2}(T\diff \{u,v,w\}\geq 2$.  Further $\det C_1\neq 0$ and the coefficient matrix of $T$ has rank at least 3.
\medskip

\noindent \textbf{Case 2:}  $T$ does not have a perfect matching.

\medskip
There are two possibilities to consider;  either $T\diff u$ has a perfect matching or it does not.

In the case that $T\diff u$ has a perfect matching, $n=|T|$ is odd and so $|T|\geq 5$. Consider the $3\times 3$ submatrix $C_2$ of the coefficient matrix of $T$ with rows corresponding to $u,v,w$ and columns corresponding to $t^0, t^{n-3}$, and $t^{n-1}$. For simplicity in the notation let $\nicefrac{(n-1)}{ 2}=j$.  Then

\[C_2=
\pmat{
(-1)^{j}m_{j}(T\diff u) & -m_1(T\diff u) & m_0(T\diff u)\\
(-1)^{j}m_{j}(T\diff v) & -m_1(T\diff v) & m_0(T\diff v)\\
(-1)^{j}m_{j}(T\diff w) & -m_1(T\diff w) & m_0(T\diff w)\\
}.\]

As stated in Case 1, $m_0(T\diff i)=1$ and $m_1(T\diff i)$ is  the number of edges in $T\diff i$.  Matchings of size $j=\nicefrac{n-1}{2}$ are perfect matchings in a graph on $n-1$ vertices.  Further since $T\diff u$ has a perfect matching so does $T\diff w$.  Lastly, $T\diff v$ does not have a perfect matching as $u$ is isolated by deleting $v$.  Thus
\[C_2=\pmat{
(-1)^{j} & -(n-2) & 1\\
0 & -(n-3) & 1\\
(-1)^{j} & -(n-\ell-1) & 1\\
}.\]
Note that $\det C_2=(-1)^j(\ell-1)$.  Since $\deg(w)=\ell\geq 2$, $C_2$ has full rank and so the coefficient matrix of $T$ has rank at least three.

We now consider the other possibility mentioned at the start of this case.  Assume that $T\diff u$ does not have a perfect matching.  By Corollary~\ref{cor:perfect} there exists a vertex $z$ of degree $f$ such that $T-z$ has a perfect matching.  Thus $n=|T|$ is odd and $n\geq 5$.  Consider the $3\times 3$ submatrix $C_3$ of the coefficient matrix of $T$ with rows corresponding to $u,v,z$ and columns corresponding to $t^0, t^{n-3}$, and $t^{n-1}$. For simplicity in the notation let $\nicefrac{n-1}{2}=j$.  Then
\[C_3=
\pmat{
(-1)^{j}m_{j}(T\diff u) & -m_1(T\diff u) & m_0(T\diff u)\\
(-1)^{j}m_{j}(T\diff v) & -m_1(T\diff v) & m_0(T\diff v)\\
(-1)^{j}m_{j}(T\diff z) & -m_1(T\diff z) & m_0(T\diff z)\\
}.\]

As in the other cases, the entries of the last two columns are easily filled. The entries in the first column are determined by whether $T\diff i$ has a perfect matching.  Thus,
\[C_3=
\pmat{
0 & -(n-2) & 1\\
0 & -(n-3) & 1\\
(-1)^{j} & -(n-f-1) & 1\\
}. \]
Note that $\det C_3=(-1)^{j+1}\neq 0$. Thus $C_3$ has full rank and so the coefficient matrix of $T$ has rank at least three. \qed

\section{Computational data}

Computations of average mixing matrices of trees on up to $20$ were carried out, using Sage Mathematics Software \cite{sage}. The results are recorded in Tables \ref{tab:trees2-14} and \ref{tab:trees15-20}. For each order $n$ and rank $r$, we record the number of trees on $n$ vertices whose average mixing matrix has rank $r$ and, amongst those, the number with $n$ distinct eigenvalues.

\begin{table}[htbp]
\centering
\begin{tabular}{|llll|}
\hline
n  & rank & \# trees & \# simple  \\
&        & & eigenvalues \\
\hline
2  & 1    & 1        & 1                     \\
\hline
3  & 2    & 1        & 1                     \\
\hline
4  & 2    & 1        & 1                     \\
   & 4    & 1        & 0                     \\
\hline
5  & 3    & 2        & 2                     \\
   & 5    & 1        & 0                     \\
\hline
6  & 3    & 3        & 2                     \\
   & 5    & 2        & 0                     \\
   & 6    & 1        & 0                     \\
\hline
7  & 4    & 5        & 5                     \\
   & 5    & 1        & 0                     \\
   & 6    & 4        & 0                     \\
   & 7    & 1        & 0                     \\
\hline
8  & 4    & 5        & 4                     \\
   & 5    & 4        & 0                     \\
   & 6    & 8        & 0                     \\
   & 7    & 4        & 0                     \\
   & 8    & 2        & 0                     \\
\hline
9  & 5    & 19       & 18                    \\
   & 6    & 3        & 0                     \\
   & 7    & 15       & 0                     \\
   & 8    & 7        & 0                     \\
   & 9    & 3        & 0                     \\
\hline
10 & 4    & 1        & 0                     \\
   & 5    & 14       & 11                    \\
   & 6    & 19       & 0                     \\
   & 7    & 30       & 0                     \\
   & 8    & 21       & 0                     \\
   & 9    & 16       & 0                     \\
   & 10   & 5        & 0                     \\
\hline
\end{tabular}
\hspace{15pt}
\begin{tabular}{|llll|}
\hline
n  & rank & \# trees & \# simple  \\
&        & & eigenvalues \\
\hline
11 & 5    & 1        & 0                     \\
   & 6    & 64       & 62                    \\
   & 7    & 18       & 0                     \\
   & 8    & 79       & 0                     \\
   & 9    & 40       & 0                     \\
   & 10   & 26       & 0                     \\
   & 11   & 7        & 0                     \\
\hline
12 & 5    & 1        & 0                     \\
   & 6    & 44       & 37                    \\
   & 7    & 106      & 0                     \\
   & 8    & 129      & 0                     \\
   & 9    & 119      & 0                     \\
   & 10   & 93       & 0                     \\
   & 11   & 48       & 0                     \\
   & 12   & 11       & 0                     \\
\hline
13 & 6    & 2        & 0                     \\
   & 7    & 264      & 250                   \\
   & 8    & 107      & 0                     \\
   & 9    & 411      & 0                     \\
   & 10   & 223      & 0                     \\
   & 11   & 186      & 0                     \\
   & 12   & 87       & 0                     \\
   & 13   & 21       & 0                     \\
\hline
14 & 6    & 4        & 0                     \\
   & 7    & 146      & 116                   \\
   & 8    & 552      & 0                     \\
   & 9    & 591      & 0                     \\
   & 10   & 694      & 0                     \\
   & 11   & 622      & 0                     \\
   & 12   & 341      & 0                     \\
   & 13   & 172      & 0                     \\
   & 14   & 37       & 0                     \\
\hline
\end{tabular}
\caption{Ranks of average mixing matrices of trees on $2$ to $14$ vertices. \label{tab:trees2-14}}
\end{table}

\begin{table}[htbp]
\centering
\begin{tabular}{|llll|}
\hline
n  & rank & \# trees & \# simple  \\
&        & & eigenvalues \\
\hline
15 & 7    & 4        & 0                     \\
   & 8    & 1117     & 1041                  \\
   & 9    & 663      & 0                     \\
   & 10   & 2173     & 0                     \\
   & 11   & 1365     & 0                     \\
   & 12   & 1328     & 0                     \\
   & 13   & 719      & 0                     \\
   & 14   & 309      & 0                     \\
   & 15   & 63       & 0                     \\
\hline
16 & 7    & 7        & 0                     \\
   & 8    & 543      & 465                   \\
   & 9    & 2926     & 0                     \\
   & 10   & 2834     & 0                     \\
   & 11   & 4265     & 0                     \\
   & 12   & 3881     & 0                     \\
   & 13   & 2650     & 0                     \\
   & 14   & 1494     & 0                     \\
   & 15   & 600      & 0                     \\
   & 16   & 120      & 0                     \\
\hline
17 & 8    & 11       & 0                     \\
   & 9    & 4889     & 4452                  \\
   & 10   & 4325     & 0                     \\
   & 11   & 11653    & 0                     \\
   & 12   & 8340     & 0                     \\
   & 13   & 9347     & 0                     \\
   & 14   & 5724     & 0                     \\
   & 15   & 3002     & 0                     \\
   & 16   & 1146     & 0                     \\
   & 17   & 192      & 0                     \\
\hline
18 & 7    & 2        & 0                     \\
   & 8    & 25       & 1                     \\
   & 9    & 2108     & 1727                  \\
   & 10   & 15306    & 0                     \\
\hline
\end{tabular}
\hspace{15pt}
\begin{tabular}{|llll|}
\hline
n  & rank & \# trees & \# simple  \\
&        & & eigenvalues \\
\hline
18   & 11   & 14829    & 0                     \\
   & 12   & 26545    & 0                     \\
   & 13   & 24194    & 0                     \\
   & 14   & 19249    & 0                     \\
   & 15   & 12980    & 0                     \\
   & 16   & 6019     & 0                     \\
   & 17   & 2242     & 0                     \\
   & 18   & 368      & 0                     \\
\hline
19 & 8    & 2        & 0                     \\
   & 9    & 25       & 0                     \\
   & 10   & 22159    & 19884                 \\
   & 11   & 26204    & 0                     \\
   & 12   & 64701    & 0                     \\
   & 13   & 53492    & 0                     \\
   & 14   & 63220    & 0                     \\
   & 15   & 43183    & 0                     \\
   & 16   & 27389    & 0                     \\
   & 17   & 12603    & 0                     \\
   & 18   & 4259     & 0                     \\
   & 19   & 718      & 0                     \\
\hline
20 & 8    & 5        & 0                     \\
   & 9    & 43       & 0                     \\
   & 10   & 8641     & 7055                  \\
   & 11   & 81498    & 0                     \\
   & 12   & 79080    & 0                     \\
   & 13   & 165082   & 0                     \\
   & 14   & 153019   & 0                     \\
   & 15   & 139556   & 0                     \\
   & 16   & 102182   & 0                     \\
   & 17   & 58113    & 0                     \\
   & 18   & 26098    & 0                     \\
   & 19   & 8405     & 0                     \\
   & 20   & 1343     & 0                    \\
\hline
\end{tabular}
\caption{Ranks of average mixing matrices of trees on $15$ to $20$ vertices. \label{tab:trees15-20}}
\end{table}

\section{Open problems}

In Section \ref{sec:lowerbd}, we give a constant lower on the rank of the average mixing matrix of trees with simple eigenvalues on at least $4$ vertices. Table \ref{tab:minrks} shows the minimum ranks among the average mixing matrices of trees of $n$ vertices.

\begin{table}[H]
\centering
\renewcommand\arraystretch{1.1}
\renewcommand\tabcolsep{4pt}
\begin{tabular}{|c|lllllllllllllllllll|}
\hline
$n$        & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 \\
\hline
min rank & 1 & 2 & 2 & 3 & 3 & 4 & 4 & 5 & 4  & 5  & 5  & 6  & 6  & 7  & 7  & 8  & 7  & 8  & 8 \\
\hline
\end{tabular}
\caption{The minimum ranks of the average mixing matrices of trees on $n$ vertices, for $n = 2, \ldots, 20$.  \label{tab:minrks}}
\end{table}

We are motivated by the computational data to ask the following question:

\begin{question} Does there exist a non-constant, increasing function $f(n)$ such that
\[\rk(\mxm(T)) \geq f(n) \]
for any tree $T$ on $n$ vertices?
\end{question}

Combinatorics (math.CO); Quantum Physics (quant-ph)

Average mixing matrix of trees


Another Enumeration of Caterpillar Trees

Abstract: A caterpillar tree is a connected, acyclic, graph in which all vertices are either a member of a central path, or joined to that central path by a single edge. In other words, caterpillar trees are the class of trees which become path graphs after removing all leaves. In 1973, F. Harary and A.J. Schwenk provided two proofs found in [1] which show that the number of non-isomorphic caterpillars with N vertices is given by the formula $2^{N-4} + \ 2^{ \lfloor \frac{N - 4}{2}\rfloor}$, where $\lfloor \ \rfloor$ denotes the floor function. The first proof follows from a special case of an application of Pólya's Enumeration theorem on graphs with integer-weighted vertices. The second proof proceeds through an appropriate edge labelling of the caterpillars. The proof presented here owes much of its insight to the first two, but has the benefit of utilizing a natural labelling for the caterpillars. We will proceed by labelling the vertices of the caterpillars with integer-weights, followed by an application of the orbit-counting theorem.

\section*{}
\underline{\textbf{Abstract:}} A caterpillar tree is a connected, acyclic, graph in which all vertices are either a member of a central path, or joined to that central path by a single edge. In other words, caterpillar trees are the class of trees which become path graphs after removing all leaves. In 1973, F. Harary and A.J. Schwenk provided two proofs found in [1] which show that the number of non-isomorphic caterpillars with N vertices is given by the formula $2^{N-4} + \ 2^{ \lfloor \frac{N - 4}{2}\rfloor}$, where $\lfloor \  \rfloor$ denotes the floor function. The first proof follows from a special case of an application of P\'{o}lya's Enumeration theorem on graphs with integer-weighted vertices. The second proof proceeds through an appropriate edge labelling of the caterpillars. The proof presented here owes much of its insight to the first two, but has the benefit of utilizing a natural labelling for the caterpillars. We will proceed by labelling the vertices of the caterpillars with integer-weights, followed by an application of the orbit-counting theorem.

\section*{Weighted Path Graphs and Spines}

One advantage of the class of caterpillar trees is their succinct representation as a weighted path graph. A weighted path graph can be obtained from a caterpillar by first assigning an integer label to each vertex in its 'central path' representing the number of leaves adjacent to it. Then, all of the leaves can be removed from the graph, with the exception of two designated endpoints which are labeled with zeros and treated as members of the central path. This process is depicted in figure 1.

\begin{figure}[H]
\centering
\includegraphics[scale=0.6]{fig1.png}
\caption{Caterpillar labeled as a weighted graph}
\end{figure}

At first glance, it may seem quite unnatural to include the two zeros in our labeling. However, the necessity of these zeros will become clear after some additional considerations. We begin with a definition.\bigbreak
\underline{\textbf{\textit{Definition:}}} \textit{Let $T \ \text{=} \ \{V, E\}$ be a labelled caterpillar tree with vertex set\newline $V \ \text{=} \ \{v_1,...,v_n\}$ and edge set $E \ \text{=} \ \{e_1,...,e_m\}.$ A \textbf{derived path}, $D \ \text{=} \ \{V',E'\}$, of the caterpillar $T$ is a subtree, such that $E'$ is a path in $T$, and for each path $P \subset E$, we have $|P| \leq |E'|.$}\bigbreak

Quite simply, a derived path is a maximal path in $T$, and different derived paths are simply different designations of endpoints. However, as mentioned, when we consider the weighted representation of the tree, the vertices which we choose to designate as endpoints are always assigned the label $0.$ Moreover, since the derived paths may differ only by endpoints, the remaining integer labels assigned to non-endpoints will be the same in any derived path for a given caterpillar tree. With this in mind, we define the \textbf{\textit{spine}} of a caterpillar as follows:\bigbreak

\underline{\textbf{\textit{Definition:}}} \textit{Let $T \ \text{=} \ \{V,E\}$ be the caterpillar defined above, and let $D$ be a derived path of $T$ with vertex set $V' \subset V$ and edge set $E' \subset E$. For simplicity, we will assume that $V' \ \text{=} \ \{v_1,v_2,...v_k\},$ where $v_1$ and $v_k$ are the two endpoints. We will also assume that $D$ has been drawn in a horizontal line with $v_1$ on the far left, $v_k$ on the far right, and the remaining vertices labeled from left to right. Let $N(v_i)$ denote the neighborhood of the vertex $v_i.$ Then, the \textbf{left-right oriented spine} of the caterpillar $T$ is a vector $\overline{s} \ \text{=} \ (s_2,s_3,...,s_{k-1})$ of dimension $k-2$ such that the component $s_i \ \text{=}  \ |N(v_i) - V'|.$ In other words, $s_i$  represents the number of vertices adjacent to vertex $v_i$ which are not themselves members of the derived path.}\bigbreak

For example, the caterpillar from figure 1 obtains the spine $(2,1,3).$ This procedure allows us to obtain a left-right oriented spine from a given caterpillar tree. In the other direction, we can obtain a weighted tree from a given spine $\overline{s} \ \text{=} \ (s_1,...,s_k)$ by drawing a path graph of length $k,$ and labeling the vertices from left to right with the corresponding entries in the spine. We then add an additional vertex onto both ends of the path and label these two new vertices with a $0$. This weighted tree now corresponds to some caterpillar tree, $C$, which may be obtained by attaching the labeled number of flags at each vertex. We will refer to this reverse process by saying that the left-right oriented caterpillar $C$ is \textbf{\textit{induced}} by the left-right oriented spine $\overline{s}.$ In all subsequent discussion we will agree to always use left-right oriented spines to draw left-right oriented caterpillars so that we may refer to \textit{the} caterpillar and \textit{the} spine without ambiguity.

As mentioned above, one may be tempted to define the spine by removing \textit{all} leaves from a particular caterpillar instead of using any zeros or considering derived paths. For example, this 'naive scheme' would assign the caterpillar $C_1$ from figure 1 the spine $\overline{s_1} \ \text{=} \ (3,1,4).$ However, the naive scheme would allow spine vectors which have the same length to induce caterpillars which have different maximal path lengths. Consider for example the caterpillar $C_2$ induced by the spine $\overline{s_2} \ \text{=} \ (0,4,4).$ Although $\overline{s_1}$ and $\overline{s_2}$ are the same length as vectors, the caterpillars $C_1$ and $C_2$ induced under this naive scheme would have maximal path lengths of 5 and 4 respectively. Our definition for the spine does not allow for such confusion. By considering the endpoints separately from the spine, we ensure that all spines of length $k$ induce caterpillars which have maximal path length $k+2.$ We will now proceed with another definition.\bigbreak

\underline{\textbf{\textit{Definition:}}} \textit{The \textbf{spine class}, which we denote $\mathcal{S}_{N_k}$, is the set of spines of length $k$ which induce caterpillar trees with $N$ vertices (and maximal path length $k+2$). That is,} $$\mathcal{S}_{N_k} \ \text{=} \ \bigg\{(s_1,...,s_k) \ \Big| \ \bigg(\sum_{i = 1}^{k} s_i \bigg) \ \text{=} \ N - k  - 2 \bigg\}.$$\bigbreak

Before proceeding, we make one last remark about the relationship between spines and caterpillars. Given a caterpillar tree, we can assign a unique spine to it by following the procedure outlined in the definition of a spine. However, given two spines, $\overline{s_1}, \overline{s_2}$ such that $\overline{s_1} \not = \overline{s_2}$, the respective induced caterpillars, $C_1, C_2,$ are not necessarily distinct. For example, let $\overline{s_1} \ \text{=} \ (1,1,2)$, $\overline{s_2} \ \text{=} \ (2,1,1)$. The spines and the corresponding caterpillars are depicted in figure 2.

\begin{figure}[H]
\centering
\includegraphics[scale=0.20]{fig2.png}
\caption{Two distinct spines which induce isomorphic caterpillar trees}
\end{figure}

Although the two spines from figure 2 are distinct as vectors, the two induced caterpillars are clearly isomorphic and are related by reflection over a vertical line centered on the middle vertex. Obviously this is only an artifact of our choice of left-right orientation for the spine vectors and graph drawings. We can frame this observation more clearly in the language of group theory. Let $\mathcal{S}_{N_k}$ denote the spine class as defined above, and let $\mathbb{Z}_2$ denote the cyclic group of order two. Then, we may define a group action of $\mathbb{Z}_2$ on $\mathcal{S}_{N_k}$ in a natural way. Let $\overline{s} \ \text{=} \ (s_1,s_2,...,s_{k-1},s_k) \in \mathcal{S}_{N_k} $ and let $\alpha$ denote the non-identity element of $\mathbb{Z}_2$. Then, we define the action $\alpha * \overline{s} \ \text{=} \ \overline{s'}$ by $s'_i \ \text{=} \ s_{k-i+1}$, for $1 \leq i \leq k.$ It is clear that two caterpillars $C_1, C_2$, with respective spines $\overline{s_1}, \overline{s_2}$ are isomorphic if and only if $s_1 \ \text{=} \ g * \overline{s_2},$ for some $g \in \mathbb{Z}_2.$ Therefore, in order to count the number of caterpillars with $N$ vertices, and spine length $k$, we can instead count the orbits of the spine class $\mathcal{S}_{N_k}$ under the action of $\mathbb{Z}_2$. To this end, we record here the well known orbit-counting theorem. A proof can be found in [2, p. 196-199].\bigbreak

\underline{\textbf{\textit{Theorem:}}} \textit{Let $X$ be any set and let $G$ be a finite group that acts on $X$. We will denote the set of orbits under this action by $X/G$, and the invariant set of an element of a group by $\big(X\big)^g.$ That is, for some element $g \in G,$ we define $\big(X\big)^g \ \text{=} \ \{x \in X \ | \ g*x \text{=} \ x\}.$ The orbit-counting theorem states the following:}
$$|X/G| \ \text{=} \ \frac{1}{|G|} \sum_{g \in G} |\big(X\big)^g|$$\bigbreak

\section*{Three Bijections}

We have described how a particular set of vectors corresponds to of a particular class of trees. Our new question becomes, "how many distinct $k$ dimensional vectors have the property that the sum of the $k$ components is equal to a fixed constant?". Thankfully, this revised question has been well investigated. In fact, if we restrict ourselves to the case of vectors with strictly positive entries, then the number of distinct vectors is given by the famed Stirling numbers of the second kind. One can prove this theorem, as well as a number of others, through a wonderful style of argument known as 'Stars and Bars Combinatorics'. We record one theorem which will be of use to us here. A proof can be found in [3, p. 12-13].\bigbreak

\underline{\textbf{\textit{Theorem:}}} \textit{For any pair of positive integers n and k, the number of k-tuples of non-negative integers whose sum is n is equal to the binomial coefficient ${n + k - 1}\choose{k - 1} $}

By substituting $n \ \text{=} \ N - k - 2$, we obtain an equation for the order of a given spine class:
\begin{align}
|\mathcal{S}_{N_k}| \ \text{=} \  \binom{N - 3}{k - 1}
\end{align}

Obviously the order of a given spine class also gives the order of the invariant set for the identity element, $\big(\mathcal{S}_{N_k}\big)^e$. In order to make use of the orbit-counting theorem, what remains is to count the invariant set of the non-identity element, $\big(\mathcal{S}_{N_k}\big)^\alpha$. In other words, we must count the number of caterpillars which are their own reflection. Harary and Schwenk refer to members of this invariant set as the \textit{symmetric caterpillars} [1], and made the critical observation required to count them. Namely, any symmetric caterpillar can be constructed from two copies of some smaller caterpillar. There are four cases we must consider which correspond to the four possible combinations of parity for $N$ and $k$. As we will see shortly, there is a correspondence between three of the four cases, and the final case is impossible. We will begin with an illustration of the correspondence.

\begin{figure}[H]
\centering
\includegraphics[scale=0.175]{fig3.png}
\caption{Spine class bijections for three sets of symmetric caterpillars.}
\end{figure}

As figure 3 suggests, there is a bijective correspondence between the three sets of symmetric caterpillars with a certain class of 'half-spines'. Starting from the top of figure three, we see that the first two caterpillars are related by taking a copy of the 'half-spine', reflecting it, and then gluing the two copies together. The second and third graphs are related by expanding or contracting the center edge. The third and fourth graphs are related by the addition or deletion of a single flag from the center vertex.

While a careful examination of figure 3 is likely the best way to understand the trick at the core of our main proof, we can also construct the bijections $f,g,$ and $h$ more explicitly. In the following proofs $N$ and $k$ will always denote an even number. When there is a need to reference an odd $N$ or odd $k$ we will do so by using $N \pm 1$ and $k \pm 1$ as necessary.

Let $\overline{x} \ \text{=} \ (x_1,...,x_{k}),$ and $\overline{y} \ \text{=} \ (y_1,...,y_k)$ be two spine vectors in $\big(\mathcal{S}_{N_k}\big)^\alpha$. Define the function $f:\big(\mathcal{S}_{N_k}\big)^\alpha \rightarrow \mathcal{S}_{(\frac{N}{2} + 1)_{\frac{k}{2}}}$ by $f(\overline{x}) \ \text{=} \ (x_1, ... , x_{\frac{k}{2}}).$  The claim is that $f$ is the required bijection.\bigbreak

\underline{\textbf{\textit{Proof:}}}  To see that $f$ is one-to-one, suppose that $f(\overline{x}) \ \text{=} \ f(\overline{y}).$ Then, for $i \leq \frac{k}{2},$ we have $x_i \ \text{=} \ y_i.$ However, by the definition of $\big(\mathcal{S}_{N_k}\big)^\alpha,$ we also have that $x_i \ \text{=} \ x_{k-i+1},$ and $y_i  \ \text{=} \ y_{k-i+1},$ which implies that $x_i  \ \text{=} \ y_i$ for $\frac{k}{2} \leq i \leq k$ as well. Hence, we see that $x_i  \ \text{=} \ y_i$ for all $1 \leq i \leq k$ so that $\overline{x} \ \text{=} \ \overline{y}.$ Next we will show that $f$ is onto. Suppose $\overline{z} \ \text{=} \ (z_1, z_2, ...,z_{\frac{k}{2}}) \in \mathcal{S}_{(\frac{N}{2} + 1)_{\frac{k}{2}}}.$ We must produce a vector $\overline{x} \in \big(\mathcal{S}_{N_k}\big)^\alpha$ such that $f(\overline{x}) \ \text{=} \ \overline{z}.$ To this end, we define the candidate vector $\overline{x} \ \text{=} \ (z_1, z_2 ... ,z_{\frac{k}{2}},z_{\frac{k}{2}}, ... ,z_2 , z_1).$ First, we see that $x$ has length $k$ and that $\alpha * \overline{x} = \overline{x}$ by its construction. Next, we see that $$ \sum_{i = 1}^{k} x_i \ \text{=} \ 2\sum_{i = 1}^{\frac{k}{2}} z_i \ \text{=} \ 2\Bigg[ \bigg(\frac{N}{2} + 1\bigg) - \bigg(\frac{k}{2}\bigg) - 2 \Bigg] \ \text{=} \ N - k -2. $$ Therefore, we have ensured that $\overline{x} \in \big(\mathcal{S}_{N_k}\big)^\alpha,$ so that $\overline{x}$ serves as the sought after vector. Hence, $f$ is also onto, which completes the proof.

\hfill $\square.$\bigbreak

The proof of the next two cases is very similar. Let $\overline{x} \ \text{=} \ (x_1,...,x_{k}),$ and $\overline{y} \ \text{=} \ (y_1,...,y_k)$ be two spine vectors in $\big(\mathcal{S}_{N_k}\big)^\alpha$. Define the function $g:\big(\mathcal{S}_{N_k}\big)^\alpha \rightarrow \big(\mathcal{S}_{(N-1)_{k-1}}\big)^\alpha$ by
\begin{align*}
g(\overline{x}) \ &\text{=} \ g((x_1,x_2, ... ,x_{\frac{k}{2} - 1}, x_{\frac{k}{2}},x_{\frac{k}{2} + 1}, x_{\frac{k}{2} + 2}, ... , x_{k-1}, x_k))\\
\ &\text{=} \ (x_1,x_2,...,x_{\frac{k}{2} - 1}, x_{\frac{k}{2}} + x_{\frac{k}{2} + 1}, x_{\frac{k}{2} + 2} ..., x_{k-1}, x_{k})
\end{align*}
We wish to show that $g$ is a bijection.\bigbreak

\underline{\textbf{\textit{Proof:}}} First we show that $g$ is one-to-one. The proof is essentially the same as the proof given for $f$ above. Let $g(\overline{x}) \ \text{=} \ g(\overline{y}).$ Then, we can see immediately that $x_i = y_i,$ for $1 \leq i \leq \frac{k}{2} - 1,$ and $\frac{k}{2} + 2 \leq i \leq k.$ We can also see that $x_{\frac{k}{2}} + x_{\frac{k}{2} + 1} \ \text{=} \ y_{\frac{k}{2}} + y_{\frac{k}{2} + 1}
.$ However, since $\overline{x}$ and $\overline{y}$ are symmetric, $x_{\frac{k}{2}} \ \text{=} \ x_{\frac{k}{2} + 1}$ and $y_{\frac{k}{2}} \ \text{=} \ y_{\frac{k}{2} + 1}.$ Therefore, we may simplify to $2x_{\frac{k}{2}} \ \text{=} \ 2y_{\frac{k}{2}},$ which implies $x_{\frac{k}{2}} \ \text{=} \ x_{\frac{k}{2} + 1} \ \text{=} \ y_{\frac{k}{2} + 1} \ \text{=} \ y_{\frac{k}{2}}.$ Hence, $\overline{x} \ \text{=} \ \overline{y}$ so that $g$ is one-to-one. Next, we will show that $g$ is onto. To begin, we will show first that each $\overline{z} \in \big(\mathcal{S}_{(N-1)_{k-1}}\big)^\alpha$ can be written in the form $(z_1,z_2,...,z_{\frac{k}{2} - 1}, 2q, z_{\frac{k}{2} + 1} ..., z_{k-2}, z_{k-1}),$ for some value of $q.$ Suppose conversely that for some $\overline{z}$ we have $$\overline{z} \ \text{=} \ (z_1,z_2,...,z_{\frac{k}{2} - 1}, 2q + 1, z_{\frac{k}{2} + 1} ..., z_{k-2}, z_{k-1}).$$
Since $\overline{z}$ is symmetric, $z_{i} = z_{k-i-1}$. Taking the sum of the components, we see that $$\sum_{i = 1}^{k-1} z_i\ \text{=} \ (2q + 1) + 2\sum_{i = 1}^{\frac{k}{2} - 1}z_i, $$
which is odd. However, from the definition of the spine class $\mathcal{S}_{(N-1)_{k-1}},$ we also have: $$ \sum_{i = 1}^{k-1} z_i \ \text{=} (N-1) - (k-1) - 2, $$
which is even. This contradiction shows that each $\overline{z} \in \big(\mathcal{S}_{(N-1)_{k-1}}\big)^\alpha$ must have the form $(z_1,z_2,...,z_{\frac{k}{2} - 1}, 2q, z_{\frac{k}{2} + 1} ..., z_{k-2}, z_{k-1}),$ for some value of $q.$ To produce the vector $\overline{x} \in \big(\mathcal{S}_{N_k}\big)^\alpha$ such that $g(\overline{x}) \ \text{=} \ \overline{z},$ we simply set $$\overline{x} = (z_1,z_2,...,z_{\frac{k}{2} - 1},q,q,z_{\frac{k}{2} + 1},...,z_{k-2},z_{k-1}).$$ Since the vector $\overline{z}$ has length $k-1$ it is clear that The vector $\overline{x}$ has length $k$. Furthermore, we see that  $$\sum_{i = 1}^{k} x_i \ \text{=} \ \sum_{i = 1}^{k-1} z_i \ \text{=} \ c.$$ Since $\overline{y} \in \mathcal{S}_{(N-1)_{k-1}},$ we have that $c = (N-1) - (k-1) - 2$. We also have that $c = (N_x) - k - 2$ for some $N_x$ which corresponds to the spine class which $\overline{x}$ belongs to. Clearly this gives $N_x = N$ so that $\overline{x} \in \mathcal{S}_{N_{k}}.$ It is also easy to see that by construction, $\alpha * \overline{x} = \overline{x}$ so that $x \in \big(\mathcal{S}_{N_{k}}\big)^\alpha \ \text{and} \ g(\overline{x}) = \overline{y}.$ Therefore, we have shown that $g$ is also onto.

\hfill $\square.$\bigbreak

Finally, we note that the function $h:\big(\mathcal{S}_{(N-1)_{k-1}}\big)^\alpha \rightarrow \big(\mathcal{S}_{N_{k-1}}\big)^\alpha$ given by
$$h(x_i) \ \text{=} \
\begin{cases}
      x_{\frac{k}{2}} + 1, &  i \ \text{=} \ \frac{k}{2}\\
      x_i, &  \text{else} \\
   \end{cases}
$$
and the inverse function  $h^{-1}:\big(\mathcal{S}_{N_{k-1}}\big)^\alpha \rightarrow \big(\mathcal{S}_{(N-1)_{k-1}}\big)^\alpha $ given by
$$h^{-1}(z_i) \ \text{=} \
\begin{cases}
      z_{\frac{k}{2}} - 1, &  i \ \text{=} \ \frac{k}{2}\\
      z_i, &  \text{else} \\
   \end{cases}
$$
defines the final bijection. The proof is essentially the same as those for $f$ and $g$.\newpage

These three bijections yield the following result:
\begin{align}
    \Big|\big(\mathcal{S}_{N_k}\big)^\alpha \Big| \ \text{=} \ \Big|\big(\mathcal{S}_{N_{k-1}}\big)^\alpha \Big| \  \text{=} \ \Big|\big(\mathcal{S}_{{(N-1)}_{k-1}}\big)^\alpha \Big| \ \text{=} \ \Big|\mathcal{S}_{(\frac{N}{2} + 1)_{\frac{k}{2}}} \Big|
\end{align}
Combining (1) and (2) we obtain:
\begin{align}
    \Big|\big(\mathcal{S}_{N_k}\big)^\alpha \Big| \text{=} \Big|\big(\mathcal{S}_{N_{k-1}}\big)^\alpha \Big| \text{=} \Big|\big(\mathcal{S}_{{(N-1)}_{k-1}}\big)^\alpha \Big| \text{=} \Big|\mathcal{S}_{(\frac{N}{2} + 1)_{\frac{k}{2}}} \Big| \text{=} \binom{\frac{N}{2} - 2}{\frac{k}{2} - 1}
\end{align}
The formula (3) accounts for three of the four cases of possible parities for $N$ and $k$. The remaining case is for $N-1$, $k$ (i.e. odd number of vertices, even spine length). In this case, a simple argument shows that $\big(\mathcal{S}_{{(N-1)}_k}\big)^\alpha$ \ \text{=} \ $\emptyset$.\bigbreak

\underline{\textbf{\textit{Proof:}}} Suppose there were some $\overline{s} \ \text{=} \ (s_1,...,s_k) \in \big(\mathcal{S}_{{(N-1)}_k}\big)^\alpha$. By definition of the invariant set $\big(\mathcal{S}_{{(N-1)}_k}\big)^\alpha,$ we have $s_i \ \text{=} \ s_{k-i+1}$, for $1 \leq i \leq k.$ But then $$ \sum_{i = 1}^{k} s_i \ \text{=} \ 2\sum_{i = 1}^{k/2} s_i, $$ which is even. However, by definition, of the spine class $\mathcal{S}_{{(N-1)}_k}$, we also have $$ \sum_{i = 1}^{k} s_i \ \text{=} \ (N-1) - k - 2 $$ which is odd.

\hfill $\square.$\bigbreak

This contradiction shows that in the case of $N-1$, $k$, we must have

\begin{align}
\big(\mathcal{S}_{{(N-1)}_k}\big)^\alpha \ \text{=} \ \emptyset.
\end{align}\bigbreak

\section*{Proof of Main Theorem:}
With these observations in hand, the stage has been set and we are ready to prove our main theorem. Let $\mathcal{C}_N$ denote the set of caterpillars with $N$ vertices. In order to evaluate $|\mathcal{C}_N|,$ we will evaluate $|\mathcal{S}_{N_k} / \mathbb{Z}_2|$ for each legal spine length $k,$ and then take the summation over all such $k$. The definition of a caterpillar requires that the minimum spine length be 1, and the definition of the spine requires that the maximum spine length be $N-2$. Therefore, these will serve as the bounds for our summation. We will begin with the case where $N$ is even:

\begin{equation*}
\begin{split}
|\mathcal{C}_N| \ &\text{=} \  \sum_{i = 1}^{N-2} |\mathcal{S}_{N_i} / \mathbb{Z}_2| \\
\ &\text{=} \ \sum_{i = 1}^{N-2} \frac{1}{|\mathbb{Z}_2|} \Bigg( \big|\big(\mathcal{S}_{N_i}\big)^e\big| + \big|\big(\mathcal{S}_{N_i}\big)^\alpha\big| \Bigg) \\
\ &\text{=} \ \frac{1}{2} \Bigg( \sum_{i = 1}^{N-2} \big|\mathcal{S}_{N_i}\big| + \sum_{i = 1}^{N-2} \big|\big(\mathcal{S}_{N_i}\big)^\alpha\big| \Bigg)  \\
\ &\text{=} \ \frac{1}{2} \Bigg( \sum_{i = 1}^{N-2} \big|\mathcal{S}_{N_i}\big| + \sum_{i = 1,3,5,...}^{N-2} \big|\big(\mathcal{S}_{N_i}\big)^\alpha\big| + \sum_{i = 2,4,6,...}^{N-2} \big|\big(\mathcal{S}_{N_i}\big)^\alpha\big| \Bigg)  \\
\ &\text{=} \ \frac{1}{2} \Bigg( \sum_{i = 1}^{N-2} \big|\mathcal{S}_{N_i}\big| + 2\sum_{i = 2,4,6,...}^{N-2} \big|\big(\mathcal{S}_{N_i}\big)^\alpha\big| \Bigg)  \\
\ &\text{=} \ \frac{1}{2} \Bigg( \sum_{i = 1}^{N-2} \big|\mathcal{S}_{N_i}\big| + 2\sum_{i = 2,4,6,...}^{N-2} \bigg|\mathcal{S}_{(\frac{N}{2} + 1)_{\frac{i }{2}}}\bigg| \Bigg)  \\
\ &\text{=} \ \frac{1}{2} \Bigg( \sum_{i = 1}^{N-2} \big|\mathcal{S}_{N_i}\big| + 2\sum_{i = 1}^{\frac{N}{2} - 1} \bigg|\mathcal{S}_{(\frac{N}{2} + 1)_{i}}\bigg| \Bigg) \\
\ &\text{=} \ \frac{1}{2} \Bigg( \sum_{i = 1}^{N-2} \binom{N - 3}{i - 1} + 2\sum_{i = 1}^{\frac{N}{2} - 1} \binom{\frac{N}{2} - 2}{i - 1} \Bigg) \\
\ &\text{=} \ \frac{1}{2} \Bigg( \sum_{i = 0}^{N-3} \binom{N - 3}{i} + 2\sum_{i = 0}^{\frac{N}{2} - 2} \binom{\frac{N}{2} - 2}{i} \Bigg) \\
\ &\text{=} \ \frac{1}{2} \bigg( 2^{N-3} + 2*2^{\frac{N}{2} - 2} \bigg) \\
\ &\text{=} \ 2^{N-4} + 2^{\frac{N-4}{2}} \\
\end{split}
\end{equation*}

\hfill $\square.$\bigbreak

Here we have made use of the orbit-counting theorem from lines one-two, and made use of theorem (3) from lines four-five, five-six, and seven-eight. From lines nine-ten we made use of the well known formula for the sum of binomial coefficients.

We now turn our attention to the case where $N$ is odd. The order of the invariant sets $\big(\mathcal{S}_{N_i}\big)^e$ will be the same as before. By making use of our counting theorem (3), we can make a simple adjustment to the formula for the order of the invariant set $\big(\mathcal{S}_{N_i}\big)^\alpha.$\newpage
Suppose $N$ and $k$ are both odd. Then $N+1$ and $k+1$ are both even. By applying (3) we obtain:
\begin{align*}
    \Big|\big(\mathcal{S}_{{(N+1)}_{(k+1)}}\big)^\alpha \Big| \ \text{=}
    \Big|\big(\mathcal{S}_{{N}_{k}}\big)^\alpha \Big| \ \text{=} \ \Big|\mathcal{S}_{(\frac{N+1}{2} + 1)_{\frac{k+1}{2}}} \Big| \ \text{=} \ \binom{\frac{N+1}{2} - 2}{\frac{k+1}{2} - 1}.
\end{align*}
If $N$ is odd but $k$ is even, then by (4) we have $\Big|\big(\mathcal{S}_{{(N)}_{k}}\big)^\alpha \Big| \ \text{=} \ 0.$ Making these adjustments, we obtain the formula for case of odd $N$:

\begin{equation*}
\begin{split}
|\mathcal{C}_N| \ &\text{=} \  \sum_{i = 1}^{N-2} |\mathcal{S}_{N_i} / \mathbb{Z}_2| \\
\ &\text{=} \ \sum_{i = 1}^{N-2} \frac{1}{|\mathbb{Z}_2|} \Bigg( \big|\big(\mathcal{S}_{N_i}\big)^e\big| + \big|\big(\mathcal{S}_{N_i}\big)^\alpha\big| \Bigg) \\
\ &\text{=} \ \frac{1}{2} \Bigg( \sum_{i = 1}^{N-2} \big|\mathcal{S}_{N_i}\big| + \sum_{i = 1}^{N-2} \big|\big(\mathcal{S}_{N_i}\big)^\alpha\big| \Bigg)  \\
\ &\text{=} \ \frac{1}{2} \Bigg( \sum_{i = 1}^{N-2} \big|\mathcal{S}_{N_i}\big| + \sum_{i = 1,3,5,...}^{N-2} \big|\big(\mathcal{S}_{N_i}\big)^\alpha\big| + \sum_{i = 2,4,6,...}^{N-2} \big|\big(\mathcal{S}_{N_i}\big)^\alpha\big|  \Bigg)\\
\ &\text{=} \ \frac{1}{2} \Bigg( \sum_{i = 1}^{N-2} \big|\mathcal{S}_{N_i}\big| + \sum_{i = 1,3,5,...}^{(N+1)-2} \bigg|\mathcal{S}_{(\frac{N+1}{2} + 1)_{\frac{i + 1}{2}}}\bigg| + 0 \Bigg)  \\
\ &\text{=} \ \frac{1}{2} \Bigg( \sum_{i = 1}^{N-2} \binom{N - 3}{i - 1} + \sum_{i = 1,3,5,...}^{(N+1)-2} \binom{\frac{N+1}{2} - 2}{\frac{i + 1}{2} - 1} \Bigg) \\
\ &\text{=} \ \frac{1}{2} \Bigg( \sum_{i = 1}^{N-2} \binom{N - 3}{i - 1} + \sum_{i = 1}^{\frac{N+1}{2} - 1} \binom{\frac{N+1}{2} - 2}{i - 1} \Bigg) \\
\ &\text{=} \ \frac{1}{2} \Bigg( \sum_{i = 0}^{N-3} \binom{N - 3}{i} + \sum_{i = 0}^{\frac{N+1}{2} - 2} \binom{\frac{N+1}{2} - 2}{i} \Bigg) \\
\ &\text{=} \ \frac{1}{2} \bigg( 2^{N-3} + 2^{\frac{N+1}{2} - 2} \bigg) \\
\ &\text{=} \ 2^{N-4} + 2^{\frac{N-5}{2}} \\
\end{split}
\end{equation*}

\hfill $\square.$ \bigbreak

Here we applied our counting theorems (3) and (4) from lines four-five, and five-six. Finally, we can use the floor function, $\lfloor x \rfloor$, to combine these two results into a succinct formula which gives the number of non-isomorphic caterpillar trees for any prescribed number of vertices, $N$: $$|\mathcal{C}_N| \ \text{=} \  2^{N-4} + 2^{\big\lfloor\frac{(N-4)}{2}\big\rfloor}.$$ \newpage

\section*{}
\textbf{References:}\bigbreak
[1] Harary, F., \& Schwenk, A. J. (1973). The number of caterpillars. \textit{Discrete Mathematics}, 6(4), 359-365. doi:10.1016/0012-365x(73)90067-8\bigbreak
[2] Harris, J. M., Hirst, J. L., \& Mossinghoff, M. J. (2008). \textit{Combinatorics and graph theory}. New York: Springer.\bigbreak
[3] Ross, S. M. (2010). \textit{A first course in probability.} Boston: Pearson.

\end{document}


Abstract: The square of a connected graph $G$ is obtained from $G$ by adding an edge between every pair of vertices at distance $2$. In this paper we give some upper or lower bounds for the spectral radius of the square of connected graphs, trees and unicyclic graphs respectively.We also investigate the spectral radius of the square of unicyclic graphs with given girth or trees with fixed diameter.

\section{Introduction}
Throughout this paper we consider simple, undirected and connected graphs.
Let $G=(V(G),E(G))$ be a connected graph of order $n$ and let $A(G)$ be its adjacent matrix.
Since $A(G)$ is a symmetric and nonnegative matrix, the largest eigenvalue of $A(G)$ is exactly the spectral radius of $A(G)$, which is also called the {\it spectral radius} of $G$ and is denoted by $\rho(G)$.

The following are among of the classical results of the spectral radius of graphs, where $P_n,C_n,S_n,K_n$ are respectively the path, the cycle, the star and the complete graphs of order $n$, and $S_{n}^{*}$ is obtained from $S_{n}$ by joining two of its pendant vertices.

\begin{theorem}\label{original} {\em \cite{bru,cve2, cve3, hon, li,simc}}
 Let $G$ be a connected graph of order $n$.
 If $G\neq P_{n}$ and $G\neq K_{n}$, then
$$\rho(P_{n})<\rho(G)<\rho(K_{n}).$$
If $G$ is a tree,  $G\neq P_{n}$ and $G\neq S_{n}$, then
$$\rho(P_{n})<\rho(G)<\rho(S_{n}).$$
If $G$ is a unicyclic graph, $G\neq C_{n}$ and $G\neq S_{n}^{*}$, then
$$\rho(C_{n})<\rho(G)<\rho(S_{n}^{*}).$$
\end{theorem}

The $k$-th {\it power} of a  connected graph $G$, denoted by $G^{k}$, is obtained from $G$ by adding an edge between every pair of vertices within distance $k$.
It is easy to see that $G^{1}=G$ and $G^{d}=K_{n}$ if $d$ is the diameter of $G$.
In particular, the graph $G^2$ is called the {\it square} of $G$.
If $G$ is a path or a cycle, then $G^{k}$ can also be considered as a distance graph or circulant graph.
   The power of graphs has been found to be useful in practical applications.
   For example, coloring on the square of a graph may be used to assign frequencies to the participants of wireless communication networks so that no two participants interfere with each other at any of their common neighbors \cite{agn,miao}, and to find graph drawings with high angular resolution \cite{for}.
   If $G$ is connected, then $G^{3}$ necessarily contains a Hamiltonian cycle; and $G^{2}$ is always Hamiltonian when $G$ is $2$-vertex connected (see \cite{die}).

In 1973 Cvetkovi\'{c} characterized the spectrum of the total graph of a regular graph \cite{cve1}.
Recall that the total graph of a graph $G$ is exactly $S(G)^{2}$, where $S(G)$ is the subdivision of $G$.
 Except for the above work, few work appears on the spectra of the power of graphs.
 In this paper, we give some upper or lower bounds for the spectral radius of the square of connected graphs, trees and unicyclic graphs respectively.
We also investigate the spectral radius of the square of unicyclic graphs with given girth or trees with fixed diameter.

\section{Preliminaries}
Denote by $\mathcal{G}_n,\mathcal{T}_n,\mathcal{U}_n$ the classes of connected graphs, trees and unicyclic graphs of order $n$ respectively.
A graph $G$ is called {\it maximizing} (respectively, {\it minimizing}) in a class of graphs if the spectral radius of the square of such graph attains the maximum (respectively, minimum) among all graphs in the class.

Let $G$ be a graph and let $u,v\in V(G)$.
 Denote by $N_{G}(u)$ the set of neighbors of $u$ in $G$, and by $d_{G}(u)=|N_{G}(u)|$ the degree of $u$.
  The distance of $u$ and $v$ is denoted by $dist_{G}(u,v)$, and the diameter of $G$ is denoted and defined as $diam(G)=\max_{u,v}dist(u,v)$.

The graph $G$ is called {\it regular} if all vertices of $G$ have the same degree, and is called {\it nontrivial} if $G$ contains more than one vertex.

A path on $n$ vertices is denoted by $P_n=v_1v_2\ldots v_n$, which contains the vertices $v_1,v_2,\ldots,v_n$ and edges $v_{i}v_{i+1}$ for $i=1,2,\ldots,n-1$.
A cycle on $n$ vertices is denoted by $C_n=v_1v_2\ldots v_n$, which contains the vertices $v_1,v_2,\ldots,v_n$ and edges $v_{i}v_{i+1}$ for $i=1,2,\ldots,n$ under modulo $n$.
The notation $H\subseteq G$ or $G \supseteq H$ means that $H$ is a subgraph of $G$, and
$H\subsetneq G$ or $G \supsetneq H$ means that $H$ is a proper subgraph of $G$ (i.e. $E(G) \backslash E(H) \ne \emptyset$).

\begin{lemma}\label{degree}{\em \cite{bro}} Let $G$ be a graph with maximum degree $\Delta(G)$
and average degree $\alpha(G)$.  If $G$ is not regular, then $\alpha(G)< \rho(G)< \Delta(G)$.
\end{lemma}

\begin{lemma}\label{subgraph}{\em\cite{bro}} Let $G$ be a connected graph and $H$ be a subgraph of $G$.
 Then $\rho(H)\leq \rho(G)$, with equality if and only if $H=G$.
 \end{lemma}

Let $G_{1}$ and $G_{2}$ be two connected vertex-disjoint graphs, and $v_{1}\in G_{1}$, $v_{2}\in G_{2}$.
The {\it coalescence} of $G_{1}$ and $G_{2}$, denoted by $G_{1}(v_{1})\circ G_{2}(v_{2})$, is obtained from $G_{1}$ and $G_{2}$ by identifying $v_{1}$ with $v_{2}$ and forming a new vertex $u$.
The graph $G_{1}(v_{1})\circ G_{2}(v_{2})$ is also written as $G_{1}(u)\circ G_{2}(u)$.  If a connected graph $G$ can be expressed in the form $G=G_{1}(u)\circ G_{2}(u)$, where $G_{1}$ and $G_{2}$ are both nontrivial and connected, then $G_{1}$ and $G_{2}$ are called the {\it branches} of $G$ rooted at $u$.
If $v'_1$ is another vertex of $G_1$ rather than $v_1$, the graph $G_{1}(v'_{1})\circ G_{2}(v_{2})$ is said obtained from $G_{1}(v_{1})\circ G_{2}(v_{2})$ by {\it relocating} $G_2$ from $v_1$ to $v'_1$.

\begin{lemma}\label{coale}  Let $G$ be a nontrivial connected graph and $T$ be a nontrivial tree.
 Then $$\rho[(G(v)\circ T(u))^{2}]\leq \rho[(G(v)\circ S(u))^{2}],$$ where $S$ is a star centered at $u$  that has the same order as $T$.
   The equality holds if and only if $T$ is a star centered at $u$.
   \end{lemma}

\noindent{\bf Proof.} It can be directly checked that, if $T$ is not a star centered at $u$,
then $G(v)\circ T(u)\subsetneq G(v)\circ S(u)$. The result follows from Lemma \ref{subgraph}.
\hfill   $\blacksquare$

\begin{coro} \label{quasi}
Let $P_3=v_{1}v_{2}v_{3}$ and let $H$ be a nontrivial connected graph.
Let $G_{1}=P_{3}(v_{3})\circ H(u)$ and $G_{2}=P_{3}(v_{2})\circ H(u)$.
Then $\rho(G_{1}^{2})<\rho(G_{2}^{2})$.
\end{coro}

From the famous Perron-Frobenius theory, for a connected graph $G$ of order $n$, $\rho(G^{2})$ is simple and is corresponding to a positive eigenvector, which is called the {\it Perron vector} of $G^{2}$. Let $X$ be a Perron vector of $G^{2}$, and let $X_{v}$ denote the entry of $X$ corresponding to the vertex $v$ of $G$. We have
$$\rho(G^{2})X_{v}=\sum_{u,dist_{G}(u,v)\leq 2}X_{u}.\eqno(2.1)$$
Denote $\tilde{X_{v}}=X_{v}+\sum_{u\in N_{G}(v)}X_{u}$, we have the following useful lemma.

\begin{lemma}\label{pendant} Let $H_{1}$ and $H_{2}$ be two nontrivial connected graphs,  and let $u,v\in V(H_{1})$, $w\in V_{H_{2}}$.
Let $G_{1}=H_{1}(u)\circ H_{2}(w)$ and $G_{2}=H_{1}(v)\circ H_{2}(w)$.
Let $X$ be a Perron vector of $G_{1}^{2}$.
If $\tilde{X_{u}}\leq \tilde{X_{v}}$ and $X_{u}\leq X_{v}$, then $\rho(G_{1}^{2})<\rho(G_{2}^{2})$.
In particular, if  $H_{2}$ is a star, and $\tilde{X_{u}}\leq \tilde{X_{v}}$, then $\rho(G_{1}^{2})<\rho(G_{2}^{2})$.\end{lemma}

\noindent{\bf Proof.}  Suppose that $X$ is unit.
We have
\begin{align*}
    \frac{1}{2}X^{T}A(G_{2}^{2})X &=\sum_{rs\in E(G_{2}^{2})}X_{r}X_{s} \\
    &=\sum_{rs\in E(G_{1}^{2})}X_{r}X_{s}+\sum_{r\in N_{H_{2}(w)}}\sum_{s\in N_{H_{1}}(v)\cup \{v\}}X_{r}X_{s}
    +\sum_{r,dist_{H_{2}}(r,w)=2}X_{r}X_{v}\\
    &~~-\sum_{r\in N_{H_{2}}(w)}\sum_{s\in N_{H_{1}}(u)\cup \{u\}}X_{r}X_{s}-\sum_{r,dist_{H_{2}}(r,w)=2}X_{r}X_{u}\\
    &=\frac{1}{2}X^{T}A(G_{1}^{2})X+\sum_{r\in N_{H_{2}}(w)}X_{r}(\tilde{X_{v}}-\tilde{X_{u}})
      +\sum_{r,dist_{H_{2}}(r,w)=2}X_{r}(X_{v}-X_{u})\\
    &\geq \frac{1}{2}X^{T}A(G_{1}^{2})X.
\end{align*}
So $$\rho(G_{2}^{2})\ge X^{T}A(G_{2}^{2})X \ge X^{T}A(G_{1}^{2})X =\rho(G_{1}^{2}).$$

If $\rho(G_{1}^{2})=\rho(G_{2}^{2})$, then $X$ is also the Perron vector of $G_{2}^{2}$.
Furthermore, $\tilde{X_{v}}=\tilde{X_{u}}$, and $X_{v}=X_{u}$ if there exists a vertex $r$ such that $d_{H_{2}}(r,w)=2$.
However, by considering the eigenvector equation (2.1) for $G_1^2$ and $G_2^2$ both on the vertex $u$,
we get that $u$ is adjacent to $v$, and $H_2$ is a star centered at $w$.
As $\tilde{X_{v}}=\tilde{X_{u}}$, there must exist a vertex $t$ of $H_1$ other than $u$ and $v$, such that $t$ is adjacent to $v$ but not adjacent to $u$.
Note that $N_{G_2}(t) \backslash N_{G_1}(t)=V(H_2)\backslash \{w\}$.
So, if considering the  equations (2.1) for $G_1^2$ and $G_2^2$ both on the vertex $t$, we also get a contradiction.

The second result is easily obtained by the above discussion. \hfill   $\blacksquare$

\begin{coro} \label{rotate}
Let $T$ be a tree obtained from $P_4=v_1v_2v_3v_4$ by appending a pendant edge $uv_3$ at $v_3$, let $H$ be a connected graph containing a vertex $w$.
Let $G_1=T(v_4) \circ H(w)$ and let $G_2$ be obtained from $G_1$ by relocating the edge $uv_3$ to $uv_1$.
Then $\rho(G_2^2) < \rho(G_1^2)$.
\end{coro}

\noindent{\bf Proof.}
Let $X$ be a Perron vector $G_2^2$.
If $\tilde{X}_{v_1}\leq \tilde{X}_{v_3}$, then $\rho(G_2^2)<\rho(G_1^2)$ by Lemma \ref{pendant}.
Otherwise, $\tilde{X}_{v_1}> \tilde{X}_{v_3}$, i.e. $X_{u}+X_{v_{1}}+X_{v_{2}} > X_{v_{2}}+X_{v_{3}}+X_{v_{4}}$.
If $X_{v_1} < X_{v_3}$, then $X_u > X_{v_4}$.
However, by the assumption $X_{v_1} < X_{v_3}$ and the eigenvector equation (2.1) on $u$ and $v_4$, we get $X_u < X_{v_4}$, a contradiction.
So, $X_{v_1} \ge X_{v_3}$.

Observe that $G_2=P(v_3) \circ (H+v_3v_4)(v_3)$, where $P=uv_1v_2v_3$ and $H+v_3v_4$ is obtained from $H$ by appending a pendant edge $v_3v_4$.
Now relocating the branch $G+v_3v_4$ from $v_3$ to $v_1$, the resulting graph $\bar{G}_1$ is isomorphic to $G_1$.
By Lemma \ref{pendant}, we have $\rho(G_2^2)<\rho(\bar{G}_1^2)=\rho(G_1^2)$.
\hfill   $\blacksquare$

\section{The spectral radius of the square of graphs or trees}
In this section we will determine the maximizing or minimizing graphs in $\mathcal{G}_n$ or $\mathcal{T}_n$.
It is easily seen that $G^2$ is a complete graph if and only if $diam(G) \le 2$.
So, by Lemma \ref{subgraph} we have the following result.

\begin{theorem}\label{graph-large}
Let $G$ be a connected graph of order $n$.
Then $\rho(G^{2})\leq n-1$, with equality holds if and only if $diam(G) \le 2$, or equivalently $G^2=K_n$.
\end{theorem}

We now wish to find the minimizing graph in $\mathcal{G}_n$. By Lemma \ref{subgraph}, such graph can be found within $\mathcal{T}_n$.
Let $T_{i}$ be the graphs listed in Fig. \ref{pic-tree}. By {\scshape \mdseries  Mathematica}, $\rho(T_{i}^{2})> 4$ for $i=1,2, \ldots,8$.
Note that $\rho(P_{n}^{2})< \Delta(P_{n}^{2})=4$.
So, if $T$ is a minimizing graph in $\mathcal{T}_n$, then $T$ cannot contain any graph in Fig. \ref{pic-tree} as a subgraph.
In other words, any graph in Fig. \ref{pic-tree} is {\it forbidden} in $T$.

\renewcommand\thefigure{\arabic{section}.\arabic{figure}}
\begin{figure}[h!]
  \centering
  \includegraphics[scale=0.6]{fig31.eps}\\
  \caption{\small Eight trees $T_i$ with $\rho(T_i^2)>4$ for $i=1,2,\ldots,8$}\label{pic-tree}
\end{figure}

\begin{lemma}\label{paths}
Let $P_{k}=v_{1}v_{2}\ldots v_{k}$ and $P_{n-k+1}=u_{1}u_{2}\ldots u_{n-k+1}$ be two disjoint paths.
Assume that $n\geq 2k-1$ and $T=P_{k}(v_{k})\circ P_{n-k+1}(u_{k})$.
Then $\rho(T^{2})\geq \rho(P_{n}^{2})$, with equality if and only if $n=2k-1$.
\end{lemma}

\noindent{\bf Proof.}
If $n=2k-1$, clearly the result follows as $T$ is exactly a path of order $n$.
Now suppose that $n >2k-1$.
 Let $P_{n}=w_{1}w_{2}\ldots w_{n}$, $P_{n}^{(1)}=w_{1}w_{2}\ldots w_{n-k+1}$ and $P_{n}^{(2)}=w_{n-k+1}w_{n-k+2}\ldots w_n$ be its two subpaths.
 One can observe that $\bar{T}:=P_{n}^{(2)}(w_{n-k+1}) \circ P_{n}^{(1)}(w_k)$ is isomorphic to $T$.
 Let $X$ be the Perron vector of $P_{n}^{2}$.
 Then by symmetry $\tilde{X}_{w_{k}}=\tilde{X}_{w_{n-k+1}}$ and $X_{w_{k}}=X_{w_{n-k+1}}$.
 So, by Lemma \ref{pendant}, $\rho(P_{n}^{2})< \rho(\bar{T}^{2})=\rho(T^{2})$.\hfill   $\blacksquare$

\begin{lemma}\label{v3} Let $T$ be a tree of order $n$ with diameter at least $4$, and
 let $P_{k}=v_{1}v_{2}\ldots v_{k}$ be a longest path in $T$.
  If $T$ is a minimizing graph in $\mathcal{T}_n$, then  $d_{T}(v_{2})=d_{T}(v_{3})=d_{T}(v_{k-1})=d_{T}(v_{k-2})=2$.
  \end{lemma}

\noindent{\bf Proof.} By Corollary \ref{quasi} we find that $d_{T}(v_{2})=d_{T}(v_{k-1})=2$.
First we assert that, if $d_{T}(v_{3})\geq 3$, then $d_T(u)=1$ for any $u\in N_{T}(v_{3})\backslash V(P_{k})$. (In fact, if $N_{T}(v_{3})\backslash V(P_{k}) \ne \emptyset$,
then it contains only one element as $S_5$ is forbidden in $T$.)
 Otherwise, if $k\geq 7$, then $T \supseteq T_{5}$, and hence $\rho(T^2) \ge \rho(T_5^{2})>4$, a contradiction, where $T_{5}$ is shown in Fig. \ref{pic-tree}.
 So, $k$ takes $5$ or $6$.
 As $T$ contains no $T_{1}$ in Fig. \ref{pic-tree} as a subgraph, $T=P_{3}(v_{3})\circ P_{n-2}(u_{3})$, where $P_3$ and $P_{n-2}$ are denoted as in Lemma \ref{paths},
 and $n$ takes  $7$ or $8$.
 By Lemma \ref{paths}, we get $\rho(T^{2})>\rho(P_{n}^{2})$, a contradiction.

Now suppose that $N_{T}(v_{3})\backslash V(P_{k})$ contains only one pendant vertex, say $u$.
Let $\bar{T}$ be obtained from $T$ by relocating the edge $uv_3$ to $uv_1$.
By Corollary \ref{rotate} we get $\rho(\bar{T}^2)< \rho(T^2)$, a contradiction.

By the above discussion, we have shown $d_{T}(v_{3})=2$. By symmetry we also have $d_{T}(v_{k-2})=2$.\hfill   $\blacksquare$

\begin{theorem}\label{tree-small}
Let $T$ be a tree of order $n\geq 4$.
Then $\rho(T^{2})\geq \rho(P_{n}^{2})$, with equality holds if and only if $T=P_{n}$.
\end{theorem}

\noindent{\bf Proof.} Let $T$ be a minimizing tree in $\mathcal{T}_n$.
We assert that $T=P_n$ and hence the result follows.
Let $P_{k}=v_{1}v_{2}\ldots v_{k}$ be a longest path in $T$.
The result holds if $k$ equals $3$ or $4$ by Corollary \ref{quasi}.
If $k \ge 5$, then $d_T(v_2)=d_{T}(v_{3})=d_{T}(v_{k-2})=d_{T}(v_{k-1})=2$ by Lemma \ref{v3}.
So the result holds for $k$ being $5$ or $6$.

Now suppose $k \ge 7$.
Assume to the contrary that $T \ne P_n$.
If $n \geq k+2$, then $T$ contains one of $T_{1},T_{2},T_{6},T_{7}$ in Fig. \ref{pic-tree} as a subgraph, which implies that $\rho(T^2)>4$, a contradiction.

If $n=k+1$, letting $u\in V(T)\backslash V(P_{k})$, we assert that if $uv_{4}\in E(T)$ or $uv_{v_{k-3}}\in E(T)$, then $\rho(T^{2})>\rho(P_{n}^{2})$.
Assume without loss of generality that $uv_{4}\in E(T)$.
Let $P_{n}=u_{1}u_{2}\ldots u_{n}$ be the path of order $n$ and let $X$ be the Perron vector of $P_{n}^{2}$.
Then $P_n=P_n^{(11)}(v_{n-1}) \circ P_n^{(12)}(v_{n-1})$, where $P_n^{(12)}=u_{n-1}u_n$; or
$P_n=P_n^{(21)}(u_{4}) \circ P_n^{(22)}(u_{4})$, where $P_n^{(21)}=u_1u_2u_3u_4$.
If $\tilde{X}_{u_{4}} \geq \tilde{X}_{u_{n-1}}$, noting that $T$ is obtained from $P_n$ by relocating $P_n^{(12)}$ from $u_{n-1}$ to $u_4$, hence by Lemma \ref{pendant} we have $\rho(P_{n}^{2})<\rho(T^{2})$.
Otherwise, $\tilde{X}_{u_{4}} < \tilde{X}_{u_{n-1}}=\tilde{X}_{u_2}$, and then $X_{u_4}+X_{u_5}<X_{u_1}+X_{u_2}$.
If $X_{u_4}>X_{u_2}$, then $X_{u_5}<X_{u_1}$.
However, by the assumption that $X_{u_4}>X_{u_2}$ and the eigenvector equation (2.1) on $u_1$ and $u_5$, we get $X_{u_5}>X_{u_1}$, a contradiction.
So $X_{u_4}\le X_{u_2}=X_{u_{n-1}}$.
Noting that $T$ is also obtained from $P_{n}$ by relocating $P_n^{(21)}$ from $u_4$ to $u_{n-1}$,
so by Lemma \ref{pendant} again we get $\rho(P_{n}^{2})<\rho(T^{2})$.

From the above discussion, it suffices to consider the case of $k \ge 9$.
If $k=9$, then $\rho(T^{2})>\rho(P_{10}^{2})$ by Lemma \ref{paths}.
If $k \ge 10$, then $T\supseteq T_{8}$ and $\rho(T^{2})>4$.
The result follows now.\hfill   $\blacksquare$

\begin{coro}\label{tree-large}
Let $T$ be a tree of order $n\ge 4$.
Then $$\rho(P_{n}^{2})\leq \rho(T^{2})\leq \rho(S_{n}^{2}),$$
 with the first equality if and only if $T=P_{n}$, and the second equality if and only if $T=S_{n}$.
 \end{coro}

\begin{coro}
Let $G$ be a connected graph of order $n\geq 4$.
Then $\rho(G^{2})\geq \rho(P_{n}^{2})$, with equality holds if and only if $G=P_{n}$.
\end{coro}

\noindent{\bf Proof.}
If $G$ itself is a tree, the result follows from Theorem \ref{tree-small}.
Otherwise, $G$ contains a spanning unicyclic subgraph $U$ which contains a cycle $C$.
Surely by Lemma \ref{subgraph}, $\rho(G^2) \ge \rho(U^2)$.
If $U=C$, noting $U$ contains at least $4$ vertices, we have $\rho((U-e)^2)<\rho(U^2)$ as $(U-e)^2$ is a proper subgraph of $U^2$, where $e$ is an arbitrary edge on the cycle.
Otherwise, let $uv$ be an edge appending on the cycle $C$ and let $uw=:e$ be an edge on $C$, where $u \in V(C)$.
Now the distance between $v,w$ is $2$ in $U$, but is greater than $2$ in $U-e$.
So, $(U-e)^2$ is still a proper subgraph of $U^2$, and hence $\rho((U-e)^2)<\rho(U^2)$.
By the above discussion, $$\rho(G^2) \ge \rho(U^2)>\rho((U-e)^2) \ge \rho(P_{n}^{2}).$$
\hfill   $\blacksquare$

\noindent{\bf Remark.} The result dose not hold for $n=3$ as $\rho(P_{3}^{2})=\rho(C_{3}^{2})=2$.

\section{The spectral radius of the square of unicyclic graphs}
In this section we determine the maximizing or minimizing graphs in $\mathcal{U}_n$.
The following result on maximizing graphs in $\mathcal{U}_n$ is easily seen, that is, the graphs $C_{3},C_{4},C_{5},S_{n}^{*}$ with diameter at most $2$.

\begin{theorem}\label{uni-large} Let $U$ be a unicyclic graph of order $n\geq 3$.
 Then $\rho(U^{2})\leq n-1$, with equality if and only if $diam(U) \le 2$.
 \end{theorem}

Now we characterize the minimizing graph in $\mathcal{U}_n$.

\begin{lemma}\label{uni-small-girth} Let $U$ be a unicyclic graph of order $n \ge 6$.
If $5\leq g(U)\leq n-1$, then $\rho(U^{2})> 4$.
\end{lemma}

\noindent{\bf Proof.}
By Lemma \ref{degree}, it suffices to prove that the average degree $\alpha(U^2)$ of $U^2$ is greater than $4$.
Denote $g:=g(U)$.
If $n=g+1$, then $\alpha(U^2) >4$ obviously by a direct calculation.
Assume that $\alpha(U^2) >4$ for all unicyclic graphs $U$ of order $n = g+k$, where $k \ge 1$.
Let $U$ be unicyclic graph of order $g+k+1$.
Then $U$ is obtained from a unicyclic graph, say $\bar{U}$ of order $g+k$ by appending a pendant edge $uw$, where $w$ is the vertex of degree one.
Note that $u$ has at least one neighbor $u'$ in $\bar{U}$.
So, $d_{U^2}(w)\ge 2$, $d_{U^2}(u)= d_{\bar{U}^2}(u)+1$ and $d_{U^2}(u')= d_{\bar{U}^2}(u')+1$.
By the assumption,
\begin{align*}
\sum_{v \in U}d_{U^2}(v) & =  \sum_{v \in U\backslash \{u,u'\}}d_{U^2}(v)+d_{U^2}(u)+d_{U^2}(u')+d_{U^2}(w) \\
&\ge \sum_{v \in U\backslash \{u,u'\}}d_{U^2}(v)+(d_{\bar{U}^2}(u)+1)+(d_{\bar{U}^2}(u')+1)+2\\
& \ge \sum_{v \in U\backslash \{u,u'\}}d_{\bar{U}^2}(v)+d_{\bar{U}^2}(u)+d_{\bar{U}^2}(u')+4\\
&= \sum_{v \in \bar{U}}d_{\bar{U}^2}(v)+4\\
& = (g+k)\alpha(\bar{U})+4\\
& > 4(g+k+1)
\end{align*}\hfill   $\blacksquare$

Note that $\rho(C_{n}^{2})=4$ when $n\geq 5$.
Let $U$ be  a unicycle graph of order $n$.
The above lemma shows that if $U$ is not a cycle and $g(U) \ge 5$, then  $U$ is not a minimizing graph.
Next we consider the unicycle graphs with girth less than $5$.
By a calculation using {\mdseries \sc Mathematica}, the graphs in Fig. \ref{pic-uni-small} are forbidden in a minimizing graph.

\setcounter{figure}{0}
\renewcommand\thefigure{\arabic{section}.\arabic{figure}}
\begin{figure}[h!]
  \centering
  \includegraphics[scale=0.6]{fig41.eps}\\
  \caption{\small Four unicyclic graphs $U_i$ with $\rho(U_i^2)>4$ for $i=1,2,3,4$}\label{pic-uni-small}
\end{figure}

\begin{lemma}\label{uni-small-tri}
Let $U$ be a minimizing graph in $\mathcal{U}_n\;(n \ge 5)$.
If $g(U)=3$ or $g(U)=4$, then $U=C_{3}(v)\circ T(v)$, where $T$ is a tree containing $v$ as a pendant vertex.
\end{lemma}

\noindent{\bf Proof.}
We first consider the case of $g(U)=3$.
Let $C_3=v_1v_2v_3$ be the cycle of $U$.
As $U_{1}$ of Fig. \ref{pic-uni-small} is forbidden, $C_3$ has at most two vertices of degree at least $3$;
If $C_3$ contains exactly two vertices, say $v_1,v_2$ of degree at least $3$, then one of them, say $v_1$ is only adjacent to pendant vertices as $U_2$ of  Fig. \ref{pic-uni-small} is forbidden.
Furthermore, by Corollay \ref{quasi}, the degree of $v_1$ is exactly $3$.
Let $u$ be the unique neighbor of $v_1$ outside $C_3$.
Now delete the edge $v_{2}v_{3}$ and adding a new edge $uv_{3}$, we will get a graph $U'$ which holds $U'^{2}\subsetneq U^{2}$.
So $\rho(U'^{2})<\rho(U^{2})$ by Lemma \ref{subgraph}, a contradiction to $U$ be minimizing.

By the above discussion, $C_3$ contains exactly one vertex, namely $v_2$ of degree at least $3$.
If $d_U(v_2)=3$, we are done.
Otherwise, $U$ contains $S_5^*$ as a proper subgraph or $U=S_5^*$.
The latter case cannot happen by Corollay \ref{quasi}.
For the former case, $\rho(U^2)>4$, also a contradiction.

Now come to the case of $g(U)=4$.
Let $C_4=v_1v_2c_3v_4$ be the cycle of $U$.
First suppose that $n \ge 6$.
As $U_{3}$ and $U_{4}$ of Fig. \ref{pic-uni-small} are forbidden, $C_4$ contains exactly one vertex, say $v_4$ of degree at least $3$.
In fact, $d_U(v_4)=3$; otherwise $U$ would contain a forbidden subgraph $S_5$.
So we can write $U$ as $U=C_{4}(v_4)\circ T(v_4)$, where $T$ is a tree containing $v_4$ as a pendant vertex.
If $n=5$, then $U$ is obtained from $C_4$ by a appending a pendant edge at some vertex say $v_4$.
Now construct a new unicyclic graph $\bar{U}$ from $U$ by deleting the edge $v_{3}v_4$ and adding a new edge $v_{3}v_{1}$.
Then $U^{2}\supsetneq \bar{U}^{2}$ and $\rho(U^{2})>\rho(\bar{U}^{2})$, a contradiction. \hfill   $\blacksquare$

\begin{theorem}\label{uni-small}
Let $U$ be a unicyclic graph of order $n \ge 4$.
Then $$\rho(U^{2})\geq \min\{\rho[(C_{3})(v)\circ P_{n-2}(v))^{2}],\rho(C_{n}^{2})\},$$
 with equality if and only if $U=C_{3}(v)\circ P_{n-2}(v)$ or $U=C_{n}$, where $v$ is a pendant vertex of $P_{n-2}$.
 \end{theorem}

\noindent{\bf Proof.}  Surely the result holds for $n=4$.
 Suppose $n \ge 5$ in the following.
 Assume that $U \ne C_n$ is a minimizing graph in $\mathcal{U}_n$.
By Lemma \ref{uni-small-girth} and Lemma \ref{uni-small-tri}, $U=C_{3}(v_1)\circ T(v_1)$, where $T$ is a tree containing $v_1$ as a pendant vertex, and $d_U(v_1)=3$.
Let $P_{k}=v_{1}v_{2}\ldots v_{k}$ be the longest path contained in $T$ which starts from $v_1$, where $k \ge 3$ as $n \ge 5$.
 We assert that $U=C_{3}(v_1)\circ P_{n-2}(v_1)$ by the following claims.

(1) $d_U(v) \le 3$ for any vertex $v \in V(T)$; otherwise $U$ would properly contain $S_5$.

(2) $d_U(v_{k-1}) =2$; otherwise, the neighbors of $v_{k-1}$ outside $P_k$ should be pendant vertices by the definition of $P_k$, and
then $U$ is not minimizing by Corollary \ref{quasi}.

(3) $d_U(v_{k-2})=2$ by Corollay \ref{rotate}.

(4) $d_U(v_2)=d_U(v_3)=2$; otherwise, by the fact that $d_U(v_{k-1}) =2$ we find that $U$ contains $T_1$ or $T_2$ of Fig. \ref{pic-tree}.

(5) $d_U(v_4)=d_U(v_5)=2$; otherwise, $U$ contains $T_3$ or $T_4$ of Fig. \ref{pic-tree}.

(6) for $6 \le i \le k-3$ (in this case $k \ge 9$), $d_U(v_i)=2$; otherwise $U$ would contain $T_7$  of Fig. \ref{pic-tree}.
\hfill   $\blacksquare$

{\bf Conjecture 1.} $$\rho[(C_{3}(v)\circ P_{n-2}(v))^{2}]<\rho(C_{n}^{2}).$$
Using {\mdseries \sc Mathematica}, we verified the conjecture is true for $5\leq n\leq 100$.
If the conjecture were true, we would find some difference between the minimum spectral radius of unicyclic graphs (see Theorem \ref{original}) and their square.

\section{The spectral radius of the square of unicyclic graph with fixed girth}

Denote by $\mathcal{U}_n(g)$ the class of unicyclic graphs of order $n$ with girth $g$, and by
$\mathcal{T}_n(d)$ the class of trees of order $n$ with diameter $d$.
We determines the unique maximizing graph  in $\mathcal{U}_n(g)$, and then pose a conjecture on the maximizing graph(s) in $\mathcal{T}_n(d)$.

\begin{theorem}\label{uni-large-girth}
Let $\tilde{U}=C_{g}(v)\circ S_{n-g+1}(v)$, where $v$ is the center of $S_{n-k+1}$.
 Then for any unicyclic graph $U \in \mathcal{U}_n(g)$ of order $n$ with girth $g$, $\rho(U^{2})\leq \rho(\tilde{U}^{2})$, with the equality if and only if $U=\tilde{U}$.
 \end{theorem}

\noindent{\bf Proof.} Let $C_{g}=v_{1}v_{2}\ldots v_{g}$.
 Then $U$ can be considered as one obtained from $C_g$ by attaching some trees $T_{i}$ at the vertices $v_{i}$'s respectively.
 By Lemma \ref{coale}, we have $\rho(U^{2})\leq \rho(\bar{U}^{2})$, where $\bar{U}$ is obtained from $U$ by replacing each $T_i$ by a star centered $v_i$ that has the same order of $T_i$. Furthermore, the equality holds if and only if each $T_i$ is a star centered at $v_i$.

Suppose that there exists at least two stars of $\bar{U}$, say $S_{(i)}$ and $S_{(j)}$ centered at $v_i$ and $v_j$ respectively.
Let $X$ be a Perron vector of $\bar{U}^{2}$.
Assume without loss of generality that $\tilde{X}_{v_{i}}\leq \tilde{X}_{v_{j}}$.
 then $\rho(\bar{U}^{2})<\rho(\bar{U}'^{2})$ by Lemma \ref{pendant}, where $\bar{U}'$ is obtained from $\bar{U}$ by relocating $S_{(i)}$ from $v_i$  to $v_j$.
 Repeating the above process until the resulting graph contains only one vertex with degree greater than $2$, we then get the
 result as desired. \hfill   $\blacksquare$

By a similar discussion as in the proof of Theorem \ref{uni-large-girth}, we narrow the scope the maximizing graph(s) in $\mathcal{T}_n(d)$.

\begin{theorem}
Let $P_{k+1}=v_{1}v_{2}\ldots v_{d+1}$, and let $\tilde{T}(i)=P_{k+1}(v_i)\circ S_{n-k}(u)$, where $2\le i \le d$, and $u$ is the center of $S_{n-k}$. If $T$ is a minimizing tree in $\mathcal{T}_n(d)$, then $T=\tilde{T}(i)$ for some $i$.
\end{theorem}

{\bf Conjecture 2.}
The maximizing tree in $\mathcal{T}_n(d)$ is $\tilde{T}(\lfloor d/ 2 \rfloor+1)$.

{\small