0% found this document useful (0 votes)
31 views34 pages

Index Reduction of DAE With Mixed Matrices

This document presents an index-reduction algorithm for differential-algebraic equations (DAEs) with mixed matrices, which are used to model dynamical systems. The proposed algorithm efficiently detects numerical cancellations and transforms high-index DAEs into low-index ones, allowing for accurate simulations. It is based on combinatorial relaxation and matroid theory, proving effective for both linear and nonlinear DAEs while maintaining the physical meanings of coefficients.

Uploaded by

Neha Parulekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views34 pages

Index Reduction of DAE With Mixed Matrices

This document presents an index-reduction algorithm for differential-algebraic equations (DAEs) with mixed matrices, which are used to model dynamical systems. The proposed algorithm efficiently detects numerical cancellations and transforms high-index DAEs into low-index ones, allowing for accurate simulations. It is based on combinatorial relaxation and matroid theory, proving effective for both linear and nonlinear DAEs while maintaining the physical meanings of coefficients.

Uploaded by

Neha Parulekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Index Reduction for Differential-algebraic Equations

with Mixed Matrices

SATORU IWATA and TAIHEI OKI, University of Tokyo, Japan


MIZUYO TAKAMATSU, Chuo University, Japan

Differential-algebraic equations (DAEs) are widely used for the modeling of dynamical systems. The difficulty
in numerically solving a DAE is measured by its differentiation index. For highly accurate simulation of
dynamical systems, it is important to convert high-index DAEs into low-index DAEs. Most of the existing
simulation software packages for dynamical systems are equipped with an index-reduction algorithm given
by Mattsson and Söderlind. Unfortunately, this algorithm fails if there are numerical cancellations.
These numerical cancellations are often caused by accurate constants in structural equations. Distinguish-
ing those accurate constants from generic parameters that represent physical quantities, Murota and Iri in-
troduced the notion of a mixed matrix as a mathematical tool for faithful model description in a structural
approach to systems analysis. For DAEs described with the use of mixed matrices, efficient algorithms to
compute the index have been developed by exploiting matroid theory.
This article presents an index-reduction algorithm for linear DAEs whose coefficient matrices are mixed
matrices, i.e., linear DAEs containing physical quantities as parameters. Our algorithm detects numerical
cancellations between accurate constants and transforms a DAE into an equivalent DAE to which Mattsson–
Söderlind’s index-reduction algorithm is applicable. Our algorithm is based on the combinatorial relaxation
35
approach, which is a framework to solve a linear algebraic problem by iteratively relaxing it into an efficiently
solvable combinatorial optimization problem. The algorithm does not rely on symbolic manipulations but
on fast combinatorial algorithms on graphs and matroids. Our algorithm is proved to work for any linear
DAEs whose coefficient matrices are mixed matrices. Furthermore, we provide an improved algorithm under
an assumption based on dimensional analysis of dynamical systems. Through numerical experiments, it is
con#rmed that our algorithms run sufficiently fast for large-scale DAEs and output DAEs such that physical
meanings of coefficients are easy to interpret. Our algorithms can also be applied to nonlinear DAEs by
regarding nonlinear terms as parameters.
CCS Concepts: • Mathematics of computing $ Differential algebraic equations; Combinatorial opti-
mization; Matroids and greedoids; Computations on matrices;
Additional Key Words and Phrases: Differential-algebraic equations, index reduction, combinatorial relax-
ation, matroid theory, combinatorial matrix theory, combinatorial scienti#c computing

A preliminary version of this paper has appeared in Proceedings of the 8th SIAM Workshop on Combinatorial Scienti#c
Computing, Bergen, Norway, June 2018.
This work was supported in part by JST CREST, Grant Number JPMJCR14D2, Japan. The second author’s research was
supported by Grant-in-Aid for JSPS Research Fellow, Grant Number JP18J22141, Japan.
Authors’ addresses: S. Iwata and T. Oki, Department of Mathematical Informatics, Graduate School of Informa-
tion Science and Technology, University of Tokyo, Hongo 7-3-1, Bunkyo-ku, Tokyo, 113-8656, Japan; emails: {iwata,
taihei_oki}@mist.i.u-tokyo.ac.jp; M. Takamatsu, Department of Information and System Engineering, Chuo University,
Kasuga 1-13-27, Bunkyo-ku, Tokyo, 112-8551, Japan; email: takamatsu@ise.chuo-u.ac.jp.
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee
provided that copies are not made or distributed for pro#t or commercial advantage and that copies bear this notice and
the full citation on the #rst page. Copyrights for components of this work owned by others than ACM must be honored.
Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires
prior speci#c permission and/or a fee. Request permissions from permissions@acm.org.
© 2019 Association for Computing Machinery.
0004-5411/2019/07-ART35 $15.00
https://doi.org/10.1145/3341499

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:2 S. Iwata et al.

ACM Reference format:


Satoru Iwata, Taihei Oki, and Mizuyo Takamatsu. 2019. Index Reduction for Differential-algebraic Equations
with Mixed Matrices. J. ACM 66, 5, Article 35 (July 2019), 34 pages.
https://doi.org/10.1145/3341499

1 INTRODUCTION
An lth order differential-algebraic equation (DAE) for x : R → Rn is a differential equation in the
form of
! "
F t, x (t ), ẋ (t ), . . . , x (l ) (t ) = 0, (1)
where F : R × Rn × · · · × Rn → Rn is a sufficiently smooth function. DAEs have aspects of both
ordinary differential equations (ODEs) ẋ (t ) = ϕ (t, x (t )) and algebraic equations G (t, x (t )) = 0.
DAEs are widely used for the modeling of dynamical systems, such as mechanical systems, elec-
trical circuits, and chemical reaction plants.
The difficulty in numerically solving a DAE is measured by its differentiation index [1], which is
de#ned for a #rst-order DAE
F (t, x (t ), ẋ (t )) = 0 (2)
as the smallest nonnegative integer ν such that the system of equations
d dν
F (t, x (t ), ẋ (t )) = 0, F (t, x (t ), ẋ (t )) = 0, . . . , F (t, x (t ), ẋ (t )) = 0
dt dt ν
can determine ẋ as a continuous function of t and x. That is, ν is the number of times one has to
differentiate the DAE (2) to obtain an ODE. Intuitively, the differentiation index represents how
far the DAE is from an ODE. The differentiation index of an lth order DAE (1) is de#ned as that
of the #rst-order DAE obtained by replacing higher-order derivatives of x with newly introduced
variables.
A common approach for solving a high (≥2) index DAE is to convert it into a low (≤1) index
DAE. This process is called index reduction, and it is important for accurate simulation of dynamical
systems. Most of existing simulation software packages for dynamical systems, such as Dymola,
OpenModelica, MapleSim, and Simulink, are equipped with the index-reduction algorithm given
by Mattsson–Söderlind [13] (MS-algorithm). The MS-algorithm uses Pantelides’ method [26] as a
preprocessing step. Pantelides’ method constructs a bipartite graph from structural information
of a given DAE and solves an assignment problem on the bipartite graph efficiently. The MS-
algorithm then differentiates equations in the DAE with the aid of the information obtained by
Pantelides’ method and replaces some derivatives with dummy variables. The MS-algorithm re-
turns a sparse DAE if the given DAE is sparse, and thus the algorithm can be applied to large-scale
DAEs.
Pantelides’ method, however, does not work correctly even for the following simple DAE


 ẋ 1 + ẋ 2 + x 3 = 0,
ẋ 1 + ẋ 2 = 0,


 x 2 + ẋ 3 = 0.
Pantelides’ algorithm reports that the index is zero, whereas it is indeed two. This is because the
method cannot detect the singularity of the coefficient matrix
1 1 0
%& 1 1 0 ()
'0 0 1*

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:3

of (ẋ 1 , ẋ 2 , ẋ 3 ) % . As this toy example shows, Pantelides’ method, which ignores numerical informa-
tion, may fail on some DAEs due to numerical cancellations. This kind of failure can also occur in
other methods to reduce the index or to analyze DAEs such as the structural algorithm of Unger
et al. [31] and the Σ-method of Pryce [27].
Some index reduction algorithms address this problem. One example is the σν -method by
Chowdhry et al. [2], which is based on the algorithm by Unger et al. [31]. The method per-
forms Gaussian elimination on the Jacobian matrix ∂F /∂ẋ under the assumption that nonlin-
ear or time-varying terms do not cancel out. For #rst-order linear DAEs with constant coeffi-
cients, Wu et al. [33] proposed a method (WZC-method) to transform a DAE into an equivalent
DAE to which the MS-algorithm is applicable. This method adopts the combinatorial relaxation
framework introduced by Murota [16, 19] to solve a linear algebraic problem by iteratively re-
laxing it into an efficiently solvable combinatorial optimization problem. The combinatorial re-
laxation based approach was extended for nonlinear DAEs implicitly by Tan et al. [30] as the
LC-method and the ES-method, and explicitly by Oki [24] as the substitution and augmenta-
tion methods. These methods identify numeric or symbolic cancellations and modify the DAE if
necessary.
Pantelides’ method [26] and the Σ-method [27] discard numerical information, which sometimes
leads to a failure of the methods. In dynamical systems, speci#c numbers in structural equations,
such as in the conservation laws, should be treated as constants, while we can deal with phys-
ical characteristic values as nonzero parameters without reference to their values. For a faithful
model of a dynamical system, it is natural to distinguish accurate and inaccurate numbers. This
led Murota–Iri [22] to introduce the notion of a mixed matrix, which is a matrix consisting of the
following two kinds of entries:

Accurate Constants, which represent precise values such as coefficients of conservation


laws. We assume that arithmetic operations with these constants can be performed in
constant time.
Independent Parameters, which are algebraically independent over the #eld of accurate
constants. These parameters often represent physical quantities such as masses, lengths,
or electric resistances, since their values are inaccurate by measurement noise and other
errors. These parameters should be treated combinatorially without reference to their
values.

For example, consider an electric network consisting of voltage sources, resistances, and wires
connecting them. A system of linear equations representing the circuit has two kinds of coeffi-
cients: the exact “±1”s coming from Kirchhoff’s laws, and the resistance values coming from Ohm’s
law. Since the values of resistances are usually inaccurate, it is natural to model the system by a
linear equation with a mixed matrix, where constants and parameters represent the exact “±1”s
and the resistances, respectively. See an example in Section 3.1 for modeling of an RLC circuit with
a mixed matrix.
Mixed matrices can be handled by symbolic computation systems. However, the computa-
tional cost of symbolic manipulation grows explosively when the size of matrices increases. Ef-
#cient algorithms without symbolic manipulation are available for the rank computation [17].
If all nonzero entries of a matrix are independent parameters, then its rank is equal to the
maximum size of a matching in an associated bipartite graph. For a mixed matrix, the rank
computation corresponds to solving an independent matching problem on matroids, which is a
generalization of the maximum matching problem on bipartite graphs. An efficient algorithm

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:4 S. Iwata et al.

based on matroid theory is provided for the rank computation of mixed matrices; see Refer-
ence [21] for details. Algorithms combining the combinatorial relaxation and mixed matrices
are presented in References [7, 8, 28]. Section 3.3 describes the history of this combination in
detail.
In this article, we provide an index reduction algorithm for a linear DAE
l
#
Ak x (k ) (t ) = f (t ) (3)
k=0

with n × n mixed matrices A0 , A1 , . . . , Al and a sufficiently smooth function f : R → Rn .


A typical procedure to analyze a linear dynamical system with our algorithm is as follows:
First, we model the system by a linear DAE (3) with mixed matrices. Next, we apply our algo-
rithm to the DAE and obtain a low-index one. We #nally obtain a numerical solution by ap-
plying a numerical scheme to the low-index DAE after substituting speci#c values of physical
quantities.
As described above, a notable feature of our algorithm is that it works for linear DAEs con-
taining physical quantities not as their values but as parameters. This feature is advantageous in
the following points: First, since accurate constants arising from typical dynamical systems are
integers or rational numbers, our algorithm can avoid arithmetic operations with %oating-point
numbers. This fact makes it numerically stable, as index reduction algorithms involve nonsingu-
larity checking of matrices. Second, since our algorithm can utilize the beforehand knowledge that
independent parameters do not cause numerical cancellations, our algorithm is expected to run
faster for DAEs with dense coefficient matrices than other index reduction algorithms. Third, when
we simulate a dynamical system on many different values of physical quantities, we can reuse
the resulting low-index DAE as long as the values of physical quantities do not unluckily cancel
out.
Our algorithm is based on the combinatorial relaxation framework as the WZC-method. To de-
tect and resolve numerical cancellations in mixed matrices without using symbolic manipulations,
we present a new combinatorial relaxation algorithm relying on the theory of combinatorial op-
timization algorithms on matroids. Our algorithm is proved to run in O(l 2nω+2 ) time, where ω is
the matrix multiplication exponent, i.e., the number of arithmetic operations needed to multiply
two n × n matrices is O(nω ). The current best known value of ω is ≈2.3728639 due to Le Gall [12].
In practice, however, we adopt ω = 3 for performance comparisons, because large coefficients are
hidden in the big-O notation of the time complexity of fast matrix multiplication algorithms. Our
algorithm is expected to run much faster in most cases, because it terminates without modifying
the DAE unless it has numerical cancellations.
In addition, we give an improved algorithm for DAEs whose coefficients are dimensionally con-
sistent. The dimensional consistency, which is introduced by Murota [15], is a mathematical as-
sumption on mixed matrices re%ecting the principle of dimensional homogeneity in physical sys-
tems. DAEs arising from dynamical systems naturally ensure this assumption. We show that the
improved algorithm retains the dimensional consistency and that the running time is O(ln4 log n).
In practice, we con#rm through numerical experiments that this algorithm is so fast that it runs in
12mins for a DAE with sparse coefficient matrix of size 131,076 × 131,076 having 393,223 nonzero
entries. The running time grows proportionally as O(n3 ) for dense DAEs and O(n2 ) for sparse
DAEs in our experiments.
It is further con#rmed that our algorithm modi#es DAEs preserving “physical meanings” of
dynamical systems. For example, for a DAE representing the Butterworth #lter via the fourth Cauer

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:5

