Professional Documents
Culture Documents
Two matroids M, = (S, 4,) and M, = (S, $), and a weight function s on
S (possibly negative or nonintegral) are given. For every nonnegative integer
k, find a k-element common independent set of maximum weight (if it
exists).
This problem was solved by J. Edmonds [3, 41 both theoretically and
algorithmically. Since then the question has been investigated by a number
of different authors; see, for example, [l, 6-101. The purpose of this note is
to make a simpler primal-dual algorithm and thereby give a clearer
constructive proof for Edmonds’ matroid polyhedral intersection theorem.
The idea behind the procedure is that the meaning of the dual part in
Lawler’s primal-dual algorithm can be made much simpler. We shall not
need the dual variables assigned to the closed sets of the two matroids.
Instead, we are working by splitting the weights of the elements. At the end
of the algorithm the optimal dual variables can simply be computed from
the final splitting.
The reader is assumed to be familiar with such basic concepts of matroid
theory as “independent set,” “circuit,” “greedy algorithm,” etc. [9, 111.
The weight of a subset X of S is s(X) = Z(s(x): x E X). If Tis a family of
subsets of S we say that F E Tis s-maximal in Tif s(F) L s(X) for X E 9.
Before describing the algorithm we need some simple lemmas. The main
content of the Greedy Algorithm theorem [2] is:
LEMMAI. ForagivenmatroidM=(S,$),letgk ={X:XE$,IXI=k}.
I E 4k is s-maximal in g k if and on& if
*This note was written while the author was visiting the University of Waterloo, January-
April, 1980.
328
Ol%-6774/81/0400328-09$02.00/O
Copyright 0 I98 I by Academic F’ress, Inc.
All rights of repmduction in any form reserved.
WEIGHTED MATROID INTERSECTION ALGORITHM 329
Proof Trivial. Cl
For each possible k, the algorithm constructs I, s,, s2 satisfying the
hypotheses of Lemma 3.
The procedure starts with k = 0. Then k is increased one by one. An
essential property of the algorithm is that, in every stage, the current I E 9t2
is s-maximal in $&.
Suppose we have I E SF,,sl, s2 which satisfy the hypotheses of Lemma 3
and which have been constructed by the algorithm previously. From these
we shall make I’ E 9:. ’ , s;, s; satisfying again the hypotheses of Lemma 3.
Atthebeginningk=O,I= 0,s, ~0,s~ =s.
Let mi = max(si( y): y @ 1, I + y E gi) (i = 1,2).
By the well-known labeling technique [9], decide whether there exists a path
from the set X, to X,.
Case 1. If the path in question exists let U be a path of minimum
number of vertices. (U is considered as a vertex set, and we shall need only
that U is minimal.)
Let I’ = I @ U, where @ denotes the symmetric difference, and let
s; = si (i = 1,2).
CLAIM 1. I’, s;, s; satisfy the conditions of Lemma 3 for k + 1.
Proof. Let us denote the vertices of U by x,,, y,, x,, y2, x2,. . . , y,, xI
(x0 E X,, x, E X,). By Lemma 1, B = I + x0 is s,-optimal in $[+I.
Observe that the hypotheses of Lemma 2 hold for k + 1 and for B E
g+‘, x,, x 2,...,XI,Y,,Y2,...9 y,. (Properties (3) and (4) are true because
of the definition of G, (5) follows from the minimality of U.) Thus I’ is
s,-optimal in 9:+‘. That I’ is s,-optimal in $:+’ can similarly be proved
with the difference that one should rename the vertices of U just in reverse
order (i.e., its last vertex will be x0 while the first one x,). 0
CLAIM 2. s(I’) - s(I) = m, + m2.
Proof Obvious. Cl
Case 2. If there is no path let T consist of vertices having reached from
X2. Let
s;(x) = s,(x) + s ifx E T
= s,(x) ifx f?! T
and s;(x) = s(x) - s;(x). S = min(S,, 6,, 6, a,), where
COMPLEXITYOFTHEALGORITHM
WEIGHTEDINTERSECTIONALGORITHM
Step 1
1.0. s, - O,s, = s, k = 0, Ik = 0.
1.1. Make the auxiliary graph. Determine X, and X,.
1.2. Find a path U from ._X, to X, by the labeling technique, using the
labels having defined but not deleted previously. If it exists, go to step 3.
Step 2
2.0. Let T denote the set of vertices having labels.
2.1. Count 6. If S = do, Let K = k, the current Ik has maximum
cardinality and K = r,(T) + rZ(S - T). HALT.
2.2. Let s,(x) = s,(x) + &s,(x) = s*(x) - 6 whenever x E T.
2.3. Go to 1.1.
Step 3
3.0. Let Ik+,:= Ik @ U. Let k: = k + 1. Ik is optimal in 9& record
it.
3.1. Delete all the labels.
32, . s::=s 1, sk*=s
2’ 2’
3.3. Go to 1.1.
Now we show some consequences of the algorithm. Since neither m, nor
ml increases during the algorithm Claim 2 implies a result of Krogdahl
[7, 91.
COROLLARY. Sk+, -Sk <Sk -Sk-,, where sj denotes the weight of an
s-maximal member of S:‘,.
We have proved the following.
THEOREM. I E $fY is s-maximal if and only if there exist two weightings s,
and s2 such that s, + s2 = s and I is s,-maximal in 5: (i = 1,2). If, in
addition, s is integer valued then si can be chosen to be integer valued.
WEIGHTED MATROID INTERSECTION ALGORITHM 333
ex = k
xro
max sx
If the primal program ( * ) has a feasible solution it has an integral optimal
solution. Moreover, if s is integral the dual program has an integral optimal
solution.
Proof. The primal optimal solution is defined as the incidence vector of
Ik, where Ik is the optimum element of SF,, constructed by the algorithm.
The dual optimal solution can be obtained from s, and s2.
Let Ik = {e,, e2,. . . , ek} = {f,, f2,. . . , fk} so that
s,(e,) 2s,(e,) 2 +--Ls,(e,) and s,(f,) 1 s2(h) 2 -m-1 sz(fd
0 b
A
d
--m--e-
case 2.1
[ Case 1.
k =3
I.= (a.c.e) l7
Let E, = sp,(e,, e2,. . . , ei) and l$ = spI( f,, f2,. . . , 6.). Define
Y,(K) = sl(ei) - sl(ej+l)9
Y,(l;;) = 4.6) - s*(f;+J fori= 1,2 ,..., k- 1.
Let t = s,(ek) + s2( fk). Using (1) and (2), a simple counting shows that
WEIGHTEDMATROIDINTERSECTIONALGORITHM 335
This proves the optimality of the primal and dual solutions. Moreover, if
s is integer then so are si and s2 and thus y,,y2, as well. Cl
Another consequence of the algorithm deserving mention is:
COROLLARY. For every k L 0, if $‘2+’ # 0, there exists an optimal
solution to ( * * ) which, at the same time, is an optimal solution to ( * * ) for
k + 1 instead of k.
(This is the so called t-phenomenon; see [S].)
Proof. Consider that stage of the algorithm when Zk+ , is arising. The
vector (y,, y2, t) belonging to the current s,, s2 satisfies the requirements.
The original version of Edmonds’ theorem can similarly be obtained:
A,
THEOREM. [3]. Consider the dual pair of linear programs
x 10,
(hY2)
[A1 2
YlTY2
2 0
IS
REFERENCES