In A Mathematical Theory of Communication (1948) Shannon gives a definition of ergodicity for a Markov process. In order to be ergodic the directed graph of the process must have the following characteristics:
1. Strongly connected
2. All cycle lengths are coprime.
I understand why the first condition is necessary. For the second, Shannon gives the example of a graph with two length three cycles, that always start with the same element, and I understand how this would have periodic structure and thus would violate ergodicity. However, I don't understand how we would necessarily have this periodic structure for any arbitrary set of non coprime cycles. Is there a proof that uses Shannon's definition/some illustration of this concept to help me understand this?
That the cycle lengths are not coprime means that there is an integer $p>1$ such that the length of every cycle in the graph is a multiple of $p$. This would imply that a path starting from a state $x$ has the possibility to return to $x$ only after a number of steps that is a multiple of $p$. More generally, you can partition the set of vertices into disjoint sets $A_0,A_1,\ldots,A_{p-1}$, where $A_i$ is the set of vertices reachable from $x$ in $kp+i$ steps. Then of course your Markov chain will have a periodic behaviour always going through the cycle $A_0\to A_1\to \cdots\to A_{p-1}\to A_0$.