topology (see Equation (44) in Section 7), the existing method (LC-method) and our algorithm
return

 = 0, 


−ξ 0 + ξ 1 + ξ 2 = 0,



−ξ 0 + ξ 1 + ξ 2 




 


−ξ 2 + ξ 3 + ξ 4 = 0,



−ξ 2 + ξ 3 + ξ 4 = 0, 




 


−ξ 0 + ξ 1 + ξ 3 + ξ 5 = 0,



−ξ 0 + ξ 1 + ξ 3 − 0.243624ξ˙4 + 0.318310η̇ 3 = 0, 




 


η0 + η1 = 0,


 η1 = −V (t ), 




 

 z 0[1] + z 1[1] = 0,


 z 1[1] 





= −V̇ (t ), 

 = 0,


 


−η 1 + η 2 + η 3



1.847759ξ˙2 − η 1 + η 3 = 0, 



 

−η 3 + η 4 + η 5 = 0,
 0.765367ξ˙4 + 3.141593ξ 5 − η 3 = 0, and  (4)


 


η0 = V (t ),


 





η0 = V (t ), 

 z 0[1]
 
= V̇ (t ),


 −ξ 1 + 0.765367z 1[1] 





= 0, 

 −ξ 1 + C 1z 1[1] = 0,


 




 1.847759ξ˙2 − η 2 = 0, 



 
 L 2 ξ˙2 − η 2 = 0,


 −ξ 3 + 1.847759η̇ 3 = 0, 




 

 −ξ 3 + C 3η̇ 3 = 0,


 



 0.765367ξ˙4 − η 4 = 0, 


 
 L 4 ξ˙4 − η 4 = 0,
 3.141593ξ 5 − η 5 =0 


  Rξ 5 − η 5 = 0,

respectively. Here ξ 0 , . . . , ξ 5 , η 0 , . . . , η 5 , z 0[1] and z 1[1] are variables of these DAEs, V : R → R is


a smooth function, and C 1 , C 3 , L 2 , L 4 , R are constants representing physical quantities in the cir-
cuit. As the LC-method requires substituting speci#c values into physical quantities beforehand,
the values of physical quantities C 1 = L 4 ( 0.765367, L 2 = C 3 ( 1.847759, and R ( 3.141593 are
scattered around the left DAE in Equation (4), and some coefficients are combinations of them:
1/R ( 0.318310 and L 4 /R ( 0.243624. This makes it difficult to guess where such complicated co-
efficients come from and how the DAE changes when the values of physical quantities are varied.
However, our algorithm is directly applicable to DAEs containing physical quantities as parame-
ters. Thus, the right DAE in Equation (4) still retains units of physical quantities, and it is easy to
interpret what the coefficients mean in the circuit.
Furthermore, though our index reduction algorithm is designed for linear DAEs, it can be applied
to nonlinear DAEs by regarding nonlinear terms as independent parameters. A similar approach is
adopted in the σν -method of Chowdhry et al. [2], which is adopted in Mathematica [32]. However,
our method is expected to be applicable to a larger class of nonlinear DAEs than the σν -method,
because our method does not transform a DAE involving nonlinear terms. Indeed, consider the
index-2 nonlinear DAE



F 1 : ẋ 1 + д(x 2 ) = f 1 (t ),

 F 2 : ẋ 1 + x 1 + x 3 = f 2 (t ),
 (5)

 F : ẋ
 3 1 + x 3 = f 3 (t ),
with smooth functions f 1 , f 2 , f 3 , д : R → R. Our algorithm correctly returns an index-1 DAE
equivalent to Equation (5), whereas the implementation of the σν -method in Mathematica un-
successfully returns an index-2 DAE. See Section 8 for details.
Related Work. We describe the relation between the proposed algorithm and related index re-
duction algorithms. If all nonzero entries of A(s) are independent parameters, our algorithm just
passes a given DAE to the MS-method. In contrast, if A(s) has no independent parameters, then our
Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:6 S. Iwata et al.

algorithm coincides with the LC-method by Tan et al. [30] and with the substitution method [24]
applied to linear DAEs with constant coefficients. We emphasize that our algorithm can treat in-
termediate DAEs between these special cases, i.e., it works for DAEs containing both accurate
constants and independent parameters.
The WZC-method by Wu et al. [33] works for #rst-order linear DAEs with constant coefficients.
This method modi#es a DAE using the combinatorial relaxation method by Iwata [6], which per-
forms row and column operations on A(s) using constant matrices. Here, column operations on
A(s) correspond to changing the basis of the variable space of DAEs. Our combinatorial relax-
ation algorithm does not use column operations, and thus the basis of the variable space remains
unchanged.
A recent work [9] has proposed an index reduction algorithm that is proved to work for any
instances of #rst order linear DAEs with constant coefficients. The algorithm directly reduces the
index of a given DAE by row operations, whereas our algorithm only resolves numerical cancella-
tions in a DAE and eventually relies on the MS-algorithm for the actual index reduction process.
Thus, our algorithm is expected to preserve the sparsity of DAEs compared to the algorithm in
Reference [9].
In addition, our algorithm is similar to the σν -method [2] in the sense that both methods treat
matrices having accurate constants and independent parameters, yet their approaches are quite
different; the σν -method is based on the Gaussian elimination approach by Gear [5], whereas our
algorithm relies on the dummy variable approach by Mattsson–Söderlind [13].
Organization. The rest of this article is organized as follows: Section 2 reviews the previous in-
dex computation and reduction algorithms for linear DAEs with constant coefficients, including
the MS-algorithm and combinatorial relaxation algorithms. Section 3 explains mixed matrices and
their rank identities. Section 4 describes the proposed algorithm. Section 5 improves our algorithm
under the assumption of the dimensional consistency. Section 6 illustrates the theory by two ex-
amples. Section 7 shows the result of numerical experiments. Section 8 discusses an application to
nonlinear DAEs. Finally, Section 9 concludes this article.

2 INDEX REDUCTION FOR LINEAR DAES


2.1 Index of Linear DAEs
A linear DAE with constant coefficients is
l
#
Ak x (k ) (t ) = f (t ), (6)
k=0

where A0 , A1 , . . . , Al are n × n matrices and f : R → Rn is a sufficiently smooth function. We


assume that f is Laplace transformable for simplicity, though this assumption is not essential. By
the Laplace transformation, the DAE (6) is transformed into

l #
# k
x (s) = f+(s) +
A(s)+ s k−i Ak x (i−1) (0), (7)
k=0 i=1

where x+(s) and f+(s) are the Laplace transforms of x (t ) and f (t ), respectively, and A(s) =
$l ,
k=0 s Ak . We henceforth denote the right-hand side of Equation (7) by f (s). The matrix A(s)
k

is a matrix whose entries are polynomials, called a polynomial matrix. We say that A(s) is nonsin-
gular if its determinant is not identically zero.
Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:7

An initial value (x 0 , x 0(1) , . . . , x 0(l −1) ) ∈ Rn × · · · × Rn is said to be consistent if there exists at least
one solution of Equation (6) satisfying

x (0) = x 0 , ẋ (0) = x 0(1) , . . . , x (l −1) (0) = x 0(l −1) . (8)


We say that the DAE (6) is solvable if there exists a unique solution of Equation (6) satisfying
the initial value condition (8) for an arbitrary consistent point. The solvability of Equation (6) is
characterized by A(s) as follows:
The()em 2.1 ([1, 29]). A linear DAE (6) is solvable if and only if the associated polynomial matrix
A(s) is nonsingular.
See Reference [1, Theorem 2.3.1] for l = 1 and Reference [29, Theorems 2.22–23] for l ≥ 2. In
this article, we focus on solvable DAEs (6). With slight abuse of terminology, we also refer to
Equation (7) as a DAE.
The differentiation index of the #rst-order linear DAE (6) with A(s) = A0 + sA1 is known to be
ν (A) = δn−1 (A) − δn (A) + 1, (9)
as described in Reference [21, Remark 5.1.10]. Here, δk (A) denotes the maximum degree of the
determinant of a submatrix in A(s) of size k, i.e.,

δk (A) = max{deg det A(s)[I , J ]--- |I | = |J | = k },

where A(s)[I , J ] is the submatrix in A(s) with row set I and column set J , and deg p(s) designates
the degree of a polynomial p(s) in s. In particular, δn (A) is the degree of the determinant of A(s),
and δn−1 (A) is the maximum degree of a cofactor of A(s). For a DAE (6) with l ≥ 2, its index is
de#ned to be that of the #rst-order DAE obtained by replacing higher-order derivatives with new
variables [30].

2.2 Assignment Problem


In analysis of DAEs, Pryce [27] introduced an assignment problem as a reinterpretation of Pan-
telides’ algorithm [26]. We describe it specializing to linear DAEs (6) using our notations.
Consider a linear DAE (7) with n × n nonsingular polynomial matrix A(s) with row set R and
column set C. We denote the (i, j) entry of A(s) by Ai, j (s). Let G (A) denote the bipartite graph
with vertex set R ∪ C and edge set E (A) = {(i, j) ∈ R × C |Ai, j (s) ! 0}. An edge subset M ⊆ E (A)
is called a matching if the ends of edges in M are disjoint. Since A(s) is nonsingular, G (A) has a
matching of size n, called a perfect matching. We set the weight c e of an edge e = (i, j) ∈ E (A) by
c e = c i, j = deg Ai, j (s).
The assignment problem on G (A) is the following problem P(A):
-- maximize $ c e
P(A) -- e ∈M
-- subject to M ⊆ E(F ) is a perfect matching on G (F ).

The dual problem D(F ) of P(F ) is expressed as follows:


-- minimize $ q j − $ pi
-- j ∈C i ∈R
-- subject to q j − pi ≥ c i, j ((i, j) ∈ E (F )) ,
D(A) -
-- pi ∈ Z (i ∈ R) ,
--
- qj ∈ Z (j ∈ C) .

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:8 S. Iwata et al.

The integral constraints on pi and q j are crucial for analysis of DAEs. We denote the optimal
value of the problem P(A) (and D(A)) by δ,n (A). Recall that δn (A) denotes deg det A(s). It is well-
known that δn (A) ≤ δ,n (A) holds, and the equality is attained if and only if the coefficient of s δn (A)
,

in det A(s) does not vanish; see Reference [21, Theorem 6.2.2]. In this sense, δ,n (A) serves as a
combinatorial upper bound on δn (A). We call A(s) upper-tight if δn (A) = δ,n (A) holds.
For a dual feasible solution (p, q), a tight coefficient matrix A# of A(s) is de#ned by
A#i, j := the coefficient of s q j −pi in Ai, j (s)
for each i ∈ R and j ∈ C. Note that A# changes depending on (p, q). This matrix is called a “system
Jacobian matrix” by Pryce [27]; the name “tight coefficient matrix” is due to Murota [18].

2.3 Computing the Index via Combinatorial Relaxation


The tight coefficient matrix plays an important role in the combinatorial relaxation algorithm of
Murota [19] to compute δn (A) for a polynomial matrix A(s) through the following lemma:
Lemma 2.2 ([16, P)(,(-./.(0 6.2]). Let A(s) be a nonsingular polynomial matrix and let A# be the
tight coefficient matrix of A(s) with respect to an optimal solution of D(A). Then A(s) is upper-tight
if and only if A# is nonsingular.
The combinatorial relaxation method for computing δn (A) consists of the following three
phases:
Phase 1. Compute a combinatorial upper bound δ,n (A) of δn (A) by solving an assignment
problem.
Phase 2. Check whether A(s) is upper-tight using Lemma 2.2. If it is, then return δ,n (A) and
halt.
Phase 3. Modify A(s) to improve δ,n (A) by replacing A(s) with U (s)A(s), where U (s) is a uni-
modular matrix. Go back to Phase 2.
Here, a unimodular matrix is a square polynomial matrix whose determinant is a nonzero con-
stant. The algorithm is designed so δ,n (A) decreases in each iteration, while unimodular transfor-
mations preserve δn (A). Thus, after a #nite number of iterations, it terminates with δ,n (A) = δn (A).
Subsequently, Murota [18] applied the combinatorial relaxation approach to computing δk (A)
for k = 1, . . . , n. In this algorithm, Phase 3 modi#es A(s) to U (s)A(s)V (s), where U (s) and V (s) are
biproper Laurent polynomial matrices, i.e., entries are all polynomials in 1/s and the determinants
are nonzero constants. This type of transformation is known to preserve δk (A). The values of
δn−1 (A) and δn (A) determine the index ν (A) by (9).

2.4 Mattsson–Söderlind’s Index Reduction Algorithm


We now review Mattsson–Söderlind’s index reduction algorithm (MS-algorithm) applied to a lin-
ear DAE (7) with n × n nonsingular polynomial matrix A(s). We remark that the MS-algorithm can
be embedded in the Σ-method of Pryce [27] and they are based on the same principle.
Let (p, q) be an optimal solution of D(A). For h ∈ Z, we de#ne
% & % &
Rh := i ∈ R | pi = h , R ≥h := i ∈ R | pi ≥ h ,
Ch := {j ∈ C |q j = h}, C ≥h := {j ∈ C |q j ≥ h}.
The MS-algorithm applied to the DAE (7) is outlined as follows. The following description is a
version specialized to linear DAEs, though the original MS-algorithm is designed for nonlinear
DAEs [13, Section 3.1].

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:9

Mattsson–Söderlind’s Index Reduction Algorithm.


Step 1. Compute an optimal solution (p, q) of D(A) satisfying pi , q j ≥ 0 for i ∈ R and j ∈ C.
Let A# denote the tight coefficient matrix of A(s) with respect to (p, q). If A# is singular,
then the algorithm terminates in failure.
Step 2. For each h = 0, . . . , η + 1 (η := maxi ∈R pi ), obtain Jh ⊆ C ≥h such that A# [R ≥h , Jh ] is
nonsingular and
C = J0 ⊇ J1 ⊇ J2 ⊇ · · · ⊇ Jη ⊇ Jη+1 = ∅.
Step 3. For each j ∈ C, let k j be the integer such that j ∈ Jk j and j " Jk j +1 . Introduce k j dummy
corresponding to s q j x+j , s q j −1x+j , . . . , s q j −k j +1x+j ,
[q ] [q −1] [q −k +1]
variables z j j , z j j , . . . , z j j j
respectively.
Step 4. For each i ∈ R, return the 0th, 1st,. . . , pi th order derivatives of the ith equation. Replace
variables with the corresponding dummy variables.
The number of dummy variables introduced in Step 3 is j ∈C q j − δ,n (A) = i ∈R pi , which is
$ $
equal to the number of the differentiated equations in Step 4. Since an optimal solution of D(A) is
not unique, the number of dummy variables and equations are not uniquely determined by A(s).
To minimize the number of equations, Pryce [27] uses the smallest optimal solution (p, q) of D(A);
that is, 0 ≤ pi ≤ pi- and 0 ≤ q j ≤ q j- hold for all nonnegative optimal solutions (p -, q - ) of D(A) and
i ∈ R, j ∈ C. An algorithm to obtain the small (p, q) is known [27], but there is no guarantee of
computational time.
The validity of the MS-algorithm is established as follows:
P)(,(-./.(0 2.3 ([13, Se1/.(0 3.2]). Let A(s) be a polynomial matrix in the DAE (7) and A# the
tight coefficient matrix of A(s) with respect to an optimal solution of D(A). If A# is nonsingular, then
the MS-algorithm correctly returns an equivalent DAE with index at most one.
From Lemma 2.2, the condition in Proposition 2.3 is equivalent to the upper-tightness of A(s) as
follows:
C()(22a)3 2.4. Let A(s) be a polynomial matrix in the DAE (7). If A(s) is upper-tight, then the
MS-algorithm correctly returns an equivalent DAE with index at most one.
The description above is still valid for a nonlinear DAE (1) by rede#ning A(s) as
the coefficient of s k in Ai, j (s) := the partial derivative of the ith equation with respect to x j(k )
for each i = 1, . . . , n, j = 1, . . . , n, and k = 0, . . . , l. Then the nonsingularity of A# essentially comes
from the requirement of the implicit function theorem, which is used to convert the DAE into an
ODE by solving the DAE for the highest-order derivatives.

2.5 Index Reduction via Combinatorial Relaxation


For a linear DAE (7) that does not satisfy the validity condition of the MS-algorithm, we need to
modify it to apply the MS-algorithm. Here, the modi#cation of DAEs must preserve the sets of
their solutions. We can use unimodular transformations in the form of
x (s) = U (s) f,(s),
U (s)A(s)+
where U (s) is a unimodular matrix. Since unimodular transformations correspond to the opera-
tions of adding an equation or its (higher order) derivative to another equation, the DAEs before
and after the transformation have the same solution set.

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:10 S. Iwata et al.

Murota’s combinatorial relaxation algorithm [19] for computing δn (A) described in Sec-
tion 2.3 modi#es a given polynomial matrix A(s) into an upper-tight polynomial matrix A(s) =
U (s)A(s) using some unimodular matrix U (s). Then from Corollary 2.4, the matrix A(s) sat-
is#es the validity condition of the MS-algorithm. Therefore, we can use Murota’s algorithm
as an index reduction algorithm by combining it with the MS-algorithm. Note that this
modi#cation may change (increase or decrease) δn−1 (A), and hence ν (A). This method in-
deed coincides with the LC-method Tan et al. [30] applied to the linear DAEs with constant
coefficients.
The idea of using the combinatorial relaxation method as a preprocessing of the MS-algorithm
was originally given by Wu et al. [33] for #rst-order linear DAEs with constant coefficients. They
proposed the WZC-algorithm, which modi#es a DAE using the combinatorial relaxation algo-
rithm by Iwata [6] for a matrix pencil A(s) = A0 + sA1 . The algorithm of Iwata [6] modi#es the
matrix pencil A(s) to U A(s)V , where U and V are nonsingular constant matrices. Since non-
singular constant matrices are biproper, the values of δn−1 (A) and ν (A) do not change in the
WZC-algorithm.

3 DAES WITH MIXED MATRICES


The algorithms explained in Section 2 work under the assumption that we know all the val-
ues of physical quantities. To treat them as parameters, we deal with a DAE with mixed
matrices.

3.1 Mixed Matrices and Mixed Polynomial Matrices


Let F be a #eld and K a sub#eld of F. A typical setting in the context of DAEs is K = Q and
F is the extension #eld of Q obtained by adjoining the set of independent physical parameters.
A matrix T over F is said to be generic if the set of nonzero entries of T is algebraically inde-
pendent over K. A mixed matrix with respect to (K, F) is a matrix in the form of Q + T , where
Q is a matrix over K and T is a generic matrix. A mixed matrix A = Q + T is called a lay-
ered mixed matrix (or LM-matrix) if there exists a bipartition {RQ , RT } of Row(A) such that all
nonzero entries of Q and T are in rows RQ and RT , respectively. An LM-matrix A can be expressed
as A = ( Q
T ). $
A polynomial matrix A(s) = lk=0 s k Ak is called a mixed polynomial matrix if it is expressed as
Ak = Q k + Tk with Q k and Tk that satisfy the following conditions:

(MP-Q) Each Q k (k = 0, . . . , l ) is a matrix over K.


(MP-T) The set of nonzero entries of T0 , . . . ,Tl is algebraically independent over K.

A layered mixed polynomial matrix (or LM-polynomial matrix) is a mixed polynomial matrix
$ $
such that nonzero rows of Q (s) = lk=0 s k Q k andT (s) = lk=0 s k Tk are disjoint. An LM-polynomial
matrix is expressed as A(s) = ( Q (s )
T (s )
).

Example 3.1. Consider an electrical network illustrated in Figure 1, given in Reference [21, Sec-
tion 1.1]. The network consists of a voltage source of time-varying voltage V (t ), two resistances
R 1 and R 2 , an inductor L, and a capacitor C. State variables of this network is currents ξ 1 , . . . , ξ 5
and voltages η 1 , . . . , η 5 shown in Figure 1. The Laplace transform of an index-2 DAE representing

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:11

Fig. 1. Simple RLC network.

this network is given by

1 ξ+1 (s) 0
%
() && ξ+2 (s) ()) %& 0 ()
−1 −1
%& 1 1 1 −1
&& )& ) & )
&& 1 1 −1 )) && ξ+3 (s) )) && 0 ))
&& 1 )) && + )) && 0 ))
)) && ξ 4 (s) )) && ))
−1 −1
& 1 )) && ξ+5 (s) )) = && 0 )),
x (s) = &&
−1
(10)
)) && η+1 (s) )) && 0 ))
A(s)+
&& R 1 −1
&& −1 )) && η+ (s) )) && 0 ))
)) && 2 )) && 0 ))
R2
&&
)) && η+3 (s) )) && ))
−1
&&
sL
−1 sC & η+4 (s) ) & 0 )
' 1 * η+ (s) V+ (s) *
' 5 * '

