A cost-scaling algorithm for computing the degree of determinants
aa r X i v : . [ c s . D S ] A ug A cost-scaling algorithm for computing the degree ofdeterminants
Hiroshi HIRAI and Motoki IKEDA,Department of Mathematical Informatics,Graduate School of Information Science and Technology,The University of Tokyo, Tokyo, 113-8656, Japan. [email protected] [email protected]
August 27, 2020
Abstract
In this paper, we address computation of the degree deg Det A of Dieudonn´edeterminant Det A of A = m X k =1 A k x k t c k , where A k are n × n matrices over a field K , x k are noncommutative variables, t is a variable commuting x k , c k are integers, and the degree is considered for t .This problem generalizes noncommutative Edmonds’ problem and fundamentalcombinatorial optimization problems including the weighted linear matroid inter-section problem. It was shown that deg Det A is obtained by a discrete convexoptimization on a Euclidean building. We extend this framework by incorporat-ing a cost scaling technique, and show that deg Det A can be computed in timepolynomial of n, m, log C , where C := max k | c k | . We apply this result to an alge-braic combinatorial optimization problem arising from a symbolic matrix having2 × Keywords: Edmonds’ problem, noncommutative rank, Dieudonn´e determinant, Eu-clidean building, discrete convex analysis, partitioned matrix.
Edmonds’ problem [4] asks to compute the rank of a matrix of the following form: A = m X k =1 A k x k , (1.1)where A k are n × n matrices over field K , x k are variables, and A is considered as a ma-trix over rational function field K ( x , x , . . . , x k ). This problem is motivated by a linear1lgebraic formulation of the bipartite matching problem and other combinatorial opti-mization problems. For a bipartite graph G = ([ n ] ⊔ [ n ] , E ), consider A = P ij ∈ E E ij x ij ,where E ij denotes the 0 , i, j )-entry. Then rank A isequal to the maximum size of a matching of G . Other basic classes of combinatorialoptimization problems have such a rank interpretation. For example, the linear matroidintersection problem corresponds to A with rank-1 matrices A k , and the linear matroidmatching 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 rankcomputation after substitution for x k is easy and it provides the correct value in highprobability. A randomized polynomial time algorithm is obtained by this idea [21]. Adeterministic polynomial time algorithm for Edmonds’ problem is not known, and isone of important open problems in theoretical computer science.A recent approach to Edmonds’ problem, initiated by Ivanyos et al. [9], is to considervariables x k to be noncommutative. That is, the matrix A is regarded as a matrix overnoncommutative polynomial ring K h x , x , . . . , x m i . The rank of A is well-defined viaembedding K h x , x , . . . , x m i to the free skew field K ( h x , x , . . . , x m i ). The resultingrank 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 intime polynomial of n, m . The algorithm by Garg et al. [7] works for K = Q , and the algorithm by Ivanyoset al. [10] works for an arbitrary field K . Another polynomial time algorithm fornc-rank is obtained by Hamada and Hirai [11], while the bit-length of this algorithmmay 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. Itholds rank A ≤ nc-rank A , where the inequality can be strict in general. For some classof matrices including linear matroid intersection, rank A = nc-rank A holds, and theFortin-Reutenauer formula provides a combinatorial duality relation. This is basicallydifferent from the usual derivation by polyhedral combinatorics and LP-duality.In the view of combinatorial optimization, rank computation corresponds to car-dinality maximization. The degree of determinants is an algebraic correspondent ofweighted maximization. Indeed, the maximum-weight of a perfect matching of a bipar-tite graph is equal to the degree deg det A of the determinant det A of A = P ij ∈ E E ij x ij t c ij ,where t is a new variable, c ij are edge-weights, and the degree is considered in t . There-fore, the weighed version of Edmonds’ problem is computation of the degree of thedeterminant of a matrix A of form (1.1), where each A k = A k ( t ) is a polynomial matrixwith variable t .Motivated by this observation and the above-mentioned development, Hirai [12]introduced a noncommutative formulation of the weighted Edmonds’ problem. In thissetting, the determinant det A is replaced by the Dieudonn´e determinant
Det A [3] — adeterminant concept of a matrix over a skew field. For our case, A is viewed as a matrixover the skew field F ( t ) of rational functions with coefficients in F = K ( h x , x , . . . , x m i ).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 linear2atroid 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 complexityof solving the optimization problem for nc-rank. Although the required bit-length isunknown for K = Q , Oki [23] showed another polynomial time reduction from deg Detto nc-rank with bounding bit-length.In this paper, we address the deg Det computation of matrices of the followingspecial form: A = m X k =1 A k x k t c k , (1.2)where A k are matrices over K and c k are integers. This class of matrices is natural fromthe view of combinatorial optimization. Indeed, the weighted bipartite matching andweighted 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 abovealgorithms [12, 23] are pseudo-polynomial. Therefore, it is natural to ask for deg Detcomputation with polynomial dependency in log | c k | . The main result of this papershows 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 := max k | c k | . For a more general setting of “sparse” polynomial matrices, such a polynomial timedeg Det computation seems difficult, since it can solve (commutative) Edmonds’ prob-lem [23].Our algorithm for Theorem 1.2 is based on the framework of [12]; hence the re-quired bit-length is unknown for K = Q . In this framework, deg Det A is formulated asa 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 prop-erty (
L-convexity ) provides a sharp iteration bound of the algorithm via geometry ofthe building. We incorporate cost scaling into the
Deg-Det algorithm, which is a stan-dard idea in combinatorial optimization. To obtain the polynomial time complexity,we need a polynomial sensitivity estimate for how an optimal solution changes underthe 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 objec-tive function enjoys this property, from which a desired estimate follows. This methodwas devised by [14] in another discrete convex optimization problem on a building-likestructure.As an application, we consider an algebraic combinatorial optimization problem fora symbolic matrix of form A = A x A x · · · A n x n A x A x · · · A n x n ... ... . . . ... A n x n A n x n · · · A nn x nn , (1.3)where A ij is a 2 × K for i, j ∈ [ n ]. We call such a matrix a 2 × -partitioned matrix . Rank computation of this matrix is viewed as a “2-dimensional”generalization of the bipartite matching problem. The duality theorem by Iwata and3urota [17] implies rank A = nc-rank A relation. Although rank A can be computedby the above-mentioned nc-rank algorithms, the problem has a more intriguing com-binatorial nature. Hirai and Iwamasa [15] showed that rank A is equal to the maxi-mum size of a certain algebraically constrained 2-matching ( A -consistent -matching )on a bipartite graph, and they developed an augmenting-path type polynomial timealgorithm to obtain a maximum A -consistent 2-matching. We apply our cost-scalingframework for a 2 × A with x ij replaced by x ij t c ij , and obtain apolynomial time algorithm to solve the weighted version of this problem and to com-pute deg det A (= deg Det A ). This result sheds an insight on polyhedral combinatorics,since it means that linear optimization over the polytope of A -consistent 2-matchingscan be solved without knowledge of its LP-formulation. Related work.
A matrix A of (1.1) corresponding to the linear matroid matchingproblem (i.e., each A k is a rank-2 skew symmetric matrix) is a representative examplein which rank and nc-rank can be different. Accordingly, deg det and deg Det can differfor a matrix A of (1.2) with rank-2 skew symmetric matrices A k . The computationof deg det of such a matrix is precisely the weighted linear matroid matching problem.Camerini et al. [1] utilized this deg det formulation and random substitution to ob-tain a random pseudo-polynomial time algorithm solving the weighted linear matroidmatching, where the running time depends on C . Cheung et al. [2] speeded up thisalgorithm, and also obtained a randomized FPTAS by using cost scaling. Recently,Iwata and Kobayashi [16] finally developed a polynomial time algorithm solving theweighted linear matroid matching problem, where the running time does not dependon C . The algorithm also uses a similar (essentially equivalent) deg det formulation,and is rather complicated. A simplified polynomial time algorithm, possibly using costscaling, 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 givenecessary arguments on nc-rank, Dieudonn´e determinant, Euclidean building, and dis-crete convexity. Our argument is elementary; no prior knowledge is assumed. In Sec-tion 3, we present our algorithm for Theorem 1.2. In Section 4, we describe the resultson 2 × 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 s ∈ Z n denote the 0,1 vector inwhich the first s components are 1 and the others are zero, i.e., s := P si =1 e i . For aring R , let GL n ( R ) denote the set of n × n matrices over R having inverse R − . Thedegree of a polynomial p ( t ) = a k t k + a k − t k − + · · · + a with a k = 0 is defined as k . Thedegree of a rational p/q with polynomials p, q is defined as deg p − deg q . The degree ofthe zero polynomial is defined as −∞ . Instead of giving necessary algebraic machinery, we simply regard the following formulaby Fortin and Reutenauer [5] as the definition of the nc-rank.4 heorem 2.1 ([5]) . Let A be a matrix of form (1.1) . Then nc - rank A is equal to theoptimal value of the following problem: (R) Min . n − r − s s . t . 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 polynomialtime. Notice that the algorithm by Garg et al. [7] obtains the optimal value of (R) but doesnot obtain optimal (
S, T ), and that the algorithm by Hamada and Hirai [11] obtainsoptimal (
S, T ) but has no guarantee of polynomial bound of bit-length when K = Q .Next we consider the degree of the Dieudonn´e determinant. Again we regard thefollowing formula as the definition. Theorem 2.3 ([12]) . Let A be a matrix of form (1.2) . Then deg Det A is equal to theoptimal value of the following problem: (D) Min . − deg det P − deg det Q s . t . deg( P A k Q ) ij + c k ≤ i, j ∈ [ n ] , k ∈ [ m ]) ,P, Q ∈ GL n ( K ( t )) . A pair of matrices
P, Q ∈ GL n ( K ( t )) is said to be feasible (resp. optimal ) for A if itis feasible (resp. optimal) to (D) for A .A matrix M = M ( t ) over K ( t ) is written as a formal power series as M = M ( d ) t d + M ( d − t d − + · · · , where M ( ℓ ) is a matrix over K ( ℓ = d, d − , . . . ) and d ≥ max ij deg M ij . For solving(D), the leading term ( P AQ ) (0) = P k ( P A k t c k Q ) (0) x k plays an important role. Lemma 2.4 ([12]) . Let ( P, Q ) be a feasible solution for A . (1) ( P, Q ) is optimal if and only if nc - rank( P AQ ) (0) = n . (2) If rank( P AQ ) (0) = n , then deg det A = deg Det A = − deg det P − deg det Q . A self-contained proof (for regarding (D) as the definition of deg Det) is given in theappendix.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 ofterms) may depend on c k pseudo-polynomially. Lemma 2.5. deg Det P mk =1 A k x k t c i > −∞ if and only if nc - rank P mk =1 A k x k = n .Proof. We observe from (D) that deg Det At b = nb +deg Det A and deg Det is monotonein c k . In particular, we may assume c k ≥ P mk =1 A k x k < n Then we can choose
S, T ∈ GL n ( K ) such that S P mk =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 κ r ) S, T ( t − κ n − s ) t − C ) is feasible in (D) with objective value − κ ( r + s − n ) + nC , where C := max k c k . This means that (D) is unbounded. Sup-pose that nc-rank P mk =1 A k x k = n . By monotonicity, we have deg Det P mk =1 A k x k t c i ≥ deg Det P mk =1 A k x k . Now ( P mk =1 A k x k ) (0) = P mk =1 A k x k has nc-rank n , and ( I, I ) isoptimal by Lemma 2.4 (1). Then we have deg Det P mk =1 A k x k = 0.5 .2 Euclidean building Here we explain that the problem (D) is regarded as an optimization over the so-called Euclidean building. See e.g., [8] for Euclidean building. Let K ( t ) − denote thesubring of K ( t ) consisting of elements p/q with deg p/q ≤
0. Let GL n ( K ( t ) − ) be thesubgroup of GL n ( K ( t )) consisting of matrices over K ( t ) − invertible in K ( t ) − . The degreeof 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 objectivevalue 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 h P i , which is identified with the submodule of K ( t ) n spanned by therow 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 h Q i and of ( P, Q ) to
L × M by h P, Q i .The space L (or M ) is known as the Euclidean building for GL n ( K ( t )). We willutilize special subspaces of L , called apartments , to reduce arguments on L to thaton Z n . For integer vector α ∈ Z n , denote by ( t α ) the diagonal matrix with diagonals t α , t α , . . . , t α n , that is, ( t α ) = t α t α . . . t α n . An apartment of L is a subset A of L represented as A = {h ( t α ) P i | α ∈ Z n } for some P ∈ GL n ( K ( t )). The map α
7→ h ( t α ) P i is an injective map from Z n to L . Thefollowing is a representative property of a Euclidean building. Lemma 2.6 (See [8]) . For h P i , h Q i ∈ L , there is an apartment containing h P i , h Q i . Therefore L is viewed as an amalgamation of integer lattices Z n . An apartment in M is defined as a subset of form {h Q ( t α ) i | α ∈ Z n } . An apartment in L × M is theproduct of apartments in L and in M .Restricting (D) to an apartment A = {h ( t α ) P, Q ( t β ) i} ( α,β ) ∈ Z n of L × M , we obtaina simpler integer program:(D A ) Min. − X i ∈ [ n ] α i − X j ∈ [ n ] β j + constants.t. α i + β j + c kij ≤ k ∈ [ m ] , i, j ∈ [ n ]) ,α, β ∈ Z n , where c kij := deg( P A k Q ) ij + c k . This is nothing but the (discretized) LP-dual of aweighted perfect matching problem.We need to define a distance between two solutions h P, Q i and h P ′ , Q ′ i in (D). Let the ℓ ∞ -distance d ∞ ( h P, Q i , h P ′ , Q ′ i ) defined as follows: Choose an apartment A containing6 P, Q i and h P ′ , Q ′ i . Now A is regarded as Z n = Z n × Z n , and h P, Q i and h P ′ , Q ′ i areregarded as points x and x ′ in Z n , respectively. Then define d ∞ ( h P, Q i , h P ′ , Q ′ i ) as the ℓ ∞ -distance k x − x ′ k ∞ .The l ∞ -distance d ∞ is independent of the choice of an apartment, and satisfies thetriangle inequality. This fact is verified by applying a canonical retraction L × M → A ,which is distance-nonincreasing; see [12].
The Euclidean building L admits a partial order in terms of inclusion relation, sincelattices are viewed as submodules of K ( t ) n . By this ordering, L becomes a lattice inposet theoretic sense; see [12, 13]. Then the objective function of (D) is a submodular-type discrete convex function on L × M , called an
L-convex function [12]. Indeed, itsrestriction to each apartment ( ≃ Z n ) is an L-convex function in the sense of discreteconvex analysis [20]. This fact played an important role in the iteration analysis of the Deg-Det algorithm.Here, for analysis of cost scaling, we introduce another discrete convexity concept,called
N-convexity . Since arguments reduce to that on an apartment ( ≃ Z n ), we firstintroduce N-convexity on integer lattice Z n . For x, y ∈ Z n , let x → y defined by x → y := x + X i : y i >x i e i − X i : x i >y i e i . Let x → i +1 y := ( x → i y ) → y , where x → y := x → y . Observe that l ∞ -distance k x − y k ∞ decreases by one when x moves to x → y . In particular, x → d y = y if d = k x − y k ∞ . The sequence ( x, x → y, x → y, . . . , y ) is called the normal path from x to y . Let y ։ x be defined by y ։ x := x → d − y = y + X i : x i − y i = d> e i − X i : x i − y i = − d< e i , where d = k x − y k ∞ .A function f : Z n → R ∪ {∞} is called N-convex if it satisfies f ( x ) + f ( y ) ≥ f ( x → y ) + f ( y → x ) , (2.1) f ( x ) + f ( y ) ≥ f ( x ։ y ) + f ( y ։ x ) (2.2)for all x, y ∈ Z n . Lemma 2.7. (1) x a ⊤ x + b is N-convex for a ∈ R n , b ∈ R . (2) x max( x i + x j , is N-convex for i, j ∈ [ n ] . (3) If f, g are N-convex, then cf + dg is N-convex for c, d ≥ . (4) Suppose that σ : Z n → Z n is a translation x x + v , a transposition of coordinates ( x , . . . , x i , . . . , x j , . . . , x n ) ( x , . . . , x j , . . . , x i , . . . , x n ) , or the sign change ofsome coordinate ( x , . . . , x i , . . . , x n ) ( x , . . . , − x i , . . . , x n ) . If f is N-convex,then f ◦ σ is N-convex. roof. (1) and (3) are obvious. (4) follows from σ ( p → q ) = σ ( p ) → σ ( q ). We examine(2). The case of i = j is clear. We next consider the case of n = 2 and ( i, j ) = (1 , f ( x ) := max( x + x , x, y ∈ Z . Let x ′ := x → y (or x ։ y ),and let y ′ := y → x (or y ։ x ); our argument below works for both → and ։ . We mayconsider the case f ( x ) < f ( x ′ ) ∈ { f ( x ) + 1 , f ( x ) + 2 } . We may assume x ′ = x + 1.Then y ≥ x ′ > x . If f ( x ′ ) = f ( x ) + 2, then x + x ≥ y ≥ x ′ > x , and y ′ = y − (1 , f ( y ′ ) = f ( y ) −
2. Suppose that f ( x ′ ) = f ( x ) + 1. If x ′ = x ,then y ′ = y − (1 ,
0) and | y − x | < y − x , implying y + y > x + x ≥ f ( y ′ ) = f ( y ) −
1. If x ′ = x + 1, then x + x = − y > x , and y ′ = y − (1 , x + (1 ,
1) = y , then x ′ = y and y ′ = x . Otherwise y + y ≥
2, implying f ( y ′ ) = f ( y ) − n ≥
3. Let p : Z n → Z be the projection x ( x i , x j ).Then f = f ◦ p . Also it is obvious that p ( x → y ) = p ( x ) → p ( y ). Hence f ( x ) + f ( y ) = f ( p ( x )) + f ( p ( y )) ≥ f ( p ( x ) → p ( y )) + f ( p ( y ) → p ( x )) = f ( p ( x → y )) + f ( p ( y → x )) = f ( x → y ) + f ( y → x ). Also observe that ( p ( x ։ y ) , p ( y ։ x )) is equal to ( p ( x ) , p ( y ))or ( p ( x ) ։ p ( y ) , p ( y ) ։ p ( x )). From this we have (2.2).Observe that the objective function of (D A ), ( α, β )
7→ − P ni =1 α i − P ni =1 β i + constif ( α, β ) is feasible, and ∞ otherwise, is N-convex. A slightly modified version of thisfact 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. Hencewe 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 theycan be written by lattice operators on L × M . In this section, we develop an algorithm in Theorem 1.2. In the following, we assumedeg Det
A > −∞ . Indeed, by Lemma 2.5, it can be decided in advance by nc-rankcomputation. Also we may assume that each c i is a positive integer, since deg Det t b A = nb + deg Det A . We here present the
Deg-Det algorithm [12] for (D), which is a simplified versionof 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. Forsimplicity, we assume (by multiplying permutation matrices) that the position of a zerosubmatrix in (R) is upper right.
Algorithm: Deg-DetInput: A = P mk =1 A k x k t c k , where A k ∈ K n × n and c k ≥ k ∈ [ m ], and an initialfeasible solution P, Q for A . 8 utput: deg Det A . Solve the problem (R) for (
P AQ ) (0) and obtain optimal matrices S, T . If the optimal value 2 n − r − s of (R) is equal to n , then output − deg det P − deg det Q .Otherwise, letting ( P, Q ) ← (( t r ) SP, QT ( t − n − s )), go to step 1.The mechanism of this algorithm is simply explained: The matrix SP AQT after step1 has a negative degree in each entry of its upper right r × s submatrix. Multiplying t for the first r rows and t − for the first n − s columns does not produce the entryof degree >
0. This means that the next solution (
P, Q ) := (( t r ) SP, QT ( t − n − s )) isfeasible for A , and decreases − deg det P − deg det Q by r + s − n ( > h P, Q i ∈ L × M to an “adjacent” point h P ′ , Q ′ i = h ( t r ) SP, QT ( t − n − s ) i with d ∞ ( h P, Q i , h P ′ , Q ′ i ) = 1.Then the number of the movements (= iterations) is analyzed via the geometry of theEuclidean building. Let OPT( A ) ⊆ L × M denote the set of (the image of) all optimalsolutions for A . Then the number of iterations of Deg-Det is sharply bounded by thefollowing distance between from h P, Q i to OPT( A ):˜ d ∞ ( h P, Q i , OPT( A )) :=min { d ∞ ( h P, Q i , h P ∗ , Q ∗ i ) | ( P ∗ , Q ∗ ) ∈ OPT( A ) : h P i ⊆ h P ∗ i , h Q i ⊇ h Q ∗ i} , where we regard h P i (resp. h Q i ) as a K ( t ) − -submodule of K ( t ) n spanned row (resp.column) vectors. Observe that ( P, Q ) ( tP, Qt − ) does not change the feasibility andobjective value, and hence an optimal solution ( P ∗ , Q ∗ ) with h P i ⊆ h P ∗ i , h Q i ⊇ h Q ∗ i always exists. Theorem 3.1 ([12]) . The number of executions of step 1 in
Deg-Det with an initialsolution ( P, Q ) is equal to ˜ d ∞ ( h P, Q i , OPT( A )) + 1 . 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 usinga cost-scaling technique.
In combinatorial optimization, cost-scaling is a standard technique to improve a pseudo-polynomial time algorithm A to a polynomial one. Consider the following situation:Suppose that an optimal solution x ∗ for costs ⌈ c k / ⌉ becomes an optimal solution 2 x ∗ for costs 2 ⌈ c k / ⌉ , and that the algorithm A starts from 2 x ∗ and obtains an optimalsolution for costs c k ≈ ⌈ c k / ⌉ 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:
Algorithm: Cost-ScalingInput: A = P mk =1 A k x k t c k , where A k ∈ K n × n and c k ≥ k ∈ [ m ]. Output: deg Det A . 9 : Let C ← max i ∈ [ m ] c i , N ← ⌈ log C ⌉ , θ ←
0, and (
P, Q ) ← ( t − I, I ). Let c ( θ ) k ← ⌈ c i / N − θ ⌉ for k ∈ [ m ], and let A ( θ ) ← P mk =1 A k x k t c ( θ ) k . Apply
Deg-Det for A ( θ ) and ( P, Q ), and obtain an optimal solution ( P ∗ , Q ∗ ) for A ( θ ) . If θ = N , then output − deg det P ∗ − deg det Q ∗ . Otherwise, letting ( P, Q ) ← ( P ∗ ( t ) , Q ∗ ( t )) and θ ← θ + 1, go to step 1.For the initial scaling phase θ = 0, it holds c (0) k = 1 for all k and ( P, Q ) = ( t − I, I ) is anoptimal solution for A (0) (by Lemma 2.4 and the assumption nc-rank P mk =1 A k x k = n ). Lemma 3.2. ( P ∗ ( t ) , Q ∗ ( t )) is an optimal solution for A ( θ ) ( t ) = P mk =1 A k x k t c ( θ ) k , andis a feasible solution for A ( θ +1) . The former statement follows from the observation that the optimality (Lemma 2.4 (1))keeps under the change (
P, Q ) ← ( P ( t ) , Q ( t )) and c k ← c k . The latter statementfollows from the fact that c ( θ +1) k is obtained by decreasing 2 c ( θ ) k (at most by 1). Thecorrectness of the algorithm is clear from this lemma.To apply Theorem 3.1, we need a polynomial bound of the distance between theinitial solution ( P ∗ ( t ) , Q ∗ ( t )) of the θ -th scaling phase and optimal solutions for A ( θ ) .The main ingredient for our algorithm is the following sensitivity result. Proposition 3.3.
Let ( P, Q ) be the initial solution in the θ -th scaling phase. Then itholds ˜ d ∞ ( h P, Q i , OPT( A ( θ ) )) ≤ n m . The proof is given in Section 3.4, in which N-convexity plays a crucial role. Thusthe number of iterations of
Deg-Det in step 2 is bounded by O ( n m ), and the numberof the total iterations is O ( n m log C ). Still, the algorithm is not polynomial, since a naive calculation makes (
P, Q ) have apseudo-polynomial number of terms. Observe that (
S, T ) in step 1 of
Deg-Det dependsonly on the leading term of
P AQ = (
P AQ ) (0) + ( P AQ ) ( − t − + · · · . Therefore it isexpected that terms ( P AQ ) ( − ℓ ) t − ℓ with large ℓ > A k is rank-1, such a care is not needed; see [6, 12] for details.First, we present the cost-scaling Deg-Det algorithm in the form that it updates A k instead of P, Q as follows:
Algorithm: Deg-Det with Cost-ScalingInput: A = P mk =1 A k x k t c k , where A k ∈ K n × n and c k ≥ k ∈ [ m ]. Output: deg Det A . Let C ← max i ∈ [ m ] c i , N ← ⌈ log C ⌉ , θ ← B k ← A k for k ∈ [ m ], and D ∗ ← n .10 : Letting B ← P mk =1 B k x k , solve the problem (R) for B (0) and obtain an optimalsolution S, T . Suppose that the optimal value 2 n − r − s of (R) is less than n . Letting B k ← ( t r ) SB k T ( t − n − s ) for k ∈ [ m ] and D ∗ ← D ∗ + n − r − s , go to step 1. Suppose that the optimal value 2 n − r − s of (R) is equal to n . If θ = N , then output D ∗ . Otherwise, letting B k ← (cid:26) B k ( t ) if ⌈ c i / N − θ − ⌉ = 2 ⌈ c i / N − θ ⌉ ,t − B k ( t ) if ⌈ c i / N − θ − ⌉ = 2 ⌈ c i / N − θ ⌉ − ,D ∗ ← D ∗ , and θ ← θ + 1, go to step 1.Notice that each B k is written as the following form: B k = B (0) k + B ( − k t − + B ( − k t − + · · · , where B ( − ℓ ) k is a matrix over K . We consider to truncate low-degree terms of B k afterstep 1. For this, we estimate the magnitude of degree for which the corresponding termis irrelevant to the final output. In the modification B k ← ( t r ) SB k T ( t − n − s ) of step2, the term B ( − ℓ ) k t − ℓ splits into three terms of degree − ℓ + 1, − ℓ , and − ℓ −
1. ByProposition 3.3, this modification is done at most L := mn 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/ B k in the endof the previous scaling phase θ = N −
1, which come from the first L/ L terms of B k at the beginning of the phase. They come from the first ( L/ L ) / L terms of thephase s = N −
2. A similar consideration shows that the final result is a consequenceof the first L (1 + 1 / / · · · + 1 / N − θ ) < L terms of B k at the beginning of the θ -th scaling phase. Thus we can truncate each term of degree at most − L : 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 ℓ ≥ n 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 ω m ) n 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.Proof. The total number of calls of the oracle solving (R) is that of the total iterations O ( n m log C ). By the truncation, the number of terms of B k is O ( n m ). Hence theupdate of all B k in each iteration is done in O ( n ω m ) time. Let A = P mk =1 A k x k t c k and let A ′ = A x t c − + P mk =2 A k x k t c k . Lemma 3.5.
Let ( P, Q ) be an optimal solution for A . There is an optimal solution ( P ′ , Q ′ ) for A ′ such that h P i ⊆ h P ′ i , h Q i ⊇ h Q ′ i , and d ∞ ( h P ′ , Q ′ i , h P, Q i ) ≤ n . A ( θ ) is obtained from A ( θ − ( t ) by O ( m ) decrements of 2 c ( θ − k .Let ( P ′ , Q ′ ) be an optimal solution for A ′ such that h P i ⊆ h P ′ i , h Q i ⊇ h Q ′ i , and d := d ∞ ( h P ′ , Q ′ i , h P, Q i ) is minimum. Suppose that d >
0. By Lemma 2.6, choose anapartment A of L × M containing h P, Q i and h P ′ , Q ′ i . Regard A as Z n × Z n . Then h P, Q i and h P ′ , Q ′ i 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 kij ≤ M > h : Z n × Z n → R by h ( x, y ) := − X i x i − X i y i + M X i,j,k max { x i + y i + c kij , } (( x, y ) ∈ Z n × Z n ) , where i, j range over [ n ] and k over [ m ]. Similarly define h ′ : Z n × Z n → R withreplacing c ij by c ij − i, j ∈ [ n ].Since M is large, ( α, β ) is a minimizer of h and ( α ′ , β ′ ) is a minimizer of h ′ . Notethat ( α, β ) is not a minimizer of h ′ .Consider the normal path ( z = z , z , . . . , z d = z ′ ) from z = ( α, β ) to z ′ = ( α ′ , β ′ ).Since z and z ′ satisfy x i + y j + c ij ≤ x i + y j + c kij ≤ k = 1) for all i, j ∈ [ n ], byN-convexity (Lemma 2.7 (2)) all points z ℓ = ( x ℓ , y ℓ ) in the normal path satisfies theseconstraints. Let N ℓ be the number of the indices ( i, j ) such that z ℓ = ( x ℓ , y ℓ ) satisfies x ℓi + y ℓj + c ij = 1. Then h ′ ( z ℓ ) = h ( z ℓ ) − M N ℓ ( ℓ = 0 , , , . . . , d ) , (3.1)where N = 0 holds (since z is a feasible solution for A ).Next we show the monotonicity of h, h ′ through the normal path: h ( z ) ≤ h ( z ) ≤ · · · ≤ h ( z d − ) ≤ h ( z ′ ) , (3.2) h ′ ( z ) > h ′ ( z ) > · · · > h ′ ( z d − ) > h ′ ( z ′ ) . (3.3)Since h is N-convex and z is a minimizer of h , we have h ( z )+ h ( z ℓ ) ≥ h ( z ։ z ℓ )+ h ( z ℓ − )and h ( z ) ≤ h ( z ։ z ℓ ), implying h ( z ℓ ) ≥ h ( z ℓ − ). Similarly, since h ′ is N-convex, itholds h ′ ( z ℓ ) + h ′ ( z ′ ) ≥ h ′ ( z ℓ +1 ) + h ′ ( z ′ → z ℓ ). Here z ′ → z ℓ = (˜ x, ˜ y ) is closer to z = ( α, β ) than z ′ , with α ≤ ˜ x , β ≥ ˜ y . Since z ′ is a minimizer of h ′ nearest to z , wehave h ′ ( z ′ ) < h ′ ( z ′ → z ℓ ). Thus h ′ ( z ℓ ) > h ′ ( z ℓ +1 ).By (3.1), (3.2), (3.3), we have0 = N < N < · · · < N d − < N d ≤ n . Thus we have d ≤ n . × -partitioned matrix In this section, we consider an algebraic combinatorial optimization problem for a 2 × Deg-Det algorithm, weextend the combinatorial rank computation in [15] to the deg-det computation.12e first present the rank formula due to Iwata and Murota [17] in a suitable formfor us.
Theorem 4.1 ([17]) . rank A for a matrix A of form (1.3) is equal to the optimal valueof the following problem: (R × ) Min . n − r − s s . t . SAT has an r × s zero submatrix ,S, T ∈ GL n ( K ) , where S, T are written as S = S O · · · OO S . . . ...... . . . . . . OO · · · O S n , T = T O · · · OO T . . . ...... . . . . . . OO · · · O T n (4.1) for S i , T i ∈ GL ( K ) ( i ∈ [ n ]) . Namely, (R × ) is a sharpening of (R) for 2 × S, T are taken as a form of (4.1). This was obtained earlier than the Fortin-Reutenauerformula (Theorem 2.1). From the view, this theorem implies rank A = nc-rank A for a2 × A . Therefore, by Theorem 1.1, the rank of A can be computedin a polynomial time.Hirai and Iwamasa [15] showed that the rank computation of a 2 × Wong sequence method [9, 10], they gave a combinatorial augmenting-pathtype O ( n )-time algorithm to obtain a maximum matching and an optimal solution S, T in (R × ).Here, for simplicity of description, we consider a weaker version of this 2-matchingconcept. Let G A = ([ n ] ⊔ [ n ] , E ) be a bipartite graph defined by ij ∈ E ⇔ A ij = O . Amultiset M of edges in E is called a 2 -matching if each node in G A is incident to at mosttwo edges in M . For a (multi)set F of edges in E , let A F denote the matrix obtainedfrom 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 belongsto M with multiplicity m ∈ { , } if x mij appears in p . Indeed, by the 2 × A , index i appears at most twice in p . The monomial p also appears ina subdeterminant of A M . Motivated by this observation, a 2-matching M is called A -consistent if it satisfies | M | = rank( A M ) , 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 -matching. We see Lemma 4.4 below for an essence of the proof. In [15], a stronger notion ofa (2-)matching is used, and it is shown that | M | = rank( A M ) is checked in O ( n )-time(by assigning a valid labeling (VL) ). An A -consistent 2-matching is called maximum ifit has the maximum cardinality over all A -consistent 2-matchings.13 heorem 4.3 ([15]) . A maximum A -consistent -matching and an optimal solution in (R × ) can be computed in O ( n ) -time. Now we consider a weighted version. Suppose that each x ij has integer weight c ij ,that is, consider A = A x t c A x t c · · · A n x n t c n A x t c A x t c · · · A n x n t c n ... ... . . . ... A n x n t c n A n x n t c n · · · A nn x nn t c nn . (4.2)The computation of deg det A corresponds to the maximum-weight A -consistent 2-matching problem. We suppose that rank A = 2 n , and deg det A > −∞ . An A -consistent matching M (defined for (1.3)) is called perfect if | M | = 2 n (= rank A );necessarily such an M is the disjoint union of cycles. The weight c ( M ) is defined by c ( M ) = X 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 -matching.Proof. Consider the leading term q · t deg det A of det A , where q is a nonzero polynomialof 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 mij appears in p formsa 2-matching. It is necessarily perfect and A -consistent. Its weight c ( M ) is equal todeg det A . Thus deg det A is at most the maximum weight of a perfect A -consistent2-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 termalso 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 benonsingular, and deg det( A ij x ij t c ij ) = 2 c ij = c ( M ). Suppose that M is a simple cycleof length 2 n . Then M is the disjoint union of two perfect matchings M , M . If A ij isnonsingular for all edges ij in the cycle M , then M and M are regarded as perfect A -consistent 2-matchings by defining the multiplicity of all edges by 2 uniformly. Bymaximality and c ( M ) = ( c ( M ) + c ( M )) /
2, it holds c ( M ) = c ( M ) = c ( M ). Replace M by M i . Then det A M has a single term with degree c ( M ). Suppose that M has anedge ij for which rank A ij = 1. As in [15, (2.6)–(2.9)], we can take S i , T i ∈ GL ( K )such that for each ij ∈ M , A ′ ij = S i A ij T j is a 2 × A ′ ij ) κκ = 0if ij ∈ M κ for κ = 1 ,
2. From ( A ′ ij ) = 0 for an edge ij ∈ M with rank A ij = 1,we see that the term of t c ( M ) (obtained by choosing the ( κ, κ )-element of A ′ ij x ij t c ij for ij ∈ M κ , κ = 1 ,
2) does not vanish in det
SAT = const · det A , where S, T are blockdiagonal matrices with diagonals S i , T j as in (4.1).Corresponding to Theorem 4.1, the following holds:14 emma 4.5. deg det A is equal to deg Det A , which is given by the optimal value of (D × ) Min . − n X i =1 deg det P i − n X i =1 deg det Q i s . t . deg( P i A ij Q j ) κλ + c ij ≤ i, j ∈ [ n ] , κ, λ = 1 , ,P i , Q j ∈ GL ( K ( t )) ( i, j ∈ [ n ]) . Proof.
When we apply
Deg-Det algorithm to A of (4.2), ( S, T ) in the step 1 is ofform of (4.1). Therefore
P AQ (0) is always of form (1.3), and P and Q are alwaysblock diagonal matrices with 2 × P , . . . , P n and Q , . . . , Q n ,respectively. Since rank P AQ (0) = nc-rank
P AQ (0) (by Theorem 4.1), the output isequal to deg det A (Lemma 2.4 (2)).Now we arrive at the goal of this section. Theorem 4.6.
Suppose that arithmetic operations on K are done in constant time. Amaximum-weight perfect A -consistent -matching (and deg det A ) can be computed in O ( n log C ) -time, where C := max i,j ∈ [ n ] | c ij | .Proof. Apply
Deg-Det with Cost-Scaling to the matrix A . Since A ij is 2 × N d in the proof of the sensitivity theorem (Section 3.4) can be taken to be 4 (constant),whereas m is n . Therefore, in each scaling phase, the number of iterations is boundedby n . Then the degree bound for truncation is chosen as 2 n . The time complexity formatrix update is O ( n × n ); this is done by matrix multiplication of 2 × γ ( n, m ) = O ( n ). The total time complexity is O ( n log C ).Next we find a maximum-weight perfect A -consistent 2-matching from the final B (0) for B = B (0) + B ( − t − + · · · . Consider a maximum B (0) -consistent 2-matching M for2 × B (0) (of form (1.3)). Necessarily M is perfect (since B (0) isnonsingular). We show that M contains a maximum-weighted A -consistent 2-matching.Indeed, B (0) is equal to ( P AQ ) for P, Q ∈ GL n ( K ( t )), where P and Q are block di-agonal matrices with 2 × P , P , . . . , P n and Q , Q , . . . , Q n . Noticethat P i , Q j are an optimal solution of (D × ). Observe B (0) M = ( P A M Q ) . From this,wehave deg det P AQ ≥ deg det P A M Q = deg det A M + P i deg det P i + P 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 themaximum-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 obtainedas follows. Consider a simple cycle C = C ∪ C of M , where C and C are disjointmatchings in C . For κ ∈ { , } , 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.From the view of polyhedral combinatorics, it is a natural question to ask for the LP-formulation describing the polytope of A -consistent 2-matchings. One possible approachto this question is to clarify the relationship between the LP-formulation and (R × ). Acknowledgments
The authors thanks Kazuo Murota for comments. The first author was supportedby JSPS KAKENHI Grant Numbers JP17K00029 and JST PRESTO Grant NumberJPMJPR192A, Japan. 15 eferences [1] P. M. Camerini, G. Galbiati, and F. Maffioli: Random pseudo-polynomial algo-rithms for exact matroid problems.
Journal of Algorithms (1992), 258–273.[2] H. Y. Cheung, L. C. Lau, and K. M. Leung: Algebraic algorithms for linear matroidparity problems. ACM Transaction on Algorithms (2014), Article 10.[3] J. Dieudonn´e: Les d´eterminants sur un corps non commutatif. Bulletin de la Soci´et´eMath´ematique de France (1943) 27–45.[4] J. Edmonds, Systems of distinct representatives and linear algebra. Journal of Re-search of the National Bureau of Standards (1967) 241–245.[5] M. Fortin and C. Reutenauer: Commutative/non-commutative rank of linear matri-ces and subspaces of matrices of low rank.
S´eminaire Lotharingien de Combinatoire (2004), B52f.[6] H. Furue and H. Hirai: On a weighted linear matroid intersection algorithm by deg-det computation. Japan Journal of Industrial and Applied Mathematics , to appear.[7] A. Garg, L. Gurvits, R. Oliveira, and A. Wigderson: Operator scaling: theory andapplications.
Foundations of Computational Mathematics , (2019).[8] P. B. Garrett:
Building and Classical Groups.
Chapman & Hall, London, 1997.[9] G. Ivanyos, Y. Qiao, and K. V. Subrahmanyam: Non-commutative Edmonds’ prob-lem and matrix semi-invariants.
Computational Complexity (2017) 717–763.[10] G. Ivanyos, Y. Qiao, and K. V. Subrahmanyam: Constructive noncommutativerank computation in deterministic polynomial time over fields of arbitrary charac-teristics. Computational Complexity (2018), 561–593.[11] M. Hamada and H. Hirai: Maximum vanishing subspace problem, CAT(0)-spacerelaxation, and block-triangularization of partitioned matrix. preprint (2017).[12] H. Hirai: Computing the degree of determinants via discrete convex optimizationon Euclidean buildings. SIAM Journal on Applied Geometry and Algebra (2019),523–557.[13] H. Hirai: Uniform modular lattices and affine buildings. Advances in Geometry (2020), 375–390.[14] H. Hirai and M. Ikeda: Node-connectivity terminal-backup, separately-capacitatedmultiflow, and discrete convexity. preprint (2020) (the conference version appearedin ICALP’ 2020).[15] H. Hirai and Y. Iwamasa: A combinatorial algorithm for computing the rank ofa generic partitioned matrix with 2 × SIAM Journal on MatrixAnalysis and Applications (1995), 719–734.[18] K. Murota: Computing the degree of determinants via combinatorial relaxation. SIAM Journal on Computing (1995), 765–796.[19] K. Murota: Matrices and Matroids for Systems Analysis.
Springer-Verlag, Berlin,2000.[20] K. Murota:
Discrete Convex Analysis . SIAM, Philadelphia, 2003.[21] L. Lov´asz: On determinants, matchings, and random algorithms. In:
Fundamentalsof Computation Theory FCT79 Proceedings of Algebraic, Arithmetic. and Cate-gorical Methods in Computation Theory (L. Budach, et.), Akademie-Verlag, Berlin(1979) 565574.[22] L. Lov´asz: Singular spaces of matrices and their application in combinatorics.
Boletim da Sociedade Brasileira de Matemtica (1989), 87–99.[23] T. Oki: Computing the Maximum Degree of Minors in Skew Polynomial Matrices.preprint (2019) (the conference version appeared in ICALP’ 2020). Appendix: Proof of Lemma 2.4 (1). We have seen the only-if part in the explanation of
Deg-Det . So we show theif part. We first extend deg Det B for matrix B = P mk =1 B k ( t ) x k , where B k ( t ) arematrices over K ( t ). This is naturally defined by (D) in replacing the constraint bydeg( P B k Q ) ij ≤
0. In this setting, it obviously holds that deg Det
P BQ = deg det P +deg det Q + deg Det B . Therefore it suffices to show deg Det B = 0 if deg B ij ≤ i, j and nc-rank B (0) = n .Let ( P, Q ) be any feasible solution for B . Recall the Smith-McMillan form that P, Q are written as P = S ′ ( t α ) S , Q = T ( t − β ) T ′ for S, S ′ , T, T ′ ∈ GL n ( K ( t ) − ), α, β ∈ Z n .Since the multiplication of S ′ , T ′ does not change the feasibility and the objective value,we can assume that P, Q are form of P = ( t α ) S , Q = T ( t − β ). We can assume furtherthat α ≥ α ≥ · · · ≥ α n ≥ β ≥ β ≥ · · · ≥ β n ≥
0. Note that S (0) , T (0) are nonsingular matrices over K . From deg( P BQ ) ij ≤
0, it must hold that α i > β j implies ( S (0) B (0) T (0) ) ij = 0. Let 0 =: γ ≤ γ < γ < · · · < γ ℓ so that { γ , γ , . . . , γ ℓ } = { α i } ni =1 ∪ { β j } nj =1 . For each p = 1 , , . . . , ℓ , define the indices r p := max { i | α i ≥ γ p } and u p = min { j | γ p − ≥ β j } . Then S (0) B (0) T (0) must have an r p × ( n − u p + 1) zerosubmatrix in its upper right corner. Since nc-rank B (0) = n , it holds − r p + u p − ≥ . Also, α, β are written as α = ℓ X p =1 ( γ p − γ p − ) r p , β = ℓ X p =1 ( γ p − γ p − ) u p − . − deg det P − deg det Q is equal to − n X i =1 α i + n X j =1 β j = ℓ X p =1 ( γ p − γ p − )( − r p + u p − ≥ . This means that every feasible solution has the objective value at least 0, and (
I, I ) isan optimal solution for B , implying deg Det B = 0.(2). It holds deg det P AQ = deg det P + deg det Q + deg det A . If rank( P AQ ) (0) = n and deg( P AQ ) ij ≤ i, j , it holds deg det P AQ = 0. In this case, it alsoholds nc-rank(