Find the number of spanning trees of a graph

discrete mathematicstrees

Let $n=2k+1$, where $k ∈ℕ$. Let there be two non-intersecting paths
$a_1,a_2,…,a_n$ and $b_1,b_2,…,b_n$. Let us also add edges
$a_1b_1$, $a_{k+1}b_{k+1}$ and $a_nb_n$. Find the number of different
spanning trees of such graph.

If we didn't add the edge $a_{k+1}b_{k+1}$, then the number of spanning trees would be simply $2n$. How do I find the number of spanning trees with that edge added? I'm not quite sure how to exclude the graphs that don't include all the vertices (i.e that are not spanning trees).

Best Answer

So we have to count all the ways to delete two edges such that remaining graph is connected. If we remove $a_{k + 1} b_{k + 1}$, then we can also remove any other edge. This gives us $2n$ spanning trees.

So now assume that we do not remove $a_{k + 1} b_{k + 1}$. Instead we have to remove two other edges. Notice that if we remove one edge to the left of $a_{k + 1}b_{k + 1}$ and one edge to the right, our graph will still be connected. Otherwise it will be disconnected. This gives us $n \cdot n$ spanning trees.

enter image description here

In total we have $2n + n^2$.

Related Question