where empty cells in the coefficient matrix A(s) indicate zero. Here, x+ = (ξ+1 , . . . , ξ+5 , η+1 , . . . , η+5 ) %
is the Laplace transform of the vector (ξ 1 , . . . , ξ 5 , η 1 , . . . , η 5 ) % of variables and V+ (s) is the Laplace
transform of V (t ) (we assumed that all state variables and their derivatives were equal to zero at
t = 0 for simplicity). In this system (10), the #rst two equations come from Kirchhoff’s current law
(KCL), and the following three equations come from Kirchhoff’s voltage law (KVL). The last #ve
equations represent the element characteristics (constitutive equations). The coefficient matrix in
system (10) is naturally regarded as a mixed polynomial matrix with independent parameters R 1 ,
R 2 , L, and C, since values of the parameters are supposed to be inaccurate.

3.2 Rank of LM-matrices


For a matrix A, we denote the row set and column set by Row(A) and Col(A), respectively. Con-
sider the associated bipartite graph G (A) = (R, C; E(A)), where R = Row(A) and C = Col(A). The
term-rank of A is the maximum size of a matching in G (A), and is denoted by t-rank A. It is well
known that rank A ≤ t-rank A holds. The equality is attained if and only if A has a submatrix of
size t-rank A with nonzero determinant. This is analogous to the relation between δn and δ,n for a
polynomial matrix.
Let A = ( Q
T ) be an LM-matrix. If A has no accurate constants, i.e., A is a generic matrix T , it
holds that rankT = t-rankT from the independence of nonzero entries. From this equality, we can
compute rankT by solving a maximum matching problem on the associated bipartite graph G (T ).
For general LM-matrices, the following holds from the generalized Laplace expansion.

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:12 S. Iwata et al.

