A $2$-star is a tree with exactly two internal nodes. How many $2$-star in a complete graph are there?
In my opinion $${n\choose 2} \left(2^n-2\right),$$ my teacher said $${n\choose 2}2^{n-1}.$$
A $2$-star is a tree with exactly two internal nodes. How many $2$-star in a complete graph are there?
In my opinion $${n\choose 2} \left(2^n-2\right),$$ my teacher said $${n\choose 2}2^{n-1}.$$
I get neither of these but instead $$ \binom n2 (3^{n-2}-2^{n-1}+1) $$ First a factor of $\binom n2$ for how to choose the two internal nodes.
Once they are chosen, each of the $n-2$ remaining nodes can be neighbors of either one of the internal nodes, or the other, or of neither -- except that we need to exclude choices where one of the nodes have no neighbors at all (and so is not internal).
If you're asking how many of the 2-stars use all of the nodes in the complete graph, a similar analysis leads to $$ \binom n2 (2^{n-2}-2) $$ which again matches neither of the proposals.