Packing of arborescences with matroid constraints via matroid intersection

Edmonds’ arborescence packing theorem characterizes directed graphs that have arc-disjoint spanning arborescences in terms of connectivity. Later he also observed a characterization in terms of matroid intersection. Since these fundamental results, intensive research has been done for understanding and extending these results. In this paper we shall extend the second characterization to the setting of reachability-based packing of arborescences. The reachability-based packing problem was introduced by Cs. Király as a common generalization of two different extensions of the spanning arborescence packing problem, one is due to Kamiyama, Katoh, and Takizawa, and the other is due to Durand de Gevigney, Nguyen, and Szigeti. Our new characterization of the arc sets of reachability-based packing in terms of matroid intersection gives an efficient algorithm for the minimum weight reachability-based packing problem, and it also enables us to unify further arborescence packing theorems and Edmonds’ matroid intersection theorem. For the proof, we also show how a new class of matroids can be defined by extending an earlier construction of matroids from intersecting submodular functions to bi-set functions based on an idea of Frank.


Edmonds' arborescence packing theorem and its extensions
An arborescence is a rooted directed tree in which each vertex has in-degree one except for one vertex called the root. In this paper we are interested in packing of arborescences, where throughout the paper a packing in a digraph means arc-disjoint subgraphs.
Edmonds' arborescence packing theorem (or disjoint branching theorem) is one of the fundamental results in combinatorial optimization. This theorem gives a good characterization for directed graphs having a given number of arc-disjoint spanning arborescences (see Fig. 1a). Since Edmonds' seminal paper [7], numerous extensions and algorithmic improvements are proposed, see e.g., [1,11,28]. In this paper we are interested in two different lines of generalizations; one is due to Kamiyama, Katoh, and Takizawa [19], and the other is due to Durand de Gevigney, Nguyen, and Szigeti [4].
Let D = (V , A) be a digraph with a multiset set {s 1 , . . . , s k } of vertices. The set of vertices reachable from s i in D is denoted by U i . If U i is not equal to V for some also posed a question whether one can efficiently find a minimum weight arc set of a reachability-based packing of arborescences if a weight function is given on the arc set. Recently, Bérczi, T. Király, and Kobayashi [2] showed that this minimum weight packing problem can be reduced to the submodular flow problem, which leads to a polynomial-time algorithm.

Contributions
For the original setting of packing spanning arborescences, there is another wellknown characterization due to Edmonds [8]. Namely the arc set of a packing of k spanning arborescences is exactly a common independent set of two matroids of size k|V | − k; one matroid is the union of k copies of the graphic matroid of the underlying undirected graph and the other is the direct sum of uniform matroids on ∂(v) of rank k − |{i ∈ {1, . . . , k} : s i = v}| over v ∈ V . This observation enables us to reduce the minimum weight packing problem of spanning arborescences to the minimum weight matroid intersection problem. In this paper we extend this fundamental observation to the setting of reachability-based packing of arborescences. We show that the arc set of a reachability-based packing is exactly a common independent set of two matroids of a certain size. One matroid we used is the direct sum of uniform matroids on ∂(v) as in the original setting. The other matroid, which is new to the best of our knowledge, is constructed by exploiting the underlying submodular bi-set function.
The application of bi-sets for arborescence packings was introduced by Bérczi and Frank [1] and then later developed by Bérczi, T. Király, and Kobayashi [2]. We continue this development by showing how the matroid induced by an intersecting submodular bi-set function plays a fundamental role. Such a matroidal view was in fact motivated by the work by Frank [13], where he used the same approach to reduce a rooted k-connection problem to the matroid intersection problem.
Our new characterization of reachability-based packing not only implies a faster algorithm for the minimum weight version of the problem but also unifies the reachability-based packing with the matroid restricted packing introduced by Frank [13] (or explicitly by Bernáth and T. Király [3]). Suppose that a matroid M v is given on ∂(v) for all v ∈ V , and let M be the directed sum of M v over v ∈ V . Then a packing is said to be M -restricted if the arc set of the packing is independent in M . Frank [13] observed that the arc set of an M -restricted packing of k spanning arborescences is exactly a common independent set of size k|V | − k of the union of k copies of the graphic matroid and M . Following Frank's idea, we can also consider the reachability-based matroid-restricted packing problem and give a good characterization of the existence of a packing as well as an efficient algorithm for finding the minimum weight packing. In this way, we obtain a common generalization of three different generalizations of Edmonds' arborescence packing theorem.
As we will explain formally in Sect. 3, the reachability-based matroid-restricted packing problem also includes the matroid intersection problem. Hence our result unifies not only the extensions of Edmonds' arborescence packing theorem but also Edmonds' matroid intersection theorem.
In order to solve the weighted reachability-based packing problem, we shall use a weighted matroid intersection algorithm. In the weighted matroid intersection problem, we are given two matroids M 1 = (S, r 1 ) and M 2 = (S, r 2 ), a weight function w : S → R, and an integer k, and are asked to find a minimum weight common independent set of cardinality k of M 1 and M 2 . Edmonds [9], Lawler [23], and Iri-Tomozawa [18] independently gave algorithms that run in polynomial time, given an efficient independence oracle for M 1 and M 2 . Since then there are number of improvements, see Sect. 41.3 of [28] and [16,24] for a recent development.
Our contributions are summarized as follows: •