P)(,(-./.(0 3.2 ([23, The()em 3.1]). For an LM-matrix A = ( Q


T ) with R Q = Row(Q ), RT =
Row(T ) and C = Col(A), the following rank identity holds:
rank A = max{rank Q[RQ , J ] + t-rankT [RT , C \ J ] | J ⊆ C}. (11)
The problem of maximizing the right-hand side of Equation (11) can be reduced to an inde-
pendent matching problem on a matroid; see Reference [21, Section 4.2] for details. The following
identity is obtained from the duality of the independent matching problem:

P)(,(-./.(0 3.3 ([23, The()em 3.1]). For an LM-matrix A = ( Q T ) with R Q = Row(Q ), RT =


Row(T ) and C = Col(A), the following rank identity holds:
. /
rank A = min rank Q[RQ , J ] + t-rankT [RT , J ] + |C \ J | | J ⊆ C . (12)

Similarly, we give the following term-rank identity for LM-matrices, which will be used later in
the proof of Lemma 4.8.

P)(,(-./.(0 3.4. For an LM-matrix A = ( QT ) with R Q = Row(Q ), RT = Row(T ) and C = Col(A),


the following term-rank identity holds:
. /
t-rank A = min t-rank Q[RQ , J ] + t-rankT [RT , J ] + |C \ J | | J ⊆ C .

P)((4. This immediately follows from the well-known rank formula of a union matroid [4]
and the fact that the union of transversal matroids is also a transversal matroid [25,
Corollary 11.3.8]. !

3.3 Combinatorial Relaxation Algorithm for Mixed Polynomial Matrices


Murota [20] described the #rst algorithm to compute δk of a mixed polynomial matrix through
a reduction to a valuated independent assignment problem. The valuated independent assignment
problem is an optimization problem on valuated matroids, which are a generalization of matroids.
The mixed matrices concept and the combinatorial relaxation were #rst combined in Reference [7].
The algorithm in Reference [7] computes δk of a (usual) polynomial matrix A(s) obtained by plug-
ging in speci#c values for independent parameters in a mixed polynomial matrix. Based on the
framework of combinatorial relaxation, this algorithm iteratively computes δk of mixed polyno-
mial matrices using the algorithm of Murota [20] as a combinatorial upper bound on δk (A). Subse-
quently, Reference [8] proposed a combinatorial relaxation algorithm for computing δk of mixed
polynomial matrices without using valuated matroid theory. Sato [28] presented a fast algorithm
to compute the entire sequence δ 1 , . . . , δn of mixed polynomial matrices extending the algorithm
of Iwata and Takamatsu [8].
The algorithm of Iwata and Takamatsu [8] #rst converts a mixed polynomial matrix into an
LM-polynomial matrix A(s) = ( Q (s )
T (s )
), and modi#es A(s) to
' (' (
UQ (s) O Q (s)
A(s) = ,
O I T (s)
where I is an identity matrix of appropriate size, and UQ (s) is a nonsingular Laurent polynomial
matrix. Here, a Laurent polynomial matrix is a matrix whose entries are polynomials in s and s −1 .
With the use of Equation (9), we can obtain the index ν (A) by computing δn (A) and δn−1 (A).
To devise an index reduction algorithm for DAEs with mixed matrices, we need to make use
of unimodular transformations instead of Laurent polynomial transformations, as explained in
Section 2.5.

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:13

4 COMBINATORIAL RELAXATION ALGORITHM FOR INDEX REDUCTION


WITH MIXED POLYNOMIAL MATRICES
This section presents our index reduction algorithm for a DAE

x (s) = f,(s)
A(s)+ (13)
with a nonsingular mixed polynomial matrix A(s), which is the Laplace transform of the DAE (3).
From Corollary 2.4, our goal is to #nd a unimodular matrix U (s) such that A(s) = U (s)A(s) is
upper-tight. Then applying the MS-algorithm to the DAE U (s)A(s)+ x (s) = U (s) f,(s), we obtain a
resultant low-index DAE.
We cannot perform row operations on A(s) involving rows containing independent parameters.
Our #rst step is to convert a given DAE (13) into another DAE whose coefficient matrix A(s) is an
LM-polynomial matrix expressed as A(s) = ( Q (s )
T (s )
). Then we can transform A(s) to
' (' (
UQ (s) O Q (s)
A(s) = , (14)
O I T (s)
where UQ (s) is a unimodular matrix. Note that we are allowed to perform row operations only
on Q (s) even for an LM-polynomial matrix A(s) = ( Q (s )
T (s )
), and thus we cannot always reduce the
index to one only by row operations on Q (s). We describe this conversion process from mixed
polynomial matrices into LM-polynomial matrices in Section 4.1.
After the conversion, we #nd a unimodular matrix UQ (s) in Equation (14) such that A(s) is
upper-tight based on the combinatorial relaxation approach. The outline of our algorithm is as
follows:
Algorithm for Tightness.
Phase 1. Construct an optimal solution (p, q) of D(A) satisfying 0 ≤ pi ≤ ln and 0 ≤ q j ≤ ln
for all i ∈ R and j ∈ C, where l is the maximum degree of an entry in A(s).
Phase 2. If the tight coefficient matrix A# with respect to (p, q) is nonsingular, then return
A(s) and halt.
Phase 3. Modify A(s) into A(s) such that δ,n (A) ≤ δ,n (A) − 1 and δn (A) = δn (A). Update (p, q)
to an optimal solution of D(A) and go back to Phase 2.
The bounds on pi and q j in Phase 1 are needed to bound the time complexity of our algorithm.
An algorithm to #nd such (p, q) is given in Reference [9] for l = 1, and we give an algorithm for
general l in Section 4.2. The condition in Phase 2, which is equivalent to the upper-tightness of
A(s) by Lemma 2.2, can be checked by solving an independent matching problem [23]. The matrix
modi#cation and an update procedure of (p, q) in Phase 3 are explained in Sections 4.3 and 4.4,
respectively. In Section 4.5, we analyze the time complexity of our algorithm.

4.1 Reduction to LM-polynomial Matrices


We #rst convert the DAE (13) with a mixed polynomial coefficient matrix A(s) = Q (s) + T (s) into
the following augmented DAE

f,(s)
' (' ( ' (
I Q (s) y+(s)
(15)
−D DT (s) +
= ,
z (s) 0
where D is a diagonal matrix whose diagonal entries are independent parameters τ1 , . . . , τn . Note
that the coefficient matrix of the augmented DAE (15) is an LM-polynomial matrix as the set of
nonzero coefficients of entries in −D and DT (s) is algebraically independent over K.

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:14 S. Iwata et al.

P)(,(-./.(0 4.1. Let ( y+z+(s(s )) ) be a solution of the DAE (15). Then +


z (s) is a solution of the DAE (13).
I O
P)((4. By left-multiplying both sides of Equation (15) by a nonsingular constant matrix ( I D −1 ),
we obtain
f,(s)
' (' (
I Q (s) y+(s)
= % , (,
O A(s) +
' f (s) *
z (s)

z (s) = f,(s), which implies that +


where O is a zero matrix. Thus, it holds A(s)+ z (s) is a solution of
the DAE (13). !
After the index reduction process, we need to #ll independent parameters by real numbers to
start a numerical method. Indeed, we can substitute 1 for each diagonal entry τi of D, i.e., D = I .
To explain this fact, let
' (
Q 1 (s) Q 2 (s)
B(s) = (16)
−D DT (s)
be the coefficient matrix of a DAE that our algorithm returns for the augmented DAE (15), where
Q 1 (s) and Q 2 (s) are some polynomial matrices. By substituting the identity matrix to D, we obtain
' (
Q 1 (s) Q 2 (s)
B(s) = . (17)
−I T (s)
Though B(s) is no longer an LM-polynomial matrix, the following lemma guarantees the upper-
tightness of B(s):
Lemma 4.2. Let Q 1 (s), Q 2 (s), and T (s) be polynomial matrices and let D be a nonsingular diagonal
matrix. Then B(s) in Equation (16) is upper-tight if and only if B(s) in Equation (17) is upper-tight.
I O
P)((4. Using P = ( O D −1 ), we have B(s) = PB(s). Since P is a nonsingular constant matrix,
δn (B) = δn (B) holds. In addition, since P is nonsingular, diagonal, and constant, the row transfor-
mation by P does not change the bipartite graph G (B) and its edge weight c e associated with B(s).
This fact implies that δ,n (B) = δ,n (B). Thus, the upper-tightness of B(s) and B(s) are equivalent. !
From this lemma, we can “forget” the existence of D in the augmented DAE (15). That is, to
reduce the index of the DAE (13), it suffices to apply our algorithm to the DAE
f,(s)
' (' ( ' (
I Q (s) y+(s)
(18)
−I T (s) +
= ,
z (s) 0
as if the set of nonzero coefficients of entries in ( −I T (s) ) were independent.
Example 4.3. Consider the index-2 DAE
f, (s)
' (' (
1 x+1 (s)
= % ,1 (,
s + α1
(19)
−1 −s + α 2 x+2 (s)
' f 2 (s) *
where α 1 and α 2 are independent parameters. Following Equation (18), we convert this DAE into
,
1 1 s % y+1 (s) ( % f 1 (s) (
%& () & y+ (s) ) && , ))
&& 1 −1 −s ) & 2 ) & f 2 (s) )
& )=&
α 1 )) && + ). (20)
& −1 z 1 (s) )) && 0 ))
' −1 α2 * +
' z 2 (s) * ' 0 *

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:15

x 1 (s), x+2 (s)) of Equation (19) by solving the augmented DAE (20).
Then, we can obtain a solution (+
While the index of Equation (20) is also three, in general this conversion does not preserve the
index of DAEs.

4.2 Construction of Dual Optimal Solution


Let A(s) be an n × n nonsingular LM-polynomial matrix with R = Row(A) and C = Col(A), and
let l be the maximum degree of an entry in A(s). An optimal solution (p, q) of D(A) satisfying
0 ≤ pi ≤ ln and 0 ≤ q j ≤ ln for all i ∈ R and j ∈ C is constructed as follows:
First, we obtain a maximum-weight perfect matching M ⊆ E (A) in G (A) by the Hungarian
method [11]. Next, construct a residual graph G M = (W , E M ) with W = R ∪ C ∪ {r } and E M =
E ◦ ∪ M ∪ Z , where r is a new vertex, E ◦ = {(j, i) | (i, j) ∈ E (A)}, and Z = {(r , i) | i ∈ R}. The arc
length γ : E M → Z of G M is de#ned by


 −c j,i
((i, j) ∈ E ◦ ) ,
γ (i, j) = 
c i, j ((i, j) ∈ M ) ,
0
 ((i, j) ∈ Z )
for each (i, j) ∈ E M .
Lemma 4.4. For the residual graph G M defined above, the following hold:
(1) All vertices are reachable from r .
(2) There is no negative-weight directed cycle with respect to γ .
P)((4.
(1) Every vertex i ∈ R is reachable from r through an edge (r , i) ∈ Z . In addition, since G (A)
has a perfect matching M, every vertex j ∈ C is also reachable from r via i ∈ R through
edges (r , i) ∈ Z and (i, j) ∈ M ⊆ E (A).
(2) This immediately follows from an optimality criterion [10, Theorem 9.6] of the minimum
cost %ow problem. !
For i, j ∈ W such that i is reachable to j, let d (i, j) denote the length of a shortest path from i to j
with respect to the arc length γ in G M . Lemma 4.4 guarantees that d (r , v) is de#ned for all v ∈ W .
Using d, we de#ne
pi := d (r , i) − min

d (r , i ∗ ), (21)
i ∈R

q j := d (r , j) − min

d (r , i ∗ ) (22)
i ∈R

for each i ∈ R and j ∈ C.


The next lemma is easily shown in almost the same way as the case for l = 1 in Reference [9,
Lemma 2.2].
Lemma 4.5. Let (p, q) be defined in Equations (21) and (22). Then (p, q) is an optimal solution of
D(A) satisfying 0 ≤ pi ≤ ln for each i ∈ R and 0 ≤ q j ≤ ln for each j ∈ C.
P)((4. First, we prove that (p, q) is a feasible solution of D(A). By the de#nition of (p, q), every
pi (i ∈ R) and q j (j ∈ C) are clearly integers. For each (i, j) ∈ E (A), it holds d (r , i) ≤ d (r , j) − c i, j .
Thus,
q j − pi = d (r , j) − d (r , i) ≥ c i, j
and this implies that (p, q) is a feasible solution of D(A).

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:16 S. Iwata et al.

Fig. 2. The residual graph G M of Equation (23) with M = {(1, 3), (2, 4), (3, 1), (4, 2)}. Edges in M, which are
shown by wavy curves, are bidirectional and have lengths whose signs reverse according to the direction.

Second, we show the optimality of (p, q). For each (i, j) ∈ M, since (i, j) ∈ E M and (j, i) ∈ E M ,
we obtain

q j − pi = d (r , j) − d (r , i) = c i, j .

Thus, it holds that


# # # # # #
qj − pi = d (r , j) − d (r , i) = (d (r , j) − d (r , i)) = c i, j ,
j ∈C i ∈R j ∈C i ∈R (i, j ) ∈M (i, j ) ∈M

which implies that (p, q) is optimal to D(A).


Finally, we give the lower and upper bounds on pi and q j . The non-negativity of pi clearly follows
from the de#nition of pi . In addition, since G (A) has a perfect matching, each j ∈ C is incidental
to at least one vertex i ∈ R on G (A). Thus, we obtain q j ≥ pi + c i, j ≥ 0 by pi , c i, j ≥ 0. Let i ∗ ∈ R
denote a vertex such that d (r , i ∗ ) ≤ d (r , i) for all i ∈ R. Fix j ∈ C. Let P j ⊆ E M and Pi ∗ ⊆ E M be
shortest paths from r to j and i ∗ , respectively. Let v ∈ W be the last common vertex in P j and Pi ∗ .
Then it holds q j = d (r , j) − d (r , i ∗ ) = d (v, j) − d (v, i ∗ ). Let Q j ⊆ P j and Q i ∗ ⊆ Pi ∗ denote subpaths
from v to j and i ∗ , respectively. Note that d (v, j) is at most l times the number of edges in E (A) on
Q j , whereas −d (v, i ∗ ) is at most l times the number of edges in M ◦ on Q i ∗ . The sum of these upper
bounds is at most ln, since Q i ∗ and Q j do not share the same vertex besides v. Thus, q j ≤ ln holds
for each j ∈ C. In addition, for each i ∈ R, we have pi ≤ q j − c i, j ≤ q j ≤ ln, where j ∈ C is incident
to i in M. !

Example 4.6. Consider the coefficient matrix

1 1
%& (
s
1 −s ))
A(s) = &&
−1
α 1 ))
(23)
& −1
' −1 α2 *

in the DAE (20). An optimal solution of the assignment problem P(A) is given by

M = {(1, 3), (2, 4), (3, 1), (4, 2)}

with optimal value δ,n (A) = 1. Figure 2 shows the residual graph G M for M. According to Equa-
tions (21) and (22), a dual optimal solution (p, q) is calculated as p = (0, 0, 0, 0) and q = (0, 0, 0, 1).

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:17

4.3 Matrix Modification


Let A(s) = ( Q (s )
T (s )
) be an n × n nonsingular LM-polynomial matrix that is not upper-tight. Let A# =
#
(Q
T#
) be the tight coefficient matrix with respect to an optimal solution (p, q) of D(A). Without loss
of generality, we assume that Row(Q ) = RQ = {1, . . . , mQ } and p1 ≤ · · · ≤ pmQ , where mQ = |RQ |.
Recall the rank identity (12). Let J ∗ ⊆ C be a column subset that minimizes the right-hand side
of the identity for A# , i.e., it holds
rank A# = rank Q # [RQ , J ∗ ] + t-rankT # [RT , J ∗ ] + |C \ J ∗ |. (24)
Such J ∗ is called a minimizer of Equation (12). By a row transformation of Q # , we obtain a matrix
#
Q = U Q # such that
# #
rank Q [RQ , J ∗ ] = t-rank Q [RQ , J ∗ ]. (25)
In particular, this transformation can be accomplished only by operations of adding a scalar mul-
tiple of a row i ∈ RQ to another row j ∈ RQ with pi > p j . Then the matrix U is upper-triangular
#
due to the order of rows in RQ . This is the forward elimination on Q [RQ , J ∗ ] with the order of the
rows reversed. Consider
UQ (s) = diag(s −p1 , . . . , s −pmQ )U diag(s p1 , . . . , s pmQ ), (26)
where diag(a 1 , . . . , an ) denotes a diagonal matrix with diagonal entries a 1 , . . . , an . Note that each
entry in UQ (s) is a polynomial, because U is upper-triangular. In addition, since det UQ (s) = det U
is a nonzero constant, UQ (s) is unimodular.
We de#ne Dp (s) = diag(s p1 , . . . , s pn ) and D q (s) = diag(s q1 , . . . , s qn ). Using UQ (s), we update
A(s) to A(s) as in Equation (14):
' ( ' (
U (s) O U O
A(s) = Q A(s) = Dp−1 (s) Dp (s)A(s). (27)
O I O I
To show that (p, q) is not an optimal solution of D(A), we use the following lemma, which is
given by Murota [16] as a combinatorial counterpart to Lemma 2.2.
Lemma 4.7 ([16, P)(,(-./.(0 6.2]). Let A(s) be an n × n nonsingular polynomial matrix and let
A# be the tight coefficient matrix of A(s) with respect to a feasible solution (p, q) of D(A). Then (p, q)
is optimal if and only if t-rank A# = n.
Lemma 4.8. Let A(s) = ( Q (s )
T (s )
) be an n × n nonsingular LM-polynomial matrix that is not upper-
#
tight, and A# = ( Q
T#
) the tight coefficient matrix with respect to an optimal solution (p, q) of D(A).
Then for the LM-polynomial matrix A(s) defined in Equation (27), the value (p, q) is feasible on D(A)
but not optimal.
P)((4. Consider a rational function matrix
H (s) = Dp (s)A(s)D q−1 (s). (28)
For each i ∈ R and j ∈ C, it holds that deg Hi, j (s) = c i, j + pi − q j , where c i, j = deg Ai, j (s). By sub-
stituting Equation (27) into (28), we obtain
' ( ' (
U O −1 U O ! # "
H (s) = Dp (s)A(s)D q (s) = A + A∞ (s) ,
O I O I
where A∞ (s) is a matrix whose entries are polynomials in s −1 without constant terms. Hence,
for each i ∈ R and j ∈ C, it holds deg Hi, j (s) ≤ 0, which implies c i, j ≤ q j − pi . Therefore, (p, q) is
feasible on D(A).

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:18 S. Iwata et al.

Next, we show that (p, q) is not optimal on D(A). From Equation (27), the tight coefficient matrix
#
A of A(s) with respect to (p, q) is
' ( ' #(
# U O #
A = A = Q# , (29)
O I T
#
where Q = U Q # . From Proposition 3.4 and Equation (25), it holds
) *
# #
t-rank A = min t-rank Q [RQ , J ] + t-rankT # [RT , J ] + |C \ J | | J ⊆ C
#
≤ t-rank Q [RQ , J ∗ ] + t-rankT # [RT , J ∗ ] + |C \ J ∗ |
#
= rank Q [RQ , J ∗ ] + t-rankT # [RT , J ∗ ] + |C \ J ∗ |.
#
Now, since Q # [RQ , J ∗ ] and Q [RQ , J ∗ ] = U Q # [RQ , J ∗ ] have the same rank, we obtain
#
t-rank A ≤ rank Q # [RQ , J ∗ ] + t-rankT # [RT , J ∗ ] + |C \ J ∗ | = rank A# ,
#
where the last equality comes from Equation (24). In addition, since rank A = rank A# from Equa-
# # # #
tion (29), we have t-rank A ≤ rank A , which implies t-rank A = rank A = rank A# . Furthermore,
since A(s) is not upper-tight, we have rank A < n by Lemma 2.2. Thus, t-rank A# = rank A# < n
#

holds. It then follows from Lemma 4.7 that (p, q) is not optimal on D(A). !
From Lemma 4.8 and the unimodularity of UQ (s), we obtain the following.
C()(22a)3 4.9. Let A(s) = ( Q (s )
T (s )
) be an n × n nonsingular LM-polynomial matrix that is not
upper-tight, and A(s) the LM-polynomial matrix defined in Equation (27). Then δ,n (A) ≤ δ,n (A) − 1
and δn (A) = δn (A) hold.
Example 4.10. Consider the LM-polynomial matrix (23) again. The tight coefficient matrix A#
with respect to p = (0, 0, 0, 0) and q = (0, 0, 0, 1) is

( % 1 1 1
()
&
#
'
1
= && )),
Q −1 −1
A# =
T #
& −1 )
' −1 *
where the row sets RQ of Q # and RT of T # correspond to the #rst and last two rows in A# , respec-
tively. A minimizer J ∗ ⊆ C is the set of the right two columns as follows:
C\J ∗ J∗
+,-. +,-.
/
1 1 1
%& 1 −1() / Q
R
−1
A# = &&−1 )) .
' *
RT
−1
Then the rank of A is calculated by Equation (24) as Q [RQ , J ∗ ] + T # [RT , J ∗ ] + |C \ J ∗ | = 1 + 0 +
# #

2 = 3. Since A# is not upper-tight, we need to modify A(s). By performing Gaussian elimination


1 1
on Q # [RQ , J ∗ ] = ( −1 −1 ), we obtain
#
Q [RQ , J ∗ ] = U Q # [RQ , J ∗ ] = ( −1 −1 ),
1 1
where U = ( The unimodular matrix UQ (s) de#ned by Equation (26) coincides with U since
1 ).
all pi are zero. According to Equation (27), we update A(s) into

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:19

1 1 1 1 1 1
%& ()%& ( % (
s
−s )) && −1 −s ))
' (
1 1 1
A(s) = && ))&&
UQ (s) O −1
α 1 )) && −1 α 1 ))
A(s) = . (30)
& )& −1
=
O I 1
' 1 *' −1 α2 * ' −1 α2 *

