Complexity of packing common bases in matroids

One of the most intriguing unsolved questions of matroid optimization is the characterization of the existence of k disjoint common bases of two matroids. The signiﬁcance of the problem is well-illustrated by the long list of conjectures that can be formulated as special cases, such as Woodall’s conjecture on packing disjoint dijoins in a directed graph, or Rota’s beautiful conjecture on rearrangements of bases. In the present paper we prove that the problem is difﬁcult under the rank oracle model, i.e., we show that there is no algorithm which decides if the common ground set of two matroids can be partitioned into k common bases by using a polynomial number of independence queries. Our complexity result holds even for the very special case when k = 2. Through a series of reductions, we also show that the abstract problem of packing common bases in two matroids includes the NAE-SAT problem and the Perfect Even Factor problem in directed graphs. These results in turn imply that the problem is not only difﬁcult in the independence oracle model but also includes NP-complete special cases already when k = 2, one of the matroids is a partition matroid, while the other matroid is linear and is given by an explicit representation.


Introduction
Various graph characterization and optimization problems can be treated conveniently by applying the basic tools of matroid theory. The main role of matroid theory is not B Kristóf Bérczi berkri@cs.elte.hu Tamás Schwarcz schtomi97@caesar.elte.hu 1 only that it helps understanding the true background of known problems but they are often unavoidable in solving natural optimization problems in which matroids do not appear explicitly at all. One of the most powerful results is the matroid intersection theorem of Edmonds [1] providing a min-max formula for the maximum cardinality of a common independent set of two matroids. In particular, this gives rise to a characterization of the existence of a common basis. The closely related problem of packing bases in one matroid is also nicely solved by Edmonds and Fulkerson [2] even in the more general case when there are k matroids on S and we want to pick a basis from each in a pairwise disjoint way.
Edmonds and Giles [3] initiated a common generalization of network flow theory and matroid theory by introducing the notion of submodular flows. Another framework that generalizes matroid intersection, introduced by Frank and Jordán [4], characterized optimal coverings of supermodular bi-set functions by digraphs and provided a min-max result in which the weighted version includes NP-complete problems. Despite being widely general, none of these frameworks gave answer for the longstanding open problem of finding k disjoint common bases of two matroids. This problem was open even for k = 2 in the sense that no general answer was known similar to the case of one matroid, but no NP-complete special cases were known either. The few special cases that are settled include Edmonds' theorem on the existence of k disjoint spanning arborescences of a digraph rooted at the same root node [5], Kőnig's result on 1-factorization of bipartite graphs [6], and results of Keijsper and Schrijver [7] on packing connectors.
There is a long list of challenging conjectures that can be formulated as a statement about packing common bases of two matroids. Rota's beautiful basis conjecture [8] states that if M is a matroid of rank n whose ground set can be partitioned into n disjoint bases B 1 , . . . , B n , then it is possible to rearrange the elements of these bases into an n × n matrix in such a way that the rows are exactly the given bases, and the columns are also bases of M. Only partial results are known, see e.g. [9][10][11][12][13].
Woodall's conjecture [14] on packing disjoint dijoins in a directed graph is also a special case of packing common bases, as was shown by Frank and Tardos [15]. Given a directed graph D, a dijoin is a subset of arcs whose contraction results in a strongly connected digraph. The conjecture states that the maximum number of pairwise disjoint dijoins equals the minimum size of a directed cut. The conjecture was known to be true for k = 2, for source-sink connected digraphs by Schrijver [16] and independently by Feofiloff and Younger [17], for series-parallel digraphs by Lee and Wakabayashi [18]. Recently Mészáros [19] proved that if k is a prime power, then the conjecture holds if the underlying undirected graph is (k − 1, 1)-partitionconnected.
The capacitated packing of k-arborescences is yet another problem that can be formulated as packing common bases in two matroids [20]. A k-arborescence is the union of k pairwise edge-disjoint arborescences rooted at the same vertex. Given a directed graph D = (V , A) with arc-capacities c : A → Z + satisfying c(a) ≤ for a ∈ A and a node r 0 ∈ V , the problem asks if the existence of a capacityobeying packing of k spanning arborescences rooted at r 0 implies the existence of a capacity-obeying packing of k-arborescences rooted at r 0 . Although several papers generalizing Edmonds' theorem on packing arborescences appeared in the last decade (for recent papers with great overviews, see e.g. [21][22][23]), this problem remains widely open.
This illustrious list of open problems underpins the significance of the abstract, matroidal version. Given two matroids M 1 = (S, I 1 ) and M 2 = (S, I 2 ), there are three different problems that can be asked: (A) Can S be partitioned into k common independent sets of M 1 and M 2 ? (B) Does S contain k disjoint common bases of M 1 and M 2 ? (C) Does S contain k disjoint common spanning sets of M 1 and M 2 ? These problems may seem to be closely related, and (A) and (B) are indeed in a strong connection, but (C) is actually substantially different from the others.
There is an obvious necessary condition for the existence of a partition into k common independent sets: the ground set has to be partitionable into k independent sets in both matroids. Davies and McDiarmid showed that this condition is sufficient for the case of strongly base orderable matroids [24]. Kotlar and Ziv [25] proved that if M 1 and M 2 are matroids on S and no element is 3-spanned in M 1 or M 2 , then S can be partitioned into two common independent sets. They conjectured that this can be generalized to arbitrary k: if no element is (k + 1)-spanned in M 1 or M 2 , then S can be partitioned into k common independent sets. Recently, Takazawa and Yokoi proposed a new approach building upon the generalized-polymatroid intersection theorem [26]. Their result explains the peculiar condition appearing in the theorem of Kotlar and Ziv on how many times an element is spanned, and they also provide new pairs of matroid classes for which the natural necessary condition is sufficient.
To the best of our knowledge, the time complexity of problems (A), (B) and (C) under the independence oracle model was open until now. (It is worth mentioning that the independence, rank, circuit-finding, spanning, port, strong basis and certain closure oracles are polynomially equivalent [27][28][29].) We will concentrate on the PartitionIntoCommonBases problem, defined as follows: Given matroids M 1 = (S, I 1 ) and M 2 = (S, I 2 ), find a partition of S into common bases. Note that this problem is a special case of all (A), (B) and (C). Our main contribution is the following.