Organization
The paper is organized as follows. In Sect. 2 we review a construction of matroids from intersecting submodular functions and then extend it to bi-set functions on digraphs. This matroid construction is a key tool in the development of our new results. In Sect. 3 we reformulate our packing problem in terms of rooted digraphs, which is more convenient in the subsequent technical discussion, and give a full description of our characterization of M-reachability-based M -restricted packing. In Sect. 4 we consider the matroid-based packing problem and show how to solve the minimum weight packing problem via matroid intersection. The result is a special case of that in Sect. 5, but we believe that understanding this special case would be helpful to capture the high level idea. In Sect. 5 we develop new results on reachability-based packings listed above. In the remaining part of this section we introduce some notations used throughout the paper. The notation can be extended for bi-sets. A bi-set is a pair

Notations
is a bi-set, X O and X I denote the outer-set X O and the inner-set X I of X, respectively. The set of all bi-sets {X = (X O , X I ) : Throughout the paper we use the following basic terminologies from matroid theory. Let S be a finite set. A set function f : for every X , Y ⊆ S. A pair M = (S, r ) of a finite set and a set function r : 2 S → Z + is called a matroid if r (∅) = 0, r ({s}) ≤ 1 for every s ∈ S, and r is monotone non-decreasing and submodular. The members of I = {Q ⊆ S : r (Q) = |Q|} are called the independent sets of the matroid and r is called the rank function of the matroid. It is well known that a matroid can also be defined by its independent sets.
For a finite set S and a positive integer k, the family of subsets Q ⊆ S with |Q| ≤ k forms the independent set family of a matroid, which is called the uniform matroid on S of rank k. If k = |S|, it is called the free matroid on S. For a graph G with the edge set S, the graphic matroid of G is defined such that Q ⊆ S is independent if and only if Q is the edge set of a forest.
Let M = (S, r ) be a matroid. For Q ⊆ S, the restriction M| Q to Q is the matroid with rank function r| Q obtained from M by restriction on Q. For s ∈ S, M − s is the matroid obtained from M by deletion of s, that is, a matroid on S − s with rank function r | S−s . For a positive integer k, M| k is the matroid obtained from M by truncation at k, that is, a matroid on S with a rank function r M| k (Q) = min{r (Q), k}. For matroids M 1 and M 2 on disjoint sets S 1 and S 2 with rank functions r 1 and r 2 , their direct sum M 1 ⊕ M 2 is the matroid on S 1 ∪ S 2 with rank function r ⊕ (Q) = r 1 (Q ∩ S 1 )+r 2 (Q ∩ S 2 ) for all Q ⊆ S 1 ∪ S 2 . For matroids M 1 , . . . , M k on a set S, the family of subsets Q ⊆ S which can be partitioned into independent sets Q 1 , . . . , Q k of M 1 , . . . , M k forms the independent set family of a matroid on S. This matroid is known as the union of M 1 , . . . , M k .

Constructing matroids from submodular functions
In this section we review a matroid construction based on intersecting submodular set functions and then extend it to bi-set functions, which will play a key role in the development of our new result. The result in this section seems to have more applications, and is interesting in its own right.

Matroids from set functions
Let S be a finite set. Two sets X , For a function f : S → R, we will denote its modular extension to 2 S by f , that is, f (X ) Initiated by Edmonds and Rota [10] or Edmonds [5], several authors gave constructions of matroids from (intersecting) submodular functions. We use the following form (see [14,Section 13.4 forms the independent set family of a matroid M h with rank function is the convex hull of the incidence vectors of the independent sets of M h .

Matroids from bi-set functions
The intersection ∩ and the union ∪ of bi-sets X, Y ∈ P 2 are defined by X ∩ Y: Note that for X, Y ∈ P 2 , Using the above definition of ∩ and ∪ and intersecting bi-sets, we can extend the notions of intersecting families to bi-set families and the notions of intersecting sub-or supermodular set functions to bi-set functions.
Frank [13,Theorem 3.3] proved the following statement for modular bi-set functions. The same argument works for intersecting submodular bi-set functions. and is the convex hull of the incidence vectors of the independent sets of M f .

Proof
The proof is done by applying Theorem 2.1. To do so we define a set family A and a set function h : A → Z ≥0 as follows: We first show that A is an intersecting family and h is intersecting submodular on A. Take any F 1 , F 2 ∈ A, and let Y i ∈ F be a minimizer in the definition of h(F i ) for i = 1, 2. By (2) and (3) To see that A is an intersecting family, suppose that F 1 ∩ F 2 = ∅. Then, by (6), As F is an intersecting family, Y 1 ∩ Y 2 ∈ F and Y 1 ∪ Y 2 ∈ F. Therefore (6) implies that F 1 ∩ F 2 ∈ A and F 1 ∪ F 2 ∈ A, and A is indeed an intersecting family.
Also (6) and the intersecting submodularity of f imply the intersecting submodularity of h as follows: We next show that B ∈ I if and only if |F| ≤ h(F) for every F ⊆ B with F ∈ A. Indeed, if B ∈ I, then for any F ⊆ B with F ∈ A and for any X ∈ F with F ⊆ A(X), |F| ≤ i B (X) ≤ f (X) and hence |F| ≤ h(F). On the other hand, if |F| ≤ h(F) for every F ⊆ B with F ∈ A, then for any X ∈ F, B(X) ∈ A and hence i B (X) = |B(X)| ≤ h(B(X)) ≤ f (X).
Thus I forms the independent set family of a matroid by Theorem 2.1, which completes the proof of the first statement.
We next derive the rank formula given in the statement. By Theorem 2.1, M f has the following formula for the rank of each F ⊆ A: where the minimum is taken over subpartitions Take a minimizer {F 1 , . . . , F t } for r f (F), and let X i ∈ F be a minimizer in (5) for h(F i ). We claim that such a minimizer {F 1 , . . . , F t } (and the corresponding X i , . . . , X t ) can be taken in such a way that by the intersecting submodularity and non-negativity of f . Hence if we remove F 1 and F 2 and insert F 1 ∪ F 2 to the family, the value on the right hand side of (7) does not increase.
Therefore, we can take (7) can be written in the form of the statement.
Finally, for the polyhedral description, Theorem 2.
Thus the description can be converted in the form of the statement.

Rooted digraphs
It is a standard technique to convert the problem of packing arborescences with multiple root vertices to that with single root vertex by inserting a designated super vertex. Since the latter formulation would be technically easier to handle, in subsequent discussion we shall always work in directed graphs with a designed vertex, called rooted digraphs. Specifically, a rooted digraph is a directed graph D = (V + s, A) (with s / ∈ V ) with a designated root vertex s of in-degree zero. The arcs leaving s are called root arcs. An arborescence is said to be an s-arborescence if its root is s.
For simplicity, in the subsequent discussion, Z is often omitted from the subscript if Z = V + s, and similarly B is omitted from the superscript if B = A. By consequence, |∂(X )| denotes the in-degree of the set X . Note also that ∂ s (V ) denotes the set of the root arcs in D. The omission rule is also applied to ∂ B Z (X) for a bi-set X ∈ P 2 (V ).

Packing in rooted digraphs
Suppose To see the counterpart of Theorem 1.4 we recall the following notation introduced in the introduction. Let P D (v) denote the set of vertices in V from which v can be reached by a directed path in D, and let P D (X ) = v∈X P D (v) for X ⊆ V . Note that, by definition, P D (X ) contains X and does not contain the root s. We will omit the subscript D when it is clear from the context.
A packing T 1 , . . . , T k of s-arborescences is M 1 -reachability-based if (R1) each T i contains exactly one root arc, denoted by e i ; Theorem 1.4 is equivalent to the following.   Fig. 3 for examples.

Main theorem
Recall that a packing T 1 , . . . , T k of arborescences is said to be One of the main results of this paper is the following extension of Theorem 3.3.
The proof is given in Sect. 5.4. Note that, if D is a rooted digraph with two vertices, then D has an M 1 -reachabilitybased M 2 -restricted packing if and only if M 1 and M 2 have a common independent set of size equal to the rank of M 1 . Hence, for this special input, Theorem 3.4 is equivalent to the following matroid intersection theorem of Edmonds.
When we require M 1 -based packings, Theorem 3.4 can be simplified as follows.

Corollary 3.6 Let D = (V + s, A) be a rooted digraph, and
We also remark that by using the technique of [11], one can extend Theorem 3.4 to directed hypergraphs.

Matroid-based packing
As a warm-up for the next section, in this section we consider the minimum weight matroid-based packing problem, a special case of the reachability-based packing problem.
Let D = (V + s, A) be a rooted digraph, and let M 1 = (∂ s (V ), r 1 ) be a matroid of rank k. Our goal is to find a minimum weight arc set of an M 1 -based packing of s-arborescences. We show how to reduce the problem to the weighted matroid intersection problem.
As explained in Sect. 1.2, Edmonds showed that the minimum weight arc set of a packing of k spanning arborescences can be found by a matroid intersection algorithm, where one matroid is the sum of uniform matroids and the other is the union of k copies of the graphic matroid of the underlying graph G. It is well-known that the union of k copies of the graphic matroid can be obtained by applying Theorem 2.1 for the set . As a counterpart we consider the following set function b on 2 for each nonempty H ⊆ A. The function b is derived from h by taking into account of the dependency among the root arcs in M 1 . It should be also remarked that this function has been already introduced in [20] for a completely different purpose.
Observe that b is non-negative integer valued, monotone and intersecting submodular on 2 A − {∅}, and hence by Theorem 2.1,  Proof We first prove that, in both directions, Indeed, if B is the arc set of a packing, then (11) follows from the definition of M 1based packings. If B is a common independent set of size k|V |, (11) follows. By (11), the following holds in both directions: for any X ⊆ V , Suppose first that B ⊆ A is the arc set of an M 1 -based packing of s-arborescences. Then, by (11), B is independent in M 0 of size k|V |. In this case, by Theorem 3.2, As By adding (12), (14), and (15), we get the inequality Suppose now that B is a common independent set of M 0 and M b of size k|V |. To verify that B satisfies (14) [and hence (13)], take any X ⊆ V with X = ∅ and F ⊆ ∂ B s (X ) and let H := B(X ) ∪ F. Then we have (15) with equality. Also since B is independent in M b and H ⊆ B, By adding (12), (15) (with equality) and (16), we get (14) and hence (13). By Theorem 3.2, the digraph (V + s, B) contains an M 1 -based packing of s-arborescences and, since |B| = k|V |, the arc set of the packing coincides with B.
We now consider M 1 -based M 2 -restricted packing, i.e., the set of arcs in the packing is independent in M 2 . Proof Let k be the rank of M 1 . If M v has rank less than k for some v ∈ V , then we can immediately conclude that there is no M 1 -based M 2 -restricted packing. If each M v has rank at least k, then we may suppose that each M v has rank exactly k by truncating it at k. Hence by Theorem 4.2, we can decide whether D has an M 1based M 2 -restricted packing of s-arborescences and find a minimum weight arc set by using any efficient algorithm for the weighted matroid intersection problem. A polynomial-time independence oracle for M b was already shown in [20], and thus one can implement the algorithm in polynomial time. Once we determined the arc set of a packing, the decomposition of it into s-arborescences that satisfy (M1) and (M2) can be done by the polynomial algorithm in [4].

Reachability-based packing
Let D = (V + s, A) be a rooted digraph, M 1 = (∂ s (V ), r 1 ) and M 2 = (A, r 2 ) two matroids such that M 2 is the direct sum of the matroids Suppose also that a weight function c : A → R is given. In this section we shall give a characterization of M 1 -reachability-based M 2 -restricted packings and derive several corollaries.
The high level idea is the same as that in Sect. 4. Our main theorem (Theorem 5.7) characterizes the arc sets of M 1 -reachability-based M 2 -restricted packings in terms of common bases of two matroids. However, deriving a matroid corresponding to M b will be much more involved in the reachability-based case.
The characterization is given assuming that the instance (D, c, M 1 , M 2 ) satisfies three conditions given below. In Sect. 5.1 we shall explain how to convert a general instance to that satisfying those conditions. In Sect. 5.2 we introduce a new matroid and prove the main theorem (Theorem 5.7). Based on Theorem 5.7, in Sect. 5.3 we give an efficient algorithm for the minimum weight packing problem. In Sect. 5.4 we also give a proof of Theorem 3.4 using lemmas in Sect. 5.2. In Sect. 5.5 we finally remark a polyhedral aspect of M 1 -reachability-based M 2 -restricted packings.
For simplicity of description, throughout this section we shall call an M 1reachability-based M 2 -restricted packing a feasible packing.

Preprocessing
Our result will be established assuming that a given instance (D, c, M 1 , M 2 ) satisfies the following three conditions: (Recall that r 1 (∂ s (P(v))) denotes the number of arborescences that span v in a feasible packing.) In this subsection we shall show how to convert a general instance to that satisfying those three conditions, (A1)-(A3).  Note that (A1) and (A2) are maintained during Reduction 2. Hence by using Reductions 1 and 2 at a preprocessing stage, we may always assume that the input satisfies (A1), (A2) and (A3). The following technical lemmas will be used later in the proof of Theorem 3.4. To see the converse, suppose that (8) fails in (D, c, M 1 , M 2 ), i.e., for some X ⊆ V and F ⊆ ∂ s (X ). We claim that, if X is an inclusionwise minimal set satisfying (17) for some F, then Suppose that this does not hold. Then X contains v such that ) as M 2 (and, resp., M 2 ) is the direct sum of matroids M u (and, resp., M u ) on ∂(u). This means that M v is truncated at r 1 (∂ s (P(v))), and . Hence if we remove v from X (and remove ∂ F s (v) from F), then the left side of (17) decreases by at least r 1 (∂ s (P(v))). On the other hand, as ∂ s (P(X )) − ∂ s (P(X − v)) ⊆ ∂ s (P(v)), the submodularity and the monotonicity of r 1 implies Hence the right side of (17) decreases by at most r 1 (∂ s (P(v))) when we remove v from X . Consequently there is a smaller set than X satisfying (17), which is a contradiction to the minimality of X .
Take an inclusionwise minimal set X with (17)  Consider the following weaker version of the cut condition (8): The following lemma says that after Reduction 1 the cut condition (8) is simplified in the weaker form.

Reducing to the weighted matroid intersection problem
In this subsection we shall characterize the arc set of a feasible packing in terms of common independent sets of two matroids.
Let (D, c, M 1 , M 2 ) be as above. Let m(v) = r 1 (∂ s (P(v))), that is, the number of arborescences that span v in a feasible packing. By Reductions 1 and 2, we may focus on instances satisfying (A1), (A2) and (A3). Moreover, if r 2 (∂(v)) < m(v) for some v ∈ V , then (D, c, M 1 , M 2 ) clearly has no feasible packing. So we may further assume the following stronger condition than (A3): The characterization is based on the following clever setting of a bi-set family and a bi-set function introduced by Bérczi and Frank [1] to understand the theorem by Kamiyama et al [19], and further developed by Bérczi et al. [2].
Let us define ∼ as follows: . Then ∼ is an equivalence relation. We call the equivalence classes A 1 , . . . , A as atoms of D. For every root arc e i , let U i be the set of vertices in V which can be reached from s via the arc e i in D. Let Note that for any X ∈ F, Hence the first term in the definition of p(X) is equal to the number of arborescences that reach to each vertex in X I , and from the definition of J X one can easily see that |∂ B V (X)| ≥ p(X) is a necessary condition for the existence of an M 1 -reachability-based packing. The next lemma shows that this necessary condition is in fact equivalent to the cut condition given in Theorem 3.3. (Although the lemma follows implicitly from Bérczi et al. [2], we give a simpler (specialized) proof for completeness.) (V + s, A). The following two conditions are equivalent:

Lemma 5.3 Let B ⊆ A for a given D =
For the polyhedral description discussed in Sect. 5.5, we shall prove a slightly generalized statement:

Lemma 5.4 Let x :
A → R ≥0 . The following two conditions are equivalent: x(∂ V (X )) ≥ r 1 (∂ s (P(X ))) − r 1 (∂ s (X )) for every X ⊆ V x(∂ V (X)) ≥ p(X) for every X ∈ F Proof (23) ⇒ (24): This direction is discussed in [2] and the proof goes as follows. Suppose that (23) holds. For (24), consider any X = (X O , X I ) ∈ F. Let Y := X I ∪ (V − e j / ∈J X U j ). By definition, for every root arc e j , e j / ∈ J X implies e j / ∈ ∂ s (Y ). This in turn implies We also claim To see this, take any arc e = uv in ∂ V (Y ). Since no arc leaves e j / ∈J X U j , the definition of Y implies that there is some e i / ∈ J X such that u ∈ U i and v ∈ X I . As U j ∩ X I = ∅ for e j / ∈ I X ∪ J X , we have e i ∈ I X . This in turn implies (X O − X I ) ∩ U i = ∅, and u / ∈ X O . In other words, e ∈ ∂ V (X) and (26) follows. Therefore, by using the non-negativity of x and the monotonicity of r 1 , we get (26) and (23)) (by (20)) (24)⇒ (23): Suppose that (24) holds. To verify that (23) holds, take any X ⊆ V . We construct a directed graph D atom on the set of all atoms obtained from D by contracting the set of vertices of each atom to a vertex. For atoms A i = A j , there exists a set U k that contains exactly one of them, say A j . Since no arc leaves U k in D, no arc leaves the corresponding set in D atom . It follows that the two vertices corresponding to A i and A j in D atom can not belong to a circuit. Thus D atom is acyclic . Let v 0 = s, v 1 , . . . , v be a topological order of this graph. Since, by assumption, no arc enters s, s can be chosen as v 0 . We denote the atoms so that atom A i corresponds to vertex v i . Suppose that the atoms that intersect X are A h 1 , . . . A h k , and let With this setting of X j , we have X j ∈ F and We prove by induction on i for If i = 1, then s is the only vertex proceeding v h i in D atom , and hence (P(A h 1 )). Therefore Suppose that (28) is satisfied for i with 1 ≤ i < i. The submodularity and the monotonicity of r 1 give Also, by Hence, by the submodularity of r 1 , we have Combining those inequalities we get (29) and (30) Thus (28) holds. In particular, by setting i = k, we get (27)) (28)) = r 1 (∂ s (P(X ))) − r 1 (∂ s (X )) (by definition) as we stated.
We also remark one more technical lemma.

