I am trying to determine the period of each state $ j = 0, 1, 2$ for this irreducible Markov Chain with transition probability matrix $$P=\begin{bmatrix}0&0&1\\1&0&0\\\frac{1}{2}&\frac{1}{2}&0\end{bmatrix}$$
All states are of period $1$ because $0 \rightarrow 2 \rightarrow 0$ and $0 \rightarrow 2 \rightarrow 1 \rightarrow 0$ have $gcd(2,3) =1$
Is this correct and is the proof sound?
Comment: Here are some computations in R that I have sometimes found convenient for use with ergodic Markov Chains having small finite state spaces. [If the matrix $\mathbf{P}$ is based on empirical data, make sure each row of the transition matrix sums exactly to $0.]$
Establish ergodicity. $\mathbf{P}^8$ is a power of the transition matrix in the current Question that has all positive elements, so the chain is ergodic.
Compute limiting distribution. The stationary vector $\sigma$ with $\sigma\mathbf{P} = \sigma$ is also the limiting distribution of the ergodic chain. For an ergodic matrix, the left eigenvector with the largest modulus is real and is proportional to the steady state vector.
So $\sigma = (.4, .2, .4)$ is the limiting distribution.
Perhaps there is more-elegant R code for this. If so, suggestions are welcome.