Theorem 1 The PartitionIntoCommonBases problem requires an exponential number of independence queries.
We prove the theorem by reduction from a problem that we call PartitionInto-ModularBases and seems to be closely related to the matroid parity. Theorem 1 immediately implies that all three of the problems (A), (B) and (C) are difficult under the rank oracle model. We also verify that the problem is not only difficult in the independence oracle model, but it also includes NP-complete special cases.

Theorem 2 PartitionIntoCommonBases includes NP-complete problems.
The proof of Theorem 2 will show that the problem of partitioning into common bases is already difficult in the very special case when |S| = 2r 1 (S) = 2r 2 (S), one of the matroids is a partition matroid and the other is a linear matroid given by an explicit linear representation.
The rest of the paper is organized as follows. Basic definitions and notation are introduced in Sect. 2. We introduce the PartitionIntoModularBases problem in Sect. 3 and prove its hardness in the independence oracle model. Theorem 1 is then proved by reduction from PartitionIntoModularBases. In Sect. 4, we show that PartitionIntoModularBases includes the NP-complete NAE-SAT problem, thus proving Theorem 2. The same proof implies that PartitionIntoCommonBases remains difficult when restricted to linear matroids given by explicit linear representations. Section 5 considers the PartitionIntoModularBases problem for transversal matroids. Through a series of reductions that might be of independent combinatorial interest, we show that the NP-complete Perfect Even Factor problem also fits in the framework of packing common bases. Finally, Sect. 6 concludes the paper with further remarks and open questions.

