|
Algorithm 4 Matroid Intersection |
-
Input:
Two matroids , , distance metric d, initial set
-
Output:
A maximum cardinality set in
-
1:
Initialize , , and
-
2:
while do
-
3:
and
-
4:
for all do
-
5:
if
-
6:
for all do
-
7:
if
-
8:
Build an augmentation graph G for S
-
9:
while there is a directed path from a to b in G do
-
10:
Let be a shortest path from a to b in G
-
11:
for all do
-
12:
if
-
13:
if
-
14:
Rebuild G for the updated S
-
15:
returnS
|