Say we have a star graph with one central vertex, with degree $n-1$, and the other $n-1$ remaining vertices are leaves in the star graph. How many paths of length 2 are there such that we do not count the cases where 2 edges are adjacent in the diagram?
I have figured out: For example, if $n=4$ , we have one central vertex and 3 outer vertices. We would have 0 correct cases because all edges in the star graph are adjacent.
if $n = 5$, we would have 2 cases, paths of length 2 between the diagonals since they have other edges between them.
Could anyone explain how to continue counting such instances? For self-study on graph theory.