Preliminaries
Matroids were introduced by Whitney [30] and independently by Nakasawa [31] as abstract generalizations of linear independence in vector spaces. A matroid M is a pair (S, I) where S is the ground set of the matroid and I ⊆ 2 S is the family of independent sets that satisfies the following, so-called independence axioms: The rank of a set X ⊆ S is the maximum size of an independent subset of X and is denoted by r M (X ). The maximal independent sets of M are called bases. Alternatively, simple properties of bases can be taken as axioms as well. In terms of bases, a matroid M is a pair (S, B) where B ⊆ 2 S satisfies the basis axioms: For a set S, the matroid in which every subset of S is independent is called a free matroid and is denoted by M free S . For disjoint sets S 1 and S 2 , the direct sum M 1 ⊕ M 2 of matroids M 1 = (S 1 , I 1 ) and M 2 = (S 2 , I 2 ) is a matroid M = (S 1 ∪ S 2 , I) whose independent sets are the disjoint unions of an independent set of M 1 and an independent set of M 2 . The k-truncation of a matroid M = (S, I) is a matroid (S, I k ) such that I k = {X ∈ I : |X | ≤ k}. We denote the k-truncation of M by (M) k .
A matroid M = (S, I) is called linear (or representable) if there exists a matrix A over a field F and a bijection between the columns of A and S, so that X ⊆ S is independent in M if and only if the corresponding columns in A are linearly independent over the field F. The class of linear matroids includes several well-investigated matroid families such as graphic matroids [32], rigidity matroids [33,34] and gammoids [35]. It is not difficult to verify that the class of linear matroids is closed under duality, taking direct sum (when the field F for linear representations is common), taking minors and taking k-truncation. Moreover, if we apply any of these operations for a matroid (or a pair of matroids) given by a linear representation over a field F, then a linear representation of the resulting matroid can be determined by using only polynomially many operations over F (see e.g. [36]).
Given a bipartite graph G = (S, T ; E), a set X ⊆ S is independent in the transversal matroid M = (S, I) if and only if X can be covered by a matching of G. Transversal matroids are also linear as they are exactly the dual matroids of strict gammoids. However, one has to be careful when discussing the complexity of prob-lems related to transversal matroids. If a transversal matroid M = (S, I) is given by an independence oracle, then determining its bipartite graph representation is difficult as it requires an exponential number of independence queries [37]. If a bipartite graph G = (S, T ; E) is given, then a linear representation of the transversal matroid associated with G on the ground set S over the field of fractions F(x) can be determined in deterministic polynomial time. Nevertheless, such a representation is not suitable for use in efficient deterministic algorithms. Substituting random values for each indeterminate in x from a field having size large enough leads to a randomized polynomial time algorithm that gives a linear representation over a field where operations can be carried out efficiently [38]. The derandomization of this approach might require to overcome major obstacles as it would have important consequences in complexity theory [39].
A matroid M = (S, I) of rank r is called paving if every set of size at most r − 1 is independent, or in other words, every circuit of the matroid has size at least r . Blackburn, Crapo and Higgs [40] enumerated all matroids up to eight elements, and observed that most of these matroids are paving matroids. Crapo and Rota [41] suggested that perhaps paving matroids dominate the enumeration of matroids. This statement was made precise by Mayhew, Newman, Welsh and Whittle in [42]. They conjectured that the asymptotic fraction of matroids on n elements that are paving tends to 1 as n tends to infinity. A similar statement on the asymptotic ratio of the logarithms of the numbers of matroids and sparse paving matroids has been proven in [43]. We will need the following technical statement [44][45][46]. Let M = (S, I) be a matroid whose ground set is partitioned into two-element subsets called pairs. A set X ⊆ S is called a parity set if it is the union of pairs. The matroid parity problem asks for a parity independent set of maximum size. This problem was introduced by Lawler [47] as a common generalization of graph matching and matroid intersection. Unfortunately, matroid parity is intractable for general matroids as it includes NP-hard problems, and requires an exponential number of queries if the matroid is given by an independence oracle [37,48]. On the positive side, for linear matroids, Lovász developed a polynomial time algorithm [48] that is applicable if a linear representation is available. In the next section, we will define a packing counterpart of the matroid parity problem in which the goal is to partition the ground set of a matroid into parity bases.

