Paths of length $k$ imply cycles

graph theory

Fix an integer $k\geq 2$. In an undirected graph, any vertex can reach any other vertex via a path of length $k$. For which $n$ must the graph contain a cycle of length $n$?

If we consider the complete graph of size $k+1$, any vertex can reach any other vertex via a path of length $k$ by going through all of the remaining vertices. This graph has cycles of length $3,4,\ldots, k+1$, so all $n\geq k+2$ are out. A cycle can probably be constructed by first looking at a path from $a$ to $b$ of length $k$, then considering a path from some middle vertex to $b$. The difficulty is that this second path may go through vertices of the first path, so we cannot tell the length of the cycle that arises.

Best Answer

Not a complete answer, but maybe of some help.

Take a "spiky $n$-cycle", by which I mean, an $n$-cycle with triangles adjoined at each edge. Here's a spiky $6$-cycle:

enter image description here

Each spiky $n$-cycle has the property for $k = n$ (it's much easier to see this for yourself, than for me to write out a proof, sorry), and has cycles of length $3$, $n$, $n + 1$, and others that are too big to worry about. We can construct these for $n \ge 3$, so for $k \ge 3$, our list of possible necessary cycle lengths is shortened to $3, k, k + 1$.