Lemma 5.5 Let B ⊆ A for a given D = (V + s, A) with ∂ A s (V ) ⊆ B, and let D = (V +s, B) be a subgraph of D. Suppose that (22) holds for B. Then r
) for every v ∈ V . Proof By Lemma 5.4, B also satisfies (21).
To see the reverse inequality, let X := P D (v) and consider (21) for X . We then get .

Moreover, the definition of X and ∂
)), and we obtain the equality. In order to extend Edmonds' idea, we need to define an appropriate variant of the union of k copies of the graphic matroid. Following the argument in Sect. 4 this will be done by giving a submodular function but in this case we would define it over the bi-set family F and use Theorem 2.
and hence X ∩ Y, X ∪ Y ∈ F j , that is, F j is an intersecting family. Since the atoms are disjoint, two intersecting bi-sets in F belong to the same F j for some j ∈ {1, . . . } and hence F is also an intersecting family. To see the intersecting submodularity of b, it suffices to show, by the modularity of m(X I ) −|∂ A s (X I )|, that p is intersecting supermodular. Take any intersecting X, Y ∈ F and we may assume X I ∩ Y I ⊆ A j . By the definition of an atom and (20), we have Also by the definition of J , Thus (32) and (33) Finally, to see that b is non-negative, take any X ∈ F. Let d = r 1 (∂ A s (P(X I ))). By (20), r 1 (I X ∪ J X ) = d. Also, since X I is contained in an atom, the definition of atoms implies r 1 (∂ A s (P(v))) = d for every v ∈ X I . Hence, picking any v ∈ X I , we have Thus b is non-negative.
Let I * := {B ⊆ A : i B (X) ≤ b(X) for every X ∈ F}. Then, by Lemma 5.6 and Theorem 2.2, I * forms the independent set family of a matroid on A. This matroid is denoted by M * and its rank function is denoted by r * : 2 A → Z + , where, by Theorem 2.2, We are ready to prove the main theorem of this section. Proof First let us check that the rank of M 2 is m(V ). Indeed, by (A3 ), Note that in both directions B is independent in M 2 . We claim that hold in both directions. Indeed, if a feasible packing exists, then (36) and (37) follow from the definition of reachability-based packing, (A2), and (A3 ). Thus, by (36), On the other hand, if B is a common independent set with |B| = m(V ), then, by (A3 ) and the independence of B in M 2 , implying (36) and (38). It follows, by (35), that B is a base of M 2 and hence, by (A2), that ∂ A s (V ) ⊆ B, that is, (37) holds. By (37), the independence condition for M * , that is, i B (X) ≤ b(X) for every X ∈ F, is written as On the other hand, since holds by (36), (39) is equivalent to Lemma 5.3 implies that (41) is equivalent to If B is the edge set of an M 1 -reachability-based M 2 -restricted packing, B must satisfy (42) (which is an easy direction of the statement and can be proved formally as discussed in Sect. 5.4.) If B satisfies (42), let D be the subgraph of D induced by B. Then by (42) and (37) we have

