My Question is:
$Let A=\begin{pmatrix} 0&−1& 0& 1& 0& 0\\ −1& 1& 0 &−1& 0& 0 \\ 0&0 &0 &0& 1& 0\\ 0 &1 &−1& 0 &0 &0\\ 0& 0& −1& 0& −1& 1\\ 0 &0 &0 &−1 &1 &0 \\ \end{pmatrix}$
By using Matlab, find the smallest $p ∈ \mathbb{N}$ such that $A^p$ has no zero entries.
I know I can use trial and error to eventually get to my answer, but is their a script that could get to my answer easier. Any help will be appreciated.