1

How many trees are there on vertex set $[n]$ that contain a given edge $uv$?

If we glue the vertex $u$ and $v$ with an edge then there are $n-1$ vertices and using the Cayley's formula there are total $(n-1)^{(n-3)}$ trees with vertex set $[n-1]$ and a given edge $uv$.

Is this correct?

Shaun
  • 47,747

1 Answers1

2

A nice way to perform the count is to count trees with a distinguished edge. As there are $n^{n-2}$ trees and each has $n-1$ edges, there are $n^{n-2}\cdot(n-1)$ such trees. By symmetry, each of the $n\choose 2$ potential edges is distinguished the same number of times. Thus we arrive at $$ \frac{n^{n-2}\cdot(n-1)}{n\choose 2}=2n^{n-3}$$ trees where $uv$ happens to be the distinguished edge.