Let $p$ be a prime number, $n$ be a positive integer, and let ${\mathbb Z}\_p^{n\times n}$ denote the set of $n\times n$-matrices over ${\mathbb Z}/p{\mathbb Z}$.


Suppose we are given an integer $m>0$ and matrices ${\bf A}\_1,\ldots, {\bf A}\_m\in {\mathbb Z}\_p^{n\times n}.$ I am looking at the following problem: if there are positive integers $n\_1,\ldots n\_m$ such that $${\bf A}\_1^{n\_1}{\bf A}\_2^{n\_2}\cdots{\bf A}\_m^{n\_m} = {\bf 0},$$ output YES, otherwise output NO.


Is this problem decidable for all primes $p$, for all sizes of matrixes $n\times n$, and for all numbers of input matrices $m\in\mathbb{N}$?



Decidability of matrix problem in ${\mathbb Z}/p{\mathbb Z}$
Yes. If we conider the sequence $A\_i^n$, because it is a sequence inside a finite set, it must eventually repeat. After it repeats, the sequence won't take any new values, so we can assume $n\_i$ is less than this first repetition. This means that there are only finitely many possibilities, which of course reduces the problem to a finite calculation. 


