Counting cycles in an interval covering graph
= Counting cycles in an interval covering graph
If $A$ is the <adjacency matrix of a directed graph>[adjacency matrix] of a directed covering graph, then $\operatorname{tr}(A^n)$ counts its pointed closed walks of length $n$. For a <prime number> $p$, subtracting the $\operatorname{tr}(A)$ constant walks and identifying the $p$ cyclic choices of starting point gives
$$
\frac{\operatorname{tr}(A^p)-\operatorname{tr}(A)}p
$$
primitive closed itineraries of length $p$.