I would like you to present to you a lame but working technique. You calculate $Q=A^n$, where $n$ is the size of the matrix. And then for every $i$-th zero row in $Q$, you set the $i$-th column in $A$ to zero.
I would like you to present to you a lame but working technique. You calculate $Q=A^n$, where $n$ is the size of the matrix. And then for every $i$-th zero row in $Q$, you set the $i$-th column in $A$ to zero.