Combinatorics – How Many Distinct Acyclic Paths Exist Through a Complete Graph of Size $n$?

combinatoricsgraph theory

Given $n$ points on a graph, I want to know how many distinct paths can be formed that:

(1) start at one point and end at a different point
(2) never revisit a point [are acyclic]

Also two paths that traverse the same path but in reverse order are considered the same path.

Is there a closed form formula for calculating this given just $n$?

I believe an equivalent way to state this problem is: "how many distinct acyclic paths through a complete graph of size $n$ are there?"

I've gotten some leads here but haven't been able to find an answer yet

Best Answer

You can just count them based on length. For now, we will ignore that the reverse of a path is the same path.

  • There are $n(n-1)$ paths of length 1 by picking the origin and terminus.
  • There are $n(n-1)(n-2)$ paths of length 2.

  • ...

  • There are $n!$ paths of length $n-1$.

So, remembering that we have double-counted, the total number of paths in $K_n$ is $$\frac12\sum_{k=0}^{n-2}\frac{n!}{k!}=\frac{n!}2\sum_{k=0}^{n-2}\frac1{k!}\approx\frac{en!}{2}$$ where the approximation should be pretty good for large $n$.

Related Question