4.4 Dual Updates


Let (p, q) be a feasible solution of D(A). We obtain an optimal solution of D(A) by iterating the
following procedure:
# #
Let A be the tight coefficient matrix of A(s) with respect to (p, q). First, we check if t-rank A =
n. If it is, (p, q) is an optimal solution of D(A) from Lemma 4.7 and we are done. Otherwise, we
construct a feasible solution (p -, q - ) of D(A) such that the difference
# #
∆ := (q j- − q j ) − (pi- − pi ) (31)
j ∈C i ∈R
0 1
of the objective values is negative. Let G # = R ∪ C, E # be a bipartite graph de#ned by
. / ) -
E # := (i, j) ∈ R × C --- Ai, j ! 0 = (i, j) ∈ E (A) -- q j − pi = c i, j .
*
#
-
Since (p, q) is not optimal, there is no perfect matching of G # . Thus, G # has a vertex cover S ⊆ R ∪ C
with |S | < n by the König–Egerváry theorem. Using this S, we de#ne (p -, q - ) as follows:
2 2
pi (i ∈ R ∩ S ) q + 1 (j ∈ C ∩ S )
-
pi = , qj = j
-
(32)
pi + 1 (i ∈ R \ S ) qj (j ∈ C \ S )
for i ∈ R and j ∈ C.
The following lemma is a restatement of a well-known fact [11]. We give a proof for
completeness:
Lemma 4.11. Let (p, q) be a feasible but not optimal solution of D(A) and (p -, q - ) defined in Equa-
tion (32). Then the difference ∆ of the objective values in Equation (31) is negative, and (p -, q - ) is a
feasible solution of D(A).
P)((4. The difference of the objective values is ∆ = |C ∩ S | − |R \ S | = |S | − |R| < 0. Next, we
show the feasibility of (p -, q - ). For every (i, j) ∈ E (A), it holds q j − pi ≥ c i, j since (p, q) is feasible.
If i ∈ S or j ∈ S, it holds (q j- − q j ) − (pi- − pi ) ≥ 0, which imply q j- − pi- ≥ q j − pi ≥ c i, j . If i " W and
j " W , then (i, j) is not an edge of G # , since (i, j) is not covered by W . Hence, it holds q j − pi > c i, j ,
and thus q j- − pi- = q j − pi − 1 ≥ c i, j . !
We update (p, q) to (p -, q - ), and go back to the optimality checking. From Lemma 4.11, it is
guaranteed that (p, q) becomes an optimal solution of D(A) by iterating the update process above.
Example 4.12. Consider the modi#ed LM-polynomial matrix (30). The tight coefficient matrix
#
A of A(s) with respect to p = (0, 0, 0, 0) and q = (0, 0, 0, 1) is
1 1
%& (
−1 ))
1
A# = &&
−1
& −1 )).
' −1 *
Let S be the set of the #rst and second columns and the second row of A# . Then S is a vertex cover
of G # with |S | < 4. Following Equation (32), we update (p, q) to p - = (1, 0, 1, 1) and q - = (1, 1, 0, 1).
We then go back to Phase 2 for A(s). It is indeed con#rmed in the next iteration that A(s) is upper-
tight, and thus the iteration ends at this point. We can obtain a low-index DAE by applying the
MS-algorithm.
Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:20 S. Iwata et al.

4.5 Complexity Analysis


This section is devoted to complexity analysis. The dominating part in our algorithm is the matrix
multiplications in Equation (27).
Let A(s) be an n × n nonsingular LM-polynomial matrix and let A# be the tight coefficient matrix
with respect to an optimal solution (p, q) of D(A). From the de#nition of A# , we can express A(s) as
#K
A(s) = Dp−1 (s) %A# + s −k Vk ( D q (s) (33)
' k=1 *
for some K matrices V1 , V2 , . . . , VK with VK ! O. By Equations (27) and (33), we have
' ( K
U O % # # −k (
A(s) = Dp−1 (s) A + s Vk D q (s).
' *
O I
k=1

Therefore, we can compute A(s) by performing K + 1 constant matrix multiplications.


By VK ! O, there exist i ∈ R and j ∈ C such that the (i, j) entry in VK is nonzero. Then the degree
of the corresponding term in Ai, j (s) is equal to q j − pi − K. Since Ai, j (s) is a polynomial, we have
q j − pi − K ≥ 0, which implies K ≤ q j − pi ≤ q j . The following lemma bounds pi and q j at any
iteration of our algorithm.
Lemma 4.13. During the algorithm, the values pi and q j are at most 2ln for i ∈ R and j ∈ C, where
l is the maximum degree of an entry in A(s).
P)((4. From Lemma 4.5, the initial values of pi and q j are bounded by ln. In every update of
(p, q), the values pi and q j increase by at most one from the update rule (32). In addition, (p, q)
is updated at most δ,n (A) − δn (A) ≤ ln times, because the objective value j ∈C q j − i ∈R pi of the
$ $
dual problem decreases by at least one in every update. Therefore, at any iteration of the algorithm,
it holds pi , q j ≤ ln + δ,n (A) ≤ ln + ln = 2ln. !
The time complexity of our algorithm is as follows:
The()em 4.14. Let A(s) be an n × n nonsingular LM-polynomial matrix and let l be the maximum
degree of an entry in A(s). Then Algorithm for Tightness runs in O(l 2nω+2 ) time, where 2 < ω ≤ 3 is
the matrix multiplication exponent.
P)((4. Phase 1 can be done in O(n3 ) time by the Hungarian method [11] and shortest path
algorithms such as the Bellman–Ford algorithm. Consider the time complexity in every itera-
tion of Phases 2 and 3. In Phase 2, the nonsingularity of the tight coefficient matrix A# can be
checked via the rank identity (12). Thus, an efficient way is to obtain a minimizer J ∗ of Equa-
tion (12) before Phase 2, and then check the nonsingularity of A# by Equation (12). The min-
imizer J ∗ can be found from a residual graph constructed by an augmenting path type algo-
rithm [23], which runs in O(n3 log n) time [3]. The computation of A(s) in Phase 3 can be done
in O(N nω ) = O(maxj ∈C q j nω ) = O(lnω+1 ) time from Lemma 4.13, where (p, q) is a dual optimal
solution of D(A) and N is in Equation (33). In addition, since the number of iterations of Phases 2
and 3 is at most δ,n (A) − δn (A) ≤ ln, the running time in Phases 2 and 3 is O(l 2nω+2 ). Finally, the
updates of (p, q) run in O(ln4 ) time: (p, q) is updated at most δ,n (A) ≤ ln times, and in every update,
we can #nd a vertex cover in O(n3 ) time by Ford–Fulkerson’s algorithm. Thus, the total running
time is O(l 2nω+2 ). !
The()em 4.15. For a DAE (13) with n × n nonsingular mixed polynomial matrix A(s), our algo-
rithm returns an equivalent DAE of index zero or one in O(l 2nω+2 ) time, where 2 < ω ≤ 3 is the matrix
multiplication exponent and l is the maximum degree of entries in A(s).

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:21

P)((4. First, we convert the DAE into an equivalent DAE with LM-polynomial matrix ALM (s)
of size 2n × 2n. Note that the maximum degree of an entry in ALM (s) is equal to l by Equation (15).
Hence, it follows from Theorem 4.14 that Algorithm for Tightness for ALM (s) runs in O(l 2nω+2 )
time. The resulting DAE has a coefficient matrix such that the maximum degree of an entry is at
most 4ln, because it holds that
deg ALM
i, j (s) ≤ q j − pi ≤ q j ≤ 4ln

with a feasible solution (p, q) of D(ALM ), where the last inequality is due to Lemma 4.13.
Next, we analyze the complexity of the MS-algorithm described in Section 2.4. In Step 1, we
can reuse a dual optimal solution (p, q) obtained at the termination of Algorithm for Tightness,
or compute a new (p+, q+) such that p+i ≤ pi for i ∈ R to decrease the number of dummy variables,
in O(n3 ) time. The nonsingularity of the corresponding tight coefficient matrix can be veri#ed by
solving an independent matching problem in O(n3 log n) time [3, 23]. Step 2 runs in O(n4 log n)
time since we solve independent matching problems at most 2n times. We now consider the re-
sultant DAE returned in Step 4. The number of original (non-dummy) variables is 2n, and from
Lemma 4.13, the orders of their derivatives are at most
4ln + max pi ≤ 4ln + 4ln = O ln.
i ∈R
$
In contrast, the number of dummy variables is i ∈R pi = O(ln2 ), and there is no derivative of
dummy variables in the resultant DAE. Therefore, the number of terms in the resultant DAE is
O(ln2 ), and thus Step 4 runs in O(ln2 ) time. Hence, the MS-algorithm costs O(n4 log n + ln2 ) time.
Since the bottleneck in the entire algorithm is Algorithm for Tightness, the total running time
of our algorithm is O(l 2nω+2 ). !

5 EXPLOITING DIMENSIONAL CONSISTENCY


5.1 Dimensional Consistency
The principle of dimensional homogeneity claims that any equation describing a physical phe-
nomenon must be consistent with respect to physical dimensions. To re%ect the dimensional con-
sistency in conservation laws of dynamical systems, Murota [15] introduced a class of mixed poly-
nomial matrices A(s) = Q (s) + T (s) that satisfy the following condition:
(MP-DC) Q (s) is written as
Q (s) = diag(s −λ1 , . . . , s −λm )Q (1) diag(s µ 1 , . . . , s µ n ) (34)
for some integers λ 1 , . . . , λm and µ 1 , . . . , µ n .
A mixed polynomial matrix satisfying (MP-DC) is said to be dimensionally consistent. We ab-
breviate a dimensionally consistent mixed polynomial matrix and a dimensionally consistent LM-
polynomial matrix to a DCM-polynomial matrix and a DCLM-polynomial matrix, respectively.
Example 5.1. Consider the DAE (10) representing the electrical circuit shown in Figure 1. Since
Q (s) of the coefficient matrix A(s) of Equation (10) is constant, A(s) is a DCM-polynomial matrix
with all λi and µ j being zero. Note that (λ, µ) is not uniquely determined; the values
λ = (0, 0, −3, −3, −3, −3, −3, −3, 0, −3), µ = (0, 0, 0, 0, 0, −3, −3, −3, −3, −3) (35)
also satisfy Equation (34).
The condition (MP-DC) can be “derived” from physical observations as follows: Suppose that
a DAE A(s)+x (s) = f,(s) arises from a dynamical system and the ith equation and the jth variable
have physical dimensions X i and Yj , respectively. For example, in the DAE (10), the #rst, second,

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:22 S. Iwata et al.

and ninth equations have the dimension of current and others have the dimension of voltage. Sim-
ilarly, the #rst #ve variables ξ+1 , . . . , ξ+5 of Equation (10) have the dimension of current and the last
#ve variables η+1 , . . . , η+5 have the dimension of voltage. Then the dimension of each nonzero entry
Ai, j (s) of A(s) must be X i Yj−1 according to the principle of dimensional homogeneity. An impor-
tant physical observation here is that all the nonzero coefficients of entries in Q (s) are naturally
regarded as dimensionless, because they typically represent coefficients of conservation laws. In
addition, since the indeterminate s corresponds to the time derivative, its dimension is the inverse
T−1 of the dimension T of time. Thus, if Q i, j (s) ! 0, then Q i, j (s) must be a monomial Q i, j (1)s di, j
of dimension T−di, j with di, j = deg Q i, j (s). Let λi , µ j ∈ Q such that X i and Yj are decomposed as
X i = Tλi X i- and Yj = Tµ j Yj-, where X i- and Yj- are physical dimensions that are not relevant to T in
the system of measurement. Now it holds T−di, j = X i Yj−1 = Tλi −µ j X i-Yj-−1 for i ∈ R and j ∈ C with
Q i, j (s) ! 0. This implies di, j = −λi + µ j , and thus we have Q i, j (s) = Q i, j (1)s −λi +µ j for all i ∈ R and
j ∈ C. This is equivalent to (MP-DC) if every λi and µ j are integral. Even if not, we can take inte-
gral (λ -, µ - ) satisfying Equation (34) [21, Theorem 2.2.35(2)]. See Reference [21, Section 3] for more
details.
As described above, λi and µ j can be taken as the exponents of T in the physical dimensions of
the ith equation and the jth variable (if they are integral). In fact, the value (35) is taken from the
DAE (10) in this way as the dimension of voltage is expressed as L2 T−3 MI−1 by the SI base units,
where L, M, and I are dimensions of length, mass, and current, respectively.

5.2 Improved Algorithm


This section improves the matrix modi#cation procedure in Phase 3 for DCLM-polynomial matri-
ces, preserving their dimensional consistency.
Let A(s) = ( Q (s )
T (s )
) be a DCLM-polynomial matrix with RQ = Row(Q ), RT = Row(T ), and C =
Col(A). Let (p, q) be an optimal solution of D(A). For an integer k ∈ Z, let

Rk = {i ∈ RQ | pi − λi = k }, Ck = {j ∈ C | q j − µ j = k }. (36)

If Q i, j (s) ! 0, then we have c i, j ≤ q j − pi from the feasibility of (p, q) and c i, j = µ j − λi by Equa-


tion (34). Hence, pi − λi ≤ q j − µ j follows, which implies i ∈ Rh if and only if j ∈ Ck with h ≤ k.
Thus, it holds Q (s)[Rh , Ck ] = O for integers h, k ∈ Z with h > k. Namely, Q (s) forms a block tri-
angular matrix.
#
Let A# = ( Q T#
) denote the tight coefficient matrix with respect to (p, q). From the de#nition of
the tight coefficient matrix, Q # forms a block diagonal matrix as

··· C −1 C0 C1 C2 ···
.. ..
. %& . ()
R −1 && #
Q −1 ))
R0 && Q 0# ))
Q # = R1 && Q 1# )) ,
&& ))
R2 & Q 2# )
..
' .*
..
.

