A dual approximation approach to weighted matroid intersection

A dual approximation approach to weighted matroid intersection

ELSEVIER Operations Research Letters 18 (1995) 153-156 A dual approximation approach to weighted matroid intersection Maiko Shigeno a,,, Satoru Iwat...

281KB Sizes 1 Downloads 91 Views

ELSEVIER

Operations Research Letters 18 (1995) 153-156

A dual approximation approach to weighted matroid intersection Maiko Shigeno a,,, Satoru Iwata b a Department of Information Sciences, Tokyo Institute of Technology, Tokyo 152, Japan b Research Institute for Mathematical Sciences, Kyoto University, Kyoto 606, Japan Received 1 December 1994; revised 1 May 1995

Abstract

This paper presents a simple algorithm for finding a minimum weight common base of a pair of matroids. The algorithm approximately splits the weight and maintains two optimal bases with respect to the split weights. The algorithm consists of only local operations and is fairly easy to implement.

Keywords: Combinatorial optimization; Matroid; Minimum weight common base; Scaling algorithm

1. Introduction

In the past couple of decades, matroid theory has been extensively applied to various fields of engineering, as can be seen in [5, 6, 9]. One of the most useful parts of the theory is concerned with a pair of matroids. More specifically, finding a minimum weight common base of a pair of matroids. A number of efficient algorithms have been proposed for this problem (see references in [2]). From a practical point of view, however, it is important not only to devise an efficient algorithm but also to provide a simple algorithm that is easy to implement. Among previously known algorithms for the problem, Frank's [3] is probably the simplest and clearest. This algorithm splits the given weight w into u and v with w = u + v and exploits the pair as "dual variables". It has been shown that a subset B C_E is a minimum weight common base if and only if there exists a weight splitting (u, v) such that B is simultaneously

* Corresponding author. 0167-6377/95/$09.50 @ 1995 Elsevier Science B.V. All rights reserved SSDI 0 1 6 7 - 6 3 7 7 ( 9 5 ) 0 0 0 4 7 - X

a minimum weight base of one matroid with respect to u and a minimum weight base of the other matroid with respect to v. This paper proposes a simpler algorithm, which also splits the weight w into u and v but "approximately," i.e., w - u + v. This relaxation obviates the need for global operations such as finding augmenting paths in auxiliary networks. The algorithm computes a minimum weight base of one matroid with respect to u and of the other matroid with respect to v. It then repeats, updating the split weights of one element and maintaining two minimum weight bases until the two bases coincide. Thus the algorithm requires only local operations such as finding a maximum/minimum weight element in a fundamental circuit/cocircuit [8] in each matroid, and is fairly easy to implement. The time complexity of the algorithm is O ( ( f + n)nrlog(rW)), where n is the cardinality of the ground set, r is the rank of both matroids, W is the maximum absolute value of the weight of any element, and f is the time needed to find a fundamental circuit or a fundamental cocircuit. This complexity is

154

M. Shigeno, S. lwatal Operations Research Letters 18 (1995) 153-156

certainly worse than that of Frank's algorithm, which runs in O ( ( f + n ) n r ) . With the aid of a hybridization technique successfully used by Orlin and Ahuja [7] for the assignment problem, we can improve the algorithm to run in O ( ( f +n)nx/r log(rW)). This bound is comparable to that of a generalization of the Odin and Ahuja algorithm to the independent assignment problem by Fujishige and Zhang [4] and other algorithms for weighted matroid intersection under the similarity assumption, i.e., W = O(n k) for some k.

2. The approximate weight-splitting algorithm Let MI = (E,/31) and ME : (E,/32) be a pair of matroids with base families /31 and /32 on the common ground set E of cardinality n. Given a weight w indexed by E, the weight of F C E is defined by w(F) = ~-~e~FW(e). For a family .T of subsets of E, F E ~" is called w-minimum in ~" if w(F)<<.w(F~) for every F ' E .T. This section presents an algorithm for finding a wminimum common base of M1 and M2. We assume that the weight w is integral. This is a natural assumption for some applications. We denote by W the maximum absolute value maxeEe Iw(e)l. We also assume that there exists at least one common base B E/31 fq/32. Hence the ranks of M1 and Mz should be the same number, which we denote by r. The following rather obvious fact gives a basic idea of the algorithm.

Lemma 1. Let MI = (E,/31 ) and M2 : (E,/32 ) be two matroids with weights u and v both indexed by E. I f B c_ E is simultaneously a u-minimum base of MI and a v-minimum base of M2, then B is a minimum common base with respect to u+ v. The algorithm works by splitting the weight w into u and v subject to