Minimum weight packing
Based on Theorem 5.7 we can now solve our minimum weight packing problem, provided an efficient independence oracle for the matroid M * induced by b. A simple polynomial time independence oracle for M * will be developed in Sect. 5.3.2. We leave open the problem of developing a faster independence oracle for M * which would imply a more acceptable running time for our algorithm. Proof As explained in Sect. 5.1 we may always assume that (D, c, M 1 , M 2 ) satisfies (A1), (A2) and (A3). If (A3 ) does not hold, then there is no feasible packing. Hence we also assume (A3 ). By a weighted matroid intersection algorithm we compute the minimum weight common base of M 2 and M * . (Here, we need an independence oracle for M * , which will be developed in Sect. 5.3.2.) By Theorem 5.7, if there is no common base, we can conclude that (D, c, M 1 , M 2 ) has no feasible packing. Otherwise, the common base B is the arc set of a minimum weight feasible packing. Once the edge set B is determined, the required decomposition can be obtained by applying the algorithm of [21] to the subgraph induced by B by Lemma 5.5.

Checking independence in M *
Let M * = (A, I * ) be the matroid induced by b as above. We show that the independence of each arc set B can be checked by solving matroid intersection problems repeatedly.

Theorem 5.9
There exists a polynomial time algorithm to decide whether a set B of arcs belongs to I * or not.
Proof We will use the definitions from Sect. 5.2. Using any searching algorithm, the sets U i , and hence the partition of V into atoms, I X and J X for any X ∈ F can be computed in polynomial time. It can also be decided in polynomial time whether a bi-set X belongs to F or not.
Recall that B is independent in I * if and only if i B (X) ≤ b(X) for every X ∈ F. Since there are O(n) atoms, we may focus on checking the inequality for every X ∈ F i for a fixed atom A i . In other words, our goal is to check By (20), r 1 (I X ∪ J X ) is constant over F i . Therefore, it suffices to design an algorithm for checking the following condition for a given k : A i → Z + and q ∈ Z + : We first solve the case when q = 0, that is, checking and then show how to deal with the general case. The special case when q = 0 will be done by reducing the problem to the independent matching problem, which is known to be equivalent to the matroid intersection problem (see e.g., [25]). In the independent matching problem, we are given a bipartite graph G = (U , W ; E) and a matroid M W on W , and we have to decide whether G has an independent matching.
In order to define G and M W appropriately we need the following definitions. For an arc a, let t(a) and h(a) be the tail and the head of a, respectively. Let of v, and let k A i := {v 1 , . . . , v k(v) : v ∈ A i } be the set of all those copies. Then we define an auxiliary bipartite graph G = (U , W ; E) as follows: A matroid M W is defined to be the sum of the free matroid on k A i and M 1 = (∂ A s (V ), r 1 ). The rank function of M W is denoted by r W .