Hardness in the independence oracle model
Recall that in the matroid parity problem the aim is to find a parity independent set of maximum size. We define an analogous problem regarding partitions of the ground set.
Let M = (S, I) be a matroid and let P be a partition of the ground set into nonempty subsets. Members of P are called modules, and a set X ⊆ S is modular if it is the union of modules. The PartitionIntoModularBases problem is as follows: Given a matroid M = (S, I) over a ground set S of size 2r (S) together with a partition P of S, find a partition of S into two modular bases.
In what follows, we prove that PartitionIntoModularBases is intractable for general matroids as it requires an exponential number of independence queries even in the special case when every module is a pair. We will refer to this variant as the Par-titionIntoParityBases problem. Although PartitionIntoParityBases seems to be closely related to matroid parity, the relationship between the two problems is unclear.

Theorem 4 The PartitionIntoParityBases problem requires an exponential number of independence queries.
Proof Let S be a finite set of 4t elements and let P be an arbitrary partition of S into 2t pairs, forming the modules. Let H = {X ⊆ S : |X | = 2t, X is a parity set}. For a parity set Clearly, the ground set cannot be partitioned into parity bases of M, while X 0 ∪ (S − X 0 ) is such a partition for M 0 . For any sequence of independence queries which does not include X 0 or S − X 0 , the result of those oracle calls are the same for M and M 0 . That is, any sequence of queries which does not include at least one of the parity subsets X 0 or S − X 0 cannot distinguish between M and M 0 , concluding the proof of the theorem. Now we turn to the proof of Theorem 1. We will need the following technical lemma.
Let M and M denote the graphic matroids defined by the edgelabeled graphs G and G on Fig. 1a, b, respectively. We first prove (a).

Claim 6 S can be partitioned into two common independent sets of M and M having sizes 5 and 4 .
Proof It is not difficult to find a partition satisfying the conditions of the claim, for example, Proof S 1 and S 2 necessarily partition the K 4 subgraphs spanned byŴ j in G and G into two paths of length 3, so |S k ∩ {a j , b j , c j , d j , e j , f j }| = 3 and |S k ∩{a j , b j , c j , d j , g j , h j }| = 3 for k = 1, 2. This implies that either |S k ∩{e j , f j }| = |S k ∩{g j , h j }| = 1 for k = 1, 2, or e j , f j , g j and h j are contained in the same partition class.
In the former case, we may assume that g j ∈ S 1 and h j ∈ S 2 . In order to partition the K 4 subgraph spanned byŴ j in G into two paths of length 3, either {a j , b j } ⊆ S 1 and {c j , d j } ⊆ S 2 or {c j , d j } ⊆ S 1 and {a j , b j } ⊆ S 2 hold. However, these sets cannot be extended to two paths of length 3 in G , a contradiction. Thus e j , f j , g j and h j are contained in the same partition class. Since |S k ∩ {a j , b j , c j , d j , e j , f j }| = 3 for k = 1, 2, the claim follows. Now we analyze how the presence of edges i j affect the sizes of the partition classes. By Claim 7, we may assume that {e 1 , f 1 , g 1 , h 1 } ⊆ S 1 , and so i ∈ S 2 .
Proof We prove by induction on j. By assumption, the claim holds for j = 1. Assume that the statement is true for j. As i j is parallel to f j+1 in G , f j+1 ∈ S 1 . By Claim 7, {e j+1 , f j+1 , g j+1 , h j+1 } ⊆ S 1 . As i j+1 is parallel to h j+1 in G , necessarily i j+1 ∈ S 2 , proving the inductive step.
It should be emphasized that, for our purposes, any pair of matroids satisfying the conditions of Lemma 5 would be suitable; we defined a specific pair, but there are several other choices that one could work with.
We are now in the position to prove Theorem 1. 1

