Fast Algorithm for Calculating the Minimal Annihilating Polynomials of Matrices via Pseudo Annihilating Polynomials
We propose a efficient method to calculate “the minimal annihilating polynomials” for all the unit vectors, of square matrix over the integers or the rational numbers. The minimal annihilating polynomials are useful for improvement of efficiency in wide variety of algorithms in exact linear algebra. We propose a efficient algorithm for calculating the minimal annihilating polynomials for all the unit vectors via pseudo annihilating polynomials with the key idea of binary splitting technique. Efficiency of the proposed algorithm is shown by arithmetic time complexity analysis.
keywords:The minimal polynomial, The minimal annililating polynomial, Exact calculation
Msc: 15A18, 65F15, 68W30
[corauthor]Corresponding author url]http://researchmap.jp/aterui
Linear algebra calculations over the integers and/or the rational numbers are important for various fields in mathematics, and a variety of software has been developed for the purpose ((1), (2), (3)).
We have proposed a series of algorithm based on residue calculus of resolvent of matrices for purposes such as calculating eigenvectors ((4), (5), (6), (7), (8)), (generalized) eigen decomposition ((9), (10), (11), (12), (13), (14), (15)), calculating matrix inverse ((16), (17)), spectral decomposition ((18), (9), (19), (20), (10), (21)), and so on. We have shown that computational costs can be reduced significantly by using “the minimal annihilating polynomials” in place of the minimal polynomial ((22), (23)). Especially, it is very effective for spectral decomposition whose computational cost is high even using state-of-the-art technique of residue calculus.
While a matrix becomes zero by putting it into the variable in its characteristic or the minimal polynomial, such property preserves only for a specific column for the “unit” minimal annihilating polynomial, or the minimal annihilating polynomial for a unit vector. Since we need polynomials which makes only specific column(s) of the matrix to zero in the algorithms proposed so far, and such polynomials are factors of the characteristic or the minimal polynomial, using the minimal annihilating polynomials makes the algorithm efficient.
For designing efficient algorithms that utilizes the unit minimal annihilating polynomials, it is important to develop efficient algorithm for calculating all the unit minimal annihilating polynomials: this is what we deal with in this paper. Generally, direct calculation of the unit minimal annihilating polynomials is often time-consuming. Thus, in the proposed algorithm, we first calculate pseudo annihilating polynomials which are factors of true annihilating polynomials with almost deterministic method, then certify if it is true unit minimal annihilating polynomial; if the verification is not satisfied, then we can efficiently revise it to obtain true one. Furthermore, proposed algorithm has another benefit that certain processes are independent with each other so that these processes can be executed in parallel, thus proposed algorithm fits into computing environments of multiple processors and/or cores to gain its efficiency.
The rest of the paper is organized as follows. In Section 2, we recall the (unit) minimal annihilating polynomial and give naive algorithm for calculating the one. In Section 3, we define pseudo annihilating polynomials which is factors of true minimal annihilating polynomials and give an algorithm for calculating the unit minimal annihilating polynomials via pseudo unit annihilating polynomials. In Section 4, we give efficient method in calculating pseudo unit annihilating polynomials using so-called binary splitting technique, then describe the main algorithm. Furthermore, we show that efficiency of the resulting algorithm is improved with the binary splitting technique by time complexity analysis of the algorithm.
2 The minimal annihilating polynomials
Let be a field of characteristic zero, be a matrix over and be a ring of univariate polynomials in over . Let the irreducible factorizations of the characteristic polynomial of over be
with for . Assume that we are already given the irreducible factorization of .
We recall the minimal annihilating polynomial as follows.
Definition 1 (The minimal annihilating polynomial).
Let and be the same as in the above, and be a column vector over of dimension . For an ideal defined as
we call the monic generator of the minimal annihilating polynomial of w.r.t. , denoted as . Furthermore, for where is the -th unit vector such that , we call the -th unit minimal annihilating polynomial, denoted as .
Let the factorization of the -th unit minimal annihilating polynomial be
For satisfying , let
Then, in the -th unit minimal annihilating polynomial in \crefeq:jthunitminannihpol, the exponent of the factor is identified as the minimum satisfying . With this property, a naive algorithm for calculating the unit minimal annihilating polynomial(s) is given as in Algorithm 1.
If we already know the minimal polynomial of along with its irreducible factorization as
then in \crefeq:gp are replaced with . (Efficient algorithms for calculating the minimal polynomial (e.g. (24)) have been proposed.)
In this paper, time complexity of algorithms is estimated with arithmetic operations in , assuming that the irreducible factorization of is given unless otherwise stated.
Note that the Horner’s rule can be used for evaluating a univariate polynomial by a matrix followed by multiplying a column vector from the right efficiently, as follows.
with , and be a column vector. Then, a vector is calculated in arithmetic operations in .
is calculated with the Horner’s rule with incorporating multiplication of from the right as
with repeating pairs of a matrix-vector multiplication and a vector addition, whose complexity is and , respectively, for times, whose const is bounded by in total. ∎
Let be the same as in \crefeq:f, and be a row vector. Then, a vector is calculated in arithmetic operations in .
Calculation in \crefeq:fav is rearranged as
thus the amount of arithmetic operations is the same as that in Proposition 1. ∎
We have proposed “extended Horner’s rule” (25) for efficient calculation of Horner’s rule for matrix polynomials and vectors by reducing the number of matrix-matrix multiplications with precalculation of certain powers of matrix.
For given matrix and irreducible factorization of its characteristic polynomial , the -th minimal annihilating polynomial is calculate by Algorithm 1 with
arithmetic operations in .
Next, in line 8, calculating requires operations, and by repeating this calculation for times in the “while” loop, we require operations in total. Repeating these calculations for in the “for” loop from line 3 requires
Sum of the amounts in \crefeq:prop:umap:bij,eq:prop:umap:fibij gives an estimate of the number of operations in the whole algorithm as in \crefeq:prop:umap:total, which proves the proposition. ∎
Time complexity of calculating all of the minimal annihilating polynomials of with Algorithm 1 is equal to
which is the sum of estimates in \crefeq:prop:umap:total for . In \crefeq:prop:umap:total-all, especially the first term is time-consuming for calculating as in \crefeq:umap:bij-def. To overcome this issue, we introduce pseudo annihilating polynomials in the next section.
3 Pseudo annihilating polynomials for calculating minimal annihilating polynomials
Pseudo annihilating polynomial is defined as follows.
Definition 2 (Pseudo annihilating polynomial).
Let , and be the same as in the above, and let be a row vector of dimension over and . If , and satisfy
then we call pseudo annihilating polynomial of w.r.t. and , denoted as . Furthermore, for where is the -th unit vector, we call the -th unit pseudo annihilating polynomial, denoted as .
Unit pseudo annihilating polynomials can be calculated as follows. Let be a row vector of integers of dimension , where with are randomly generated numbers for all , and . Then, we have , thus if . Therefore, we see that for every satisfying .
Let be defined as in the above, and let
where and are defined as in \crefeq:gp. Furthermore, for , define
Then, we have the following lemma.
For in \crefeq:jthunitminannihpol, in \crefeq:rhopj, and , we have .
By the definition of and , we have
Thus, for in \crefeq:wpk, we have
which implies . This completes the proof. ∎
Lemma 4 tells us a way for calculating the -th unit pseudo annihilating polynomial that is a factor of the -th unit minimal annihilating polynomial. We summarize the steps for calculating the unit pseudo annihilating polynomials in Algorithm 4.
For defined as in the above, Algorithm 4 outputs all unit pseudo annihilating polynomials of with
arithmetic operations in .
By repeating the step in line 20 in Algorithm 4, we calculate in \crefeq:rhopj. By Lemma 4, we see that with as in \crefeq:rhopj divides in \crefeq:jthunitminannihpol, thus we have or the -th pseudo unit minimal annihilating polynomial of .
We estimate time complexity of the algorithm as follows. First, the amount of operations required for calculating in lines 6 and 7 is estimated , similarly as in \crefeq:umap:bij-def. Repeating this calculation for in the “for” loop from line 5 requires
arithmetic operation by the same estimation as in \crefeq:prop:umap:bij.
for in the “for” loop in line 5. Sum of the amounts in \crefeq:prop:upap:1stterm,eq:prop:upap:2ndterm gives an estimate of the number of operations in the whole algorithm as in \crefeq:upap-time, which proves the proposition. ∎
Then, we show the validity and the time complexity of the algorithm by the following propositions.
For defined as in the above, Algorithm 6 outputs the exponents of factors in the unit annihilating polynomials of .
For , let the -th unit annihilating polynomial of be
and the -th pseudo unit annihilating polynomial of w.r.t. calculated by Algorithm 4 be
Case 1: , which corresponds to . In this case, the algorithm outputs as .
Case 2: , which corresponds to and . For , in \crefeq:unitannihpol and in \crefeq:pseudounitannihpol, let
be the largest index of satisfying and let .
Then, by line 17, we have .
At the end of “for” loop in line 30 for the -th time, we have
for (note that exponent of is equal to which is equal to the one in the unit annihilating polynomial).