w(e)<.u(e) + v(e)<~ w(e) + e

(1)

for all e E E, and by scaling the approximation accuracy e > 0. Each scaling phase cuts the value of e in half and begins with a weight splitting (u, v) obtained from the approximate weight splitting found at the end of the preceding phase. It then computes a u-minimum base Bj of the matroid Ml and a v-minimum base B2 of the matroid ME using the greedy algorithm. If B1 and B2 do not coincide,

it modifies one component of either u or v by e and obtains a pair of minimum weight bases with respect to the new weights by exchanging elements in a fundamental circuit or cocircuit. We denote by greedy(E,/3i, w) a function that finds a w-minimum base of the matroid Mi (i = 1,2). Let Cf(BIe ) denote the fundamental cocircuit with respect to B E /31 and e E B in the matroid Ml, and C2(Ble ) the fundamental circuit with respect to B E /32 and e E E \ B in the matroid M2. A variable p indexed by E is introduced for the sake of analysis. The algorithm for finding a w-minimum common base is as follows.

Approximate Weight-Splitting Algorithm 1: begin u(e) := W(e E E), e := 2W; 3: while e >/1/r do 4: begin {sealing p h a s e } 5: v:=w-u,e:=e/2, p:=O; 6: Bl*--gree_dy(E,/31,u), Bz~---greedy(E,132, v); 7: while 3e E BI\B2 do 8: begin {inner loop} . 9: i f u(e')+ v (e') = w(e') then 10: begin 11: u(e') := u(e') + e, p(e') := p(e') + e ; 12: e + ~- argmin~u(e) [ e E C~(Bl[e')}; 13: B1 ~ (Bl\{e'}) U {e +} 14: end; 15: else 16: begin 17: v (e') := v (e') - e; 18: e - ,--- argmax {v (e) [ e E C2(BzIe')}; 19: B2 ~ (B2 U { e ' } ) \ { e - } 20: end 21: end 22: end 23: end. 2:

Note that the subsets Bl and B 2 are a u-minimum base of M1 and a v-minimum base of M2, respectively, at the end of each inner loop. Lemma 1 implies that when a scaling phase terminates, B l ( = B2) is a (u + v) -minimum common base. In each scaling phase, u(e) and v (e) are modified alternately for each e E E, so that the algorithm maintains the inequalities (l).

Lemma 2. Suppose that the algorithm has terminated with a common base B. Then B is optimal with respect to w. Proof. Let Boot be a w-minimum common base. Since B is a u-minimum base of M1 as well as a

M. Shiqeno, S. lwatalOperations Research Letters 18 (1995) 153-156

155

and B' is simultaneously a u'-minimum base in MI and a v'-minimum base in M2, we have

v-minimum base of M2, it follows from (1) that

w(B) <~u(B) + v(B) <~U(Bopt ) + V(Bovt) ~
p(e) = u(e) - ~ ( e ) > ~ ( e ) -

v(e)

(2)

u(B1 ) + ~(B2) >/u'(B1 ) + v'(B2 ) -

2elB21

~u'(B') + v'(B') - 2elB2 I. On the other hand, since Bl and B2 are a uminimum base of M1 and a v-minimum base of M2, respectively, the inequalities (1) imply

u(B1) + v(B2) <~u(B') + v(B')<...w(B') + elB't

<..u'(B') + v'(B') + ~IB'I. Hence we obtain

p(Bi \B2) <~3er.

(4)

holds for each e c E . Once an element e E E is out of B:\BI, it will never belong to B2\BI in the scaling phase. Hence,

Therefore each element can be chosen as e' at most 6r times, and the total number of iterations is no more than 6nr. []

p(B2\BI) = 0

We assume that given a spanning set S of M1 and an element e E S, we can find a cocircuit of M~ contained in (E\S) kJ {e} within f ~ time, and that given an independent set I of M2 and e' E E \ L we can find a circuit of M2 contained in I U {e'} within f 2 time. By means of the greedy algorithm, we obtain a u-minimum base of M1 in O ( n l o g n + n f ~ ) time and a v-minimum base of M2 in O(niogn + n f 2 ) time. It takes O ( f ] ~ + (n - r ) ) t i m e to update the u-minimum base Bl, and O(f2 + r) time to update the v-minimum base B2. Summarizing the above and putting f = max{f~, f2 }, we obtain the following theorem.

(3)

is satisfied throughout the scaling phase. Lemma 3. Each scaling phase of the algorithm terminates within 6nr iterations.

Proof. For each element e C E, the value of p(e) increases exactly by e every other time e is chosen as e' E BI\B2. We shall derive an upper bound on p(e') at the beginning of each iteration. Since e' is an element in the subset BI\B2, the value of p(BI\B2) bounds p(e') from above. It follows from the inequalities (2) and (3) that