Theorem 1 The PartitionIntoCommonBases problem requires an exponential number of independence queries.
Proof We prove by reduction from PartitionIntoModularBases. Let M = (S, I) be a matroid together with a partition P of its ground set into modules. Recall that |S| = 2r (S), that is, the goal is to partition the ground set into two modular bases.
We define two matroids as follows. For every set P ∈ P, let M P = (S P , I P ) and M P = (S P , I P ) be copies of the matroids M |P| and M |P| provided by Lemma 5. We denote Note that |S | = 10|S|, that is, the size of the new ground set is linear in that of the original. Let M 1 is defined as the |S |/2-truncation of the direct sum of M and the matroids M P for P ∈ P. For the other matroid, we first take the 5|P|-truncation of the direct sum of M P and the free matroid M free P on P for each P ∈ P, and then define M 2 as the direct sum of these matroids. We first determine the ranks of M 1 and M 2 .

Proof
The rank of M 1 is clearly at most |S |/2 as it is obtained by taking the |S |/2truncation of a matroid. Hence it suffices to show that M ⊕ P∈P M P has an independent set of size at least |S |/2. For each P ∈ P, let B P be a basis of M P . Then P∈P B P is an independent set of M 1 having size P∈P 5|P| = 5|S| = |S |/2 as requested.
The rank of (M free P ⊕ M P ) 5|P| is 5|P| for each P ∈ P. This implies that the rank of M 2 is at most P∈P 5|P| = 5|S| = |S |/2. We get an independent set of that size by taking a basis B P of M P for each P ∈ P, and then taking their union P∈P B P .
The main ingredient of the proof is the following. 1 The proof is based on reduction from PartitionIntoModularBases, and so, by Theorem 4, we could assume that every module has size 2. However, our construction in Sect. 4 for proving that the linear case is already difficult uses modules of larger sizes, hence we show reduction from the general version of PartitionIntoModularBases.

Claim 10 If S = B 1 ∪ B 2 is a partition of S into two common bases of M 1 and M 2 , then each module P ∈ P is contained completely either in B 1 or in B 2 .
Proof For an arbitrary module P, let I 1 = S P ∩ B 1 and I 2 = S P ∩ B 2 . Clearly, I 1 and I 2 are independent in both M P and M P . By Lemma 5, we may assume that |I 1 | = 4|P| and |I 2 | = 5|P|. As the rank of (M free P ⊕M P ) 5|P| is 5|P|, we get P ⊆ B 1 as requested.
The next claim concludes the proof of the theorem.

Claim 11 S has a partition into two modular bases if and only if S can be partitioned into two common bases of M 1 and M 2 .
Proof For the forward direction, assume that there exists a partition S = B 1 ∪ B 2 of S into two common bases of M 1 and M 2 . By Claim 10, for every module P ∈ P, the elements of P are all contained either in B 1 or in B 2 . This implies that B 1 = S ∩ B 1 and B 2 = S ∩ B 2 are modular sets. By the definition of M 1 , these sets are independent in M. As |S| = 2r (S), B 1 and B 2 are modular bases of M.
To see the backward direction, let S = B 1 ∪ B 2 be a partition of S into modular bases. For each P ∈ P, let I 1 P ∪ I 2 P be a partition of S P into common independent sets of M P and M P having sizes 4|P| and 5|P|, respectively. Recall that such a partition exists by Lemma 5. Then the sets form common independent sets of M 1 and M 2 and partitions the ground set S . By Claim 9, B 1 and B 2 are bases, concluding the proof of the claim.
The theorem follows by Claim 11.

Hardness in the linear case
The aim of this section is to show that the PartitionIntoModularBases problem might be difficult to solve even when the matroid is given with a consise description, namely by an explicit linear representation over a field in which the field operations can be done efficiently. In order to do so, we consider the PartitionIntoModularBases problem for graphic matroids, called the PartitionIntoModularTrees problem.
The problem can be rephrased as follows: Given a graph G = (V , E) and a partition P of its edge set, find a partition of E into two spanning trees consisting of partition classes.