where Q k# = Q # [Rk , Ck ] for k ∈ Z, and empty blocks indicate zero submatrices.

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:23

Let J ∗ ⊆ C be a minimizer of the rank identity (12) for A# . Sorting rows in ascending order of
p, the matrix modi#cation process described in Section 4.3 #nds a nonsingular upper-triangular
matrix U such that
rank U Q # [RQ , J ∗ ] = t-rank U Q # [RQ , J ∗ ]. (37)
For a DCLM-polynomial matrix, supposing that rows in Rk are sorted in ascending order of p, we
#nd a nonsingular upper-triangular matrix Uk such that
rank Uk Q k# [Rk , Ck ∩ J ∗ ] = t-rank Uk Q k# [Rk , Ck ∩ J ∗ ]
for k ∈ Z. Then U = block-diag(. . . , U−1 , U0 , U1 , U2 , . . .) satis#es Equation (37), where block-
diag(B 1 , B 2 , . . . , B N ) is a block diagonal matrix of diagonal blocks B 1 , B 2 , . . . , B N .
For k ∈ Z, let Pk (s) be a diagonal polynomial matrix with Row(Pk ) = Col(Pk ) = Rk whose (i, i)
entry is s pi for each i ∈ Rk . Let Dp (s) = block-diag(. . . , P−1 (s), P0 (s), P1 (s), P2 (s), . . .). Now the uni-
modular matrix UQ (s) de#ned in Equation (26) can be written as
UQ (s) = Dp−1 (s) block-diag(. . . , U−1 , U0 , U1 , U2 , . . .)Dp (s)
= Dp−1 (s) block-diag(. . . , U−1 P−1 (s), U0 P0 (s), U1 P1 (s), U2 P2 (s), . . .). (38)
UQ (s )Q (s )
Then, we update A(s) into A(s) = ( T (s )
) as written in Equation (27).
UQ (s )Q (s )
Lemma 5.2. Let A(s) = ( Q (s )
T (s )
) be an n × n DCLM-polynomial matrix. Then A(s) = ( T (s )
) is
also dimensionally consistent.
P)((4. Let λ 1 , . . . , λmQ and µ 1 , . . . , µ n de#ned in Equation (34) for A(s), where mQ = | Row(Q )|.
For k ∈ Z, let Rk and Ck de#ned in Equation (36), and let Λk (s) denote a diagonal polyno-
mial matrix with Row(Λk ) = Col(Λk ) = Rk whose (i, i) entry is s λi for each i ∈ Rk , and D µ (s) =
diag(s µ 1 , . . . , s µ n ). Then the condition (34) for dimensional consistency is written as
Q (s) = block-diag(. . . , Λ−1 −1 −1 −1
−1 (s), Λ0 (s), Λ1 (s), Λ2 (s), . . .)Q (1)D µ (s). (39)
Combining Equations (38) and (39), we obtain
UQ (s)Q (s) = P −1 (s) block-diag(. . . , U−1 P−1 (s)Λ−1 −1 −1
−1 (s), U0 P 0 (s)Λ0 (s), U1 P 1 (s)Λ1 (s), . . .)Q (1)D µ (s)
= P −1 (s) block-diag(. . . , s −1U−1 , U0 , sU1 , s 2U2 , . . .)Q (1)D µ (s)
= block-diag(. . . , s −1 P−1
−1
(s), P0−1 (s), sP1−1 (s), s 2 P2−1 (s), . . .)U Q (1)D µ (s), (40)
where we used Pk (s)Λ−1
k
(s) = s k I for k ∈ Z. From Equation (40), A(s) is also dimensionally
consistent. !

5.3 Complexity Analysis


For a DCLM-polynomial matrix A(s), we can compute A(s) = U (s)A(s) only by one constant matrix
multiplication U Q (1) from Equation (40), whereas a general LM-polynomial matrix needs O(ln)
multiplications. This improves the total running time as follows:
The()em 5.3. Let A(s) be an n × n nonsingular DCLM-polynomial matrix and l the maximum
degree of an entry in A(s). Then Algorithm for Tightness runs in O(ln4 log n) time.
P)((4. For each iteration of Phases 2 and 3, the computation of A(s) in Phase 3 can be done
in O(nω ) time, where 2 < ω ≤ 3 is the matrix multiplication exponent. The most expensive part
is the nonsingularity checking for a tight coefficient matrix in Phase 2, which requires O(n3 log n)
time [3, 23]. Since the number of iterations of Phases 2 and 3 is at most δ,n (A) − δn (A) ≤ ln, the

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:24 S. Iwata et al.

running time of Phases 2 and 3 is O(ln4 log n). We can check that other processes run in O(ln4 log n)
time as in the proof of Theorem 4.14. !
The()em 5.4. For a DAE (13) with n × n nonsingular DCM-polynomial coefficient matrix A(s),
our algorithm returns an equivalent DAE of index zero or one in O(ln4 log n) time, where l is the
maximum degree of entries in A(s).
P)((4. We can easily check that the coefficient LM-polynomial matrix of the augmented
DAE described in Section 4.1 is also dimensionally consistent. Algorithm for Tightness runs in
O(ln4 log n) time from Theorem 5.3. In addition, the MS-algorithm runs in O(n4 log n + ln2 ) time
as discussed in the proof of Theorem 4.15. Thus, the total running time is O(ln4 log n). !

6 EXAMPLES
We give two examples below. The #rst example is a simple index-4 DAE and the second example
is the DAE (10) representing the electrical network shown in Figure 1. Throughout the execution
of our algorithm, it is emphasized that: (i) we only use combinatorial operations and numerical
calculations over rational numbers (over integers in the following examples), and (ii) we do not
reference values of physical quantities.

6.1 Example of High-index DAE


The #rst example is the following index-4 DAE



ẍ 1 − ẋ 1 + ẍ 2 − ẋ 2 + x 4 = f 1 (t ),





ẍ 1 + ẍ 2 + x 3 = f 2 (t ),
 (41)



α 1x 2 + α 2ẍ 3 + α 3ẋ 4 = f 3 (t ),


 α 4x 3 + α 5ẋ 4 = f 4 (t ),
with independent parameters α 1 , . . . , α 5 and smooth functions f 1 , . . . , f 4 . The coefficient matrix
A(s) = ( Q (s )
T (s )
) corresponding to Equation (41) is an LM-polynomial matrix given by

s2 − s s2 − s 1
%& 2 ()
s2 1
A(s) = && ).
s
α 3s ))
(42)
& α1 α 2s 2
' α4 α 5s *
The row sets RQ of Q (s) and RT of T (s) correspond to the #rst and last two rows in A(s), respec-
tively. This polynomial matrix (42) is not DCLM. Since δn (A) = deg(−α 1α 5s 3 − α 1α 4s 2 + α 1α 5s 2 ) =
3 and δ,n (A) = 7, the MS-algorithm is not applicable to the DAE, which is shown in our algorithm.
Let us apply our algorithm to Equation (42). First, we #nd a dual optimal solution p = (0, 0, 0, 0)
#
and q = (2, 2, 2, 1). The corresponding tight coefficient matrix A# = ( Q
T#
) is
1 1
%& 1 1 ()
& )
A# = && α2 α 3 )).
&& α 5 ))
' *
A minimizer J ∗ of Equation (12) for A# is the set of the #rst and the second columns. Then
we can check that rank A# = Q # [RQ , J ∗ ] + T # [RT , J ∗ ] + |C \ J ∗ | = 1 + 0 + 2 = 3 < 4, which implies
! "
that A(s) is not upper-tight. We convert Q # [RQ , J ∗ ] = 11 11 by a row transformation into

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:25

# ! " !1 "
Q [RQ , J ∗ ] = U Q # [RQ , J ∗ ] = 1 1 , where U = −1
1 . Using UQ (s) = U , the LM-polynomial
matrix A(s) is modi#ed to

1 −1 −s −s −1 1
%& () %& 2 ()
1 s2 1
A (s) = && )) A(s) = && s ).
α 3s ))
-
& 1 ) & α1 α 2s 2
' 1* ' α4 α 5s *

The dual solution is updated to p - = (1, 0, 0, 1) and q - = (2, 2, 2, 2), and the corresponding tight
-#
coefficient matrix A-# = ( Q
T -#
) of A- (s) is

−1 −1
%& ()
1 1
A-# = && )).
& α2 )
' α5 *

The minimizer J ∗ that we used above also minimizes the right-hand side of the rank identity (12)
for A-# . Since A-# is still singular,
! −1 we "continue the
! 1 modi#cation
" process. Noting the order of rows,
−1
we transform Q [RQ , J ] = 1 1 by U = 1 1 into
-# ∗ -

-# ! "
Q [RQ , J ∗ ] = U -Q -# [RQ , J ∗ ] = −1 −1 .

!1 "
We have UQ- (s) = diag(s −1 , 1)U - diag(s, 1) = s 1 , and modify A- (s) to

1 −s −s −1 1
%& () % (
A (s) = &&
s 1 )) A- (s) = &&& −s + 1 s ))
α 2s 2 α 3s ))
--
.
& 1 ) & α1
' 1* ' α4 α 5s *

