A fast, deterministic algorithm for computing a Hermite Normal Form of a polynomial matrix
aa r X i v : . [ c s . S C ] F e b A fast, deterministic algorithm for computing a HermiteNormal Form of a polynomial matrix
Wei Zhou and George Labahn ∗ Abstract
Given a square, nonsingular matrix of univariate polynomials F ∈ K [ x ] n × n over a field K , we give a fast, deterministic algorithm for finding the Hermite normal form of F withcomplexity O ∼ ( n ω d ) where d is the degree of F . Here soft- O notation is Big- O with logfactors removed and ω is the exponent of matrix multiplication. The method relies of afast algorithm for determining the diagonal entries of its Hermite normal form, having ascost O ∼ ( n ω s ) operations with s the average of the column degrees of F . For a given square, nonsingular matrix polynomial F ∈ K [ x ] n × n there exists a unimodularmatrix U such that F · U = H , a matrix in (column) Hermite normal form. Thus H = h h h ... ... . . . h n · · · · · · h nn is a lower triangular matrix where each h ii is monic and deg h ij < deg h ii for all j < i . Othervariations include specifying row rather than column forms (in which case the unimodularmatrix multiplies on the left rather than the right) or upper rather than lower triangularform. The Hermite form was first defined by Hermite in 1851 in the context of triangularizinginteger matrices.There has been considerable work on fast algorithms for Hermite form computation. Thisincludes O ∼ (cid:0) n d (cid:1) algorithms from Hafner and McCurley [9] and Iliopoulos [10] which controlintermediate size by working modulo the determinant. Hafner and McCurley [9], Storjohannand Labahn [15] and Villard [16] gave new algorithms which reduced the cost to O ∼ (cid:0) n ω +1 d (cid:1) operations, with < ω < being the exponent of matrix multiplication. The second namedworked with integer matrices but the results carried over directly to polynomial matrices.Mulders and Storjohann [13] gave an iterative algorithm having complexity O (cid:0) n d (cid:1) , thusreducing the exponent of n at the cost of increasing the exponent of the degree d .During the past decade the goal has been to give an algorithm that computes the Hermiteform in the time it takes to multiply two polynomial matrices having the same size n anddegree d as the input matrix, namely at a cost O ∼ ( n ω d ) . Such algorithms already exist for a ∗ Cheriton School of Computer Science, University of Waterloo, Waterloo ON, Canada N2L 3G1 {w2zhou,glabahn}@uwaterloo.ca O ∼ (cid:0) n d (cid:1) . Their algorithm was the first to be both softly cubic in n andlinear in d .One natural technique for finding a Hermite form is to first determine a triangular formand to then reduce the lower triangular elements using the diagonals. The problem with thisis that the best a-priori bounds for the degrees of the unimodular multiplier U can become toolarge for efficient computation (since these bounds are determined from F adj ( F ) · H ). Onthe other hand simply looking for bounds on H has a similar problem since the best knowna-priori bound for the i -th column is id and hence the sum of these degree bounds is O ( n d ) , afactor of n larger than the actual sum deg det ( H ) = nd . Gupta and Storjohann make use ofthe Smith normal form of F in order to obtain accurate bounds for the degrees of the diagonalentries (and hence the degrees of the columns) of H . That combined with some additionalpartial information on one of the right multipliers of this Smith form are then used to find H .In this paper we give a deterministic Hermite norml form algorithm having complexity O ∼ (cid:0) n d (cid:1) . As with Gupta and Storjohan ours is a two step process. We first determine thediagonal elements of H and then secondly find the remaining elements having reduced degrees.Our approach is to make use of fast, deterministic methods for shifted minimal kernel basisand column basis computation to find the diagonal entries. We do this without the need forfinding the associated unimodular multiplier. We do this with a cost O ∼ ( n ω s ) field operationswhere s is the average of the column degrees of F . The remaining entries are then determinedmaking use of a second type of fast shifted minimal kernel basis computation with special carerequired to reduce the computation to one having small degrees. The use of shifted minimalkernel bases for matrix normal form computation was previously used in [4, 5] in order toobtain efficient algorithms in the case where intermediate coefficient growth is a concern.The remainder of this paper is organized as follows. In the next section we give preliminaryinformation for shifted degrees, kernel and column bases of polynomial matrices. Section 3then contains the algorithm for finding the diagonal elements of a Hermite form with thefollowing section giving the details of the fast algorithm for the entire Hermite normal formcomputation. The paper ends with a conclusion and topics for future research. In this section we first describe the notations used in this paper, and then give the basicdefinitions and properties of shifted degree , kernel basis and column basis for a matrix ofpolynomials. These will be the building blocks used in our algorithm. Our methods makes use of the concept of shifted degrees of polynomial matrices [4], basicallyshifting the importance of the degrees in some of the rows of a basis. For a column vector p = [ p , . . . , p n ] T of univariate polynomials over a field K , its column degree, denoted by cdeg p , is the maximum of the degrees of the entries of p , that is, cdeg p = max ≤ i ≤ n deg p i . shifted column degree generalizes this standard column degree by taking the maximumafter shifting the degrees by a given integer vector that is known as a shift . More specifically,the shifted column degree of p with respect to a shift ~s = [ s , . . . , s n ] ∈ Z n , or the ~s -columndegree of p is cdeg ~s p = max ≤ i ≤ n [deg p i + s i ] = deg( x ~s · p ) , where x ~s = diag ( x s , x s , . . . , x s n ) . For a matrix P , we use cdeg P and cdeg ~s P to denote respectively the list of its column degreesand the list of its shifted ~s -column degrees. When ~s = [0 , . . . , , the shifted column degreespecializes to the standard column degree. Similarly, cdeg − ~s P ≤ is equivalent to deg p ij ≤ s i for all i and j , that is, ~s bounds the row degrees of P .The shifted row degree of a row vector q = [ q , . . . , q n ] is defined similarly as rdeg ~s q = max ≤ i ≤ n [deg q i + s i ] = deg( q · x ~s ) . Shifted degrees have been used previously in polynomial matrix computations and in gener-alizations of some matrix normal forms [5]. The shifted column degree is equivalent to thenotion of defect commonly used in the literature.Along with shifted degrees we also make use of the notion of a matrix polynomial beingcolumn (or row) reduced. A matrix polynomial F is column reduced if the leading columncoefficient matrix, that is the matrix [ coeff ( f ij , x, d j )] ≤ i,j ≤ n , with ~d = cdeg F , has full rank. A matrix polynomial F is ~s -column reduced if x ~s F is column reduced. A similarconcept exists for being shifted row reduced.The usefulness of the shifted degrees can be seen from their applications in polynomialmatrix computation problems [17, 21]. One of its uses is illustrated by the following lemmafrom [18, Chapter 2], which can be viewed as a stronger version of the predictable-degreeproperty [12, page 387]. For completeness we also include the proof. Lemma 1.
Let A ∈ K [ x ] m × n be a ~u -column reduced matrix with no zero columns and with cdeg ~u A = ~v . Then a matrix B ∈ K [ x ] n × k has ~v -column degrees cdeg ~v B = ~w if and only if cdeg ~u ( AB ) = ~w .Proof. Being ~u -column reduced with cdeg ~u A = ~v is equivalent to the leading coefficientmatrix of x ~u · A · x − ~v having linearly independent columns. The leading coefficient matrix of x ~v · B · x − ~w has no zero column if and only if the leading coefficient matrix of x ~u · AB · x − ~w = x ~u · A · x − ~v x ~v · B · x − ~w has independent columns. That is, x ~v · B · x − ~w has column degree ~ if and only if x ~u · AB · x − ~w has column degree ~ .An essential fact needed in this paper, also based on the use of shifted degrees, is theefficient multiplication of matrices with unbalanced degrees [21, Theorem 3.7]. Theorem 1.
Let A ∈ K [ x ] m × n with m ≤ n , ~s ∈ Z n a shift with entries bounding the columndegrees of A and ξ , a bound on the sum of the entries of ~s . Let B ∈ K [ x ] n × k with k ∈ O ( m ) and the sum θ of its ~s -column degrees satisfying θ ∈ O ( ξ ) . Then we can multiply A and B with a cost of O ∼ ( n m ω − s ) ⊂ O ∼ ( n ω s ) , where s = ξ/n is the average of the entries of ~s . .2 Kernel Bases and Column Bases The kernel of F ∈ K [ x ] m × n is the F [ x ] -module { p ∈ K [ x ] n | Fp = 0 } with a kernel basis of F being a basis of this module. Formally, we have: Definition 1.
Given F ∈ K [ x ] m × n , a polynomial matrix N ∈ K [ x ] n × k is a (right) kernelbasis of F if the following properties hold:1. N is full-rank.2. N satisfies F · N = 0 .3. Any q ∈ K [ x ] n satisfying Fq = 0 can be expressed as a linear combination of the columnsof N , that is, there exists some polynomial vector p such that q = Np . It is easy to show that any pair of kernel bases N and M of F are unimodularly equivalent.A ~s -minimal kernel basis of F is just a kernel basis that is ~s -column reduced. Definition 2.
Given F ∈ K [ x ] m × n , a polynomial matrix N ∈ K [ x ] n × k is a ~s -minimal (right)kernel basis of F if N is a kernel basis of F and N is ~s -column reduced. We also call a ~s -minimal (right) kernel basis of F a ( F , ~s ) -kernel basis. A column basis of F is a basis for the K [ x ] -module { Fp | p ∈ K [ x ] n } . Such a basis can be represented as a full rank matrix T ∈ K [ x ] m × r whose columns are thebasis elements. A column basis is not unique and indeed any column basis right multipliedby a unimodular polynomial matrix gives another column basis.The cost of kernel basis computation is given in [21] while the cost of column basis com-putation is given in [20]. In both cases they make heavy use of fast methods for order bases(often also referred to as minimal approximant bases) [2, 6, 17]. Theorem 2.
Let F ∈ K [ x ] m × n with ~s = cdeg F . Then a ( F , ~s ) -kernel basis can be computedwith a cost of O ∼ ( n ω s ) field operations where s = P ~s/n is the average column degree of F . Theorem 3.
There exists a fast, deterministic algorithm for the computation of a columnbasis of a matrix polynomial F having complexity O ∼ (cid:0) nm ω − s (cid:1) field operations in K with s being the average column degree of F . Example 1.
Let F = x − x − x x − x − − x − x − x + x x − x + 1 3 x e a × matrix over Z [ x ] having column degree ~s = (1 , , , , . Then a column space, G ,and a kernel basis, N , of F are given by G = x − x − x − − x − x + x x and N := − x − x − x − . For example, if { g i } i =1 ,..., denote the columns of G then column of F - denoted by f - isgiven by f = − g − x g + x g + 2 g . Here cdeg ~s N = (5 , with shifted leading coefficient matrixlcoeff ~s ( N ) = − − . Since lcoeff ~s ( N ) has full rank we have that N is a ~s -minimal kernel basis. In this section we first show how to determine only the diagonal entries of the Hermite normalform of a nonsingular input matrix F ∈ K [ x ] n × n with F having column degrees ~s . Thecomputation makes use of fast kernel and column basis computation.Consider unimodularly transforming F to F · U = G = (cid:20) G ∗ G (cid:21) . (1)After this unimodular transformation, the elimination of the top right block of G , the matrixis now closer to being in Hermite normal form. Applying this procedure recursively to G and G , until the matrices reach dimension , gives the diagonal entries of the Hermite normalform of F .While such a procedure can be used to correctly compute the diagonal entries of theHermite normal form of F , a major problem is that the degree of the unimodular multiplier U can be too large for efficient computation. Our approach is to make use of fast kernel andcolumn basis methods to efficiently compute only G and G and so avoid computing U .Partition F = (cid:20) F u F d (cid:21) , with F u and F d consisting of the upper ⌈ n/ ⌉ and lower ⌊ n/ ⌋ rowsof F , respectively. Then both upper and lower parts are of full-rank since F is assumed to benonsingular. By partitioning U = (cid:2) U ℓ , U r (cid:3) , where the column dimension of U ℓ matchesthe row dimension of F u , then F · U = G becomes (cid:20) F u F d (cid:21) (cid:2) U ℓ U r (cid:3) = (cid:20) G ∗ G (cid:21) . lgorithm 1 HermiteDiagonal( F ) Input: F ∈ K [ x ] n × n is nonsingular. Output: d ∈ K [ x ] n a list of diagonal entries of the Hermite normal form of F . Partition F := (cid:20) F u F d (cid:21) , with F u consists of the top ⌈ n/ ⌉ rows of F ; if n = 1 then return F ; endif ; G := ColumnBasis( F u ) ; N := MinimalKernelBasis ( F u , cdeg F ) ; G := F d N ; d := HermiteDiagonal( G ) d := HermiteDiagonal( G ); return [ d , d ] ;Notice that the matrix G is nonsingular and is therefore a column basis of F u . As such thiscan be efficiently computed as mentioned in Theorem 3. In order to compute G = F d U r ,notice that the matrix U r is a right kernel basis of F u , which makes the top right block of G zero.The following lemma states that the kernel basis U r can be replaced by any other kernelbasis of F u to give another unimodular matrix that also works. Lemma 2.
Partition F = (cid:20) F u F d (cid:21) and suppose G is a column basis of F u and N a kernel basisof F u . Then there is a unimodular matrix U = [ ∗ , N ] such that FU = (cid:20) G ∗ G (cid:21) , where G = F d N . If F is square nonsingular, then G and G are also square nonsingular.Proof. This follows from Lemma 3.1 in [20]Note that we do not compute the blocks represented by the symbol ∗ , which may havevery large degrees and cannot be computed efficiently.Lemma 2 allows us to determine G and G independently without computing the unimod-ular matrix. This procedure for computing the diagonal entries gives Algorithm 1. Formallythe cost of this algorithm is given in Theorem 4. Example 2.
Let F = x − x − x x − x − − x − x − x + x x − x + 1 3 x x + 2 x − x + 2 x − − x + 2 − x − x + 3 2 x + 2 0 working over Z [ x ] . If F u denotes the top three rows of F then a column basis G and kernelbasis N were given in Example 1. If F d denotes the bottom rows of F , then this gives diagonal locks G and G = F d · N as G = x − x − x − − x − x + x x and G = " x − − x x Recursively computing with G gives column space and nullspace for the top rows, G U as ˜ G = (cid:20) x x − (cid:21) and ˜ N = − x . This in turn gives ˜ G = G d · ˜ N = [ x ] which gives the two diagonal blocks from G . As ˜ G is triangular we have triangularized G . Similarly as G is already in triangular form we donot need to do any extra work. As a result we have that F is unimodularly equivalent to x ∗ x − ∗ ∗ x ∗ ∗ ∗ x − ∗ ∗ ∗ ∗ x giving the diagonal elements of the Hermite form of F . Theorem 4.
Algorithm 1 costs O ∼ ( n ω s ) field operations to compute the diagonal entries forthe Hermite normal form of a nonsingular matrix F ∈ K [ x ] n × n , where s is the average columndegree of F .Proof. The three main operations are computing a column basis of F u , computing a kernelbasis N of F u , and multiplying the matrices F d N . Set ξ = P ~s , a scalar used to measure sizefor our problem.For the column basis computation, by Theorem 3 (see also [20, Theorem 5.6]) we knowthat a column basis G of F u can be computed with a cost of O ∼ ( n ω s ) . By [20, Lemma 5.1]the column degrees of the computed column basis G are also bounded by the original columndegrees ~s . Similarly, from Theorem 2 (see also [21, Theorem 4.1]), computing a ~s -minimalkernel basis N of F u also costs O ∼ ( n ω s ) operations.By Theorem 3.4 of [21] we also know that the sum of the ~s -column degrees of the outputkernel basis N is bounded by ξ . For the matrix multiplication F d N , we have that the sum ofthe column degrees of F d and the sum of the ~s -column degrees of N are both bounded by ξ .Therefore Theorem 1 (see also [21, Theorem 3.7]) applies and the multiplication can be donewith a cost of O ∼ ( n ω s ) .If we let the cost of Algorithm 1 be g ( n ) for a input matrix of dimension n then g ( n ) ∈ O ∼ ( n ω s ) + g ( ⌈ n/ ⌉ ) + g ( ⌊ n/ ⌋ ) . As s depends on n we use O ∼ ( n ω s ) = O ∼ (cid:0) n ω − ξ (cid:1) with ξ not depending on n . Then we solvethe recurrence relation as g ( n ) ∈ O ∼ ( n ω − ξ ) + g ( ⌈ n/ ⌉ ) + g ( ⌊ n/ ⌋ ) ∈ O ∼ ( n ω − ξ ) + 2 g ( ⌈ n/ ⌉ ) ∈ O ∼ ( n ω − ξ ) = O ∼ ( n ω s ) . Hermite Normal Form
In Section 3, we have shown how to efficiently determine the diagonal entries of the Hermitenormal form of a nonsingular input matrix F ∈ K [ x ] n × n . In this section we show how todetermine the remaining entries for the complete Hermite form H of F . Our approach issimilar to that used in the randomized algorithm of [8] but does not use the Smith normalform. Our algorithm has the advantage of being both efficient and deterministic. For simplicity, let us assume that F is already column reduced, something which we cando with complexity O ∼ ( n ω s ) using the column basis algorithm of [20]. Assume that F hascolumn degrees ~d = [ d , . . . , d n ] and that ~s = [ s , . . . , s n ] are the degrees of the diagonalentries of the Hermite form H . Let d max = max ≤ i ≤ n d i and s max = max ≤ i ≤ n s i and set ~u = [ s max , . . . , s max ] , a vector with n entries. The following lemma implies that we can obtainthe Hermite normal form of F from a [ − ~u, − ~s ] -minimal kernel basis of [ F , − I ] ∈ K [ x ] n × n . Lemma 3.
Suppose N ∈ K [ x ] n × n is a [ − ~u, − ~s ] -minimal kernel basis of [ F , − I ] , partitionedas N := (cid:20) N u N d (cid:21) where each block is n × n square. Then N u is unimodular while N d has rowdegrees ~s and is unimodularly equivalent to the Hermite normal form H of F .Proof. Let U be the unimodular matrix satisfying F · U = H . By the predictable-degreeproperty (1), U has ~d -column degrees bounded by s max , that is, cdeg − ~u U ≤ . Letting M = (cid:20) UH (cid:21) ∈ K [ x ] n × n we have that M is a kernel basis of [ F , − I ] having shifted [ − ~u, − ~s ] column degree . Thus M is [ − ~u, − ~s ] -column reduced and hence is a [ − ~u, − ~s ] -minimal kernelbasis of [ F , − I ] .The [ − ~u, − ~s ] -minimal kernel basis N of [ F , − I ] is then unimodularly equivalent to M .Thus the matrix N u , making up the upper n rows, is unimodular and the matrix N d , con-sisting of the lower n rows, is unimodularly equivalent to H . Minimality also ensures that cdeg [ − ~u, − ~s ] (cid:20) N u N d (cid:21) = cdeg [ − ~u, − ~s ] (cid:20) UH (cid:21) = 0 , implying cdeg − ~s N d ≤ − ~s H . Simi-larly, the minimality of H then ensures that cdeg − ~s N d = cdeg − ~s H = 0 , or equivalently, rdeg N d = rdeg H = ~s .Knowing that the bottom n rows N d have the same row degrees as H and is unimodularlyequivalent with H implies that the Hermite form H can then be obtained from N d usingLemma 8 from [8]. We restate this as follows: Lemma 4.
Let H ∈ K [ x ] n × n be a column basis of a matrix A ∈ K [ x ] n × k having the same rowdegrees as A . If U ∈ K n × n is the matrix putting lcoeff (cid:0) x − ~s A (cid:1) into reduced column echelonform and if H is in Hermite normal form then H is the principal n × n submatrix of A · U .Proof. This follows from the fact that H and A all have uniform − ~s column degrees . Thisallows their relationship to be completely determined by the leading coefficient matrices ofboth (cid:0) x − ~s A (cid:1) and (cid:0) x − ~s H (cid:1) , respectively. 8 xample 3. Let F = x − x + 3 x − − x + 2 x − x + 2 x + 3 x − x + 2 − x + x + 1 − x − x − − x + x − − x be a × nonsingular matrix over Z [ x ] . As the leading column coefficient matrix is non-singular, F is column reduced. Using the method of Section 3 one can determine that thediagonal elements of the Hermite form of F are x − , x + 1 , x + 1 , respectively. Using [21]one computes a kernel basis for [ F , − I ] as N = x − − x x + 1 2 x + 2 2 x + 1 x − x + 2 x − x − x x x + x x + 1 − x + 2 − x − x + 1 t . With shift ~w = [ − , − , − , − , − , − we have thatlcoeff ~w ( N ) = − t which has full rank and hence N is a ~w -minimal kernel basis. If N = x + 1 2 x x + 2 2 x + x x + 1 2 x + 1 and N = x − x − − x + 21 x + 2 − − x x − x − x x − x + 1 denote the first and last three rows of N , respectively, then N is unimodular, F · N = N and N has the same row degrees as the Hermite form. Then U = − is the matrix which converts the leading coefficient matrix of x − (1 , , · N into column echelonform. Therefore U = N · U is unimodular and F · U = x − x + 1 0 − x x − x x + 1 is in Hermite normal form. .2 Reducing the degrees and the shift Although the Hermite normal form H of F can be computed from a [ − ~u, − ~s ] -minimal kernelbasis of [ F , − I ] , a major problem here is that s max can be very large and hence is not efficientenough for our needs. In this subsection we show how to convert our normal form computationinto one where the bounds are smaller.Since we know the row degrees of H we can expand each of the high degree rows of H intomultiple rows each having lower degrees. This allows us to compute an alternative matrix H ′ having lower degrees, but with a higher row dimension that is still in O ( n ) , with H easilydetermined from this new H ′ . Such an approach was used in the Hermite form computationalgorithm in [8] and also in the case of the order basis algorithms from [19, 17]. Our task hereis in fact easier as we already know the row degrees of H .For each entry s i of the shift ~s , let q i and r i be the quotient and remainder of s i dividedby d max . Any polynomial h of degree at most s i can be written as h = h + h x s i − q i d max + · · · + h q i x s i − d max with each of the q i + 1 components, h i , having degree at most d max . Similarly the i th columnof H can be written in terms of vector components each bounded in degree by d max .In terms of matrix identities let ˜ E i = h e i , x s i − q i d max e i , . . . , x s i − d max e i i where e i is the i th column of the n × n identity matrix. For each i ˜ E i has q i + 1 entries andcombines into a single matrix E = [ ˜ E , . . . , ˜ E n ]= x s − q d max · · · x s − d max . . . . . . x s n − q n d max · · · x s n − d max n × ¯ n with column dimension ¯ n = n + P ni =1 q i . Then there exists a matrix polynomial H E ∈ K [ x ] ¯ n × n such that E · H E = H . The shift in this case is given by ~s ∗ = [ ~s ∗ , . . . , ~s ∗ n ] where ~s ∗ i = [ r i , d max , . . . , d max ] with q i + 1 components . Since F is column reduced we have that P ni =1 s i = P ni =1 d i ≤ nd max and hence the columndimension ¯ n satisfies ¯ n = n + n X i =1 q i ≤ n + n X i =1 s i d max ≤ n. Rather than recovering H from a [ − ~u, − ~s ] -minimal kernel basis for [ F , − I ] the followinglemma implies that we can now recover the Hermite form from a (cid:2) − ~u, − ~s ∗ (cid:3) -minimal kernelbasis of [ F , − E ] . 10 emma 5. Let N be a (cid:0) [ F , − E ] , (cid:2) − ~u, − ~s ∗ (cid:3)(cid:1) -kernel basis, partitioned as N = (cid:20) N u N d (cid:21) with N d of dimension ¯ n × ¯ n . Let ¯ N be the submatrix consisting of the columns of N d whose − ~s ∗ -columndegrees are bounded by . Then H is a column basis of E · ¯ N having − ~s -column degrees .Proof. Let U be the unimodular matrix satisfying F · U = H and H E the matrix H expandedaccording to E . Then H E has row degrees ~s ∗ and E · H E = H . Set M = (cid:20) U H E N E (cid:21) where N E is a (cid:0) E , − ~s ∗ (cid:1) -kernel basis. Then M is a (cid:2) − ~u, − ~s ∗ (cid:3) kernel basis for [ F , − E ] .Let N = (cid:20) N u N d (cid:21) be a (cid:0) [ F , − E ] , (cid:2) − ~u, − ~s ∗ (cid:3)(cid:1) -kernel basis. Then the matrices M and N consisting of the columns from M and N , respectively, whose (cid:2) − ~u, − ~s ∗ (cid:3) -column degrees arebounded by , are unimodularly equivalent, that is, M · V = N for some unimodular matrix V . As a result, the matrices ¯ M and ¯ N consisting of the bottom ¯ n rows of M and N respectively, also satisfies ¯ MV = ¯ N . Thus E · ¯ MV = E ¯ N , with cdeg − ~s E · ¯ M ≤ and cdeg − ~s E ¯ N ≤ , since cdeg − ~s ∗ ¯ M ≤ and cdeg − ~s ∗ ¯ N ≤ . Let ¯ M = [ H E , N ′ ] , where N ′ consists of the columns of N E with − ~s ∗ -column degrees bounded by . Then E · ¯ MU = E (cid:2) H E , N ′ (cid:3) V = [ H , V = E ¯ N . Since H is − ~s -column reduced and has − ~s -column degrees , the nonzero columns of E · ¯ N must have − ~s -column degrees no less than , so their − ~s -column degrees are equal to . Remark 1.
Note that the nonzero columns of E · ¯ N having − ~s -column degrees allows us torecover the Hermite form H of F from E · ¯ N using Lemma 4 Example 4.
Let F be the × matrix over Z [ x ] from Example 3. In this case d max = 3 , q = q = 0 , r = r = 1 and q = 2 , r = 1 so that E = x x with shift ~s ∗ = (1 , , , , . Then a [ − ~u, − ~s ∗ ] -minimal kernel basis for [ F , − E ] is given by the × matrix N = x − − x x + 1 2 x + 2 2 x + 1 x − x + 2 0 − x − x x x + x x + 1 − x + 2 − − x x − x − x t . The matrix ¯ N , the bottom rows of N having shifted degrees less than , then gives E · ¯ N = x − x − − x + 2 0 01 x + 2 − − x x − x − x x − x + 1 0 0 ith the column space consisting of the first columns. As in Example 3 the Hermite form isthen determined by reduction of the shifted leading coefficient matrix of this column space intocolumn echelon form. The problem of computing a ([ F , I ] , [ − ~u, − ~s ]) -kernel basis from Subsection 4.1 has now beenreduced to computing a (cid:0) [ F , E ] , (cid:2) − ~u, − ~s ∗ (cid:3)(cid:1) -kernel basis in Subsection 4.2. However, thedegree of E and the shift ~u are still too large to guarantee efficient computation. In order tolower these further, we can reduce E against F in a way similar to [8]. Lemma 6.
Suppose E = F · Q + R where Q and R are matrix polynomials and where R has degree less than d max . Let ~u ∗ =[2 d max , . . . , d max ] ∈ Z n and N = (cid:20) N u N d (cid:21) be a (cid:0) [ F , − R ] , (cid:2) − ~u ∗ , − ~s ∗ (cid:3)(cid:1) -kernel basis where theblock N d has dimension n × n . Let ¯ N be the matrix consisting of the columns of N d whose − ~s ∗ -column degrees are bounded by . Then H is a column basis of E · ¯ N and the nonzerocolumns of E · ¯ N have − ~s -column degrees .Proof. Let N = (cid:20) U H E N E (cid:21) be the kernel basis of [ F , − E ] constructed in Lemma 5. Then [ F , − R ] = [ F , − E ] (cid:20) I n Q I ¯n (cid:21) implies that we can construct a kernel basis for [ F , − R ] via ˆN = (cid:20) I n − Q I ¯n (cid:21) N = (cid:20) U − QH E − QN E H E N E (cid:21) . The proof then follows the same argument as given in Lemma 5.As noted in Remark 1 the fact that the nonzero columns of E · ¯ N have − ~s -column degrees allows us to recover H from E · ¯ N using column echelon reduction of a constant matrix asnoted in Lemma 4.A (cid:0) [ F , − R ] , (cid:2) − ¯ u, − ~s ∗ (cid:3)(cid:1) -kernel basis from Lemma 6 can now be computed and can thenbe used to recover the Hermite normal form. A big question remaining, however, is how toefficiently compute the remainder R from E and F . For this, we follow the approach usedfor computing matrix gcds found in [3] and use F ∗ , the matrix polynomial having the reversecoefficients of F : F ∗ ( x ) = F (1 /x ) · x ~d = F (1 /x ) x d . . . x d n . Efficient computation can then be done using the series expansions of the inverse of F ∗ as inthe proof of Lemma 3.4 from [6] and making use of the higher-order lifting algorithm from[14]. Since F is assumed to be column reduced, deg det F = P ~d , and so the lowest order termof F ∗ is nonsingular. Therefore x is not a factor of det F ∗ , which means the series expansion12f ( F ∗ ) − always exists. This also implies that the x d -adic lifting algorithm from [14] becomesdeterministic.The division with remainder also takes advantage of the special structure of E . In particu-lar, its higher degree elements are all of the form x k e i for e i a column of the identity. Considernow how the series expansion of ( F ∗ ) − gives a remainder of x k I divided by F . Lemma 7.
For any integer k ≥ d max , let G ∗ k = ( F ∗ ) − mod x k − ~d where ( F ∗ ) − mod x k − ~d denotes the i -th row of the series expansion of ( F ∗ ) − mod x k − d i for each row i . Then I = F ∗ · G ∗ k + x k − d max C ∗ k (2) where C k = x d max C ∗ k (1 /x ) is a matrix polynomial having degree less than d max and satisfying x k I = F · G k + C k with G k = x k − ~d · G ∗ k (1 /x ) a matrix polynomial.Proof. Replacing x by /x in equation (2) and multiplying both sides by x k gives x k I = x k F ∗ (1 /x ) · G ∗ k (1 /x ) + x d max C ∗ k (1 /x )= F ( x ) · x k − ~d · G ∗ k (1 /x ) + x d max C ∗ k (1 /x )= F · G k + C k . The definition of G ∗ k implies that G k is a matrix polynomial. Therefore C k is also a matrixpolynomial and, by its definition, has degree less than d max .Lemma 7 implies that x k · e j is determined by the j -th column of G k and C k allowing usto construct the columns of the quotient and remainder for the corresponding columns when E is divided by F .Lemma 7 shows how the series expansion ( F ∗ ) − = G = G + G x + G x + · · · can be used to compute a remainder of x k I divided by F for any k ≥ d max . Similarly, the i -th column G i = G e i of G allows us to compute a remainder r of x k e i divided by F , with deg r < d max . Note that the degrees of columns corresponding to e i are bounded by s i , so weneed to compute the series expansions G i to at least order s i . Let us now look to see howthese series expansions can be computed efficiently. Lemma 8.
Let G = ( F ∗ ) − . Then computing the series expansions G i to order s i for all i ’swhere s i ≥ d max can be done with a cost of O ∼ ( n ω d max ) field operations. Proof.
Let us assume, without any loss of generality, that the columns of F and the corre-sponding entries of ~s = [ s , . . . , s n ] are arranged so that they are in increasing order. Wecan then separate ~s into ⌈ log n ⌉ + 1 disjoint lists ~s j (0) , ~s j (1) , ~s j (2) , . . . , ~s j ( ⌈ log n ⌉ ) with entries inthe ranges [0 , d max ) , [ d max , d max ) , ..., [2 ⌈ log n ⌉− d max , ⌈ log n ⌉− d max ) , [2 ⌈ log n ⌉− d max , nd max ] respectively, where each j ( i ) consists of a list of indices of the entries of ~s that belong to ~s j ( i ) .Notice that j ( i ) has at most n/ i − entries, since otherwise the sum of the entries of ~s j ( i ) would exceed P ~s ≥ nd max . We then compute series expansions G j (1) , G j (2) , . . . , G j ( ⌈ log n ⌉ ) d max , d max , . . . , ⌈ log n ⌉− d max / , nd max , respectively, where again G j ( i ) consists of the columns of G that are indexed by the entries in j ( i ) . These computations aredone efficiently using the higher order series solution algorithm from [14]. For G j ( i ) , there areat most n/ i − columns, so computing the series expansion to order i d max costs O ∼ ( n ω d max ) .Doing this for i from to ⌈ log n ⌉ then costs O ∼ ( n ω d max ) field operations.With the series expansions computed, we can compute a remainder R of E divided by F . Lemma 9.
A remainder R of E divided by F , where deg R < d max , can be computed with acost of O ∼ ( n ω d max ) field operations.Proof. The remainder r of x k e i divided by F can be obtained by (cid:16) e i − F ∗ (cid:16) G i mod x k − ~d (cid:17)(cid:17) /x k − d max where G = ( F ∗ ) − . Note that only the terms from G i with degrees in the range [ k − d max , k ) are needed for thiscomputation, which means we are just multiplying F ∗ with a polynomial vector with degreebounded by d max . In order to make the multiplication more efficient, we can compute allthe remainder vectors at once. Since there at most n columns with degrees no less than d max ,the cost is just the multiplication of matrices of dimension n and degrees bounded by d max ,which costs O ∼ ( n ω d max ) field operations. Example 5.
Continuing with Example 4 we see that only column of E , which is x · e needsto be reduced. In this case G ∗ = ( F ∗ ) − mod x = " − and we have that G = x x x − x x and C = x − x + 2 − x + 2 − x − x − − x − − x . Therefore we construct Q as Q = x x x and then multiply the N matrix from Example 4 by (cid:20) I − Q I (cid:21) which then gives a minimal kernel basis for [ F , − R ] as ˆN = x − − x
01 2 x + 2 2 x + 1 x − x + 2 0 − x − x x + x x + 1 − x + 2 − − x x − x − x − x t . The Hermite form for F is then determined using the bottom rows of ˆN as in Example 4. R computed, we can now compute a (cid:0) [ F , − R ] , (cid:2) − ¯ u, − ~s ∗ (cid:3)(cid:1) -kernel basisthat can be used to recover the Hermite normal form using Lemma 6. This in turn gives usour Hermite form. Theorem 5.
A Hermite normal form of F can be computed deterministically with a cost of O ∼ ( n ω d max ) field operations. In this paper we have given a new, deterministic algorithm for computing the Hermite normalform of a nonsingular matrix polynomial. Our method relied on the efficient, deterministiccomputation of the diagonal elements of the Hermite form. In terms of future research we areinterested in finding efficient, deterministic algorithms for other forms such as the Popov nor-mal form. We also expect that our methods can be improved so that normal form computationcan be done in cost O ∼ (cid:0) n ω − s (cid:1) , that is with maximal degree replaced by average degree. Inaddition we are interested in fast, normal form algorithms where then entries are differentialoperators rather than polynomials. Such algorithms are useful for reducing systems of lineardifferential equations to solveable systems [1]. References [1] M. Barkatou, C. El Bacha, G. Labahn, and E. Pflügel. On simultaneous row and columnreduction of higher-order linear differential systems.
Journal of Symbolic Computation ,49(1):45–64, 2013.[2] B. Beckermann and G. Labahn. A uniform approach for the fast computation of matrix-type Padé approximants.
SIAM Journal on Matrix Analysis and Applications , 15(3):804–823, 1994.[3] B. Beckermann and G. Labahn. Fraction-free computation of matrix rational interpolantsand matrix GCDs.
SIAM Journal on Matrix Analysis and Applications , 22(1):114–144,2000.[4] B. Beckermann, G. Labahn, and G. Villard. Shifted normal forms of polynomial matrices.In
Proceedings of the International Symposium on Symbolic and Algebraic Computation ,ISSAC’99, pages 189–196, 1999.[5] B. Beckermann, G. Labahn, and G. Villard. Normal forms for general polynomial matri-ces.
Journal of Symbolic Computation , 41(6):708–737, 2006.[6] P. Giorgi, C.-P. Jeannerod, and G. Villard. On the complexity of polynomial matrixcomputations. In
Proceedings of the International Symposium on Symbolic and AlgebraicComputation, Philadelphia, Pennsylvania, USA , ISSAC’03, pages 135–142. ACM Press,2003.[7] S. Gupta, S. Sarkar, A. Storjohann, and J. Valeriote. Triangular x-basis decompositionsand derandomization of linear algebra algorithms over K[x].
Journal of Symbolic Compu-tation: Special issue in honour of the research and influence of Joachim von zur Gathenat 60 , 47(4):422–453, 2012. 158] S. Gupta and A. Storjohann. Computing Hermite forms of polynomial matrices. In
Proceedings of the International Symposium on Symbolic and Algebraic Computation ,ISSAC’11, pages 155–162, 2011.[9] J. Hafner and K. McCurley. Asyptotically fast triangularization of matrices over rings.
SIAM Journal of Computing , 20:1068–1083, 1991.[10] C. Iliopoulos. Worst-case complexity bounds on algorithms for computing the canonicalstructure of finite abelian groups and the Hermite and Smith normal forms of integermatrices.
SIAM Journal of Computing , 18:658–669, 1986.[11] C. P. Jeannerod and G. Villard. Essentially optimal computation of the inverse of genericpolynomial matrices.
Journal of Complexity , 21(1):72–86, 2005.[12] T. Kailath.
Linear Systems . Prentice-Hall, 1980.[13] T. Mulders and A. Storjohann. On lattice reduction for polynomial matrices.
Journal ofSymbolic Computation , 35(4):377–401, April 2003.[14] A. Storjohann. High-order lifting and integrality certification.
Journal of Symbolic Com-putation, , 36:613–648, 2003.[15] A. Storjohann and G. Labahn. Asymptotically fast computation of Hermite forms ofinteger matrices. In
International Symposium on Symbolic and Algebraic Computation ,ISSAC’96, pages 259–266, 1996.[16] G. Villard. Computing Popov and Hermite forms of polynomial matrices. In
InternationalSymposium on Symbolic and Algebraic Computation , ISSAC’96, pages 250–258, 1996.[17] Zhou W. and Labahn G. Efficient algorithms for order basis computation.
Journal ofSymbolic Computation , 47(7):793–819, 2012.[18] W. Zhou.
Fast Order Basis and Kernel Basis Computation and Related Problems . PhDthesis, University of Waterloo, 2012.[19] W. Zhou and G. Labahn. Efficient computation of order bases. In
Proceedings of theInternational Symposium on Symbolic and Algebraic Computation , ISSAC’09, pages 375–382. ACM, 2009.[20] W. Zhou and G. Labahn. Fast computation of column bases of polynomial matrices.In
Proceedings of the International Symposium on Symbolic and Algebraic Computation ,ISSAC’13, pages 379–387. ACM, 2013.[21] W. Zhou, G. Labahn, and A. Storjohann. Computing minimal nullspace bases. In