Given a nilpotent matrix $A \in M_n(\mathbb K)$, is there a fast trick to find the degree of $A$?
Where the degree of $A$ is the smallest $k \in \mathbb N$ for which $A^k =0$
Thank you.
Given a nilpotent matrix $A \in M_n(\mathbb K)$, is there a fast trick to find the degree of $A$?
Where the degree of $A$ is the smallest $k \in \mathbb N$ for which $A^k =0$
Thank you.
The fastest computation I can think of, is just to compute $A,A^2,\ldots ,A^k$ with $1\le k\le n$., i.e., at most $n$ matrix multiplications. Of course, computing the Jordan form of $A$ also gives the nilpotency index, with the largest size of a Jordan block, but this seems to be more complicated in general.
The Dietrich's method has a complexity (when $n$ is a great number) $\sim (k-1)n^3$ that can be $\sim n^4$. I think that we can do the job with a complexity $\sim 2\log_2(k)n^3$ that can be $\sim 2\log_2(n)n^3$, as follows.
Let $k$ be the required degree. Calculate $A^2,A^4,\cdots,A^{2^p}$ and stop when you encounter the zero matrix. Then $2^{p-1}<k\leq 2^p$. In a second time, go down dividing by 2 the length of the intervals; you go left if your last result is $0$, otherwise you go right; and so on. Thus you calculate $k$ in binary format.
Example: let $k=23$. Then we consider successively $2,4,8,16,32,24,20,22,23$; the complexity of the procedure is $\sim 2\log_2(k)$.