The dual solution is updated to p -- = (1, 3, 2, 3) and q -- = (2, 2, 4, 4). Our algorithm halts at this
point, since A-- (s) is upper-tight, which can be checked through the nonsingularity of the tight
coefficient matrix A--# again. Now δn (A) is computed as δn (A) = δn (A-- ) = δ,n (A-- ) = 3. The result-
ing DAE is




−ẋ 1 − ẋ 2 − x 3 + x 4 = f 1 (t ) − f 2 (t ),




 = f˙1 (t ) − f˙2 (t ) + f 2 (t ),

−ẋ 3 + x 3 + ẋ 4
 (43)




α 1x 2 + α 2ẍ 3 + α 3ẋ 4 = f 3 (t ),


 α 4x 3 + α 5ẋ 4 = f 4 (t ),

which is index two.


An index-1 DAE is obtained by applying the MS-algorithm to the DAE (43). Instead of (p --, q -- ),
we now use an optimal solution p+ = (0, 2, 1, 2) and q+ = (1, 1, 3, 3) of D(A-- ) to decrease the number
of dummy variables as described in the proof of Theorem 4.15. Then the MS-algorithm outputs the

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:26 S. Iwata et al.

index-1 DAE


 −ẋ 1 − z 2[1] − x 3 + x 4 = f 1 (t ) − f 2 (t ),





 = f˙1 (t ) − f˙2 (t ) + f 2 (t ),



−ẋ 3 + x 3 + ẋ 4





 −z 3[2] + x 3 + z 4[2] = f¨1 (t ) − f¨2 (t ) + f˙2 (t ),


 ... ...


 −z 3[3] + x 3 + z 4[3] = f 1 (t ) − f 2 (t ) + f¨2 (t ),



 α 1x 2 + α 2x 3 + α 3ẋ 4



= f 3 (t ),




 α 1z 2[1] + α 2ẋ 3 + α 3z 4[2] = f˙3 (t ),









α 4x 3 + α 5ẋ 4 = f 4 (t ),




 α 4ẋ 3 + α 5z 4[2] = f˙4 (t ),



 α 4z 3[2] + α 5z 4[3] = f¨4 (t ),

... ...
where z 2[1] , z 3[2] , z 3[3] , z 4[2] , and z 4[3] are dummy variables corresponding to ẋ 2 , ẍ 3 , x 3 , ẍ 4 , and x 4 ,
respectively.

6.2 Example of Electrical Network


The next example is the DAE (10) representing the electrical network in Figure 1. Since the co-
efficient matrix A(s) is not LM-polynomial, it seems that we cannot directly apply our algorithm
to A(s). However, since each of the last #ve rows in A(s) do not contain two or more accurate
constants, we can convert A(s) into an LM-polynomial matrix by multiplying an independent pa-
rameter to each of the rows. In addition, by the same logic to Lemma 4.2, our algorithm works
without actually multiplying the independent parameters by regarding nonzero entries in the last
#ve rows as independent parameters. Thus, we see A(s) as an LM-polynomial matrix A(s) = ( Q (s )
T (s )
),
where Q (s) and T (s) correspond to the #rst and last #ve rows in A(s), respectively. The ma-
trix A(s) meets the condition (MP-DC) for DCLM-polynomial matrices with λ = (0, 0, 0, 0, 0) and
µ = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0).
We are now ready for applying our algorithm to A(s). In Phase 1, a dual optimal solution
is obtained as p = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0) and q = (0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0), which implies that
δ,n (A) = 2. The corresponding tight coefficient matrix A# = ( Q
#

T#
) is given by



1 
() 
−1 −1
%& 


1 1 −1
&& )) 
−1 )  
RQ
&& 1 1 
))  

&& −1 −1
)) 
& 1 
A = && )) 
# −1
&& R 1 ))  
 .
−1 

&& ))  
)) 
R2 −1
&& 

RT
)) 
−1
&& 
L
−1 C 


' 1* 

A minimizer J ∗ of the rank identity (12) for A# is the set of nine columns other than the rightmost
column corresponding to the variable η+5 . Thus, we can check
rank A# = Q # [RQ , J ∗ ] + T # [RT , J ∗ ] + |C \ J ∗ | = 4 + 4 + 1 = 9 < 10,

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:27

which implies that A(s) is not upper-tight. We proceed to the matrix modi#cation process for
DCLM-polynomial matrices that we described in Section 5.2.
The row set Rk and the column set Ck for k ∈ Z de#ned in Equation (36) is the following:

J∗
+33333333333333333333333333333333333,-33333333333333333333333333333333333.
C0 C1 C0 C1 C0
+,-. +,-. +333333333333333,-333333333333333. +,-. +,-.
1 

() 
−1 −1
%& 


1 1 −1 

Q # = &&& 1 1 )
−1 )) 
)
R0 .
& 


−1 −1 
' 1 −1 *

Now Q # can be seen as a block diagonal matrix consisting of one diagonal block Q 0# = Q # [R 0 , C 0 ]
by Q # [R 0 , C 1 ] = O. We transform

−1 −1 1
%& 1 1 −1 ()
&& )
1 1 ))
Q 0# [R 0 , C 0 ∩ J ∗ ] = && ))
&& −1 −1
)
& 1 −1 )
' *

−1 −1 1
%& 1 1 −1 () %&
1
()
&& )) 1
into U Q 0 [R 0 , C 0 ∩ J ] = &&
# ∗ )), where U = &&& 1 1
)
1 )).
&& −1 −1 )) && 1 ))
& 1 −1 )
' * ' 1*
Using UQ (s) = U , we modify A(s) to

−1 −1 1
%& 1 1 1 −1 ()
&& )
&& 1 −1 ))
&& −1 −1 1 ))
& ))
1
A- (s) = && )) ,
−1
&& R 1 −1 ))
&& R2 −1 ))
&& −1 ))
&& ))
Ls
−1 Cs
' 1*

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:28 S. Iwata et al.

Fig. 3. Butterworth filter via the Kth Cauer topology.

where the third row is different between A(s) and A- (s). The dual solution is updated to p - =
(0, 0, 1, 0, 0, 0, 0, 0, 0, 1) and q - = (0, 0, 1, 0, 0, 0, 0, 0, 1, 1). Since the corresponding tight coefficient
matrix of A- (s) is nonsingular, we stop the algorithm. The index of the modi#ed DAE remains at
two.
Finally, by applying the MS-algorithm to the modi#ed DAE, we obtain an index-1 DAE




−ξ 1 − ξ 4 + ξ 5 = 0,






ξ2 + ξ3 + ξ4 − ξ5 = 0,






η4 − η5 = 0,





 z 4[1] − z 5[1] = 0,





 = 0,



−η 1 − η 2 + η 4


 = 0,


η2 − η3



R1ξ 1 − η1 = 0,






R2ξ 2 − η2 = 0,





 Lξ˙3 − η 3 = 0,









−ξ 4 + Cz 4[1] = 0,






η5 = V (t ),



 z 5[1] = V̇ (t ),

where z 4[1] and z 5[1] are dummy variables corresponding to η̇ 4 and η̇ 5 , respectively.

7 NUMERICAL EXPERIMENTS
We conduct numerical experiments comparing our algorithm with the LC-method by Tan
et al. [30]. Recall that the LC-method works for linear DAEs whose associated polynomial
matrix A(s) has only constants, whereas our algorithm can treat a DAE containing independent
parameters.

7.1 Experiment Description


For an even positive integer K, the Butterworth #lter via the Kth Cauer topology is an electrical cir-
cuit shown in Figure 3. This circuit has n = 2K + 4 state variables ξ 0 , ξ 1 , . . . , ξ K +1 , η 0 , η 1 , . . . , η K +1 ,
where ξ 0 , ξ 1 , . . . , ξ K +1 are currents and η 0 , η 1 , . . . , η K +1 are voltages shown in Figure 3.

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:29

A DAE representing the circuit is given by





−ξ k−1 + ξ k + ξ k+1 = 0 (k = 1, 3, 5, . . . , K − 1),






−ξ 0 + ξ 1 + ξ 3 + · · · + ξ K +1 = 0,






η 0 + η 2 + η 4 + · · · + η K + η K +1 = 0,




 −ηk−1 + ηk + ηk+1 = 0 (k = 2, 4, 6, . . . , K ),
 (44)




η 0 = V (t ),






−ξ k + Ck η̇k = 0 (k = 1, 3, 5, . . . , K − 1),





 Lk ξ˙k − ηk = 0 (k = 2, 4, 6, . . . , K ),



 Rξ K +1 − η K +1 = 0.
The index of the DAE (44) is two, and the associated polynomial matrix A(s) is a sparse matrix
that has 6K + 7 nonzero coefficients. Though it suffices to use simpler equations −ξ K + ξ K +1 = 0
and η 0 + η 1 = 0 instead of the second and the third equations in (44), respectively, we use them to
make the MS-algorithm not applicable for the DAE.
We apply our algorithm and the LC-method to the DAE (44) using the following two ways of
implementation:
Dense Matrix Implementation, which stores a matrix in the memory as a two-dimensional
array. While this implementation always requires O (nm) space for a matrix of size m × n,
it has less overhead than the sparse matrix implementation if the matrix is dense.
Sparse Matrix Implementation, which stores only nonzero entries of a matrix. A typi-
cal implementation of this type is in formats called compressed sparse column (CSC) or
compressed sparse row (CSR). We adopt the CSR in our experiments. The sparse matrix
implementation has an advantage in that it consumes only the space proportional to the
number of nonzero entries, and thus algorithms using this implementation are expected
to run efficiently for sparse matrices.
In our algorithm, we treat the coefficients R, Ck , Lk , and “±1”s in the last four equations in (44) as
independent parameters similarly to the example in Section 6.2. Then the associated polynomial
matrix A(s) = ( Q (s )
T (s )
) is dimensionally consistent, where | Row(Q (s))| = | Row(T (s))| = K + 2. In
the LC-method, we substitute the following real numbers:
2k − 1
Ck = 2 sin π (k = 1, 3, 5, . . . , K − 1),
2K
2k − 1
Lk = 2 sin π (k = 2, 4, 6, . . . , K ),
2K
R = π.
Under this setting, we compare the running time for K = 2, 4, 8, 16, . . . , 216 . We implemented all
algorithms in C++ using the library Eigen3 for matrix computation. It is emphasized again that
we do not rely on symbolic computation. The experiments are conducted on a laptop with Core i7
1.7GHz CPU and 8GB memory.

7.2 Experimental Results


Running Time. Tables 1 and 2 and Figure 4 show the running time of the algorithms. On the
dense matrix implementations, both algorithms did not run for K ≥ 212 due to the lack of memory
capacity. The reasons are as follows: Our implementations express a polynomial as an array of
coefficients using std::vector<int> or std::vector<float> in C++, and it consumes 32 bytes

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:30 S. Iwata et al.

Table 1. Running Time (sec) of Dense Implementations for K = 211

LC-method proposed
Phase 1 1.80 × 10−2 (0.00%) 1.70 × 10−2 (0.00%)
Phase 2 6.69 × 102 (29.61%) 9.69 × 101 (19.54%)
Phase 3 1.59 × 103 (70.26%) 3.97 × 102 (79.98%)
MS-algorithm 1.02 × 100 (0.04%) 7.28 × 10−1 (0.15%)
total 2.26 × 103 (100.00%) 4.96 × 102 (100.00%)

Table 2. Running Time (sec) of Sparse Implementations for K = 211

LC-method proposed
Phase 1 1.55 × 10−2 (4.88%) 1.58 × 10−2 (3.32%)
Phase 2 1.33 × 10−1 (41.87%) 3.82 × 10−1 (80.07%)
Phase 3 1.25 × 10−1 (39.40%) 39.2 × 10−2 (8.21%)
MS-algorithm 2.54 × 10−2 (7.98%) 2.47 × 10−2 (5.17%)
total 3.18 × 10−1 (100.00%) 4.78 × 10−1 (100.00%)

Fig. 4. Log-log plot of the experimental result: K versus the running time.

even for the zero polynomial. Since the number of entries in the input polynomial matrix A(s) for
K = 212 is n2 = (2K + 4) 2 ≥ 226 , we need at least 226 × 32 bytes = 2GB to hold A(s). Besides the
input matrix, our implementations construct several constant and polynomial matrices of similar
or larger size, such as a tight coefficient matrix A# , a unimodular matrix U (s) for modi#cation in
Phase 3, and an output matrix. Thus, 212 is near the borderline of the maximum K for which our
implementations run on our laptop with 8GB memory.
It can be seen from Figure 4 that our algorithm is faster than the LC-method on their dense
matrix implementations, and it is converse for their sparse ones. This is attributed to the fact that
in the process of multiplying polynomial matrices in Equation (27) at Phase 3, the LC-method
multiplies the entire of the given polynomial matrix A(s), whereas our algorithm multiplies only

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:31

Fig. 5. Hatched regions indicate submatrices in a polynomial matrix A(s) to be modified by algorithms. In
(b), we use notations given in Section 5.2.

submatrices of A(s) as illustrated in Figure 5. Since this process is dominant on the dense matrix
implementations as Table 1 indicates, the difference between the sizes of matrices to be multiplied
directly affects the difference of the running times. This process, however, does not cost much in
the sparse matrix implementations, and thus Phase 2 becomes relatively expensive. As a result,
the difference between the running times on sparse matrix implementations re%ect the difference
between that of the independent matching algorithm and the Gaussian elimination used by our
algorithm and the LC-method in Phase 2, respectively.
Recalling that the size of the DAE is n = O(K ), Figure 4 shows that the running time of our
algorithm grows proportionally to O(n2.84 ) in the dense matrix implementation and O(n1.97 ) in
the sparse one for K ≥ 28 . Both are much faster than the theoretical guarantee O(n4 log n) given
in Theorem 5.4.

