\include{preamble}
\setcounter{try}{57}




\pagestyle{empty}
\begin{document}
\thispagestyle{empty}
\centerline{\bf Math 365 -- Monday 5/6/19 -- Trees (11.1 \& 11.4)}
\begin{try}
\begin{enumerate}[(a)]
\item Which of the following graphs are trees? Which are forests?
$$
\text{(i)} ~ \begin{matrix}\begin{tikzpicture}
\foreach \x in {1,2,3} { \node[bV] (t\x) at (\x,1){}; \node[bV] (b\x) at (\x,0){};}
\draw (t1) to (b1) to (t2) to (b2) to (t3) to (b3); 
\end{tikzpicture}\end{matrix}\qquad 
\text{(ii)} ~ \begin{matrix}\begin{tikzpicture}
\foreach \x in {1,2,3} { \node[bV] (t\x) at (\x,1){}; \node[bV] (b\x) at (\x,0){};}
\draw (t1) to (b1) to (t2)  (b2) to (t3) to (b3); 
\end{tikzpicture}\end{matrix}\qquad 
\text{(iii)} ~ \begin{matrix}\begin{tikzpicture}
\foreach \x in {1,2,3} { \node[bV] (t\x) at (\x,1){}; \node[bV] (b\x) at (\x,0){};}
\draw (t2) to (t1) to (b1) to (t2) to  (b2) to (t3) to (b3); 
\end{tikzpicture}\end{matrix}\qquad 
\text{(iv)} ~ \begin{matrix}\begin{tikzpicture}
\foreach \x in {1,2,3} { \node[bV] (t\x) at (\x,1){}; \node[bV] (b\x) at (\x,0){};}
\draw  (t1) to (b1) to (t2) to  (b2) to (t3) to (b3) to (t1); 
\end{tikzpicture}\end{matrix}\qquad 
\text{(v)} ~ \begin{matrix}\begin{tikzpicture}
\foreach \x in {1,2,3} { \node[bV] (t\x) at (\x,1){}; \node[bV] (b\x) at (\x,0){};}
\draw (b1) to (t2) to  (b2) to (t3) to (b3) (t1) to [bend right] (t3); 
\end{tikzpicture}\end{matrix}
$$
\item What is the smallest $n$ for which there is a tree on $n$ vertices that is not a path?  \smallskip
\item What is the largest number of leaves a tree on $n$ vertices can have, for $n \geq 3$?  \smallskip
\item\label{trees} How many isomorphism classes are there of trees on 4 vertices? Draw them. \smallskip
\item\label{trees}  How many isomorphism classes are there of forests on 4 vertices?  Draw them. \smallskip
\item How many isomorphism classes are there of trees on 5 vertices? Draw them. \smallskip
\item How many isomorphism classes are there of forests on 5 vertices?  Draw them. \smallskip
\item For which values of $n$ is $K_n$ a tree? For which values of $m,n$ is $K_{m,n}$ a tree?  \smallskip
\item If $T$ is a tree, what are $\kappa(T)$,   $\lambda(T)$, and $\omega(T)$? What can you say about $\alpha(T)$? \smallskip
\item  Which trees have Euler trails? Which trees have paths that visit every vertex (``Hamilton paths'')? \smallskip
\item What does the Handshake theorem tell you about the degrees sequence of a tree? \smallskip
\item Explain why every tree is 2-colorable (and therefore bipartite). {[Hint: describe a process for 2-coloring a tree.]} \smallskip
\item Your answer to \eqref{trees} should have been 2. Now calculate the number of 0, 1, 2, 3, and 4-colorings of a labeled representative of each tree to verify that the chromatic polynomial is the same across all trees on 4 vertices.  \smallskip
\item Explain why a graph is a tree if and only if it is connected and has $|V| - 1$ edges. \\
{\footnotesize [Hint: You already know one direction, the ``if $G$ is a tree, then\dots'' direction. Now suppose $G$ is not a tree. Then either it's not connected, or it has a cycle (say on $m$ vertices). If it has a cycle, there's an induced subgraph that is a cycle. Start from there, and build $G$ up one vertex at a time. What's the minimum number of edges you have to accumulate? ]}
\end{enumerate}
\end{try}




\begin{try}
\begin{enumerate}[(a)]
\item How many spanning trees does $C_n$ have for $n=3, 4, 5,$?  \smallskip
\item Use the recurrence relation $t(G) = t(G-e) + t(G/e)$ to count the number of spanning trees of 
$$\begin{matrix}\begin{tikzpicture}[scale=1.5]
\foreach \x in {1,2,3} {
\node[bV, label=above:{\small$v_\x$}] (a\x) at (\x,1){};
\node[bV, label=below:{\small$u_\x$}] (b\x) at (\x,0){};
}
\draw (a1) to (b3) to (a3) to (b1) to (a1) (b1) to (a2) (b2) to (a2) (b2) to (a3) ;
\end{tikzpicture}\end{matrix}$$
Remember to keep multiple edges!! \smallskip
\item How many spanning trees does $W_n$ have for $n=3, 4, 5,$?  \smallskip
\item How many spanning trees does $K_n$ have for $n=4, 5$?  \smallskip
\item Explain why a tree has exactly one spanning tree. \smallskip\smallskip
\item Is it true that every maximal path of $G$ is also a maximal path of some spanning tree? Do some examples, and explain why or why not. (Careful: Recall that ``maximal path'' and ``maximal length path'' mean different things.) 


\end{enumerate}
\end{try}



\begin{try}
\begin{enumerate}[(a)]
\item What is the Pr\"ufer code for the following labeled tree?
$$\begin{matrix}\begin{tikzpicture}
\node[bV, label=above:{1}] (1) at (0,2){};
\node[bV, label=above:{2}] (2) at (1,2){};
\node[bV, label=above:{3}] (3) at (0,1){};
\node[bV, label=above:{4}] (4) at (3,2){};
\node[bV, label=above:{5}] (5) at (2,2){};
\node[bV, label=right:{6}] (6) at (2,1){};
\node[bV, label=right:{7}] (7) at (1,1){};
\draw(1) to (2) to (5) to (4) (5) to (6) (2) to (7) to (3);
\end{tikzpicture}\end{matrix}$$
Check your answer by reversing the process and building the tree from the code. \smallskip
\item Draw the tree whose Pr\"ufer code is $2,2,5,3,6$. Check your answer by calculating the Pr\"ufer code that goes with your tree. \smallskip
\item Draw a labeled $K_3$ (labeled with $1,2,3$), and list all the spanning trees, and the corresponding Pr\"ufer code. Verify that there is a bijection between the labeled trees on $3$ vertices and the length-1 Pr\"ufer codes. \smallskip
\item How many spanning trees does $K_7$ have? \smallskip
\item How many labeled trees are there on 14 vertices? 
\item In class we computed that the codes for 
$$\begin{matrix}\begin{tikzpicture}[scale =.75]
	\node[bV, label=above:{\footnotesize1}] (1) at (0,2){};
	\node[bV, label=above:{\footnotesize2}] (2) at (1,2){};
	\node[bV, label=right:{\footnotesize3}] (3) at (0,1){};
	\node[bV, label=above:{\footnotesize4}] (4) at (3,2){};
	\node[bV, label=above:{\footnotesize5}] (5) at (2,2){};
	\node[bV, label={above, inner sep=2pt:{\footnotesize6}}] (6) at (3,1){};
	\node[bV, label={below left, inner sep=1pt:{\footnotesize7}}] (7) at (2,1.25){};
	\draw (3) to (1) to (2) to (5) to (4) (5) (2) to (7) to (6) ;
\end{tikzpicture}\end{matrix} \quad \text{ and } \quad 
\begin{matrix}\begin{tikzpicture}[scale =.5]
\node[bV] (0) at (0,0) {}; \node[left] at (0) {$1$}; 
\foreach \x in {1, 2, 3, 4, 5, 6}{\node[bV] (O\x) at (60*\x+30:2){};}
\foreach \x in {1, 2, 3}{\node[bV] (I\x) at (120*\x:1){}; \draw (0) to (I\x);}
\node[above left] at (I1) {$2$}; \node[below left] at (I2) {$3$}; \node[right] at (I3) {$4$}; 
\node[above] at (O1) {$5$};\node[left] at (O2) {$6$}; 
\node[below left] at (O3) {$7$};\node[below] at (O4) {$8$}; 
\node[right] at (O5) {$9$};\node[above] at (O6) {$10$}; 
\draw (O5) to (I3) to (O6) (I1) to (O1) (I1) to (O2) (I2) to (O3) (I2) to (O4); 
\end{tikzpicture}\end{matrix}$$
are $1, 2, 5, 2, 7$ and $2, 2, 1, 3, 3, 1, 4, 4$, respectively. Compare this to the degrees each of the (labeled) vertices in corresponding trees. Add to that data your computation from parts (a), (b), and (c), and collect all this into a table of the form:\\
\centerline{\begin{tabular}{c|ccc}
	P\"{u}fer code & $d_1$&$d_2$&$\cdots$\\\hline~&&&\\~&&&\\~&&&\\\end{tabular}}
(where $d_1$ is the degree of vertex $1$, $d_2$ is the degree of vertex $2$, and so on).  
Now make a hypothesis about a correspondence between some properties of the Pr\"{u}fer code and degrees of a labeled tree. Use your hypothesis to explain why the number of labeled trees where vertex $i$ has degree  $d_i$ is 
$$\frac{(n-2)!}{(d_1 - 1)! \cdots (d_n-1)!}$$
(think back to counting techniques of chapter 6!). More generally, what can you say about the correspondence between  Pr\"{u}fer codes and degree sequences?

\end{enumerate}


\end{try}
\end{document}

