The purpose of this article is to generalize a recent result of Gao and Yang on packing mixed arborescences with flexible roots from mixed graphs to mixed hypergraphs using matroid intersection. This also yields a weighted algorithm for the corresponding problem.
In order to understand the introduction, the reader may find all the necessary definitions in Section 2.
The most basic setting when dealing with arborescence packings is the following one: Given a directed graph and a multiset of vertices in , we want to find a packing of spanning -arborescences. The following result was proven by Edmonds in 1973 in  and is fundemental to the theory of arborescence packings. It gives a complete characterization for the existence of packings of spanning arborescences with fixed roots in the basic setting.
Let be a digraph and a multiset of There exists a packing of spanning -arborescences in if and only if
Another celebrated achievement of Edmonds is a connection between the theory of spanning arborescence packings in digraphs and matroid theory. For that, he considers two matroids on the arc set of . The first matroid is the -sum of the forest matroid of the underlying graph of where . In other words, an arc set is independent in if the corresponding edge set can be partitioned into forests. The second matroid is the direct sum of the uniform matroids of rank on the set of arcs entering for all . We refer to these matroids as the -forest matroid and the -partition matroid of , respectively. Edmonds proved in  that the arc sets of a packing of spanning arborescences with respect to the root set are exactly the common independent sets of and . The following observation which can simply be obtained from Theorem 1 is crucial for this modeling. It can be found as Theorem 13.3.20 in . It can also be found as Lemma 5.4.6 in , where a direct proof is provided.
Let be a digraph and a multiset of of size Some is the arc set of a packing of spanning -arborescences in if and only if the underlying edge set of is the edge set of a packing of spanning trees and for all .
A first way of generalizing the results obtained in the basic setting is the consideration of directed hypergraphs instead of digraphs. The following generalization of Theorem 1 was proved in a stronger form by Frank, Király and Király in .
Let be a dypergraph and a multiset in There exists a packing of spanning -hyperarborescences in if and only if for all
Let be a dypergraph and a multiset in of size Some is the dyperedge set of a packing of spanning -hyperarborescences in if and only if the underlying hyperedge set of is the hyperedge set of a packing of spanning hypertrees and for all
The above idea of approaching the problem of packing spanning arborescences via matroid intersection is useful for two reasons. On the one hand, one can apply Edmonds’ matroid intersection theorem  to get the characterization for the existence of the packing. On the other hand, one can apply Edmonds’ weighted matroid intersection algorithm  to find a packing of minimum total weight. These results of Edmonds are presented in the following theorem.
Let and be two matroids on a common ground set with polynomial independence oracles for and being available, a positive integer and let be a weight function.
Giving a similar characterization in terms of matroid intersection for arborescence packings in a more general setting is the main purpose of this article.
Firstly, the generalization concerns mixed hypergraphs instead of digraphs. Secondly, the generalization relaxes the condition of the roots of the arborescences being fixed. We are given a mixed hypergraph , a non-negative integer and functions and we want to find a packing of spanning mixed -hyperarborescences such that every vertex is the root of at least and at most of the hyperarborescences. We call such a packing -flexible. The digraphic case of this problem has been successfully treated by Frank in . He gave both a theorem characterizing the digraphs admitting a -flexible packing for given and an algorithm to find such a packing if it exists. Recently, this has been generalized to the case of mixed graphs by Gao and Yang in .
The basic insight of our approach is that, given a packing of spanning arborescences, for every vertex , the number of arborescences in the packing whose root is plus the in-degree of in the packing is equal to We use this fact to show that -flexible packings in mixed hypergraphs can be modeled as the intersection of two matroids. While a hypergraphic analogue of the -forest matroid is maintained as one of the two matroids, the -partition matroid is replaced by a more general object, a so-called generalized partition matroid. Using Theorem 5(a), this allows to obtain the following characterization for -flexible packings in mixed hypergraphs which is the main contribution of this article. It generalizes the theorem of Gao and Yang. Our proof is completely different from the one in  and works for mixed hypergraphs.
Let be a mixed hypergraph, and functions. There exists a -flexible packing of mixed hyperarborescences in if and only if we have
While the technique of matroid intersection for arborescence packings is routinely used as a tool to obtain algorithms for the weighted cases, this is to our best knowledge the first time that a new structural result is obtained via matroid intersection. By Theorem 5(b), the previous observation also yields an algorithm to compute a -flexible packing of minimum total weight in polynomial time.
Let be a mixed hypergraph, functions and a weight function. Then a -flexible packing of mixed hyperarborescences of minimum weight can be computed in polynomial time, if there exists one.
For some directed graph (in short, digraph) and , an -arborescence in is a subgraph of whose underlying graph is a tree and in which all the vertices except have exactly arc entering. An -arborescence of is called spanning if it contains all the vertices of By a packing of arborescences we mean a set of arc-disjoint arborescences. A multiset is a collection of elements in which an element may appear several times. For some , we denote by the number of times is contained in .
A mixed hypergraph is a tuple where is a set of vertices, is a set of directed hyperedges (dyperedges) and is a set of hyperedges. A dyperedge is a tuple where is a single vertex in and is a nonempty subset of and a hyperedge is a subset of of size at least two.
For some , we denote by the set of hyperedges with , by the set of dyperedges with . We use for and for . For a single vertex , we use instead of etc. Given a function and , we use the notation and hence we consider
For some and , we denote by the set of vertices in which are contained in at least one dyperedge in or hyperedge in . A mixed hypergraph without hyperedges is a directed hypergraph (dypergraph) and a mixed hypergraph without dyperedges is a hypergraph. The underlying hypergraph of is obtained by replacing every dyperedge by the hyperedge . For a hyperedge , its corresponding bundle is the set of all possible orientations of , i.e. . The directed extension of is obtained by replacing every hyperedge in by its corresponding bundle, i.e. . A packing of spanning hyperarborescences in is called -feasible if every vertex is the root of at least and at most of the hyperarborescences and for every , at most one dyperedge of the bundle is contained in the dyperedge set of the packing. We say that is a mixed graph if each dyperedge has a tail of size exactly one and each hyperedge contains exactly two vertices.
Trimming a dyperedge means that is replaced by an arc with and . Trimming a hyperedge means that is replaced by an arc for some . The mixed hypergraph is called a mixed hyperarborescence if its dyperedges and hyperedges can be trimmed to get an arborescence. A mixed -hyperarborescence for some is a mixed hyperarborescence together with a vertex whose dyperedges and hyperedges can be trimmed to get an -arborescence. A hypergraph is called a (spanning) hypertree if it can be trimmed to a (spanning) arborescence.
Given a packing of mixed hyperarborescences, we use for and for . Further, given a weight function , we use for .
Given a subpartition of , we use for and for . We use for the cardinality of and , respectively. A hypergraph is called partition-connected if for every partition of . Further, we use for the union of the classes of .
Basic notions of matroids which are used in this article can be found in Chapter 5 of .
3 Relevant matroids
We now give an overview of the matroids we need for our characterization.
3.1 Hypergraphic matroids
While graphic matroids are well-studied, their generalization to hypergraphs has received significantly less attention. The following matroid construction was first observed by Lorea . Given a hypergraph , let
The set is the set of independent sets of a matroid on .
The matroid is called the hyperforest matroid of the hypergraph .
For our algorithmic result, we need to show that an independence oracle for exists. In order to do so, we require the following two preliminaries. The first result can be found as Corollary 2.6 in .
Let be a hypergraph. Then if and only if is partition-connected.
This result is useful due to the next one which can be found in  as a comment after Theorem 9.1.22 stating that the proof of Theorem 9.1.15 is algorithmic.
There is a polynomial time algorithm that decides whether a given hypergraph is partition-connected.
We are now ready to conclude that a polynomial time independence oracle for exists.
Given a hypergraph and , we can decide in polynomial time whether is independent in .
If , it follows immediately from the definition of that is dependent in . We may hence suppose that . Let a hypergraph be obtained from by adding a set of hyperedges each of which equals . Observe that .
is independent in if and only if is partition-connected.
First suppose that is independent in . By definition of , for any , we have . For any with , we have . It follows that for all and so by definition, . Now Proposition 1 yields that is partition-connected.
Now suppose that is partition-connected. It follows from Proposition 1 that . It follows that is the free matroid, so in particular, is independent in . It follows that is also independent in . ∎
We also need the -sum matroid of , that is the matroid on ground set in which a subset of is independent if it can be partitioned into independent sets of . We call this matroid -hyperforest matroid and refer to it as . The following formula for the rank function of was proved by Frank, Király and Kriesell .
For all , we have
We now extend the previous construction to mixed hypergraphs. Let be a mixed hypergraph, the underlying hypergraph of and the directed extension of . We now construct the extended -hyperforest matroid on from by replacing every by parallel copies of itself, associating these elements to the dyperedges in and associating every element of to the corresponding element in . We give the following formula for the rank function of .
For all , we have
Let be obtained from by deleting all but one element of for all with . As all elements in are parallel in , we obtain that . As for every , there exists a matroid that is isomorphic to , is a restriction of and whose ground set contains . It follows from Theorem 9 that ∎
Again, for the algorithmic part, we need to show that an independence oracle for is available. We need the following preliminary result on matroids which was proven by Edmonds .
Let be a matroid such that a polynomial time independence oracle for is available and a positive integer. Then a polynomial time independence oracle for the -sum of is also available.
Given a mixed hypergraph and , we can decide in polynomial time if is independent in .
If contains at least 2 elements of for some , then is dependent in by definition. Otherwise, there is a matroid that is isomorphic to , is a restriction of and whose ground set contains . Further, can be found efficiently. It therefore suffices to prove that a polynomial time independence oracle for is available. This follows immediately from Lemma 1 and Proposition 4. ∎
3.2 Generalized partition matroids
The other matroid we consider is called a generalized partition matroid and plays the role of the -partition matroid. It has been considered in a slightly weaker form in , see Problem 5.3.4.
Let be a partition of a set and , , for all For and let Let
There exists a matroid whose set of independent sets is , set of bases is and rank function is if and only if
The matroid in Theorem 10 is called generalized partition matroid.
First suppose that is a matroid and let . For all , this yields . Further, we obtain and .
We now show sufficiency through three claims.
forms the collection of independent sets of a matroid , i.e. satisfies the following 3 independence axioms:
if and , then ,
if and , then there exists some such that .
: Let . Then for and so we have .
: Let and Let . Observe that as . For all , let and . Observe that for all , we have and for all . In order to prove that for some , it remains to show that there is some with . If there is some with , then , so we are done. We may hence suppose that for all . This yields for all . For all , we have yielding . This yields for all . As and , for some arbitrary we obtain
if and only if is a maximal element in .
First let . We obtain . As for all , we have . Further, for any proper superset of , we have , so . It follows that is maximally in .
Now let be a maximal element in . If for some , let and let . As and , we obtain and for all . Further, , so . This contradicts the maximality of . We obtain that for all .
If , by , there exists some such that . Let and let . We have and for all . Further, , so . This contradicts the maximality of . It follows that .
The rank function of is
Let and be a maximal element of in
As and , we obtain for all . This yields . Further, as for all and , we obtain , so . It follows that .
Let . If , we obtain , so we are done. We may hence suppose that .
For all , let and let . Observe that for all , we have and for all . If , then for some arbitrary , we have , so , a contradiction to the maximality of . This yields .
If there is some such that , then , so , a contradiction to the maximality of . This yields for all , so, as , we obtain . For all , we have either or . If , by and , we obtain . If , we clearly obtain . It follows that holds for all .
This yields .
The three previous claims yield the theorem. ∎
Let be a directed hypergraph and integer functions such that the following two conditions are satisfied:
Then for all is the set of bases of a matroid on with rank function
The following is an immediate corollary of the definition of .
4 Flexible packings by matroid intersection
We are now ready to show how to model packings of spanning mixed hyperarborescences with flexible roots via matroid intersection.
The following observation allows us to reduce the problem of flexible packings in a mixed hypergraph to finding feasible packings in its directed extension.
Let be a mixed hypergraph, its directed extension, integer valued functions and . Then has a -flexible packing if and only if has a -feasible packing.
First suppose that has a -flexible packing . Then there is a -flexible packing of arborescences such that is a trimming of for all . For every , let be the head of the arc to which is trimmed in and let be the orientation of where is chosen to be its head. Then the set of dyperedges can be trimmed to and it contains at most one dyperedge of for all . It follows that