8 APPLICATION TO NONLINEAR DAES


In this section, we discuss the application of our algorithm to nonlinear DAEs. The σν -method [2],
which is implemented in Mathematica [32], adopts a strategy of treating nonlinear or time-varying
terms as independent parameters in the Jacobian matrices of DAEs. We #rst describe the σν -
method brie%y.
Consider the index-2 nonlinear DAE (5) with a smooth nonlinear function д : R → R. Their
method constructs two kinds of Jacobian matrices JD and JV as follows:

' ( 1 0 0 ' ( 0 ∂д/∂x 2 0


= %& 1 0 0 (), = %& 1 1 ().
∂Fi ∂Fi
JD = JV = 0
∂ẋ j ∂x j
i, j
'1 0 0* i, j
'0 0 1*

If JD is nonsingular, the DAE is index zero from the implicit function theorem. Otherwise, the
method performs Gaussian elimination on JD (and JV simultaneously) to make the bottom row
of JD zero. Then the method differentiates the equation corresponding to the bottom row and
checks the nonsingularity of JD again. The main feature of the σν -method is to treat nonlinear
or time-varying terms as “independent parameters” to avoid complicated symbolic manipulations.
The method works according to the rule that arithmetic operations and the differentiation of in-
dependent parameters generate new independent parameters.

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:32 S. Iwata et al.

The σν -method may fail due to this rule. For example, let α 1 be an independent parameter
representing ∂д/∂x 2 in JV. By subtracting the #rst row from the second and third ones, we obtain
1 0 0 0 α1 0
JD = %& 0 0 0 (), JV = %& 1 α 2 1 (),
'0 0 0* ' 0 α3 1 *
where α 2 = 0 − α 1 and α 3 = 0 − α 1 are newly generated parameters by the rule of arithmetic op-
erations. We differentiate the second and third rows. Then JD and JV are
1 0 0 0 α1 0
JD = %& 1 α 2 1 (), JV = %& 0 α 4 0 (),
' 0 α3 1 * ' 0 α5 0 *
where α 4 and α 5 are parameters corresponding to the derivatives of α 2 and α 3 , respectively. Al-
though the Jacobian matrix JD is indeed singular due to α 2 = α 3 , the σν -method halts at this point
as the method regards α 2 and α 3 as independent. This failure originates from the elimination of
matrices involving the independent parameter α 1 . We have con#rmed that the implementation in
Mathematica actually fails on this DAE.
Our algorithm is applied to the same DAE (5) as follows. Let
s α
A(s) = %& s + 1 1 (),
' s 1*
where α is an independent parameter representing ∂д/∂x 2 . As described in Section 2.4, the MS-
algorithm is applicable to the nonlinear DAE (5) if A(s) is upper-tight. The tight coefficient matrix
corresponding to a dual optimal solution p = (0, 0, 0) and q = (1, 0, 0) is
1 α
A# = %& 1 1 (),
'1 1*
which is singular. Thus, we need to modify the matrix. By the same logic as the discussion in
Section 6.2, we can regard A(s) as an LM-polynomial matrix A(s) = ( Q
T (s )
(s )
), where T (s) corresponds
to the #rst row and Q (s) corresponds to the other two rows in A(s). Then our algorithm modi#es
A(s) to
s α
A- (s) = %& 1(),
's
1*
which is upper-tight (we omit the detail of this modi#cation). Using an optimal solution p - =
(0, 1, 0) and q - = (1, 0, 0) of D(A- ), the MS-algorithm obtains a purely algebraic equation


 z 1[1] + д(x 2 )

= f 1 (t ),




 x1 = f 2 (t ) − f 3 (t ),



 z 1[1] = f˙2 (t ) − f˙3 (t ),




 z [1] + x
 1 3 = f 3 (t ),
where z 1[1] is a dummy variable corresponding to ẋ 1 .
This example shows that our algorithm works for a DAE to which the existing index reduction
algorithm cannot be applied. Our algorithm is expected to rarely cause cancellations between
nonlinear terms, as it does not perform the row operations involving independent parameters.

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
Index Reduction for Differential-algebraic Equations with Mixed Matrices 35:33

In particular, our algorithm can be applied to nonlinear DAEs in which cancellations occur only
between linear terms like the transistor ampli#er DAE in Reference [14]; such DAEs often appear in
practice. Therefore, although the application to nonlinear DAEs remains at the stage of a heuristic,
it is anticipated that the proposed method can be useful for index reduction of nonlinear DAEs.

9 CONCLUSION
In this article, we have proposed an index reduction algorithm for linear DAEs whose coefficient
matrices are mixed matrices. The proposed method detects numerical cancellations between ac-
curate constants and transforms a DAE into an equivalent DAE to which the MS-algorithm is
applicable. Our algorithm uses combinatorial algorithms on graphs and matroids, based on the
combinatorial relaxation framework. We have also developed a faster algorithm for DAEs whose
coefficient matrices are dimensionally consistent. In addition, we have con#rmed through nu-
merical experiments that our algorithm runs sufficiently faster than the theoretical guarantee for
large-scale DAEs and modi#es DAEs preserving physical meanings of dynamical systems. Our
algorithms can also be applied to nonlinear DAEs by regarding nonlinear terms as independent
parameters. Numerical experiments on nonlinear DAEs are left for further investigation.

ACKNOWLEDGMENTS
We thank anonymous referees for helpful suggestions and comments.

REFERENCES
[1] K. E. Brenan, S. L. Campbell, and L. R. Petzold. 1996. Numerical Solution of Initial-Value Problems in Differential-
Algebraic Equations. SIAM, Philadelphia, PA.
[2] S. Chowdhry, H. Krendl, and A. A. Linninger. 2004. Symbolic numeric index analysis algorithm for differential alge-
braic equations. Industr. Eng. Chem. Res. 43, 14 (2004), 3886–3894. DOI:https://doi.org/10.1021/ie0341754
[3] W. H. Cunningham. 1986. Improved bounds for matroid partition and intersection algorithms. SIAM J. Comput. 15, 4
(1986), 948–957. DOI:https://doi.org/10.1137/0215066
[4] J. Edmonds. 1968. Matroid partition. In Mathematics of the Decision Sciences: Part I, G. B. Dantzig and A. F. Veinott
(Eds.). Lectures in Applied Mathematics, Vol. 11. AMS, Providence, RI, 335–345.
[5] C. W. Gear. 1988. Differential-algebraic equation index transformations. SIAM J. Sci. Statist. Comput. 9 (1988), 39–47.
DOI:https://doi.org/10.1137/0909004
[6] S. Iwata. 2003. Computing the maximum degree of minors in matrix pencils via combinatorial relaxation. Algorithmica
36, 4 (2003), 331–341. DOI:https://doi.org/10.1007/s00453-003-1022-9
[7] S. Iwata and K. Murota. 2001. Combinatorial relaxation algorithm for mixed polynomial matrices. Math. Prog. 90, 2
(2001), 353–371. DOI:https://doi.org/10.1007/PL00011427
[8] S. Iwata and M. Takamatsu. 2013. Computing the maximum degree of minors in mixed polynomial matrices via
combinatorial relaxation. Algorithmica 66, 2 (2013), 346–368. DOI:https://doi.org/10.1007/s00453-012-9640-8
[9] S. Iwata and M. Takamatsu. 2018. Index reduction via unimodular transformations. SIAM J. Matrix Anal. Appl. 39, 3
(2018), 1135–1151. DOI:https://doi.org/10.1137/17M111794X
[10] B. Korte and J. Vygen. 2008. Combinatorial Optimization (4th. ed.). Algorithms and Combinatorics, Vol. 21. Springer-
Verlag, Berlin.
[11] H. W. Kuhn. 1955. The Hungarian method for the assignment problem. Nav. Res. Log. Quart. 2 (1955), 83–97.
[12] F. Le Gall. 2014. Powers of tensors and fast matrix multiplication. In Proceedings of the 39th International Symposium on
Symbolic and Algebraic Computation (ISSAC’14). ACM, New York, NY, 296–303. DOI:https://doi.org/10.1145/2608628.
2608664
[13] S. E. Mattsson and G. Söderlind. 1993. Index reduction in differential-algebraic equations using dummy derivatives.
SIAM J. Sci. Comput. 14, 3 (1993), 677–692. DOI:https://doi.org/10.1137/0914043
[14] F. Mazzia and C. Magherini. 2008. Test Set for Initial Value Problem Solvers. Technical Report. Department of Mathe-
matics, University of Bari, Bari. Retrieved from: https://archimede.dm.uniba.it/∼testset/.
[15] K. Murota. 1985. Use of the concept of physical dimensions in the structural approach to systems analysis. Japan J.
Appl. Math. 2, 2 (1985), 471–494. DOI:https://doi.org/10.1007/BF03167086
[16] K. Murota. 1990. Computing Puiseux-series solutions to determinantal equations via combinatorial relaxation. SIAM
J. Comput. 19, 6 (1990), 1132–1161. DOI:https://doi.org/10.1137/0219077

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.
35:34 S. Iwata et al.

[17] K. Murota. 1993. Mixed matrices: Irreducibility and decomposition. In Combinatorial and Graph-Theoretical Problems
in Linear Algebra, R. A. Brualdi, S. Friedland, and V. Klee (Eds.). The IMA Volumes in Mathematics and its Applications,
Vol. 50. Springer, New York, NY, 39–71. DOI:https://doi.org/10.1007/978-1-4613-8354-3_2
[18] K. Murota. 1995. Combinatorial relaxation algorithm for the maximum degree of subdeterminants: Computing Smith-
McMillan form at in#nity and structural indices in Kronecker form. Appl. Alg. Eng., Commun. Comput. 6, 4–5 (1995),
251–273. DOI:https://doi.org/10.1007/BF01235719
[19] K. Murota. 1995. Computing the degree of determinants via combinatorial relaxation. SIAM J. Comput. 24, 4 (1995),
765–796. DOI:https://doi.org/10.1137/S0097539791201897
[20] K. Murota. 1998. On the degree of mixed polynomial matrices. SIAM J. Matrix Anal. Appl. 20, 1 (1998), 196–227.
DOI:https://doi.org/10.1137/S0895479896311438
[21] K. Murota. 2010. Matrices and Matroids for Systems Analysis. Algorithms and Combinatorics, Vol. 20. Springer-Verlag,
Berlin.
[22] K. Murota and M. Iri. 1985. Structural solvability of systems of equations—A mathematical formulation for distin-
guishing accurate and inaccurate numbers in structural analysis of systems. Japan J. Appl. Math. 2 (1985), 247–271.
DOI:https://doi.org/10.1007/BF03167048
[23] K. Murota, M. Iri, and M. Nakamura. 1987. Combinatorial canonical form of layered mixed matrices and its application
to block-triangularization of systems of linear/nonlinear equations. SIAM J. Alg. Disc. Meth. 8, 1 (1987), 123–149.
DOI:https://doi.org/10.1137/0608011
[24] T. Oki. 2019. Improved structural methods for nonlinear differential-algebraic equations via combinatorial relaxation.
In Proceedings of the 44th International Symposium on Symbolic and Algebraic Computation (ISSAC’19). ACM, New
York, NY.
[25] J. G. Oxley. 2011. Matroid Theory (2nd. ed.). Oxford University Press, New York, NY.
[26] C. C. Pantelides. 1988. The consistent initialization of differential-algebraic systems. SIAM J. Sci. Statist. Comput. 9, 2
(1988), 213–231. DOI:https://doi.org/10.1137/0909014
[27] J. D. Pryce. 2001. A simple structural analysis method for DAEs. BIT Numer. Math. 41, 2 (2001), 364–394. DOI:https://
doi.org/10.1023/A:1021998624799
[28] S. Sato. 2015. Combinatorial relaxation algorithm for the entire sequence of the maximum degree of minors in mixed
polynomial matrices. JSIAM Letters 7 (2015), 49–52. DOI:https://doi.org/10.14495/jsiaml.7.49
[29] C. Shi. 2004. Linear Differential-Algebraic Equations of Higher-Order and the Regularity or Singularity of Matrix Poly-
nomials. Ph.D. Dissertation. Technische Universität, Berlin.
[30] G. Tan, N. S. Nedialkov, and J. D. Pryce. 2017. Conversion methods for improving structural analysis of
differential-algebraic equation systems. BIT Numerical Mathematics 57, 3 (2017), 845–865. DOI:https://doi.org/10.
1007/s10543-017-0655-z
[31] J. Unger, A. Kröner, and W. Marquardt. 1995. Structural analysis of differential-algebraic equation systems —
theory and applications. Computers and Chemical Engineering 19, 8 (1995), 867–882. DOI:https://doi.org/10.1016/
0098-1354(94)00094-5
[32] Wolfram Research, Inc. 2017. Numerical Solution of Differential-Algebraic Equations — Wolfram Language Docu-
mentation. Retrieved September 27, 2017 from http://reference.wolfram.com/language/tutorial/NDSolveDAE.html.
[33] X. Wu, Y. Zeng, and J. Cao. 2013. The application of the combinatorial relaxation theory on the structural index
reduction of DAE. In Proceedings of the 12th International Symposium on Distributed Computing and Applications to
Business, Engineering & Science. IEEE, 162–166. DOI:https://doi.org/10.1109/DCABES.2013.36

Received June 2018; revised June 2019; accepted June 2019

Journal of the ACM, Vol. 66, No. 5, Article 35. Publication date: July 2019.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy