A cost-scaling algorithm for computing the degree of determinants

In this paper, we address computation of the degree degDetA\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\deg {\rm Det} A$$\end{document} of Dieudonné determinant DetA\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\rm Det} A$$\end{document} of A=∑k=1mAkxktck,\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} A = \sum_{k=1}^m A_k x_k t^{c_k}, \end{aligned}$$\end{document} where Ak\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$A_k$$\end{document} are n×n\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n \times n$$\end{document} matrices over a field K\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbb{K}$$\end{document}, xk\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_k$$\end{document} are noncommutative variables, t is a variable commuting with xk\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_k$$\end{document}, ck\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$c_k$$\end{document} are integers, and the degree is considered for t. This problem generalizes noncommutative Edmonds' problem and fundamental combinatorial optimization problems including the weighted linear matroid intersection problem. It was shown that degDetA\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\deg {\rm Det} A$$\end{document} is obtained by a discrete convex optimization on a Euclidean building (Hirai 2019). We extend this framework by incorporating a cost-scaling technique and show that degDetA\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\deg {\rm Det} A$$\end{document} can be computed in time polynomial of n,m,log2C\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n,m,\log_2 C$$\end{document}, where C:=maxk|ck|\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C:= \max_k |c_k|$$\end{document}. We give a polyhedral interpretation of degDet\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\deg {\rm Det}$$\end{document}, which says that degDet\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\deg {\rm Det}$$\end{document}A is given by linear optimization over an integral polytope with respect to objective vector c=(ck)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$c = (c_k)$$\end{document}. Based on it, we show that our algorithm becomes a strongly polynomial one. We also apply our result to an algebraic combinatorial optimization problem arising from a symbolic matrix having 2×2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$2 \times 2$$\end{document}-submatrix structure.


Introduction
Edmonds' problem [4] asks to compute the rank of a matrix of the following form: where A k are n × n matrices over field K, x k are variables, and A is considered as a matrix over rational function field K(x 1 , x 2 , . . ., x k ).This problem is motivated by a linear algebraic formulation of the bipartite matching problem and other combinatorial optimization problems.For a bipartite graph G = ([n] ⊔ [n], E), consider A = ij∈E E ij x ij , where E ij denotes the 0, 1 matrix having 1 only for the (i, j)-entry.Then rank A is equal to the maximum size of a matching of G. Other basic classes of combinatorial optimization problems have such a rank interpretation.For example, the linear matroid intersection problem corresponds to A with rank-1 matrices A k , and the linear matroid matching problem corresponds to A with rank-2 skew symmetric matrices A k ; see [22].Symbolical treatment of variables x k makes the problem difficult, whereas the rank computation after substitution for x k is easy and it provides the correct value in high probability.A randomized polynomial time algorithm is obtained by this idea [21].A deterministic polynomial time algorithm for Edmonds' problem is not known, and is one of important open problems in theoretical computer science.
A recent approach to Edmonds' problem, initiated by Ivanyos et al. [9], is to consider variables x k to be noncommutative.That is, the matrix A is regarded as a matrix over noncommutative polynomial ring K x 1 , x 2 , . . ., x m .The rank of A is well-defined via embedding K x 1 , x 2 , . . ., x m to the free skew field K( x 1 , x 2 , . . ., x m ).The resulting rank is called the noncommutative rank (nc-rank) of A and is denoted by nc-rank A. Interestingly, nc-rank A admits a deterministic polynomial time computation: Theorem 1.1 ( [7,10]).nc-rank A for a matrix A of form (1.1) can be computed in time polynomial of n, m.
The algorithm by Garg et al. [7] works for K = Q, and the algorithm by Ivanyos et al. [10] works for an arbitrary field K. Another polynomial time algorithm for nc-rank is obtained by Hamada and Hirai [11], while the bit-length of this algorithm may be unbounded if K = Q.By the formula of Fortin and Reutenauer [5], nc-rank A is obtained by an optimization problem defined on the family of vector subspaces in K n .The above algorithms deal with this new type of an optimization problem.It holds rank A ≤ nc-rank A, where the inequality can be strict in general.For some class of matrices including linear matroid intersection, rank A = nc-rank A holds, and the Fortin-Reutenauer formula provides a combinatorial duality relation.This is basically different from the usual derivation by polyhedral combinatorics and LP-duality.
In the view of combinatorial optimization, rank computation corresponds to cardinality maximization.The degree of determinants is an algebraic correspondent of weighted maximization.Indeed, the maximum-weight of a perfect matching of a bipartite graph is equal to the degree deg det A of the determinant det where t is a new variable, c ij are edge-weights, and the degree is considered in t.Therefore, the weighed version of Edmonds' problem is computation of the degree of the determinant of a matrix A of form (1.1), where each A k = A k (t) is a polynomial matrix with variable t.
Motivated by this observation and the above-mentioned development, Hirai [12] introduced a noncommutative formulation of the weighted Edmonds' problem.In this setting, the determinant det A is replaced by the Dieudonné determinant Det A [3] -a determinant concept of a matrix over a skew field.For our case, A is viewed as a matrix over the skew field F(t) of rational functions with coefficients in F = K( x 1 , x 2 , . . ., x m ).Then the degree with respect to t is well-defined.He established a formula of deg Det A generalizing the Fortin-Reutenauer formula for nc-rank A, a generic algorithm (Deg-Det) to compute deg Det A, and deg det A = deg Det A relation for weighted linear matroid intersection problem.In particular, deg Det is obtained in time polynomial of n, m, the maximum degree d of matrix A with respect to t, and the time complexity of solving the optimization problem for nc-rank.Although the required bit-length is unknown for K = Q, Oki [23] showed another polynomial time reduction from deg Det to nc-rank with bounding bit-length.
In this paper, we address the deg Det computation of matrices of the following special form: where A k are matrices over K and c k are integers.This class of matrices is natural from the view of combinatorial optimization.Indeed, the weighted bipartite matching and weighted linear matroid intersection problems correspond to deg Det of such matrices.Now exponents c k of variable t work as weights or costs.In this setting, the above algorithms [12,23] For a more general setting of "sparse" polynomial matrices, such a polynomial time deg Det computation seems difficult, since it can solve (commutative) Edmonds' problem [23].
Our algorithm for Theorem 1.2 is based on the framework of [12]; hence the required bit-length is unknown for K = Q.In this framework, deg Det A is formulated as a discrete convex optimization on the Euclidean building for GL n (K(t)).The Deg-Det algorithm is a simple descent algorithm on the building, where discrete convexity property (L-convexity) provides a sharp iteration bound of the algorithm via geometry of the building.We incorporate cost scaling into the Deg-Det algorithm, which is a standard idea in combinatorial optimization.To obtain the polynomial time complexity, we need a polynomial sensitivity estimate for how an optimal solution changes under the perturbation c k → c k − 1.We introduce a new discrete convexity concept, called N-convexity, that works nicely for such cost perturbation, and show that the objective function enjoys this property, from which a desired estimate follows.This method was devised by [14] in another discrete convex optimization problem on a building-like structure.
As an application, we consider an algebraic combinatorial optimization problem for a symbolic matrix of form where A ij is a 2 × 2 matrix over K for i, j ∈ [n].We call such a matrix a 2 × 2partitioned matrix.Rank computation of this matrix is viewed as a "2-dimensional" generalization of the bipartite matching problem.The duality theorem by Iwata and Murota [17] implies rank A = nc-rank A relation.Although rank A can be computed by the above-mentioned nc-rank algorithms, the problem has a more intriguing combinatorial nature.Hirai and Iwamasa [15] showed that rank A is equal to the maximum size of a certain algebraically constrained 2-matching (A-consistent 2-matching) on a bipartite graph, and they developed an augmenting-path type polynomial time algorithm to obtain a maximum A-consistent 2-matching.We apply our cost-scaling framework for a 2 × 2-partitioned matrix A with x ij replaced by  [2] speeded up this algorithm, and also obtained a randomized FPTAS by using cost scaling.Recently, Iwata and Kobayashi [16] finally developed a polynomial time algorithm solving the weighted linear matroid matching problem, where the running time does not depend on C. The algorithm also uses a similar (essentially equivalent) deg det formulation, and is rather complicated.A simplified polynomial time algorithm, possibly using cost scaling, is worthy to be developed, in which the results in this paper may help.
Organization.The rest of this paper is organized as follows: In Section 2, we give necessary arguments on nc-rank, Dieudonné determinant, Euclidean building, and discrete convexity.Our argument is elementary; no prior knowledge is assumed.In Section 3, we present our algorithm for Theorem 1.2.In Section 4, we describe the results on 2 × 2-partitioned matrices.

Preliminaries
Let R, Q, and Z denote the sets of reals, rationals, and integers, respectively.Let e i ∈ Z n denote the i-th unit vector.For s ∈ [n], let 1 s ∈ Z n denote the 0,1 vector in which the first s components are 1 and the others are zero, i.e., The degree of a rational p/q with polynomials p, q is defined as deg p − deg q.The degree of the zero polynomial is defined as −∞.

Nc-rank and the degree of Dieudonné determinant
Instead of giving necessary algebraic machinery, we simply regard the following formula by Fortin and Reutenauer [5] as the definition of the nc-rank.

Theorem 2.1 ([5]
).Let A be a matrix of form (1.1).Then nc-rank A is equal to the optimal value of the following problem: SAT has an r × s zero submatrix, S, T ∈ GL n (K).

Theorem 2.2 ([10]
).An optimal solution S, T in (R) can be computed in polynomial time.
Notice that the algorithm by Garg et al. [7] obtains the optimal value of (R) but does not obtain optimal (S, T ), and that the algorithm by Hamada and Hirai [11] obtains optimal (S, T ) but has no guarantee of polynomial bound of bit-length when K = Q.
Next we consider the degree of the Dieudonné determinant.Again we regard the following formula as the definition.

Theorem 2.3 ([12]
).Let A be a matrix of form (1.2).Then deg Det A is equal to the optimal value of the following problem: A pair of matrices P, Q ∈ GL n (K(t)) is said to be feasible (resp.optimal) for A if it is feasible (resp.optimal) to (D) for A.
A matrix M = M(t) over K(t) is written as a formal power series as For solving (D), the leading term (P AQ) x k plays an important role.
(1) (P, Q) is optimal if and only if nc-rank(P AQ) (0) = n. ( A self-contained proof (for regarding (D) as the definition of deg Det) is given in the appendix.
Notice that the optimality condition (1) does not imply a good characterization (NP ∩ co-NP characterization) for det Det A, since the size of P, Q (e.g., the number of terms) may depend on c k pseudo-polynomially.
In particular, we may assume c k ≥ 0.
Suppose that nc-rank m k=1 A k x k < n Then we can choose S, T ∈ GL n (K) such that S m k=1 A k x k T has an r × s zero submatrix with r + s > n in the upper right corner.Then, for every κ > 0, ((t κ1r )S, and (I, I) is optimal by Lemma 2.4 (1).Then we have deg Det m k=1 A k x k = 0.

Euclidean building
Here we explain that the problem (D) is regarded as an optimization over the socalled Euclidean building.See e.g., [8] for Euclidean building.Let K(t) − denote the subring of K(t) consisting of elements p/q with deg p/q ≤ 0. Let GL n (K(t) − ) be the subgroup of GL n (K(t)) consisting of matrices over K(t) − invertible in K(t) − .The degree of the determinant of any matrix in GL n (K(t) − ) is zero.Therefore transformation (P, Q) → (LP, QM) for L, M ∈ GL n (K(t) − ) keeps the feasibility and the objective value in (D).Let L be the set of right cosets GL n (K(t) − )P of GL n (K(t) − ) in GL n (K(t)), and let M be the set of left cosets.Then (D) is viewed as an optimization over L×M.The projection of P ∈ GL n (K(t)) to L is denoted by P , which is identified with the submodule of K(t) n spanned by the row vectors of P with coefficients in K(t) − .In the literature, such a module is called a lattice.We also denote the projections of Q to M by Q and of (P, Q) to L × M by P, Q .
The space L (or M) is known as the Euclidean building for GL n (K(t)).We will utilize special subspaces of L, called apartments, to reduce arguments on L to that on Z n .For integer vector α ∈ Z n , denote by (t α ) the diagonal matrix with diagonals t α 1 , t α 2 , . . ., t αn , that is, An apartment of L is a subset A of L represented as for some P ∈ GL n (K(t)).The map α → (t α )P is an injective map from Z n to L. The following is a representative property of a Euclidean building.
Therefore L is viewed as an amalgamation of integer lattices , we obtain a simpler integer program: This is nothing but the (discretized) LP-dual of a weighted perfect matching problem.
We need to define a distance between two solutions P, Q and P ′ , Q ′ in (D).Let the ℓ ∞ -distance d ∞ ( P, Q , P ′ , Q ′ ) defined as follows: Choose an apartment A containing P, Q and P ′ , Q ′ .Now A is regarded as Z 2n = Z n × Z n , and P, Q and P ′ , Q ′ are regarded as points x and x ′ in Z 2n , respectively.Then define d ∞ ( P, Q , P ′ , Q ′ ) as the ℓ ∞ -distance x − x ′ ∞ .The l ∞ -distance d ∞ is independent of the choice of an apartment, and satisfies the triangle inequality.This fact is verified by applying a canonical retraction L × M → A, which is distance-nonincreasing; see [12].

N-convexity
The Euclidean building L admits a partial order in terms of inclusion relation, since lattices are viewed as submodules of K(t) n .By this ordering, L becomes a lattice in poset theoretic sense; see [12,13].Then the objective function of (D) is a submodulartype discrete convex function on L × M, called an L-convex function [12].Indeed, its restriction to each apartment (≃ Z 2n ) is an L-convex function in the sense of discrete convex analysis [20].This fact played an important role in the iteration analysis of the Deg-Det algorithm.

Observe that the objective function of (D
and ∞ otherwise, is N-convex.A slightly modified version of this fact will be used in the proof of the sensitivity theorem (Section 3.4).
N-convexity is definable on L × M by taking apartments.That is, f : L × M → R∪{∞} is called N-convex if the restriction of f to every apartment is N-convex.Hence we have the following, though it is not used in this paper explicitly.
Proposition 2.8.The objective function of (D) is N-convex on L × M.
In fact, operators → and ։ are independent of the choice of apartments, since they can be written by lattice operators on L × M.

Algorithm
In this section, we develop an algorithm in Theorem 1.2.In the following, we assume deg Det A > −∞.Indeed, by Lemma 2.5, it can be decided in advance by nc-rank computation.Also we may assume that each c i is a positive integer, since deg Det t b A = nb + deg Det A.

Deg-Det algorithm
We here present the Deg-Det algorithm [12] for (D), which is a simplified version of Murota's combinatorial relaxation algorithm [18] designed for deg det; see also [19,Section 7.1].The algorithm uses an algorithm of solving (R) as a subroutine.For simplicity, we assume (by multiplying permutation matrices) that the position of a zero submatrix in (R) is upper right.

Algorithm: Deg-Det
, and an initial feasible solution P, Q for A.
Output: deg Det A.

2:
If the optimal value 2n−r−s of (R) is equal to n, then output − deg det P −deg det Q.
The mechanism of this algorithm is simply explained: The matrix SP AQT after step 1 has a negative degree in each entry of its upper right r × s submatrix.Multiplying t for the first r rows and t −1 for the first n − s columns does not produce the entry of degree > 0. This means that the next solution (P, Q) := ((t 1r )SP, QT (t −1 n−s )) is feasible for A, and decreases − deg det P − deg det Q by r + s − n(> 0).Then the algorithm terminates after finite steps, where Lemma 2.4 (1) guarantees the optimality.
In the view of Euclidean building, the algorithm moves the point P, Q ∈ L × M to an "adjacent" point Then the number of the movements (= iterations) is analyzed via the geometry of the Euclidean building.Let OPT(A) ⊆ L × M denote the set of (the image of) all optimal solutions for A. Then the number of iterations of Deg-Det is sharply bounded by the following distance between from P, Q to OPT(A): where we regard P (resp.Q ) as a K(t) − -submodule of K(t) n spanned row (resp.column) vectors.Observe that (P, Q) → (tP, Qt −1 ) does not change the feasibility and objective value, and hence an optimal solution (P * , Q * ) with P ⊆ P * , Q ⊇ Q * always exists.
This property is a consequence of L-convexity of the objective function of (D).Thus Deg-Det is a pseudo-polynomial time algorithm.We will improve Deg-Det by using a cost-scaling technique.

Cost-scaling
In combinatorial optimization, cost-scaling is a standard technique to improve a pseudopolynomial time algorithm A to a polynomial one.Consider the following situation: Suppose that an optimal solution x * for costs ⌈c k /2⌉ becomes an optimal solution 2x * for costs 2⌈c k /2⌉, and that the algorithm A starts from 2x * and obtains an optimal solution for costs c k ≈ 2⌈c k /2⌉ within a polynomial number of iterations.In this case, a polynomial time algorithm is obtained by log max k c k calls of A.
Motivated by this scenario, we incorporate a cost scaling technique with Deg-Det as follows: Output: deg Det A.
1: Letting B ← m k=1 B k x k , solve the problem (R) for B (0) and obtain an optimal solution S, T .
2: Suppose that the optimal value 2n − r − s of (R) is less than n.Letting B k ← (t 1r )SB k T (t −1 n−s ) for k ∈ [m] and D * ← D * + n − r − s, go to step 1.
3: Suppose that the optimal value 2n−r −s of (R) is equal to n.If θ = N, then output D * .Otherwise, letting Notice that each B k is written as the following form: is a matrix over K.We consider to truncate low-degree terms of B k after step 1.For this, we estimate the magnitude of degree for which the corresponding term is irrelevant to the final output.In the modification B k ← (t 1r )SB k T (t −1 n−s ) of step 2, the term B Proof.The total number of calls of the oracle solving (R) is that of the total iterations O(n 2 m log C).By the truncation, the number of terms of B k is O(n 2 m).Hence the update of all B k in each iteration is done in O(n 2+ω m 2 ) time.

Proof of the sensitivity theorem
Lemma 3.5.Let (P, Q) be an optimal solution for A. There is an optimal solution Proposition 3.3 follows from this lemma, since A (θ) is obtained from A (θ−1) (t 2 ) by O(m) decrements of 2c (θ−1) k .Let (P ′ , Q ′ ) be an optimal solution for A ′ such that P ⊆ P ′ , Q ⊇ Q ′ , and d := d ∞ ( P ′ , Q ′ , P, Q ) is minimum.Suppose that d > 0. By Lemma 2.6, choose an apartment A of L × M containing P, Q and P ′ , Q ′ .Regard A as Z n × Z n .Then P, Q and P ′ , Q ′ are regarded as points (α, β) and (α ′ , β ′ ) in Z n × Z n , respectively.The inclusion order ⊆ becomes vector ordering ≤.In particular, α ≤ α ′ and β ≥ β ′ .Consider the problem (D A ) on this apartment.We incorporate the constraints x i + y i + c k ij ≤ 0 to the objective function as barrier functions.Let M > 0 be a large number.Define h : where i, j range over [n] and k over Consider the normal path (z = z 0 , z 1 , . . ., , by N-convexity (Lemma 2.7 ( 2)) all points z ℓ = (x ℓ , y ℓ ) in the normal path satisfies these constraints.Let N ℓ be the number of the indices (i, j) such that z ℓ = (x ℓ , y ℓ ) satisfies where N 0 = 0 holds (since z is a feasible solution for A).
Next we show the monotonicity of h, h ′ through the normal path: Since h is N-convex and z is a minimizer of h, we have ).By (3.1), (3.2), (3.3), we have Thus we have d ≤ n 2 .
4 Algebraic combinatorial optimization for 2 × 2partitioned matrix In this section, we consider an algebraic combinatorial optimization problem for a 2 ×2partitioned matrix (1.3).As an application of the cost-scaling Deg-Det algorithm, we extend the combinatorial rank computation in [15] to the deg-det computation.
We first present the rank formula due to Iwata and Murota [17] in a suitable form for us.Theorem 4.1 ([17]).rank A for a matrix A of form (1.3) is equal to the optimal value of the following problem: SAT has an r × s zero submatrix, S, T ∈ GL n (K), where S, T are written as Namely, (R 2×2 ) is a sharpening of (R) for 2 × 2-partitioned matrices, where S, T are taken as a form of (4.1).This was obtained earlier than the Fortin-Reutenauer formula (Theorem 2.1).From the view, this theorem implies rank A = nc-rank A for a 2 × 2-partitioned matrix A. Therefore, by Theorem 1.1, the rank of A can be computed in a polynomial time.
Hirai and Iwamasa [15] showed that the rank computation of a 2×2-partitioned matrix can be formulated as the cardinality maximization problem of certain algebraically constraint 2-matchings in a bipartite graph.Based on this formulation and partly inspired by the Wong sequence method [9,10], they gave a combinatorial augmenting-path type O(n 4 )-time algorithm to obtain a maximum matching and an optimal solution S, T in (R 2×2 ).
Here, for simplicity of description, we consider a weaker version of this 2-matching concept.Let G A = ([n] ⊔ [n], E) be a bipartite graph defined by ij ∈ E ⇔ A ij = O.A multiset M of edges in E is called a 2-matching if each node in G A is incident to at most two edges in M. For a (multi)set F of edges in E, let A F denote the matrix obtained from A by replacing A ij (ij ∈ F ) by the zero matrix.Observe that a nonzero monomial p of a subdeterminant of A gives rise to a 2-matching M by: An edge ij ∈ E belongs to M with multiplicity m ∈ {1, 2} if x m ij appears in p. Indeed, by the 2 × 2-partition structure of A, index i appears at most twice in p.The monomial p also appears in a subdeterminant of A M .Motivated by this observation, a 2-matching M is called where the cardinality |M| is considered as a multiset.

Proposition 4.2 ([15]
). rank A is equal to the maximum cardinality of an A-consistent 2-matching.
We see Lemma 4.4 below for an essence of the proof.In [15], a stronger notion of a (2-)matching is used, and it is shown that |M| = rank(A M ) is checked in O(n 2 )-time (by assigning a valid labeling (VL)).An A-consistent 2-matching is called maximum if it has the maximum cardinality over all A-consistent 2-matchings.

Theorem 4.3 ([15]).
A maximum A-consistent 2-matching and an optimal solution in (R 2×2 ) can be computed in O(n 4 )-time.Now we consider a weighted version.Suppose that each x ij has integer weight c ij , that is, consider Proof.Consider the leading term q • t deg det A of det A, where q is a nonzero polynomial of variables x ij .Choose any monomial p in the polynomial q.As mentioned above, the set M of edges ij (with multiplicity m = 1, 2) for which x m ij appears in p forms a 2-matching.It is necessarily perfect and A-consistent.Its weight c(M) is equal to deg det A. Thus deg det A is at most the maximum weight of a perfect A-consistent 2-matching.
We show the converse.Choose a maximum-weight perfect A-consistent 2-matching M. It suffices to show that det A M has a nonzero term with degree c(M); such a term also appears in det A. Now M is a disjoint union of cycles, where a cycle of two (same) edges ij, ij can appear.We may consider the case where M consists of a single cycle, from which the general case follows.Suppose that M = {ij, ij}.Then A ij must be nonsingular, and deg det . Suppose that M is a simple cycle of length 2n.Then M is the disjoint union of two perfect matchings M 1 , M 2 .If A ij is nonsingular for all edges ij in the cycle M, then M 1 and M 2 are regarded as perfect A-consistent 2-matchings by defining the multiplicity of all edges by 2 uniformly.By maximality and c(M) = (c(M 1 ) + c(M 2 ))/2, it holds c(M 1 ) = c(M 2 ) = c(M).Replace M by M i .Then det A M has a single term with degree c(M).Suppose that M 1 has an edge ij for which rank A ij = 1.As in [15, (2.6)-(2.9)],we can take S i , T does not vanish in det SAT = const • det A, where S, T are block diagonal matrices with diagonals S i , T j as in (4.1).
Corresponding to Theorem 4.1, the following holds: Proof.When we apply Deg-Det algorithm to A of (4.2), (S, T ) in the step 1 is of form of (4.1).Therefore P AQ (0) is always of form (1.3), and P and Q are always block diagonal matrices with 2 × 2 block diagonal matrices P 1 , . . ., P n and Q 1 , . . ., Q n , respectively.Since rank P AQ (0) = nc-rank P AQ (0) (by Theorem 4.1), the output is equal to deg det A (Lemma 2.4 (2)).
Now we arrive at the goal of this section.Proof.Apply Deg-Det with Cost-Scaling to the matrix A. Since A ij is 2 × 2, N d in the proof of the sensitivity theorem (Section 3.4) can be taken to be 4 (constant), whereas m is n 2 .Therefore, in each scaling phase, the number of iterations is bounded by n 2 .Then the degree bound for truncation is chosen as 2n 2 .The time complexity for matrix update is O(n 2 × n 2 ); this is done by matrix multiplication of 2 × 2 matrices.By Theorem 4.3, γ(n, m) = O(n 4 ).The total time complexity is O(n 6 log C).
Next we find a maximum-weight perfect A-consistent 2-matching from the final B (0) for B = B (0) + B (−1) t −1 + • • • .Consider a maximum B (0) -consistent 2-matching M for 2 × 2-partitioned matrix B (0) (of form (1.3)).Necessarily M is perfect (since B (0) is nonsingular).We show that M contains a maximum-weighted A-consistent 2-matching.Indeed, B (0) is equal to (P AQ) 0 for P, Q ∈ GL n (K(t)), where P and Q are block diagonal matrices with 2 × 2 block diagonals P 1 , P 2 , . . ., P n and Q 1 , Q 2 , . . ., Q n .Notice that P i , Q j are an optimal solution of (D 2×2 ).Observe B From the view of polyhedral combinatorics, it is a natural question to ask for the LPformulation describing the polytope of A-consistent 2-matchings.One possible approach to this question is to clarify the relationship between the LP-formulation and (R 2×2 ).

(
−ℓ) k t −ℓ splits into three terms of degree −ℓ + 1, −ℓ, and −ℓ − 1.By Proposition 3.3, this modification is done at most L := mn 2 time in each scaling phase.In the final scaling phase θ = N, the results of this phase only depend on terms of B k with degree at least −L.These terms come from the first L/2 terms of B k in the end of the previous scaling phase θ = N − 1, which come from the first L/2 + L terms of B k at the beginning of the phase.They come from the first (L/2 + L)/2 + L terms of the phase s = N − 2. A similar consideration shows that the final result is a consequence of the first L(1 + 1/2 + 1/4 + • • • + 1/2 N −θ ) < 2L terms of B k at the beginning of the θ-th scaling phase.Thus we can truncate each term of degree at most −2L: Add to Deg-Det with Cost-Scaling the following procedure after step 1. Truncation: For each k ∈ [m], remove from B k all terms B (−ℓ) k t −ℓ for ℓ ≥ 2n 2 m.Now we have our main result in an explicit form: Theorem 3.4.Deg-Det with Cost-Scaling computes deg Det A in O((γ(n, m) + n 2+ω m 2 )n 2 m log C) time, where γ(n, m) denotes the time complexity of solving (R) and ω denotes the exponent of the time complexity of matrix multiplication.

. 2 )
The computation of deg det A corresponds to the maximum-weight A-consistent 2matching problem.We suppose that rank A = 2n, anddeg det A > −∞.An Aconsistent matching M (defined for (1.3)) is called perfect if |M| = 2n(= rank A);necessarily such an M is the disjoint union of cycles.The weight c(M) is defined byc(M) = ij∈M c ij .Note that c ij contributes to c(M) twice if the multiplicity of ij in M is 2. Lemma 4.4.deg det A is equal to the maximum weight of a perfect A-consistent 2matching.

Theorem 4 . 6 .
Suppose that arithmetic operations on K are done in constant time.A maximum-weight perfect A-consistent 2-matching (and deg det A) can be computed in O(n 6 log C)-time, where C := max i,j∈[n] |c ij |.

M
= (P A M Q) 0 .From this,we have deg det P AQ ≥ deg detP A M Q = deg det A M + i deg det P i + i deg det Q i = deg det B(0) M = 0.This means that deg det A M is equal to deg det A, which is the maximum-weight of a perfect A-consistent 2-matching (Lemma 4.4).Therefore, M must contain a maximum-weight perfect A-consistent 2-matching.It is easily obtained as follows.Consider a simple cycle C = C 1 ∪ C 2 of M, where C 1 and C 2 are disjoint matchings in C. For κ ∈ {1, 2}, if C κ consists of edges ij with rank A ij = 2 and c(C κ ) ≥ c(C), then replace C by C κ in M. Apply the same procedure to each cycle.The resulting M satisfies c(M) = deg det A M , as desired.
are pseudo-polynomial.Therefore, it is natural to ask for deg Det computation with polynomial dependency in log 2 |c k |.The main result of this paper shows that such a computation is indeed possible.Theorem 1.2.Suppose that arithmetic operations over K are done in constant time.Then deg Det A for a matrix A of (1.2) can be computed in time polynomial of n, m, log C, where C