Claim 5.10 (45) holds if and only if G has an independent matching that covers U .
Proof The Rado-Perfect theorem [26,27] (see [25, (2.75)]) says that G has an independent matching of size d if and only if |U − C| + r W ( (C)) ≥ d for every C ⊆ U , where (C) denotes the set of neighbors of C in G. Hence G has an independent matching that covers U if and only if We show (45) is equivalent to (46). Suppose that (45) holds. To see (46) take any C ⊆ U . We may suppose C = ∅.
where H and T denote the set of heads and tails of arcs of C in D, respectively. Then X I = ∅, and we have X ∈ F i . Also from the construction we have Hence we have Thus (46) holds.
Conversely, suppose (46) holds. Take any X ∈ F i . Observe that B(X) ⊆ U and each element in (B(X)) ∩ k A i is a copy of a vertex in X I . Hence By the construction we also have Hence we have ( by (49) and (50)).
By Claim 5.10, we can check whether B satisfies (45) in polynomial time by a matroid intersection algorithm. It remains to extend the approach to the case when q > 0. We do this by using a standard technique for checking the independence in a so-called count matroid observed by Imai [17].
Let us use the auxiliary graph G = (U , W ; E) and M W defined above, and assume that B satisfies (45). For a fixed a ∈ U , let i be the index of the atom A i which contains the head of a. We consider checking where F a i := {X ∈ F i : a ∈ B(X)}. We prepare a new auxiliary bipartite graph G a = (U a , W ; E a ) obtained from G by replacing a with q + 1 copies a 0 , . . . , a q (and then replacing each edge ax ∈ E in G incident to a ∈ U with q + 1 copies a 0 x, . . . , a q x). Applying the same proof as that in Claim 5.10 we have the following: Claim 5.11 Suppose that B satisfies (45). Then (51) holds if and only if G a has an independent matching that covers U a .
In view of this claim one can check (44) in polynomial time first by checking (45) by computing a maximum independent matching in G and then checking (51) by computing a maximum independent matching in G a for every a ∈ U . This completes the proof.