Fig. 2 Examples for variable gadgets
Proof We prove by reduction from Not-All-Equal Satisfiability, abbreviated as NAE-SAT: Given a CNF formula, decide if there exists a truth assignment not setting all literals equally in any clause. It is known that NAE-SAT is NP-complete, see [49]. 2 Let = (U , C) be an instance of NAE-SAT where U = {x 1 , . . . , x n } is the set of variables and C = {C 1 , . . . , C m } is the set of clauses. We construct an undirected graph G = (V , E) as follows. We may assume that no clause contains a variable and its negation simultaneously, as for such a clause every assignment has a true value and no assignment sets all literals equally.
First we construct the variable gadget. Let H [ p, q] denote an undirected graph on node set {s, t} ∪ {u i , w i : i = 1, . . . , p} ∪ {v j , z j : j = 1, . . . , q} consisting of the two paths su 1 , u 1 u 2 , . . . , u p t and sv 1 , v 1 v 2 , . . . , v q t, together with edges u i w i for i = 1, . . . , p and v j z j for j = 1, . . . , q. If any of p or q is 0, then the corresponding path simplifies to a single edge st (see Fig. 2).
We construct an undirected graph G = (V , E) as follows. With each variable x j , we associate a copy of H [ p j , q j ] where the literal x j occurs p j times and the literalx j occurs q j times in the clauses. These components are connected together by identifying t j with s j+1 for j = 1, . . . , n − 1. We apply the notational convention that in the gadget corresponding to a variable x j , we add j as an upper index for all of the nodes. For a variable x j , the ordering of the clauses naturally induces an ordering of the occurrences of x j andx j . For every clause C i , we do the following. Assume that C i involves variables x j 1 , . . . , x j . Recall that no clause contains a variable and its negation simultaneously, hence is also the number of literals appearing in C i . If C i contains the literal x j k and this is the r th occurrence of the literal x j k with respect to the ordering of the clauses, let y i j k := w j k r . If C i contains the literalx j k and this is the r th occurrence of the literalx j k with respect to the ordering of the clauses, let y i j k := z j k r . Then we add the edges of the cycle y i j 1 , . . . , y i j to the graph. Finally, we close the construction by adding edges t n w j k for j = 1, . . . , n, k = 1, . . . , p j , and adding edges t n z j k for j = 1, . . . , n, k = 1, . . . , q j (see Fig. 3). An easy computation Fig. 3 The graph corresponding to = ( We claim that has a truth assignment not setting all literals equally in any clause if and only if G can be partitioned into two modular spanning trees. For the forward direction, let E = T 1 ∪ T 2 be a partition of E into two modular spanning trees. Then ϕ(x j ) = 1 if p j > 0 and P j ⊆ T 1 , or p j = 0 and s j t j ∈ T 1 , 0 otherwise. is a truth assignment not setting all literals equally in any clause. To verify this, observe that for a variable x j , if x j = 1 then M j k ⊆ T 2 for k = 1, . . . , p j . This follows from the fact that T 2 has to span the node u j k and {u j k w j k , w j k t n } form a module for k = 1, . . . , p j . Similarly, if x j = 0 then N j k ⊆ T 2 for k = 1, . . . , q j . Let now C i be a clause involving variables x j 1 , . . . , x j and recall the definition of y i j 1 , . . . , y i j . If all the literals in C i has true value then, by the above observation, the cycle y i j 1 , . . . , y i j has to lie completely in T 1 , a contradiction. If all the literals in C i has false value then, again by the above observation, the cycle y i j 1 , . . . , y i j has to lie completely in T 2 , a contradiction. A similar reasoning shows that T 2 also defines a truth assignment not setting all literals equally in any clause.
To see the backward direction, consider a truth assignment ϕ of not setting all literals equally in any clause. We define the edges of T 1 as follows. For each variable x j with ϕ(x j ) = 1, we add P j and N j k for k = 1, . . . , q j to T 1 . For each variable x j with ϕ(x j ) = 0, we add N j and M j k for k = 1, . . . , p j to T 1 . Finally, for each clause C i involving variables x j 1 , . . . , x j do the following: for k = 1, . . . , , if C i contains the literal x j k and ϕ(x j k ) = 1 or C i contains the literalx j k and ϕ(x j k ) = 0, then add the edge y i j k y i j k−1 to T 1 (indices are meant in a cyclic order). By the assumption that ϕ does not set all literals equally in any clause, this last step will not form cycles in T 1 . It is not difficult to see that both T 1 and its complement T 2 are modular spanning trees, thus concluding the proof of the theorem. Now Theorem 2 is a consequence of the previous results.

Theorem 2 PartitionIntoCommonBases includes NP-complete problems.
Proof The proof of Theorems 1 shows that PartitionIntoModularBases can be reduced to PartitionIntoCommonBases. As PartitionIntoModularTrees is a special case of the former problem, the theorem follows by Theorem 12.
As the matroids M , M given in the proof of Lemma 5 are graphic, they are linear. If we apply the reduction described in the proof of Theorem 1 for a graphic matroid M, then the matroids M 1 and M 2 can be obtained from graphic matroids by using direct sums and truncations, hence they are linear as well and an explicit linear representation can be given in polynomial time [36]. This in turn implies that PartitionIntoCommonBases is difficult even when both matroids are given by explicit linear representations.
Harvey et al. [12] showed that the computational problem of common base packing reduces to the special case where one of the matroids is a partition matroid. Their construction involves the direct sum of M 1 and the matroid obtained from the dual of M 2 by replacing each element by k parallel elements. This means that if both M 1 and M 2 are linear, then the common base packing problem reduces to the special case where one of the matroids is a partition matroid and the other one is linear. Concluding these observations, we get the following.

Corollary 13
The PartitionIntoCommonBases problem includes NP-complete problems even when r (S) = 2|S|, one of the matroids is a partition matroid and the other is a linear matroid given by an explicit linear representation. is given together with a partition of its ground set into pairs, and the goal is to find a partition of S into parity bases. The aim of this section is to show that PartitionIn-toParityBases is difficult for transversal matroids. First we define the C 4k+2 Free2Factor problem: Given a biparite graph G = (S, T ; E), decide if G admits a 2-factor in which the length of each cycle is a multiple of 4. This problem was previously studied in [51], where it was shown that the problem is tractable for a special subclass of bipartite graphs. However, for general bipartite graphs C 4k+2 Free2Factor is NP-complete.
Proof We prove by reduction from PerfectEvenFactor: Given a directed graph D = (V , A), decide if there exists a node-disjoint collection of directed cycles of even length covering every node of D. This problem was shown to be NP-complete in [52]. 3 Given an instance D = (V , A) of PerfectEvenFactor, we construct a bipartite graph G = (S, T ; E) as follows. Let V and V denote two copies of V . The copies of a node v ∈ V are denoted by v and v , respectively. For each v ∈ V , add a path between v and v . For every arc uv ∈ A, add an edge u v to the graph. Note that the graph G = (S, T ; E) thus obtained is bipartite and, say, V ⊆ S and V ⊆ T . For a set F ⊆ A, let E F = {u v ∈ E : uv ∈ F} denote the corresponding set of edges in G. We claim that D admits a perfect even factor if and only if G has a C 4k+2 -free 2-factor (see Fig. 4 for the construction).
For the forward direction, let N ⊆ E be a C 4k+2 -free 2-factor of G. Due to the presence of nodes having degree 2, N necessarily contains all the edges of the path P v for v ∈ V . This implies that the degree of every node v ∈ V ∪ V in N ∩ E A is exactly 1. Hence N ∩ E A corresponds to a subgraph of D in which every node has in-and out-degrees exactly 1, thus forming a perfect cycle factor of D. The length of a cycle in N is six times the original length of the corresponding directed cycle in D. As the length of every cycle in N is a multiple of 4, the corresponding dicycles have even lengths. To see the backward direction, consider a perfect even factor F ⊆ A in D. Then N = E F ∪ v∈V P v is a C 4k+2 -free 2-factor in G. Indeed, it is clear that N is a 2factor. The length of a cycle in N is six times the original length of the corresponding directed cycle in F. As F was assumed to be an even factor, every cycle in N has a length that is a multiple of 4, concluding the proof of the theorem. Now we show that the PartitionIntoParityBases problem is difficult already for transversal matroids.
Proof Let G = (S, T ; E) be an instance of C 4k+2 Free2Factor. We may assume that |S| = |T | as otherwise there is certainly no 2-factor in G. We define a new bipartite graph G + = (S ∪ S , T ; E + ), where S and S are two copies of S. The copies of a node s ∈ S will be denoted by s and s . For each st ∈ E, we add the edges s t, s t to E + . Let P = {{s , s } : s ∈ S} denote the partitioning of S ∪ S into pairs where each pair consists of the two copies of a node in S. Finally, let M = (S ∪ S , I) denote the transversal matroid on S ∪ S defined by G + . We claim that G admits a C 4k+2 -free 2-factor if and only if the ground set of M can be partitioned into two parity bases (see Fig. 5 for the construction).
For the forward direction, take a partition of S ∪ S into parity bases, that is, let S = S 1 ∪ S 2 be a partition of S so that S 1 ∪ S 1 and S 2 ∪ S 2 are bases of M. Then there exist edge-disjoint matchings N 1 and N 2 in G + such that N i covers S i ∪ S i for i = 1, 2. As the two copies s , s of a node s ∈ S form a pair, the union of these two matchings contains at most one copy of each edge st ∈ E. Thus, for i = 1, 2, N i can be naturally identified with a subset F i ⊆ E in which every node in T has degree exactly 1 while every node in S has degree either 0 or 2. The union of F 1 and F 2 is then a 2-factor in which every cycle has a length that is a multiple of 4.
To see the the backward direction, consider a C 4k+2 -free 2-factor F of G. Let  {{s i,1 t i,1 , t i,1 s i,2 , . . . , s i,2k i t i,2k i , t i,2k i s i,1 } : i = 1, . . . , q} be the set of cycles appearing in F where s i, j ∈ S and t i, j ∈ T for every i, j. Let The proof of Theorem 14 implies that PartitionIntoParityBases includes NPcomplete problems even when restricted to transversal matroids. However, we assumed throughout that the transversal matroid in question is given by a bipartite graph representation. It is not clear whether PartitionIntoParityBases remains difficult if the matroid is given by an explicit linear representation. The authors find it quite unlikely, but it might happen that the problem becomes tractable if a linear representation of the corresponding transversal matroid is also given. However, the randomized polynomial algorithm of [38] and the gap between the solvability of MatroidParity and Par-titionIntoParityBases for transversal matroids given by a bipartite graph suggest that this is not the case, and PartitionIntoParityBases is most probably difficult even if explicit linear representations are given.

Conclusions
In this paper we study a longstanding open problem of matroid theory, the problem of partitioning the ground set of two matroids into common bases. We prove that the problem is difficult, i.e., it requires an exponential number of independence queries in the independence oracle model. We also show that the problem remains intractable for matroids given by explicit linear representations.
The hardness of the general case increases the importance of tractable special cases. The long list of open questions and conjectures that fit in the framework of packing common bases shows that there is still a lot of work to do. For example, one of the simplest cases when one of the matroids is a partition matroid while the other one is graphic remains open.
European Social Fund (EFOP-3.6.3-VEKOP-16-2017-00002). Projects No. NKFI-128673 and No. ED_18-1-2019-0030 (Application-specific highly reliable IT solutions) have been implemented with the support provided from the National Research, Development and Innovation Fund of Hungary, financed under the FK_18 and the Thematic Excellence Programme funding schemes, respectively.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.