Assume that matrix $A$ contains only 0 or 1 elements. Could anyone give me some condition, under which the matrices $A^i$ (for $i=1,2,3,...,k$) still contains only 0 or 1 elements.
For example, I know that if $A$ is an identity matrix, then it satisfies the above condition. Could you provide me some general conditions about $A$ ?
$A$ can be a permutation matrix, that is, a square matrix, each row or columns of contains exactly one $1$ and the rest $0$.
$\bf{Added:}$ One really should think about the associated oriented graph. The matrix $A^k$ has the $(i,j)$ element equal to the number of walks of length $k$ from $i$ to $j$ ( I say walk because it could go back and forth if that is possible). Now we can get more example of such graphs. For instance, an oriented segment graph works.