Computing a rank certificate
We have seen how to check the independence in polynomial time. We can also output a maximal independent set using the above independence oracle. In this section we show how to find a certificate of the rank of M * , i.e., a minimizer of the rank formula given in (34). As explained at the end of Sect. 5.4, such a certificate will be used to construct a certificate that D has no feasible packing.
Let B be a maximal M * -independent subset of a set F ⊆ A. We first observe that the above algorithm for the independence oracle can be modified to output a bi-set X a ∈ F for each a ∈ F − B such that Indeed, since B is a maximal M * -independent subset of F, there is no independent matching covering U a in G a (where U a and G a are as defined in the proof of Theorem 5.9 when we check the independence of B + a). Hence there exists a C a ⊆ U a for which (46) does not hold. Setting as in the proof of Claim 5.10, X a satisfies (52).
Since B is independent and i B+a (X a ) ≤ i B (X a ) + 1, we have and a ∈ A(X a ) for every a ∈ F − B.
We say that X ∈ F is tight if i B (X) = b(X). By a standard argument using the intersecting submodularity of b and the supermodularity of i B , one can show that the union of two intersecting tight bi-sets is tight. Thus, by taking the union of the intersecting bi-sets in the collection {X a : a ∈ F − B}, we get a family {X 1 , . . . , X t } of tight bi-sets with disjoint inner sets such that that is, {X 1 , . . . , X t } is a minimizer of the right side of (34).