Theorem 4. The algorithm finds a minimum weight common base in O ( ( f + n)nrlog(rW)) time.

v(8, \82) = v(8!) - v(82)

<...u( B ~) + v(B2 ) - u( B1) - v(B2) holds at the beginning of each iteration. Let u', v' and B' be the split weights and the common base obtained by the previous scaling phase. At the first scaling phase, assume that u'(e) = W, v' (e) = 0 for all e C E and B' is an arbitrary common base. Note here that u' = ~ a n d S = w - ~ . Sinceu' andv' satisfy the inequalities (1) for 2e, i.e.,

w(e)<~u'(e) + v'(e)<...w(e) + 2e,

3. Concluding remarks We have presented a simple algorithm for computing a minimum weight common base of a pair of matroids, whose time complexity is O ( ( f + n)nr log(rW)), provided that there exists a common base. If this assumption does not hold, the algorithm never stops. However, in this case, we can detect the infeasibility, because we know an upper bound of the number of iterations, as shown in Lemma 3.

156

M. Shioeno, S. Iwatal Operations Research Letters 18 (1995) 153-156

Recently, Fujishige and Zhang [4] have proposed an O ( ( f + n)nv'71og(rW)) algorithm for the independent assignment problem. This algorithm is a generalization of the hybrid algorithm by Orlin and Ahuja [7] for the assignment problem. Each scaling phase of these algorithms consists of an auctionlike algorithm and a successive-shortest-path algorithm. The algorithm presented in this paper can also be improved to achieve the same time complexity by a hybridization with Frank's algorithm [3]. In this hybrid algorithm, Line 7 of the description in Section 2 is replaced by the following step: 7':

while 3e' E B I \ B 2 such that p(e') < eL do

with a positive integer L. At the end of each scaling phase, we obtain a common independent set I = Bl fq BE. By Frank's algorithm, we convert I into a minimum weight common base with respect to u + v, and then start the next scaling phase. The time complexity of this hybrid algorithm is evaluated as follows. The former half of each scaling phase runs in O ( ( f + n)nL), because p(e) is bounded from above by eL for all e E E. When the inner loop terminates, it holds that p(BI\B2) = IBI\B2IeL, which, together with the inequality (4), implies that IB~\B21 ~<3r/L. Since Frank's algorithm increases the cardinality of the common independent set by one in each iteration, the number of iterations is at most 3r/L. Thus the latter half of each scaling phase takes O((nf + n2)r/L). If we assign L = Ix/7 ], the overall time complexity of the hybrid algorithm is O ( ( f + n)nv/r log(rW)). Under the similarity assumption, i.e., W = O(n k) for some k, it runs in O((f + n)nx/r logn) time. This time complexity is competitive with the best known strongly polynomial bound O(nr(r + f + log n)) due

to [1], which relies on the Fibonacci heap implementation of Dijkstra's method.

Acknowledgement The authors are much indebted to Tomomi Matsui of the University of Tokyo for enjoyable discussions. We also express our appreciation to David Avis of McGill University, Yoshiko T. Ikebe of Science University of Tokyo and an anonymous referee for valuable comments on the manuscript.

References [1] C. Brezovec, G. Comutjols and F. Glover, "Two algorithms for weighted matroid intersection", Math. Programming 36, 39-53 (1986). [2] U. Faigle, "Matroids in combinatorial optimization", in: N. White (ed.), Combinatorial Geometries, Cambridge University Press, Cambridge, 1987, pp. 161-210. [3] A. Frank, "A weighted matroid intersection algorithm", J. Algorithms 2, 328-336 ( 1981 ). [4] S. Fujishige and X. Zhang, "An efficient cost scaling algorithm for the independent assignment problem", J. Oper. Res. Soc. Japan 38, 124-136 (1995). [5] M. Iri, "Applications of matroid theory", in: A. Bachem, M. Grttschel and B. Korte (eds.), Mathematical Programming - - The State of the Art, Springer, Berlin, 1983, pp. 158-201. [6] K. Murota, Systems Analysis by Graphs and Matroids - Structural Solvability and Controllability, Springer, Berlin, 1987. [7] J.B. Orlin and R.K. Ahuja, "New scaling algorithms for the assignment and minimum mean cycle problems", Math. Programming 54, 41-56 (1992). [8] J.G. Oxley, Matroid Theory, Oxford University Press, New York, 1992. [9] A. Recski, Matroid Theory and Its Applications in Electric Network Theory and in Statics, Springer, Berlin, 1989.