Proof of theorem 3.4
Let D, M 1 and M 2 be as given in the statement of Theorem 3.4. Our goal is to prove that there is a feasible packing in D if and only if (8) holds, i.e., Necessity of Theorem 3.4: Let {T 1 , . . . , T t } be a feasible packing in D. We may assume that each T i is an s-one-arborescence, i.e., T i contains exactly one root arc, which is denoted by e i . For each v ∈ V , let R v be the set of root arcs e i in T i ( Consider any X ⊆ V and F ⊆ ∂ s (X ), and let R X = v∈X R v . Since Span M 1 is monotone and ∂ s (P(v)) ⊆ Span M 1 (R v ) for each v ∈ V by the definition of feasible packings, we have Span M 1 (R X ) ⊇ v∈X Span M 1 (R v ) ⊇ v∈X ∂ s (P(v)) = ∂ s (P(X )). Thus we get For each e i ∈ R X , T i ∩ ∂(X ) = ∅; so let us choose one arc a i from T i ∩ ∂(X ).
Combining this with (56) and the definition of b, we get Hence there is some i such that Let B be a base of Now by (57) Hence by Lemma 5.3 we have a set X ⊆ V with Combining this with (58), we finally get that is, X violates (19). This completes the proof of the lemma as well as that of Theorem 3.4.
As explained in the last subsection, one can check the existence of a feasible packing in polynomial-time by using a weighted matroid intersection algorithm. This implies by Theorem 3.4 that one can check in polynomial-time whether an instance satisfies the cut condition (8). One may however wonder how to compute X ⊆ V and F ⊆ ∂ s (X ) violating the condition if the instance has no feasible packing.
The proofs of Lemmas 5.1 and 5.2 explains how to convert certificates violating the cut conditions in Reductions 1 and 2. Hence let us assume (A1), (A2) and (A3 ). Observe that the above proof of the sufficiency of Theorem 3.4 is algorithmic: a set X having the minimum of the left side of (9) can be computed by a matroid intersection algorithm; the minimizer of the rank formula in (34) can be found in polynomial time as explained in Sect. 5.3.3. In other words, one can compute a bi-set X i with (57). From X i , the proof of Lemma 5.3 explains how to construct a set X violating the cut condition (19). (Take X to be Y as defined in the proof of Lemma 5.3.)

Polyhedral aspects
An immediate corollary of Lemma 5.7 is a polyhedral description of the characteristic vectors of the arc sets of the feasible packings as the intersection of two base polyhedra due to Edmonds [5]. In this subsection we provide a different polyhedral description which is more natural and fits better to Theorem 3.4.
Next we replace (60) by another inequality which is more convenient to apply the results of the previous subsections.
By Theorem 2.2, the polyhedron P b , defined by the inequalities (62), (67), and x(a) ≤ 1 ∀a ∈ A, is the convex hull of the incidence vectors of the independent sets of the matroid M * (induced by b). By Edmonds [6], the polyhedron P 2 , which is the convex hull of the incidence vectors of the independent sets of the matroid M 2 , is defined by the inequalities (61) and (62). Then, by Edmonds [5], P b ∩ P 2 forms the common independent set polytope of M * and M 2 , and the common base polytope of M * and M 2 is given by P D,M 1 ,M 2 (see e.g., [28,Corollary 41.12d]).
x(a) ≥ 0 for each a ∈ A, x(A) = m(V ). Then observe x ∈ P D ,M 1 ,M 2 . By Theorem 5.13, x can be described as a convex combination of the characteristic vectors of the arc sets of feasible packings in D , i.e., x = t i=1 λ i χ P i for some feasible packings P i in D and λ i ≥ 0 with t i=1 λ i = 1. By the definition of x , we have x = t i=1 λ i χ P i , where P i is the feasible packing in D corresponding to P i . This completes the proof.