Planar Graph Perfect Matching is in NC

Nima Anari, Vijay V. Vazirani

Introduction

Is perfect matching in NC\mathsf{NC}? That is, is there a deterministic parallel algorithm that computes a perfect matching in a graph in polylogarithmic time using polynomially many processors? This has been an outstanding open question in theoretical computer science for over three decades, ever since the discovery of RNC\mathsf{RNC} matching algorithms [KUW86, MVV87]. Within this question, the case of planar graphs had remained an enigma: For general graphs, counting the number of perfect matchings is far harder than finding one: the former is #P\mathsf{P}-complete [Val79] and the latter is in P\mathsf{P} [Edm65a]. However, for planar graphs, a polynomial time algorithm for counting perfect matchings was found by Kasteleyn, a physicist, in 1967 [Kas67], and an NC\mathsf{NC} algorithm follows easily For a formal proof, in a slightly more general context, see [Vaz89]., given an NC\mathsf{NC} algorithm for computing the determinant of a matrix, which was obtained by Csanky [Csa76] in 1976. On the other hand, an NC\mathsf{NC} algorithm for finding a perfect matching in a planar graph has resisted a solution. In this paper, we provide such an algorithm.

An RNC\mathsf{RNC} algorithm for the decision problem, of determining if a graph has a perfect matching, was obtained by Lovász [Lov79], using the Tutte matrix of the graph. The first RNC\mathsf{RNC} algorithm for the search problem, of actually finding a perfect matching, was obtained by Karp, Upfal, and Wigderson [KUW86]. This was followed by a somewhat simpler algorithm due to Mulmuley, Vazirani, and Vazirani [MVV87].

The matching problem occupies an especially distinguished position in the theory of algorithms: Some of the most central notions and powerful tools within this theory were discovered in the context of an algorithmic study of this problem, including the notion of polynomial time solvability [Edm65a] and the counting class #P\mathsf{P} [Val79]. The parallel perspective has also led to such gains: The first RNC\mathsf{RNC} matching algorithm led to a fundamental understanding of the computational relationship between search and decision problems [KUW85] and the second algorithm yielded the Isolation Lemma [MVV87], which has found several applications in complexity theory and algorithms. Considering the fundamental insights gained by an algorithmic study of matching, the problem of obtaining an NC\mathsf{NC} algorithm for it has remained a premier open question ever since the 1980s.

The first substantial progress on this question was made by Miller and Naor in 1989 [MN89]. They gave an NC\mathsf{NC} algorithm for finding a perfect matching in bipartite planar graphs using a flow-based approach. In 2000, Mahajan and Varadarajan gave an elegant way of using the NC\mathsf{NC} algorithm for counting perfect matchings to finding one, hence giving a different NC\mathsf{NC} algorithm for bipartite planar graphs [MV00]. Our algorithm is inspired by their approach.

In the last few years, several researchers have obtained quasi-NC\mathsf{quasi\text{-}NC} algorithms for matching and its generalizations; such algorithms run in polylogarithmic time though they require O(nlog⁡O(1)n)O(n^{\log^{O(1)}n}) processors. These algorithms achieve a partial derandomization of the Isolation Lemma for the specific problem addressed. Several nice algorithmic ideas have been discovered in these works and our algorithm has benefited from some of these; in turn, it will not be surprising if some of our ideas turn out to be useful in the resolution of the main open problem. First, Fenner, Gurjar, and Thierauf gave a quasi-NC\mathsf{quasi\text{-}NC} algorithm for perfect matching in bipartite graphs [FGT16], followed by the algorithm of Svensson and Tarnawski for general graphs [ST17]. Algorithms were also found for the generalization of bipartite matching to the linear matroid intersection problem by Gurjar and Thierauf [GT16], and to a further generalization of finding a vertex of a polytope with faces given by totally unimodular constraints, by Gurjar, Thierauf, and Vishnoi [GTV17].

There is an NC\mathsf{NC} algorithm which given a planar graph, returns a perfect matching in it, if it has one.

In section 7 we generalize theorem 1 to finding a minimum weight perfect matching if the edge weights are polynomially bounded and to finding a perfect matching in graphs of bounded genus; their common generalization easily follows.

Overview and Technical Ideas

We first give the idea behind the NC\mathsf{NC} algorithm of Mahajan and Varadarajan for bipartite planar graphs. W.l.o.g. assume that the graph is matching covered, i.e., each edge is in a perfect matching. Using an oracle for counting the number of perfect matchings, they find a point xx in the interior of the perfect matching polytope and they show how to move this point to lower dimensional faces of the polytope until a vertex is reached; this will be a perfect matching. In a matching covered bipartite planar graph, every face (in a planar embedding) is the symmetric difference of two perfect matchings and modifying xx by increasing and decreasing alternate edges by the same (small) amount ϵ\epsilon moves the point inside the polytope; we will call this a rotation of the cycle. Keep increasing ϵ\epsilon, starting from 0, until some edge ee on this cycle attains xe=0x_{e}=0; in this case, ee is dropped. When this happens, ϵ\epsilon cannot be increased anymore and we will say that the cycle is blocked. If so, the point xx moves to a lower (by at least one) dimension face. To make substantial progress, they observe that for any set of edge-disjoint faces, this process can be executed independently (by different amounts) in parallel on cycles corresponding to each of the faces, thereby reaching a face of the polytope of correspondingly lower dimension. Finally, they show how to find Ω(n)\Omega(n) edge-disjoint faces in NC\mathsf{NC}, thereby terminating in O(log⁡n)O(\log n) such iterations.

The fundamental difference between the perfect matching polytopes of bipartite and non-bipartite graphs is the additional constraint in the latter saying that each odd subset, SS, of vertices must have a total of at least one edge in the cut δ(S)\delta(S) (see LP (1) in section 3.2). This constraint introduces a second way in which a cycle CC can be blocked, namely some odd set SS, whose cut intersects CC, may go tight (section 5.1) and the ϵ\epsilon introduced for this cycle cannot be increased any more (without moving the point outside the polytope and making it infeasible). If so the cycle will not lose an edge. However, notice that since one of the odd set constraints has gone tight, we are already at a face of one lower dimension! In this case, we will say that cycle CC is blocked by odd set SS. For an example, see fig. 1 in which the point inside the polytope is the all 1/31/3 vector and highlighted cycle is blocked by odd set SS. Observe that the rotation chosen on the highlighted cycle leads to infeasibility on cut SS.

How do we capitalize on this progress though? The obvious idea (which happens to need substantially many additional ideas to get to an NC\mathsf{NC} algorithm) is to shrink SS, find a perfect matching in the shrunk graph, expand SS, remove from it the vertex that is matched to a vertex in V−SV-S, and find a perfect matching on the remaining vertices of SS. For an example of the shrunk graph, see fig. 2. It is easy to see that at least one edge of CC must have both endpoints in SS, and therefore the shrunk graph is smaller than the original graph.

As stated above, a number of new ideas are needed to make this rough outline yield an NC\mathsf{NC} algorithm. First, a small hurdle: If GG is non-bipartite planar, the procedure of Mahajan and Varadrajan will find Ω(n)\Omega(n) edge-disjoint faces; however, not all of these faces may be even. In fact, there are matching covered planar graphs having only one even face. To get around this, we define the notion of an even walk: it consists of two odd faces with a path connecting them; for convenience, we will call an even cycle an even walk as well (section 3.3). We give an NC\mathsf{NC} algorithm for finding Ω(n)\Omega(n) edge-disjoint even walks in GG (section 6.2). Furthermore, it is easy to see that rotating an even walk also moves point xx inside the perfect matching polytope (this is done in lemma 9).

2 A key algorithmic issue and its resolution

As in the case of a cycle, a walk is blocked either if it loses an edge or if an odd cut intersecting it goes tight. In either case, the point moves to a face of lower dimension. However, a new algorithmic question arises: In the first case, the amount of rotation required to make the walk lose an edge is easy to compute, similar to the bipartite case. But in the second case, how do we find the smallest rotation so an odd cut intersecting the walk goes just tight? Note that we seek the “smallest” rotation so no odd cut goes under-tight. We will postpone the answer to this question until we address the next hurdle.

Next, we state a big hurdle: As in the bipartite case, to make substantial progress, we need to move the point xx to a face of the polytope where each of the Ω(n)\Omega(n) even walks is blocked. Recall that in the bipartite case, we could modify all of the edge-disjoint even cycles independently in parallel and, the resulting point still remains in the matching polytope. However, in the non-bipartite case, executing these moves in parallel may take the point outside the polytope, i.e., it becomes infeasible. These two cases are illustrated in fig. 3 and fig. 4, respectively. The reason for the latter is that whereas rotations on two different walks may be individually feasible, executing them both may make an odd set go under-tight. This is made explicit in fig. 5 in which the two walks can individually be rotated by ϵ1\epsilon_{1} and ϵ2\epsilon_{2}, respectively, without violating feasibility. However, executing them both simultaneously makes odd set SS go under-tight.

The following idea, which can be considered the main new idea in our work, helps us get around this hurdle: It suffices to find a weight function on edges, ww, so that one of the half-spaces defined by ww contains the vector ww itself and the other contains, for each of the even walks, the direction of motion resulting from its rotation. Then, the minimizer of x↦⟨w,x⟩x\mapsto\langle w,x\rangle in the polytope will lie in a face at which each of the walks is blocked either because it has lost an edge or it intersects a tight odd cut. Furthermore, the minimizer is still a feasible point, so no odd cut goes under-tight. This idea is illustrated in fig. 6. The two yellow arrows indicate independent moves on two edge-disjoint walks which lead to two different faces of the polytope. Executing them both simultaneously would take the point outside the polytope, as was illustrated in fig. 4. However, the minimizer of ⟨w,x⟩\langle w,x\rangle lies on a face of the polytope at which both the walks are blocked.

The weight function ww is obtained as follows: The traversal of an even walk gives an ordered list of edges, possibly with repetition, of even length. W.r.t. a weight function ww, define the circulation of an even walk to be the difference of sum of weights of even and odd numbered edges in the traversal of this walk (section 5.1). We show that any weight function ww that makes the circulation of each of the even walks non-zero suffices in the following sense: Given such a function ww, we can pick a direction of rotation for each of the even walks so that one of the half-spaces defined by ww contains the vector ww and the other contains the direction of motion of each of the even walks (lemma 10). Moreover, such a function ww is easy to construct: in each walk, pick the weight of any one edge to be 1 and the rest 0 (section 4.2).

Next, we need to find the minimizer of ww in the polytope. For this, it suffices to construct an NC\mathsf{NC} oracle for computing #Gwe\#G^{e}_{w}, the number of minimum weight matchings in GG containing the edge ee. This oracle is constructed by finding a Pfaffian orientation (section 3.1) for GG, appropriately substituting for the variables in the Tutte matrix of GG and computing the determinant of the resulting matrix (section 6.1).

Some clarifications are due at this point: First, let us answer the opening question of this section, i.e., how to rotate just one given walk so it gets blocked by one of the two ways? Interestingly enough, at present we know of no simpler method for one walk than for multiple walks (binary search comes to mind but that is not an elegant, analytic solution). Second, in the bipartite case, either one of two measures of progress works when we simultaneously rotate many edge-disjoint cycles: the number of edges removed or the decrease in the dimension of the face we end up on. In the non-bipartite case, if rotating a walk leads to an odd cut going tight, we will shrink the cut, as stated above. As stated above, at least one edge of the walk will be in the odd set and will get shrunk. So, for the case of a single walk, both measures of progress stated above still work. However, when we rotate kk edge-disjoint walks, say, and none of these walks loses an edge, then the dimension of the face we end up on may not be smaller by O(k)O(k). The reason is that very few, or even one, odd cut may intersect each of the walks. However, each walk will have at least one edge in a tight odd set, and therefore shrinking them will result in O(k)O(k) edges being shrunk. Hence, the first measure of progress still works.

3 The rest of the ideas

A number of ideas are still needed to get to an NC\mathsf{NC} algorithm. First, for each walk that does not lose an edge, we need to find a tight odd cut intersecting it. For this, we use the result of Padberg and Rao [PR82] stating that the Gomory-Hu tree of a graph will contain a minimum weight odd cut. We show how to find a Gomory-Hu tree in a weighted planar graph in NC\mathsf{NC} (section 6.3), a result of independent interest. Next, consider a walk WW which, w.r.t. the current point xx in the polytope, is intersecting a tight odd cut. We rotate walk WW further slightly so the point xx becomes infeasible, i.e., WW now crosses an under-tight cut, or perhaps several of them (lemma 10). Observe that rotating a walk leaves each singleton cut tight. Hence, w.r.t. xx, each minimum weight odd cut must be an under-tight cut that crosses WW, and the Gomory-Hu tree must contain one of them. Repeating this for all walks in parallel, we obtain a set of tight odd cuts that intersect each of the walks.

However, these odd cuts cannot be shrunk simultaneously because they may be crossing each other. We know there is a laminar family of tight odd cuts, but how do we find it in NC\mathsf{NC}? We next give a divide-and-conquer-based procedure that finds the top level sets of one such laminar family; these top level sets can clearly be shrunk simultaneously (section 5.2). The procedure works as follows: We partition the family of tight odd cuts into two (almost) equal subfamilies, recursively “uncross” each subfamily to obtain its top level sets, and then merge these two into one family of top level sets. Clearly the last step is the crux of the procedure. The key to it lies in observing that two families of top level sets have a simple intersection structure, which can be exploited appropriately.

The proposed algorithm has now evolved to the following: shrink all top level sets and recursively find a perfect matching in the shrunk graph, followed by recursively finding a perfect matching in each of the shrunk sets (after removing its matched vertex). This algorithm has polylog depth; however, it does not run in polylog time because of the following inherent sequentiality: matchings in the shrunk sets have to be found after finding a matching in the shrunk graph. The reason is that a matching in a shrunk set SS can be found only after knowing the vertex in SS that is matched outside SS, and this will be known only after finding a matching in the shrunk graph. We next observe that if we could find a balanced tight odd cut, we would be done by a simple divide-and-conquer strategy: match any edge in the cut and find matchings in the two sides of the cut recursively, in parallel. The task of finding a balanced tight odd cut is not straightforward though. It involves iteratively shrinking the top level sets found, finding even walks and moving to the minimum weight face in the shrunk graph, etc. (section 4.2). This is illustrated in fig. 7. We show that O(log⁡n)O(\log n) such iterations suffice for finding a balanced tight odd cut.

Preliminaries

In this section, we will state several notions and algorithmic primitives we need for our NC\mathsf{NC} algorithm for finding a perfect matching in a planar graph.

A key fact underlying our algorithm is that computing the number of perfect matchings in a planar graph lies in NC\mathsf{NC}. Let G=(V,E)G=(V,E) be an arbitrary graph (not necessarily planar). Let AA be the symmetric adjacency matrix of GG, i.e., corresponding to each edge (i,j)∈E, A(i,j)=A(j,i)=1(i,j)\in E,\ A(i,j)=A(j,i)=1, and the entries corresponding to non-edges are zero. Obtain matrix TT from AA by replacing for each edge (i,j)∈E(i,j)\in E, its two entries by xijx_{ij} and −xij-x_{ij}, so the entries below the diagonal are positive; clearly, TT is skew-symmetric. TT is called the Tutte matrix for GG. Its significance lies in that its determinant is non-zero as a polynomial iff GG has a perfect matching. However, computing this determinant is not easy: Simply writing it will require exponential space in general.

Next assume that GG has a perfect matching. A simple cycle CC in GG is said to be nice if the removal of its vertices leave a graph having a perfect matching. If so, clearly, CC lies in the symmetric difference of two perfect matchings in GG. Direct the edges of GG to obtain G→\overrightarrow{G}. We will say that G→\overrightarrow{G} is a Pfaffian orientation for GG if each nice cycle CC has an odd number of edges oriented in each way of traversing CC. Its significance lies in the following: Let (i,j)∈E(i,j)\in E, with i<ji<j. If in the Pfaffian orientation, this edge is directed from ii to jj, then let xij=1x_{ij}=1, otherwise let xij=−1x_{ij}=-1. Then the determinant of the resulting matrix is the square of the number of perfect matchings in GG.

Of course, GG may not have a Pfaffian orientation. A key fact underlying our algorithm is that every planar graph has a Pfaffian orientation and moreover, such an oriantation can be found in NC\mathsf{NC} and the determinant can be computed in NC\mathsf{NC} by Csanky’s algorithm [Csa76]. Hence we can answer the decision question of whether GG has a perfect matching in NC\mathsf{NC}.

2 The perfect matching polytope, its faces, and tight odd sets

We use the notation \mathds1F\mathds{1}_{F} to denote the indicator vector of a subset of edges F⊆EF\subseteq E. For a subset of vertices SS, we let δ(S)\delta(S) denote the edges that cross SS, and by a slight abuse of notation we let δ(v)=δ({v})\delta(v)=\delta(\{v\}) denote the set of edges adjacent to vertex vv.

The perfect matching polytope is the convex hull of indicator vectors of all perfect matchings in GG and will be denoted by \PM(G)\PM(G):

One of the key steps needed by our algorithm is finding a point in the relative interior of the face \PM(G,w)\PM(G,w) in NC\mathsf{NC}. This requires computing a Pfaffian orientation for GG and then evaluating the Tutte matrix for appropriate substitutions of the variables. The point we find will be exactly the average of the vertices, i.e., \mathds1M\mathds{1}_{M} for perfect matchings MM, lying on the face \PM(G,w)\PM(G,w). We denote this average by \avg(\PM(G,w))\avg(\PM(G,w)):

In general, a face of \PM(G)\PM(G) is defined by setting a particular set of inequalities to equalities. Let S\cal S be the family of odd sets whose inequalities are set to equality. These will be called tight odd sets. Two such tight odd sets S1,S2∈SS_{1},S_{2}\in\cal S are said to cross if they are not disjoint and neither is a subset of the other. If so, one can prove that either S1∩S2S_{1}\cap S_{2} and S1∪S2S_{1}\cup S_{2} are also tight odd sets or S1−S2S_{1}-S_{2} and S2−S1S_{2}-S_{1} are tight odd sets. In the former case one can remove the equality constraint for S1S_{1} and replace it by the equality constraints for S1∩S2S_{1}\cap S_{2} and S1∪S2S_{1}\cup S_{2}, and the face would not change. In the latter case S1S_{1} can be replaced by S1−S2S_{1}-S_{2} and S2−S1S_{2}-S_{1} and still the face remains invariant. In either case, the new sets do not cross. The family S\cal S is said to be laminar if no pair of sets in it cross. Given a family of tight odd sets S\cal S, one can successively uncross pairs to obtain a family of tight odd sets defining the same face of the polytope. This operation will result in a laminar family. However, for our purposes, we only need to work with the maximal sets in the laminar family. We define a similar notion of uncrossing for such top-level sets and show how they give us the space of equality constraints, by defining things appropriately.

3 Finding maximal independent sets and even walks

One of the ingredients we use in multiple ways to design our algorithm is that a maximal independent set in a graph can be found in NC\mathsf{NC}.

There is an NC\mathsf{NC} algorithm for finding some maximal independent set in an input graph G=(V,E)G=(V,E).

Mahajan and Varadarajan used lemma 2 to find linearly many edge-disjoint cycles in bipartite planar graphs [MV00]. We use a similar step, but instead of cycles we have to work with even walks, i.e., cycles with possibly repeated edges.

For this paper, an even walk is either a simple even length cycle in GG or the following structure: Let C1C_{1} and C2C_{2} be two odd length edge-disjoint cycles in GG and let PP be a path, edge-disjoint from C1,C2C_{1},C_{2}, connecting vertex v1v_{1} of C1C_{1} to vertex v2v_{2} of C2C_{2}; if v1=v2v_{1}=v_{2}, PP will be the empty path. Starting from v1v_{1}, traverse C1C_{1}, then PP from v1v_{1} to v2v_{2}, then traverse C2C_{2}, followed by PP from v2v_{2} to v1v_{1}. This will be a walk that traverses an even number of edges and will also be called an even walk.

Note that all of our walks start and end at the same location. We use lemma 2 to derive the following. We prove lemma 3 in section 6.2.

Suppose that G=(V,E)G=(V,E) is a connected planar graph with no vertices of degree 11 and at most ∣V∣/2\lvert V\rvert/2 vertices of degree 22. Then we can find Ω(∣E∣)\Omega(\lvert E\rvert) edge-disjoint even walks in GG by an NC\mathsf{NC} algorithm.

Main Algorithm

In this section we will describe the algorithm we use to prove theorem 1. W.l.o.g. assume that the input graph has a perfect matching. We can easily check whether a perfect matching exists first, by counting the number of perfect matchings in NC\mathsf{NC}; see section 3.1.

We use a divide-and-conquer approach. The pseudocode is given in algorithm 1. Given a graph G=(V,E)G=(V,E), our algorithm finds an odd set S⊂VS\subset V, selects an edge e∈δ(S)e\in\delta(S) as the first edge of the perfect matching, and then recursively extends this to a perfect matching in SS and V−SV-S, without using any other edge of the cut δ(S)\delta(S).

Note that if MM is the output of our algorithm, by definition, ∣M∩δ(S)∣=1\lvert M\cap\delta(S)\rvert=1. This prevents us from using an arbitrary odd set S⊂VS\subset V in the first step and motivates the following definition.

Given a graph G=(V,E)G=(V,E), an odd set SS is called viable if there exists at least one perfect matching M⊆EM\subseteq E with ∣M∩δ(S)∣=1\lvert M\cap\delta(S)\rvert=1.

In order for a step of the algorithm to make significant progress, i.e., reduce the size of the graph by a constant factor, we also require the viable set to be balanced. That is, we require

for some small constant c1>0c_{1}>0. Throughout the paper we will assume several constant upper bounds for c1c_{1}. At the end c1c_{1} can be set to the lowest of these upper bounds.

Assuming that we are able to find a balanced viable set SS in NC\mathsf{NC}, we can prove theorem 1.

Since the set SS found by algorithm 1 is feasible, there is at least one perfect matching NN with ∣N∩δ(S)∣=1\lvert N\cap\delta(S)\rvert=1. On the other hand, for the weight vector w=\mathds1δ(S)w=\mathds{1}_{\delta(S)} and any perfect matching NN, we have ⟨w,\mathds1N⟩=∣N∩δ(S)∣\langle w,\mathds{1}_{N}\rangle=\lvert N\cap\delta(S)\rvert, which is always at least one. So the minimum weight perfect matchings NN are exactly those that have a single edge in the cut δ(S)\delta(S). The point xx is the average of these perfect matchings, so for any edge ee with xe>0x_{e}>0, there is at least one minimum weight perfect matching N∋eN\ni e. This shows that {e}\{e\} can be extended to a perfect matching without using any other edge of δ(S)\delta(S) and therefore proves that G1G_{1} and G2G_{2} both have a perfect matching, an assumption we need to be able to recursively call the algorithm. This shows the correctness of the algorithm.

We finish the proof by showing that the algorithm is in NC\mathsf{NC}. By lemma 1, we can compute the point xx in NC\mathsf{NC}, and we assumed the viable set SS was found by an NC\mathsf{NC} algorithm. So all of the steps of each recursive call can be executed in polylogarithmic time with a polynomially bounded number of processors. Notice that the recursion depth of the algorithm is at most log⁡1/(1−c1)(∣V∣)\log_{1/(1-c_{1})}(\lvert V\rvert) which is logarithmic in the input size. This is because the size of the graph gets reduced by a factor of 1−c11-c_{1} in each recursive level. Since recursive calls are executed in parallel, this shows that the entire algorithm runs in polylog time. ∎

All that remains is finding a balanced viable set by an NC\mathsf{NC} algorithm. This is done in section 4.2.

2 Finding a balanced viable set

In this section we describe how to find a balanced viable set SS in a graph G=(V,E)G=(V,E) by an NC\mathsf{NC} algorithm. Notice that a single vertex is, by definition, a viable set, but is not balanced unless ∣V∣≤1c1\lvert V\rvert\leq\frac{1}{c_{1}}. So w.l.o.g. we can assume ∣V∣>1c1\lvert V\rvert>\frac{1}{c_{1}}.

The main idea behind our algorithm is the following: Suppose that we reduce the size of the graph GG by either removing edges not participating in perfect matchings from it, or shrinking tight odd sets (both w.r.t. some weight vector ww). Any vertex in the shrunk graph corresponds to an odd set in the original graph GG. This odd set is always viable. So if we manage to reduce the size of the shrunk graph enough so that it contains at most 1/c11/c_{1} vertices, then the largest of the viable sets we get this way would have size at least c1∣V∣c_{1}\lvert V\rvert. By being careful when we remove edges or shrink pieces, we can also make sure the size is not larger than (1−c1)∣V∣(1-c_{1})\lvert V\rvert; so the end result is a balanced viable set. See fig. 7 for a depiction.

The pseudocode is given in algorithm 2. Throughout the algorithm we maintain a mapping ff from the original vertices to the vertices of the current shrunk graph. We iteratively reduce the size of the graph by removing edges and/or contracting odd sets of vertices until one of the vertices contains a c1c_{1} fraction of the original vertices. We then return the preimage of this vertex.

The while loop in algorithm 2 finishes as soon as ∣V∣≤1c1\lvert V\rvert\leq\frac{1}{c_{1}}.

So when the number of terms in the sum is below 1c1\frac{1}{c_{1}}, one of them has to be larger than c1c_{1}. ∎

We further maintain the invariant that our graph GG is at all time planar, and has a perfect matching. This invariant is satisfied, because we restrict ourselves to manipulate GG in only one of the two following ways:

We either remove an edge ee from GG, where ee does not participate in any minimum weight perfect matching for some weight vector ww.

Or we shrink a set of vertices SS that is a tight odd set w.r.t. some point xx in the matching polytope.

If a graph GG is planar and has a perfect matching, after the removal of an edge or shrinking of a set as described above, it continues to be planar and have a perfect matching.

The lemma is obvious in the case of removing an edge. Planarity is automatically satisfied, and since the edge did not participate in any minimum weight perfect matching, the remaining graph still has a minimum weight perfect matching.

In the case of shrinking a tight odd set, first note that the resulting graph would still have a perfect matching. Indeed, if we look at xx after shrinking SS, it becomes a valid point in the matching polytope of the shrunk graph: The degree constraint of the shrunk vertex is satisfied because the odd set constraint of SS was originally tight.

It remains to show why after shrinking SS, the graph remains planar. If SS is internally connected, this follows from the fact that contracting edges preserves planarity. Otherwise, assume that S=S1∪S2S=S_{1}\cup S_{2} where there are no edges between S1S_{1} and S2S_{2}. Because SS is odd, either S1S_{1} or S2S_{2} must be odd, and the other even. W.l.o.g. assume that S1S_{1} is odd. Note that ⟨\mathds1δ(S1),x⟩≤⟨\mathds1δ(S),x⟩\langle\mathds{1}_{\delta(S_{1})},x\rangle\leq\langle\mathds{1}_{\delta(S)},x\rangle and equality holds if and only if S2S_{2} does not have any outgoing edges. But ⟨\mathds1δ(S),x⟩=1\langle\mathds{1}_{\delta(S)},x\rangle=1, and ⟨\mathds1δ(S1),x⟩≥1\langle\mathds{1}_{\delta(S_{1})},x\rangle\geq 1, so there must be equality.

So when SS was not internally connected, we showed that it must be a union of a connected component and a smaller tight odd set. By repeating this argument, we see that SS must always be a union of an internally connected odd set and a number of connected components. Now simply note that shrinking an entire connected component with some other vertex preserves planarity. ∎

It is also easy to see that any viable set in the resulting graph is a viable set in the original graph at any point, because any perfect matching in GG can be extended to a perfect matching in G0G_{0}. So we can return f−1(v)f^{-1}(v) at any point if it is a balanced set.

The main loop in algorithm 2 has two steps, Preprocess and Reduce. Although not explicitly stated in the pseudocode, at any point in the execution of either step, we can terminate the whole procedure by finding a balanced viable set and directly returning it.

First we preprocess the graph. Below we state the properties we expect to hold after preprocessing. We postpone the description of the procedure Preprocess and the proof of lemma 6 to section 4.3.

The procedure Preprocess either finds a balanced viable set or after it returns the following conditions hold.

No vertex v∈Vv\in V has degree 11 and at most half of the vertices have degree 22.

For all v∈Vv\in V, we have ∣f−1(v)∣<c1∣V0∣\lvert f^{-1}(v)\rvert<c_{1}\lvert V_{0}\rvert.

Now we describe the main step, i.e., Reduce. The pseudocode is given in algorithm 3.

Assuming lemma 6, our goal is to either remove a constant fraction of the edges of GG or shrink pieces of GG so that a constant fraction of the edges get shrunk. The conditions satisfied after the preprocessing step, lemma 6, ensure that we can apply lemma 3 and find Ω(∣E∣)\Omega(\lvert E\rvert) edge-disjoint even walks, as we do in the first step of algorithm 3.

Next, we construct a weight vector which is 00 everywhere except for the first edge of every even walk, and find a point xx in the relative interior of \PM(G,w)\PM(G,w) by applying lemma 1. By our choice of weight vector, each even walk either loses an edge or gets blocked by a tight odd set as we will prove in section 5. Our last step consists of finding a number of disjoint odd sets S1,…,SlS_{1},\dots,S_{l}, such that each even walk WiW_{i}, that did not lose an edge, has an edge with both endpoints in one SjS_{j}. We describe the procedure DisjointOddSets and prove these properties in section 5.

After running Reduce we either find a balanced viable set, or ∣E∣\lvert E\rvert gets reduced by a constant factor.

We find kk even walks where k=Ω(∣E∣)k=\Omega(\lvert E\rvert). Every walk either loses an edge in the edge removal step, or loses an edge after shrinking S1,…,SlS_{1},\dots,S_{l}. So the number of edges gets reduced by at least kk, which is a constant fraction of ∣E∣\lvert E\rvert as long as ∣E∣\lvert E\rvert is large enough (larger than a large enough constant). Note that we never encounter graphs with ∣V∣<1/c1\lvert V\rvert<1/c_{1} by lemma 4, so by setting c1c_{1} small enough we can assume that ∣E∣\lvert E\rvert is larger than a desired constant. ∎

By lemma 7, our measure of progress, ∣E∣\lvert E\rvert gets reduced by a constant factor each time until we find a balanced viable set. Therefore the number of times Reduce is called is at most O(log⁡(∣E0∣))O(\log(\lvert E_{0}\rvert)), so as long as DisjointOddSets can be run in NC\mathsf{NC}, the whole algorithm is in NC\mathsf{NC}.

We describe the remaining pieces, Preprocess in section 4.3, and DisjointOddSets in section 5.

3 Preprocessing

Here we describe the procedure Preprocess and prove lemma 6. The pseudocode is given in algorithm 4. Throughout the process, we make sure that ∣f−1(v)∣<c1∣V0∣\lvert f^{-1}(v)\rvert<c_{1}\lvert V_{0}\rvert for every vv or we find a balanced viable set.

In the first step, we remove any edge of GG that does not participate in a perfect matching. Next we make the graph connected. We arrive at a connected graph where every edge participates in a perfect matching. This ensures that there are no vertices of degree 11, unless the entire graph is a single edge; but in that case we return f−1(v)f^{-1}(v) as a balanced viable set for any of the two vertices.

After having a connected graph with no vertices of degree 11, while half of the vertices have degree 22, we shrink them into other vertices by finding appropriate tight odd sets. The while loop can be run at most a logarithmic number of times, because each time the number of vertices gets reduced by a factor of 22.

It remains to describe the procedures MakeConnected and ShrinkDegreeTwos. Both of these procedures work by shrinking tight odd sets w.r.t. xx. In both, we have to be slightly careful to avoid shrinking a large piece of the original graph causing a violation of the condition ∣f−1(v)∣<c1∣V0∣\lvert f^{-1}(v)\rvert<c_{1}\lvert V_{0}\rvert.

First let us describe MakeConnected. We first find the connected components C1,…,CkC_{1},\dots,C_{k} of GG. We sort them to make sure ∣f−1(C1)∣≤⋯≤∣f−1(Ck)∣\lvert f^{-1}(C_{1})\rvert\leq\dots\leq\lvert f^{-1}(C_{k})\rvert. Let vv be an arbitrary vertex of CkC_{k}. For any i<ki<k the set Si={v}∪C1∪…CiS_{i}=\{v\}\cup C_{1}\cup\dots C_{i} is a tight odd set, because {v}\{v\} is a tight odd set and adding entire connected components does not change the cut value. If ∣f−1(Sk−1)∣<c1∣V0∣\lvert f^{-1}(S_{k-1})\rvert<c_{1}\lvert V_{0}\rvert, then we can simply shrink Sk−1S_{k-1} into a single vertex and make the graph connected. Otherwise let jj be the first index where ∣f−1(Sj)∣≥c1∣V0∣\lvert f^{-1}(S_{j})\rvert\geq c_{1}\lvert V_{0}\rvert. Then f−1(Sj)f^{-1}(S_{j}) is a viable set, because it is a tight odd set. We claim that it is balanced as well; for this we need to show that ∣f−1(Sj)∣≤(1−c1)∣V0∣\lvert f^{-1}(S_{j})\rvert\leq(1-c_{1})\lvert V_{0}\rvert. We have

where we used the fact that CjC_{j} is not the largest component in terms of f−1(Cj)f^{-1}(C_{j}). So as long as c1+1/2<1−c1c_{1}+1/2<1-c_{1}, we are done. This is clearly satisfied for small enough c1c_{1}.

Now let us describe ShrinkDegreeTwos. First we identify all vertices of degree 22. Some of these vertices might be connected to each other, in which case we get paths formed by these vertices. We can extend these paths, by the doubling trick in polylog time to find maximal paths consisting of degree 22 vertices. Then, in parallel, for each such maximal path we do the following: Let the vertices of the path be (v1,…,vk)(v_{1},\dots,v_{k}). Further, let v0v_{0} be the vertex we would get if we extended this path from the v1v_{1} side and vk+1v_{k+1} the one we would get from the vkv_{k} side. Note that deg⁡(vi)=2\deg(v_{i})=2 for i=1,…,ki=1,\dots,k but not for i=0,k+1i=0,k+1.

We claim that for any even ii, the set Si={v0,v1,…,vi}S_{i}=\{v_{0},v_{1},\dots,v_{i}\} is a tight odd set. To see this, let t=x(v0,v1)t=x_{(v_{0},v_{1})}. Then because v1v_{1} has degree 22, it must be that x(v1,v2)=1−tx_{(v_{1},v_{2})}=1-t. Then, this means that x(v2,v3)=tx_{(v_{2},v_{3})}=t, and so on. In the end, we get that x(vi−1,vi)=1−tx_{(v_{i-1},v_{i})}=1-t. Now, look at the edges in δ(S)\delta(S). They are either adjacent to v0v_{0} or viv_{i}. Those adjacent to v0v_{0} have a total xx value of 1−t1-t and those adjacent to viv_{i} have a total xx value of tt. So ⟨\mathds1δ(Si),x⟩=t+(1−t)=1\langle\mathds{1}_{\delta(S_{i})},x\rangle=t+(1-t)=1.

Now let jj be the first even index such that ∣f−1(Sj)∣≥c1∣V0∣\lvert f^{-1}(S_{j})\rvert\geq c_{1}\lvert V_{0}\rvert. If no such index exists, we can simply shrink SkS_{k} or Sk+1S_{k+1} (depending on the parity of kk). Else, we claim that SjS_{j} is a balanced viable set. Viability follows from being a tight odd set. Being balanced follows because

So as long as 3c1≤(1−c1)3c_{1}\leq(1-c_{1}), the set SjS_{j} is balanced and we can simply return it.

Having all of the ingredients, we now finish the proof of lemma 6.

It is easy to see that the point x∈\PM(G)x\in\PM(G) remains a valid point throughout, i.e., it remains in the matching polytope even after shrinking sets. This is because we only shrink tight odd sets w.r.t. xx. Assume that the algorithm does not find a balanced viable set.

After MakeConnected the graph becomes connected, and from then on it remains connected.

Since xx remains a valid point in the matching polytope until the end, every edge at the end participates in a perfect matching. But in a connected graph, this means that there are no vertices of degree 11.

Finally note that by the stopping condition of the while loop, the algorithm terminates only when at most half of the remaining vertices have degree 22. ∎

Tight Odd Sets

In this section we describe the main remaining piece of the algorithm, namely the procedure DisjointOddSets. The input to this procedure is a graph G=(V,E)G=(V,E) and a map f:V0→Vf:V_{0}\to V, a number of edge-disjoint even walks W1,…,WmW_{1},\dots,W_{m} in GG, the point x=\avg(\PM(G,w))x=\avg(\PM(G,w)), where ww is the weight vector constructed in algorithm 3. Note that xe>0x_{e}>0 for all e∈Ee\in E, since we removed all edges ee with xe=0x_{e}=0. We will prove the following:

There is an NC\mathsf{NC} algorithm DisjointOddSets, that either finds a balanced viable set, or finds disjoint tight odd sets S1,…,SlS_{1},\dots,S_{l} satisfying the following: In any WiW_{i} there is an edge ee both of whose endpoints belong to some SjS_{j}. Furthermore ∣f−1(Sj)∣<c1∣V0∣\lvert f^{-1}(S_{j})\rvert<c_{1}\lvert V_{0}\rvert for all jj.

At a high level the procedure works as follows:

First, for each even walk WiW_{i}, we find a tight odd set blocking it.

The resulting tight odd sets might cross each other in arbitrary ways. We uncross them to obtain S1,…,SlS_{1},\dots,S_{l}, being careful not to produce sets with ∣f−1(Si)∣≥c1∣V0∣\lvert f^{-1}(S_{i})\rvert\geq c_{1}\lvert V_{0}\rvert.

In section 5.1 we describe the procedure for finding a tight odd set blocking an even walk. Then in section 5.2, we describe how to uncross these and produce disjoint odd sets.

In this section we describe how to find a tight odd set blocking a given even walk WW. At a high level, we first move slightly outside of the polytope by moving along a direction defined by WW. Then we find one of the violated constraints defining the matching polytope. This must be the tight odd set we were after.

Recall that an even walk is either a simple even length cycle in GG or the following structure: Let C1C_{1} and C2C_{2} be two odd length edge-disjoint cycles in GG and let PP be a path connecting vertex v1v_{1} of C1C_{1} to vertex v2v_{2} of C2C_{2}; if v1=v2v_{1}=v_{2}, PP will be the empty path. Starting from v1v_{1}, traverse C1C_{1}, then PP from v1v_{1} to v2v_{2}, then traverse C2C_{2}, followed by PP from v2v_{2} to v1v_{1}.

Next we define the alternating vector of an even walk WW. For this purpose, write WW as a list of edges W=(e1,…,ek)W=(e_{1},\dots,e_{k}), where kk is even and if the walk contains a path, then the edges of the path will be repeated twice in this list. We define the alternating vector associated to WW as the vector χW\chi_{W} given by

Note that for a weight vector ww, we have

In particular for the weight vector chosen in algorithm 3, we have ⟨w,χW⟩<0\langle w,\chi_{W}\rangle<0.

Note that the point xx is \avg(\PM(G,w))\avg(\PM(G,w)), i.e., we have

where M1,…,MmM_{1},\ldots,M_{m} are all the minimum weight perfect matchings in GG.

We will now see what happens to an ϵ\epsilon-rotation of this point if ϵ\epsilon is small enough.

Let x=\avg(\PM(G,w))x=\avg(\PM(G,w)) for some weight vector ww. Let WW be an even walk whose edges are in the support of xx, i.e., for every e∈We\in W, we have xe>0x_{e}>0, and let ⟨w,χW⟩<0\langle w,\chi_{W}\rangle<0. Let K(n)≤nnK(n)\leq n^{n} denote the number of perfect matchings in the complete graph KnK_{n}, and let yy be an ϵ\epsilon-rotation of xx with the walk WW for some ϵ<1/2nK(n)\epsilon<1/2nK(n). Then, the following hold:

For every vertex vv, we have ⟨\mathds1δ(v),y⟩=1\langle\mathds{1}_{\delta(v)},y\rangle=1.

For every odd set S⊂VS\subset V, if ⟨\mathds1δ(S),x⟩>1\langle\mathds{1}_{\delta(S)},x\rangle>1, then ⟨\mathds1δ(S),y⟩≥1\langle\mathds{1}_{\delta(S)},y\rangle\geq 1.

For every edge e∈Ee\in E, we have ye≥0y_{e}\geq 0.

Condition 1 holds because ⟨\mathds1δ(v),χW⟩=0\langle\mathds{1}_{\delta(v)},\chi_{W}\rangle=0. This identity holds, because the walk WW enters and exits each vertex vv the same number of times, and the entries and exits have alternating signs, cancelling each other.

Condition 2 holds, because when ⟨\mathds1δ(S),x⟩>1\langle\mathds{1}_{\delta(S)},x\rangle>1, then it is larger than 11 by a margin; choosing ϵ\epsilon small enough will not let us erase more than this margin. Formally we have

and note that ⟨\mathds1δ(S),\mathds1Mi⟩\langle\mathds{1}_{\delta(S)},\mathds{1}_{M_{i}}\rangle is at least 11 and must be greater than 11 for some ii. For that particular ii this value must be at least 22 (in fact, at least 33), which gives us

Now, note that ∥χW∥1≤2n\lVert\chi_{W}\rVert_{1}\leq 2n and ∥\mathds1δ(S)∥∞≤1\lVert\mathds{1}_{\delta(S)}\rVert_{\infty}\leq 1 which together imply that

Finally, piecing things together, we have

Condition 3 holds, because again, xe>0x_{e}>0 implies that xex_{e} is positive by a margin. We have

which implies that ye≥1/m−2ϵ≥0y_{e}\geq 1/m-2\epsilon\geq 0. ∎

Lemma 9 almost ensures that the point yy is inside the matching polytope \PM(G)\PM(G) if the starting point xx was in \PM(G)\PM(G). The only way that yy cannot be in \PM(G)\PM(G) is if there is an odd set S⊂VS\subset V such that ⟨\mathds1δ(S),x⟩=1\langle\mathds{1}_{\delta(S)},x\rangle=1, i.e., a tight odd set, whose constraint gets violated by yy. This leads us to the following important lemma, which enables us to extract a tight odd set blocking the rotation of the walk WW.

Suppose that ww is a weight vector, x=\avg(\PMw(G))x=\avg(\PM_{w}(G)), WW is a walk that satisfies the conditions of lemma 9, and furthermore ⟨w,χW⟩<0\langle w,\chi_{W}\rangle<0. Then there must be an odd set S⊂VS\subset V such that ⟨\mathds1δ(S),x⟩=1\langle\mathds{1}_{\delta(S)},x\rangle=1 and ⟨\mathds1δ(S),χW⟩≠0\langle\mathds{1}_{\delta(S)},\chi_{W}\rangle\neq 0. Furthermore such an SS can be found by first obtaining yy as an ϵ\epsilon-rotation of xx by WW, for a small but inverse exponentially large ϵ\epsilon, and then finding a minimum odd cut in yy:

Since ⟨w,χW⟩<0\langle w,\chi_{W}\rangle<0 we have ⟨w,y⟩<⟨w,x⟩\langle w,y\rangle<\langle w,x\rangle. We choose the magnitude of ϵ\epsilon to be small enough that the conditions of lemma 9 are satisfied. Now, since xx was a minimizer of the linear function x↦⟨w,x⟩x\mapsto\langle w,x\rangle over the polytope \PM(G)\PM(G), it must be the case that y∉\PM(G)y\notin\PM(G).

Therefore one of the constraints defining the matching polytope, eq. 1, must not be satisfied for yy. But lemma 9 ensures that almost all of these constraints are satisfied; the only possible constraint being violated would be an odd set SS such that ⟨\mathds1δ(S),x⟩=1\langle\mathds{1}_{\delta(S)},x\rangle=1 and ⟨\mathds1δ(S),y⟩<1\langle\mathds{1}_{\delta(S)},y\rangle<1. Take any such set SS where ⟨\mathds1δ(S),x⟩=1\langle\mathds{1}_{\delta(S)},x\rangle=1 and ⟨\mathds1δ(S),y⟩<1\langle\mathds{1}_{\delta(S)},y\rangle<1. We have

which means that ⟨\mathds1δ(S),χW⟩≠0\langle\mathds{1}_{\delta(S)},\chi_{W}\rangle\neq 0. In other words, SS satisfies the statement of the lemma.

It only remains to show that if we take SS to be a minimum odd cut in yy, then SS satisfies ⟨\mathds1δ(S),x⟩=1\langle\mathds{1}_{\delta(S)},x\rangle=1 and ⟨\mathds1δ(S),y⟩<1\langle\mathds{1}_{\delta(S)},y\rangle<1. We know that the only possible constraint being violated by yy is an odd set constraint, so for the minimum odd cut it must be true that ⟨\mathds1δ(S),y⟩<1\langle\mathds{1}_{\delta(S)},y\rangle<1. On the other hand if ⟨\mathds1δ(S),x⟩>1\langle\mathds{1}_{\delta(S)},x\rangle>1, then we would get a contradiction from condition 2 of lemma 9, because that would imply ⟨\mathds1δ(S),y⟩≥1\langle\mathds{1}_{\delta(S)},y\rangle\geq 1. So such a set must satisfy ⟨\mathds1δ(S),x⟩=1\langle\mathds{1}_{\delta(S)},x\rangle=1 and ⟨\mathds1δ(S),y⟩<1\langle\mathds{1}_{\delta(S)},y\rangle<1. ∎

We will say that an odd set SS such that ⟨\mathds1δ(S),x⟩=1\langle\mathds{1}_{\delta(S)},x\rangle=1 and ⟨\mathds1δ(S),χW⟩≠0\langle\mathds{1}_{\delta(S)},\chi_{W}\rangle\neq 0, is a set that blocks the walk WW. By combining the following lemma with lemma 10, we get that we can find a tight odd set blocking each of our even walks.

There is an NC\mathsf{NC} algorithm that given a weight planar graph GG, outputs the minimum odd cut of GG.

2 Uncrossing tight odd sets

Suppose we are given a list of tight odd sets S1,…,SmS_{1},\dots,S_{m} that could cross each other in arbitrary ways.

Note that we can assume from the beginning that for each ii, ∣f−1(Si)∣≤12∣V0∣\lvert f^{-1}(S_{i})\rvert\leq\frac{1}{2}\lvert V_{0}\rvert. If not, we simply replace SiS_{i} by V−SiV-S_{i}. We can even further assume that ∣f−1(Si)∣<c1∣V0∣\lvert f^{-1}(S_{i})\rvert<c_{1}\lvert V_{0}\rvert; otherwise, we would return f−1(Si)f^{-1}(S_{i}) as a balanced viable set and end the procedure. Throughout the algorithm we maintain this property.

Our goal is to uncross the sets S1,…,SmS_{1},\dots,S_{m}, so that we can shrink all of them at the same time. We make progress from shrinking these sets by making sure that each of our even walks has an edge inside at least one of the shrunk sets, so that shrinking reduces the number of edges by at least the number of walks.

Unfortunately, having an edge inside an SiS_{i} is not a property that is preserved by uncrossing. Instead, we require a stronger property that implies having an edge in one SiS_{i}, and show that this stronger property is preserved by uncrossing. Throughout this section we assume that xx is some fixed point in \PM(G)\PM(G) with xe>0x_{e}>0 for all e∈Ee\in E.

We extend this definition to more than one set S1,…,SmS_{1},\dots,S_{m} by letting

Next, we will show that χW\chi_{W} not being orthogonal to Λ(S1,…,Sm)\Lambda(S_{1},\dots,S_{m}) implies that WW has an edge in one E(Si)E(S_{i}).

Let WW be an even walk, and assume that χW∉Λ⊥(S1,…,Sm)\chi_{W}\notin\Lambda^{\perp}(S_{1},\dots,S_{m}). Then there is at least one edge e∈We\in W and at least one ii such that e∈E(Si)e\in E(S_{i}).

It is easy to see that χW∉Λ⊥(S1,…,Sm)\chi_{W}\notin\Lambda^{\perp}(S_{1},\dots,S_{m}) implies that there is at least one ii such that χW∉Λ⊥(Si)\chi_{W}\notin\Lambda^{\perp}(S_{i}). It follows from definition 3 that there must be some tight odd set T⊆SiT\subseteq S_{i} such that ⟨\mathds1δ(T),χW⟩≠0\langle\mathds{1}_{\delta(T)},\chi_{W}\rangle\neq 0. We will show that ⟨\mathds1δ(T),χW⟩≠0\langle\mathds{1}_{\delta(T)},\chi_{W}\rangle\neq 0 implies that there is some e∈We\in W such that e∈E(T)⊆E(Si)e\in E(T)\subseteq E(S_{i}).

Suppose the contrary, that no edge e∈We\in W is in E(T)E(T). Let W=(e1,…,ek)W=(e_{1},\dots,e_{k}) and note that

Every time that WW enters a vertex v∈Tv\in T, it must leave immediately from TT, or else we would find an edge e∈E(T)∩We\in E(T)\cap W. Therefore we can pair up the nonzero ⟨\mathds1δ(T),\mathds1ej⟩\langle\mathds{1}_{\delta(T)},\mathds{1}_{e_{j}}\rangles into consecutive pairs, possibly pairing up the last edge with the first. Since these pairs appear in the sum with alternating signs, they cancel each other, giving us

which is a contradiction. Therefore WW must have at least one edge in E(T)⊆E(Si)E(T)\subseteq E(S_{i}). ∎

Next we will define our basic uncrossing operations and show that they preserve this nonorthogonality property. Whenever we have two tight odd sets S1S_{1} and S2S_{2} we will show that we can uncross them, i.e., replace them by new tight odd sets without shrinking the subspace Λ(S1)+Λ(S2)\Lambda(S_{1})+\Lambda(S_{2}). We will use the following uncrossing lemma, which is standard in the literature. We will prove it for the sake of completeness.

If S1S_{1} and S2S_{2} are tight odd sets then either S1∩S2,S1∪S2S_{1}\cap S_{2},S_{1}\cup S_{2} are tight odd sets and

or S1−S2S_{1}-S_{2} and S2−S1S_{2}-S_{1} are tight odd sets and

The following identity holds for any S1S_{1} and S2S_{2} and can be easily checked by considering all possible configurations of the endpoints of an arbitrary edge:

We have two cases: Either ∣S1∩S2∣\lvert S_{1}\cap S_{2}\rvert is odd, or it is even.

Case 1: Assume that ∣S1∩S2∣\lvert S_{1}\cap S_{2}\rvert is odd. It follows that ∣S1∪S2∣\lvert S_{1}\cup S_{2}\rvert is also odd. Then by taking the dot product with xx we get

where the last inequality follows from the fact that x∈\PM(G)x\in\PM(G) and that S1∩S2S_{1}\cap S_{2} and S1∪S2S_{1}\cup S_{2} are odd sets. Since this inequality is tight it must be the case that ⟨\mathds1δ(S1∩S2),x⟩=⟨\mathds1δ(S1∪S2),x⟩=1\langle\mathds{1}_{\delta(S_{1}\cap S_{2})},x\rangle=\langle\mathds{1}_{\delta(S_{1}\cup S_{2})},x\rangle=1, which proves that S1∩S2S_{1}\cap S_{2} and S1∪S2S_{1}\cup S_{2} are tight odd sets. It further follows that

which implies that \mathds1δ(S1−S2,S2−S1)=0\mathds{1}_{\delta(S_{1}-S_{2},S_{2}-S_{1})}=0, i.e., δ(S1−S2,S2−S1)=0\delta(S_{1}-S_{2},S_{2}-S_{1})=0; this is because xx has strictly positive entries. Now we have the desired identity

Case 2: Now assume that ∣S1∩S2∣\lvert S_{1}\cap S_{2}\rvert is even. We can replace S2S_{2} by V−S2V-S_{2}, since V−S2V-S_{2} is also a tight odd set. But now S1∩(V−S2)=S1−S2S_{1}\cap(V-S_{2})=S_{1}-S_{2} which is an odd set. So it follows from the proof of case 1 that S1∩(V−S2)S_{1}\cap(V-S_{2}) and S1∪(V−S2)S_{1}\cup(V-S_{2}) are both tight odd sets and we have

Now observe that S1∩(V−S2)=S1−S2S_{1}\cap(V-S_{2})=S_{1}-S_{2} and S1∪(V−S2)=V−(S2−S1)S_{1}\cup(V-S_{2})=V-(S_{2}-S_{1}). Since taking complements does not change either δ(⋅)\delta(\cdot) or being a tight odd set, the claim follows. ∎

Now we use lemma 13 to prove the claim that tight odd sets can be uncrossed without shrinking Λ(S1)+Λ(S2)\Lambda(S_{1})+\Lambda(S_{2}).

Suppose that S1,S2S_{1},S_{2} are tight odd sets, i.e., ∣S1∣,∣S2∣\lvert S_{1}\rvert,\lvert S_{2}\rvert are odd and ⟨\mathds1δ(S1),x⟩=⟨\mathds1δ(S2),x⟩=1\langle\mathds{1}_{\delta(S_{1})},x\rangle=\langle\mathds{1}_{\delta(S_{2})},x\rangle=1. Then exactly one of the following two conditions holds:

S1S_{1} and S2−S1S_{2}-S_{1} are both tight odd sets and

Look at the parity of ∣S1∪S2∣\lvert S_{1}\cup S_{2}\rvert. If ∣S1∪S2∣\lvert S_{1}\cup S_{2}\rvert is odd, then we claim that case 1 happens. Otherwise, we will show that case 2 happens.

Case 1: ∣S1∪S2∣\lvert S_{1}\cup S_{2}\rvert is odd. In this case ∣S1∩S2∣\lvert S_{1}\cap S_{2}\rvert is also odd and it follows by lemma 13 that S1∪S2S_{1}\cup S_{2} is a tight odd set. It is trivial from definition 3 that Λ(S1),Λ(S2)⊆Λ(S1∪S2)\Lambda(S_{1}),\Lambda(S_{2})\subseteq\Lambda(S_{1}\cup S_{2}) which immediately yields

Case 2: ∣S1∪S2∣\lvert S_{1}\cup S_{2}\rvert is even. In this case ∣S1−S2∣\lvert S_{1}-S_{2}\rvert and ∣S2−S1∣\lvert S_{2}-S_{1}\rvert are both odd. Again, from lemma 13 it follows that S2−S1S_{2}-S_{1} is a tight odd set. It remains to prove that Λ(S1)+Λ(S2)⊆Λ(S1)+Λ(S2−S1)\Lambda(S_{1})+\Lambda(S_{2})\subseteq\Lambda(S_{1})+\Lambda(S_{2}-S_{1}). It is enough to prove that Λ(S2)⊆Λ(S1)+Λ(S2−S1)\Lambda(S_{2})\subseteq\Lambda(S_{1})+\Lambda(S_{2}-S_{1}).

It is enough to show that for any tight odd set T⊆S2T\subseteq S_{2}, we have the inclusion \mathds1δ(T)∈Λ(S1)+Λ(S2−S1)\mathds{1}_{\delta(T)}\in\Lambda(S_{1})+\Lambda(S_{2}-S_{1}). We again have two cases: Either ∣T∩S1∣\lvert T\cap S_{1}\rvert is odd or even.

If ∣T∩S1∣\lvert T\cap S_{1}\rvert is even, it follows from lemma 13 that T−S1T-S_{1} and S1−TS_{1}-T are tight odd sets and

We have \mathds1δ(S1−T),\mathds1δ(S1)∈Λ(S1)\mathds{1}_{\delta(S_{1}-T)},\mathds{1}_{\delta(S_{1})}\in\Lambda(S_{1}) and \mathds1δ(T−S1)∈Λ(S2−S1)\mathds{1}_{\delta(T-S_{1})}\in\Lambda(S_{2}-S_{1}). So \mathds1δ(T)∈Λ(S1)+Λ(S2−S1)\mathds{1}_{\delta(T)}\in\Lambda(S_{1})+\Lambda(S_{2}-S_{1}) as desired.

The only case that remains is when ∣T∩S1∣\lvert T\cap S_{1}\rvert is odd. In this case we apply lemma 13 to the sets TT and S2−S1S_{2}-S_{1}, both of which are tight odd sets. Note that T∩(S2−S1)=T−S1T\cap(S_{2}-S_{1})=T-S_{1} which has even size by assumption. Therefore by lemma 13, (S2−S1)−T(S_{2}-S_{1})-T and T−(S2−S1)=S1∩TT-(S_{2}-S_{1})=S_{1}\cap T are also tight odd sets and

We have \mathds1δ(S1∩T)∈Λ(S1)\mathds{1}_{\delta(S_{1}\cap T)}\in\Lambda(S_{1}) and \mathds1δ(S2−S1−T),\mathds1δ(S2−S1)∈Λ(S2−S1)\mathds{1}_{\delta(S_{2}-S_{1}-T)},\mathds{1}_{\delta(S_{2}-S_{1})}\in\Lambda(S_{2}-S_{1}) which proves that \mathds1δ(T)∈Λ(S1)+Λ(S2−S1)\mathds{1}_{\delta(T)}\in\Lambda(S_{1})+\Lambda(S_{2}-S_{1}) as desired. ∎

Given tight odd sets S1,…,SmS_{1},\dots,S_{m}, repeated applications of lemma 14 allow us to uncross them, i.e., replace them by pairwise disjoint tight odd sets S1′,…,Sm′′S_{1}^{\prime},\dots,S_{m^{\prime}}^{\prime} such that Λ(S1,…,Sm)⊆Λ(S1′,…,Sm′′)\Lambda(S_{1},\dots,S_{m})\subseteq\Lambda(S_{1}^{\prime},\dots,S_{m^{\prime}}^{\prime}). However, naively applying lemma 14 would result in a sequential algorithm which is not in NC\mathsf{NC}. We will next show how we can do the uncrossing in NC\mathsf{NC}.

We will use a divide-and-conquer approach to uncross a given list of tight odd sets S1,…,SmS_{1},\dots,S_{m}. The high-level description of our procedure, Uncross, is given in algorithm 5. We roughly divide the given sets into two parts, and recursively uncross each part. Then we call the procedure MergeUncross in order to merge the resulting sets.

Next, we will describe the merging procedure MergeUncross. The procedure MergeUncross, similarly to Uncross, accepts a list of tight odd sets and returns a list of pairwise disjoint tight odd sets whose Λ\Lambda is not smaller. With some abuse of notation, we still name the inputs to MergeUncross as S1,…,SmS_{1},\dots,S_{m}. The difference between MergeUncross and Uncross is that the input sets to MergeUncross satisfy certain properties highlighted below.

Suppose that {S1,…,Sm}={R1,…,Rp,C1,…,Cq}\{S_{1},\dots,S_{m}\}=\{R_{1},\dots,R_{p},C_{1},\dots,C_{q}\}, where m=p+qm=p+q and R1,…,RpR_{1},\dots,R_{p} are pairwise disjoint tight odd sets and C1,…,CqC_{1},\dots,C_{q} are also pairwise disjoint tight odd sets. Then S1,…,SmS_{1},\dots,S_{m} have no 33-wise intersections. Furthermore, the intersection graph of S1,…,SmS_{1},\dots,S_{m}, where two SiS_{i}’s are connected if they have a nonempty intersection, is bipartite.

If we select any three sets Si,Sj,SkS_{i},S_{j},S_{k}, then either two of them are from R1,…,RpR_{1},\dots,R_{p} or two of them are from C1,…,CqC_{1},\dots,C_{q}. In either case, those two sets would not have any intersections.

It is also easy to see that the intersection graph is bipartite, since R1,…,RpR_{1},\dots,R_{p} naturally form one part and C1,…,CqC_{1},\dots,C_{q} the other; by assumption, no two sets from the same part have any intersection. ∎

Having no 33-way intersections means that we can compute the parity of any union of S1,…,SmS_{1},\dots,S_{m} from their pairwise intersections. This is more handily captured by the notion of an intersection parity graph.

For tight odd sets S1,…,SmS_{1},\dots,S_{m} satisfying the conditions of lemma 15, define the intersection parity graph H=(VH,EH)H=(V_{H},E_{H}), as follows: Let VHV_{H}, the nodes of HH, be S1,…,SmS_{1},\dots,S_{m} and for i≠ji\neq j let there be an edge between SiS_{i} and SjS_{j} if and only if ∣Si∩Sj∣\lvert S_{i}\cap S_{j}\rvert is odd.

An immediate corollary of lemma 15 is that HH is bipartite. Another corollary is that the parity of ∣∪iSi∣\lvert\cup_{i}S_{i}\rvert is the same as the parity of ∣VH∣+∣EH∣\lvert V_{H}\rvert+\lvert E_{H}\rvert which we simply denote by ∣H∣\lvert H\rvert; this is because the inclusion-exclusion formula stops at pairwise intersections for our sets. We use the notation H(Si1,…,Sik)H(S_{i_{1}},\dots,S_{i_{k}}) to denote the induced subgraph on nodes Si1,…,SikS_{i_{1}},\dots,S_{i_{k}}. With this notation we have

where ≡2\stackrel{{\scriptstyle 2}}{{\equiv}} represents having the same parity.

By lemma 14, if S1,S2S_{1},S_{2} have an edge between them in HH, then the union S1∪S2S_{1}\cup S_{2} will also be a tight odd set. If there is a third set S3S_{3} connected to S2S_{2}, we can again include S3S_{3} in this union, i.e., S1∪S2∪S3S_{1}\cup S_{2}\cup S_{3} will be a tight odd set.

Can we repeatedly apply this procedure and otain S1∪⋯∪SmS_{1}\cup\dots\cup S_{m} as a tight odd set? There seem to be two barriers to this. If the graph HH is not connected, we can never take the union of two sets from different connected components. Another natural barrier is that ∣S1∪⋯∪Sm∣\lvert S_{1}\cup\dots\cup S_{m}\rvert could possibly be even; so it will never emerge out of this process, because lemma 14 only produces odd tight sets. For simplicity of notation we use ∪H\cup H to denote S1∪⋯∪SmS_{1}\cup\dots\cup S_{m}.

Surprisingly, the two mentioned barrier are really the only barriers, as we will show next.

Assume that H=H(S1,…,Sm)H=H(S_{1},\dots,S_{m}) is connected and that ∣H∣≡21\lvert H\rvert\stackrel{{\scriptstyle 2}}{{\equiv}}1. Then ∪H=S1∪⋯∪Sm\cup H=S_{1}\cup\dots\cup S_{m} is a tight odd set, and Λ(S1,…,Sm)⊆Λ(∪H)\Lambda(S_{1},\dots,S_{m})\subseteq\Lambda(\cup H).

We just need to show that ∪H\cup H is a tight odd set. The fact that Λ(S1,…,Sm)⊆Λ(∪H)\Lambda(S_{1},\dots,S_{m})\subseteq\Lambda(\cup H) is trivial from definition 3.

We will use induction on ∣VH∣\lvert V_{H}\rvert to prove this fact. It is trivial to check this for ∣VH∣≤2\lvert V_{H}\rvert\leq 2. Even if ∣VH∣=3\lvert V_{H}\rvert=3, the only graph that is connected and bipartite on 33 nodes would be the path of length 22 and we have already described that in this case we can take the union by two applications of case 1 from lemma 14.

Now consider a depth-first-search (DFS) tree started from an arbitrary node of HH. If SS is any leaf of this tree with deg⁡H(S)≡21\deg_{H}(S)\stackrel{{\scriptstyle 2}}{{\equiv}}1, then we can proceed as follows: The graph H−{S}H-\{S\} will have one fewer node and odd many fewer edges. Therefore ∣H−{S}∣≡21\lvert H-\{S\}\rvert\stackrel{{\scriptstyle 2}}{{\equiv}}1, and obviously H−{S}H-\{S\} is connected, since SS was a leaf. By induction, ∪(H−{S})\cup(H-\{S\}) is a tight odd set. But SS is also an tight set, and by assumption the union of the two, ∪(H−{S})∪S=∪H\cup(H-\{S\})\cup S=\cup H, is also odd. So by lemma 14 we get that ∪H\cup H is a tight odd set. So from now on, assume that for any leaf node SS, deg⁡H(S)≡20\deg_{H}(S)\stackrel{{\scriptstyle 2}}{{\equiv}}0. More generally, if SS is any node whose removal does not disconnect the graph, we can assume that deg⁡H(S)≡20\deg_{H}(S)\stackrel{{\scriptstyle 2}}{{\equiv}}0, or else we can proceed as before. Note that this implies that any leaf in the tree has at least one back edge, i.e., an edge going to an ancestor other than its parent. This is true, because any leaf must have at least one edge other than the one going to its parent, and in a DFS tree there are no cross edges, which means that this edge must be a back edge.

Note that in a DFS tree, the leaf nodes are never connected to each other. This implies, by simple parity counting, that if S1,S2S_{1},S_{2} are two leaves then ∣H−{S1,S2}∣≡21\lvert H-\{S_{1},S_{2}\}\rvert\stackrel{{\scriptstyle 2}}{{\equiv}}1. Note that H−{S1,S2}H-\{S_{1},S_{2}\} is also connected, so by induction ∪(H−{S1,S2})\cup(H-\{S_{1},S_{2}\}) is a tight odd set.

Now, if the DFS tree has at least four leaves S1,S2,S3,S4S_{1},S_{2},S_{3},S_{4}, we can proceed as follows: Consider the graphs H−{S1,S2}H-\{S_{1},S_{2}\} and H−{S3,S4}H-\{S_{3},S_{4}\}. They both satisfy the assumptions of the induction and therefore ∪(H−{S1,S2})\cup(H-\{S_{1},S_{2}\}) and ∪(H−{S3,S4})\cup(H-\{S_{3},S_{4}\}) are both tight odd sets. Their union is again ∪H\cup H which has an odd parity. So again by lemma 14 we get that ∪H\cup H is a tight odd set. From now on we assume that there are at most 33 leaves in the tree.

If there are any two leaves S1,S2S_{1},S_{2} that share a parent PP, we can proceed as follows: The graph H−{S1,S2}H-\{S_{1},S_{2}\} again satisfies the assumptions of induction. We also have that S1∪P∪S2S_{1}\cup P\cup S_{2} is a tight odd set; this follows by applying the base case to the subgraph H(S1,S2,P)H(S_{1},S_{2},P) which is a path of length 22. Again we have two tight odd sets ∪(H−{S1,S2})\cup(H-\{S_{1},S_{2}\}) and S1∪P∪S2S_{1}\cup P\cup S_{2} whose union ∪H\cup H is odd. Therefore ∪H\cup H is a tight odd set. So from now on, we assume that no two leaves share a parent.

Now assume that the DFS tree has three leaves S1,S2,S3S_{1},S_{2},S_{3}. Without loss of generality, assume that S1S_{1} is the deepest leaf. Let PP be the parent of S1S_{1}. Note that PP does not have any other children in the tree, because S1S_{1} was the deepest leaf and no two leaves share a parent. Note that the removal of PP does not disconnect the graph because S1S_{1} has a back edge. Therefore it must be that deg⁡H(P)≡20\deg_{H}(P)\stackrel{{\scriptstyle 2}}{{\equiv}}0. Note also that PP is not connected to S2S_{2} or S3S_{3}, because a DFS tree does not have cross edges. All of this implies that H−{S3,P}H-\{S_{3},P\} is connected, and also has odd parity. As before H−{S1,S2}H-\{S_{1},S_{2}\} also satisfies the assumptions of the induction. So again, we get two tight odd sets whose union is ∪H\cup H and therefore ∪H\cup H is a tight odd set.

Now assume that the DFS tree has only two leaves S1,S2S_{1},S_{2}. Let P1P_{1} be the parent of S1S_{1} and P2P_{2} the parent of S2S_{2}. Let QQ be the lowest common ancestor of S1S_{1} and S2S_{2} in the tree. If P1,P2≠QP_{1},P_{2}\neq Q, then we can proceed similarly to the previous case: Both P1P_{1} and P2P_{2} must have an even degree, since their removal does not disconnect the graph. Now H−{P1,S2}H-\{P_{1},S_{2}\} and H−{P2,S1}H-\{P_{2},S_{1}\} are both connected and have an odd parity. We use induction and the fact that their union is ∪H\cup H to again show that ∪H\cup H is a tight odd set. So assume that one of P1,P2P_{1},P_{2} is the same as QQ. Without loss of generality, assume that P2=QP_{2}=Q. Note that P1≠QP_{1}\neq Q, or else we would have two leaves sharing a parent, which is already a resolved case. Now let RR be the parent of P2=QP_{2}=Q. Note that S2S_{2} has a back edge, but its back edge cannot be to RR because that would create a triangle between S2,P2,RS_{2},P_{2},R which is forbidden in our bipartite graph. So the back edge must be to some ancestor of RR. This means that removing RR or even removing both R,S1R,S_{1} does not disconnect the graph. Since removing RR does not disconnect the graph we have deg⁡H(R)≡20\deg_{H}(R)\stackrel{{\scriptstyle 2}}{{\equiv}}0. Now we have two cases:

If S1S_{1} does not have an edge to RR, that would imply H−{S1,R}H-\{S_{1},R\} is odd and connected. Similar to the case of three leaves, we would get that H−{P1,S2}H-\{P_{1},S_{2}\} is odd and connected as well. But then H−{S1,R}H-\{S_{1},R\} and H−{P1,S2}H-\{P_{1},S_{2}\} are two connected and odd subgraphs whose union is HH which implies that ∪H\cup H is a tight odd set.

Now assume that S1S_{1} does have an edge to RR. Note that Q=P2Q=P_{2} is a parent of S2S_{2} and an ancestor of S1S_{1}. So it must have some other child, which we will call CC. Note that C≠S1C\neq S_{1}, or else S1,S2S_{1},S_{2} would be two leaves sharing a parent, which has already been resolved. Now, the removal of CC does not disconnect the graph because of the edge between S1S_{1} and RR. So it must be that deg⁡H(C)≡20\deg_{H}(C)\stackrel{{\scriptstyle 2}}{{\equiv}}0. On the other hand, the removal of both S2,CS_{2},C also does not disconnect the graph. Also note that there is no edge between S2S_{2} and CC because such an edge would create a triangle S2,C,QS_{2},C,Q which is forbidden in our bipartite graph. All of these mean that H−{S2,C}H-\{S_{2},C\} is odd and connected and by induction ∪(H−{S2,C})\cup(H-\{S_{2},C\}) is a tight odd set. On the other hand S2∪Q∪CS_{2}\cup Q\cup C is also a tight odd set because the induced graph on these three sets is a path of length 22. Again we have found two tight odd sets ∪(H−{S2,C})\cup(H-\{S_{2},C\}) and S2∪Q∪CS_{2}\cup Q\cup C whose union gives us ∪H\cup H and we are done.

The only remaining case is when the DFS tree has only one leaf, i.e., when the DFS tree is a Hamiltonian path. If the root and the leaf are not connected to each other, we can find another DFS tree such that it has more than one leaf and reduce the problem to the previous cases considered. Consider starting the DFS from the child of the current root and going down the Hamiltonian path until we reach the current child. Since this child was not connected to the root, the DFS procedure cannot continue and has to back up. Eventually the original root will be connected somewhere along the tree as a leaf, but we now have two leaves, and we have already considered this case.

So the only case that remains is if the DFS tree is a Hamiltonian path and that the root is connected to the leaf. This tree with the extra edge gives us a Hamiltonian cycle. Since the removal of any node in this graph does not disconnect the graph, all of the degrees must be even. Note that the entire graph cannot be simply this Hamiltonian cycle, because otherwise ∣H∣≡2m+m≡20\lvert H\rvert\stackrel{{\scriptstyle 2}}{{\equiv}}m+m\stackrel{{\scriptstyle 2}}{{\equiv}}0. So there must be some edge, other than those of the cycle, between two vertices PP and QQ. Let the two neighbors of PP on the Hamiltonian cycle be A,BA,B. Note that removing both A,BA,B does not disconnect the graph. There is also no edge between AA and BB, because otherwise we would have a triangle A,B,PA,B,P which is forbidden in bipartite graphs. So H−{A,B}H-\{A,B\} is odd and connected and by induction ∪(H−{A,B})\cup(H-\{A,B\}) is a tight odd cut. Note that A∪B∪PA\cup B\cup P is also a tight odd cut, because the induced graph on A,B,PA,B,P is a path of length 22. Again we have written HH as the union of two connected and odd subgraphs; this implies that ∪H\cup H is a tight odd set. ∎

Lemma 16 is the powerful pillar we use to create the method MergeUncross. If the intersection parity graph HH has multiple connected components, we can deal with each one separately and then uncross the results using case 2 of lemma 14. If all of the connected components have odd parity, then we can take the union in each one and proceed. The only case we still need to show how to handle is when a connected component of HH has even parity. We will show next that the even parity case can also be handled very easily.

Assume that H=H(S1,…,Sm)H=H(S_{1},\dots,S_{m}) is connected and ∣H∣≡20\lvert H\rvert\stackrel{{\scriptstyle 2}}{{\equiv}}0. Then there are two induced subgraphs of HH, which are both odd and connected, and which together cover every node. Furthermore, these two subgraphs can be found in NC\mathsf{NC}.

We will be working with the biconnected components of HH and the corresponding block-cut tree. A biconnected component is simply a maximal subgraph such that the removal of any vertex from it does not disconnect the subgraph. The block-cut tree is formed by introducing a node for each biconnected component and a node for every cut vertex, a vertex whose removal disconnects the graph, and connecting a cut vertex to all biconnected components to which it belongs. Finding biconnected components and forming the block-cut tree can be easily done in NC\mathsf{NC}. For example in parallel for every pair of edges, and every vertex, one can check whether the removal of that vertex disconnects the pair of edges; then one can form equivalence classes out of the edges and obtain the biconnected components. For more efficient and elegant algorithms in NC\mathsf{NC}, see [TV85].

For an induced subgraph B=(VB,EB)B=(V_{B},E_{B}) let us define its inverse parity as the parity of ∣VB∣+∣EB∣+1\lvert V_{B}\rvert+\lvert E_{B}\rvert+1 and denote this by [B]‾\overline{[B]}. Note that we have [B]‾≡21+∣B∣\overline{[B]}\stackrel{{\scriptstyle 2}}{{\equiv}}1+\lvert B\rvert. We regard biconnected components as induced subgraphs, unless otherwise stated. Inverse parity has a certain additivity property. Namely, if B1B_{1} and B2B_{2} are induced subgraphs that share only a single vertex and have no edges to each other, then [B1∪B2]‾=[B1]‾+[B2]‾\overline{[B_{1}\cup B_{2}]}=\overline{[B_{1}]}+\overline{[B_{2}]}.

Using this, one can easily compute the inverse parity of any subtree of the block-cut tree. In the block-cut tree, to each biconnected component assign its inverse parity, and to each cut vertex assign 00. Then it is easy to see by the additivity property that for any subtree of the block-cut tree, the inverse parity of the union of all blocks in the subtree is simply the parity of the sum of assigned numbers.

In particular, since ∣H∣≡20\lvert H\rvert\stackrel{{\scriptstyle 2}}{{\equiv}}0, or in other words, [H]‾≡21\overline{[H]}\stackrel{{\scriptstyle 2}}{{\equiv}}1, there must be an odd number of 11s in the block-cut tree.

We will first solve the problem when there are at least three 11s in the tree. In this case, we can find two subtrees whose union is the entire tree, each having an even number of 11s. This suffices, because the union of all biconnected components in each subtree would be an odd connected graph, and by lemma 16 we can merge all of the nodes in it. Each subtree will be obtained by simply partitioning the block-cut tree by removing an edge and looking at one of the resulting two subtrees. Clearly we can try all such partitions in NC\mathsf{NC}. So it remains to show that at least two of them, whose union is the entire tree, have an even internal sum. For this, look at the 11 nodes in the tree whose distance, in the tree, is the largest. Let them be B1B_{1} and B2B_{2}. Look at the path on the block-cut tree connecting B1B_{1} to B2B_{2} and let the edge adjacent to B1B_{1} be e1e_{1} and the one adjacent to B2B_{2} be e2e_{2}. Now if we partition the block-cut tree by removing e1e_{1}, we get two parts, one of which contains B2B_{2}, and the other part can only contain one 11 node, namely B1B_{1}. Otherwise, the distance between B1B_{1} and B2B_{2} would not have been maximal. So the subtree containing B2B_{2} has an even sum. Similarly if we remove e2e_{2} from the block-cut tree, the part containing B1B_{1} will have an even sum. It is not hard to see that these two subtrees cover the whole tree.

So the only remaining case is when the block-cut tree has only one 11 node. In that case let BB be the biconnected component with [B]‾≡21\overline{[B]}\stackrel{{\scriptstyle 2}}{{\equiv}}1.

First consider the case where BB is the entire graph HH. In this case, we will show that either there is a vertex SS where BB and B−{S}B-\{S\} are both odd and connected, or there are two vertices S1,S2S_{1},S_{2} connected by an edge such that B−{S1,S2}B-\{S_{1},S_{2}\} and H(S1,S2)H(S_{1},S_{2}) are both odd and connected. First, note that if any node in BB has an even degree, then this condition is automatically satisfied. Because if S1S_{1} is such a node, B−{S1}B-\{S_{1}\} is connected since BB is biconnected. It is also odd because B−{S1}B-\{S_{1}\} has one fewer node and an even number of fewer edges. So assume from now on that the degree of every node in BB is odd. Now we want to obtain the nodes S1,S2S_{1},S_{2} as described before. This is easy to derive from an open ear decomposition of BB. Note that [B]‾≡21\overline{[B]}\stackrel{{\scriptstyle 2}}{{\equiv}}1 implies that BB cannot be simply a single edge, so it must have an open ear decomposition. Look at this ear decomposition, and add the ears one by one. Look at the last ear added that was not a single edge. Suppose that this ear was some path (S1,…,Sk)(S_{1},\dots,S_{k}). Then, note that S2S_{2} is a new node added by this ear, and since no new nodes are added after this ear, the removal of S1,S2S_{1},S_{2} leaves BB connected; even if this ear was the initial cycle, this is still true. So B−{S1,S2}B-\{S_{1},S_{2}\} is connected and since the degrees of S1,S2S_{1},S_{2} are both odd and they are connected to each other, it must be that B−{S1,S2}B-\{S_{1},S_{2}\} is odd. Since S1,S2S_{1},S_{2} are connected to each other as well H(S1,S2)H(S_{1},S_{2}) is also connected and odd as desired. Note that the vertex S1S_{1} or the pair of vertices S1,S2S_{1},S_{2} can be found in NC\mathsf{NC} by simply checking all possibilities in parallel.

Now consider the case where BB is not the entire graph HH. In this case we proceed as before, and by looking at the induced subgraph BB, we find either a node S1S_{1} or two connected nodes S1,S2S_{1},S_{2} such that B−{S1}B-\{S_{1}\} or B−{S1,S2}B-\{S_{1},S_{2}\} is connected and odd. So we have a partition of BB into a single or a pair of vertices and the rest of BB. We simply attach the biconnected components other than BB to one of the partitions, based on the block-cut tree. This ensures that connectivity is preserved, and further, the parity of the partitions is not changed because every biconnected component other than BB has inverse parity 00. Again this operation can be done in NC\mathsf{NC}, since the partition inside BB can be found in NC\mathsf{NC}, and connecting the rest of the biconnected components is simply a matter of partitioning the block-cut tree into two or three parts. ∎

Now, armed with lemmas 16 and 17, we can describe the procedure MergeUncross. We will first make sure that even intersections are completely removed, i.e., made empty. This is easy to do in parallel, because there are no 33-wise intersections. Then we apply lemma 16 or lemma 17 to each connected component of HH. To avoid creating sets SS with ∣f−1(S)∣≥c1∣V0∣\lvert f^{-1}(S)\rvert\geq c_{1}\lvert V_{0}\rvert, we always pass our new sets through the procedure CheckBalancedViable, which will potentially find a balanced viable set and end the procedure.

We just have to describe CheckBalancedViable. The input to this procedure is an odd connected subset HH of the intersection parity graph. If ∣f−1(∪H)∣<c1∣V0∣\lvert f^{-1}(\cup H)\rvert<c_{1}\lvert V_{0}\rvert, then this procedure simply does nothing. Otherwise it outputs a balanced viable set as follows:

If ∣f−1(∪H)∣≤(1−c1)∣V0∣\lvert f^{-1}(\cup H)\rvert\leq(1-c_{1})\lvert V_{0}\rvert, then it simply outputs f−1(∪H)f^{-1}(\cup H) as the balanced viable set. Otherwise, we order the vertices of HH as S1′,…,Sk′S_{1}^{\prime},\dots,S_{k}^{\prime} so that for any ii, the induced subgraph on Ui={S1′,…,Si′}U_{i}=\{S_{1}^{\prime},\dots,S_{i}^{\prime}\} is connected. For example, sorting according to shortest distance (in HH) to an arbitrary initial vertex S1′S_{1}^{\prime} would satisfy this property. Now let jj be the first index for which ∣f−1(∪Uj)∣≥2c1∣V0∣\lvert f^{-1}(\cup U_{j})\rvert\geq 2c_{1}\lvert V_{0}\rvert. Then ∣f−1(∪Uj)∣≤3c1∣V0∣<(1−c1)∣V0∣\lvert f^{-1}(\cup U_{j})\rvert\leq 3c_{1}\lvert V_{0}\rvert<(1-c_{1})\lvert V_{0}\rvert. So if ∣∪Uj∣≡21\lvert\cup{U_{j}}\rvert\stackrel{{\scriptstyle 2}}{{\equiv}}1, then we can return f−1(∪Uj)f^{-1}(\cup U_{j}) as a balanced viable set (it is a tight odd set by lemma 16). Otherwise by lemma 17, we can find two subsets of UjU_{j} whose union covers UjU_{j} and are odd. We simply return the subset with the larger value of ∣f−1(⋅)∣\lvert f^{-1}(\cdot)\rvert as the balanced viable set.

All together we get the following result:

Given tight odd sets S1,…,SmS_{1},\dots,S_{m}, there is an NC\mathsf{NC} algorithm that either finds a viable set or outputs pairwise disjoint tight odd sets S1′,…,Sm′′S_{1}^{\prime},\dots,S_{m^{\prime}}^{\prime} such that

and ∣f−1(Si′)∣<c1∣V0∣\lvert f^{-1}(S_{i}^{\prime})\rvert<c_{1}\lvert V_{0}\rvert.

Other Algorithmic Ingredients

In this section we describe the remaining algorithmic ingredients we used in sections 4 and 5.

Let #Gw\#G_{w} denote the number of minimum weight perfect matchings in GG w.r.t. edge weights ww, and for each edge e∈Ee\in E, let #Gwe\#G^{e}_{w} denote the number of such matchings which contain the edge ee. The point xx we will find will have coordinate

Clearly, xx satisfies all required conditions. Additionally, observe that if M1,…,MmM_{1},\ldots,M_{m} are all the minimum weight perfect matchings in GG, then

We will crucially use the fact that a Pfaffian orientation of GG can be computed in NC\mathsf{NC}. Let (i,j)∈E(i,j)\in E, with i<ji<j. If in the Pfaffian orientation, this edge is directed from ii to jj, then let Bij=yweB_{ij}=y^{w_{e}}, otherwise let Bij=−yweB_{ij}=-y^{w_{e}}, where yy is an indeterminate. Let BB be the resulting matrix. Observe that the exponents of the entries of BB are polynomially bounded in the input size and hence its determinant can be computed in NC\mathsf{NC} [BCP83]. Consider the lowest degree term in det⁡(B)\det(B); let its degree be dd. Then the coefficient of ydy^{d} is the square of the number of perfect matchings of minimum weight in GG, i.e., it is (#Gw)2(\#G_{w})^{2}.

Next, for each edge e∈Ee\in E, we will compute #Gwe\#G^{e}_{w}, the number of minimum weight perfect matchings that edge ee participates in. Zero out the two entries in BB corresponding to ee to obtain matrix BeB_{e} and compute det⁡(Be)\det(B_{e}). Then the coefficient of ydy^{d} will be (#Gw−#Gwe)2(\#G_{w}-\#G^{e}_{w})^{2}. Hence, #Gwe\#G^{e}_{w} as well as #Gw\#G_{w} can be computed. Clearly, this can be done in parallel for all edges. ∎

2 Finding linearly many edge-disjoint even walks

In this section we prove lemma 3 by showing how to find Ω(∣E∣)\Omega(\lvert E\rvert) many edge-disjoint even walks in a given graph G=(V,E)G=(V,E) in NC\mathsf{NC}. By assumption, GG is a connected planar graph that does not have any vertices of degree 11 and at most ∣V∣/2\lvert V\rvert/2 vertices of degree 22. We first find linearly many edge-disjoint planar faces in GG.

There is an NC\mathsf{NC} algorithm that returns ∣E∣/288\lvert E\rvert/288 edge-disjoint planar faces of a graph satisfying the assumptions of lemma 3.

It is easy to see that the graph has Ω(∣E∣)\Omega(\lvert E\rvert) faces. By Euler’s formula we have

where FF denotes the set of (planar) faces. By rearranging and using the fact that deg⁡(v)≥2\deg(v)\geq 2 for every vv, we get

Consider the planar dual G∗G^{*} of GG. Corresponding to each face in GG, the dual has a vertex, and corresponding to each edge in the primal, there is an edge in the dual. The sum of the degrees in the dual graph is 2∣E∣≤12∣F∣2\lvert E\rvert\leq 12\lvert F\rvert. In other words, the average degree in the dual graph is at most 1212. By Markov’s inequality, at least half of the dual vertices must have degree at most 2424. We simply drop the dual vertices of degree more than 2424 from the dual graph and find a maximal independent set in the remaining dual. This can be done in NC\mathsf{NC}, by lemma 2. The remaining dual has maximum degree at most 2424, so its maximal independent set has at least at least 1/241/24 of its vertices, i.e., at least ∣F∣/48≥∣E∣/288\lvert F\rvert/48\geq\lvert E\rvert/288. ∎

If at least half of the faces found by lemma 18 are even, we work with these as our even walks. Else, we need to pair up odd faces together with an edge-disjoint path connecting each pair to get Ω(∣E∣)\Omega(\lvert E\rvert) even walks of the second type.

Given an even number ff of edge-disjoint odd faces in a planar graph, we can find, in NC\mathsf{NC}, f2/16∣E∣f^{2}/16\lvert E\rvert edge-disjoint even walks, each formed by joining two of the given faces.

First we find a spanning tree TT of GG. We will only use paths on the spanning tree to pair up odd faces. For each given odd face, place a token at one of its vertices, arbitrarily. Now we have ff tokens on the spanning tree TT. In lemma 20 we will prove that these tokens can be paired up by edge-disjoint paths from the tree in NC\mathsf{NC}.

We use this pairing of tokens and the paths from the tree TT to pair the given odd faces. When we connect two odd faces O1O_{1} and O2O_{2} by a path PP, the path PP might intersect or even use the edges of O1O_{1} and O2O_{2}. We fix this by replacing PP with a subpath of PP. More precisely, we find the last intersection of PP with O1O_{1}, and the first intersection after that point with O2O_{2}, and replace PP by the subpath between these two intersections. Now the path is edge-disjoint from the O1,O2O_{1},O_{2}.

So far, we have created f/2f/2 even walks; but they are not necessarily edge-disjoint. The only way that two of these walks can intersect each other is if the connecting path from one shares an edge with an odd face of the other. Because of this, any given edge ee can appear in at most 22 of the walks. So the average number of edges in an even walk is at most 2∣E∣/f2\lvert E\rvert/f. Markov’s inequality implies that at least f/4f/4 of the even walks have at most 4∣E∣/f4\lvert E\rvert/f edges. Any of these even walks shares an edge with at most 4∣E∣/f4\lvert E\rvert/f other walks, since an edge appears in at most two walks.

By lemma 2, we can find, in NC\mathsf{NC}, a maximal independent set of these short even walks (an independent set is a just a set of walks that are pairwise edge-disjoint). The number of walks in this independent set will be at least

We now describe the missing part from the above proof.

Consider a tree TT and an even number of tokens o1,…,ofo_{1},\dots,o_{f} placed on the vertices of the tree. We can find, in NC\mathsf{NC}, a pairing of the tokens using the shortest path on the tree, so that no two paths share an edge.

For each edge e∈Te\in T, we will count the number of tokens on either side of TT when ee is removed. Since there are an even number of tokens, this count must either be odd on both sides or even on both sides. We will do this in parallel for every edge. We then remove all of the edges whose token counts were even-even.

After this operation, the degree of every vertex vv must have the same parity as the number of tokens on it. This is because for each edge ee adjacent to vv, the number of tokens on the other side of ee is odd. So the number of tokens not on vv has the same parity as deg⁡(v)\deg(v). But the total number of tokens on the entire tree is even, so this parity is also shared by the number of tokens on vv.

Now we do the following in parallel for each vertex vv: We pair up all the tokens on vv in an arbitrary way until there is at most one token left. We will then pair the remaining token, if any, with one of the remaining edges; there must be at least one edge if there is at least one token. Now there are an even number of edges adjacent to vv that remain. We pair them up in an arbitrary way, so that whenever we use an edge in a pair to enter vv we exit using the other edge.

Now by following the paths from each token to the edge it is assigned to, we will get to another token, and this gives us a pairing between tokens. Note that this path following does not have to be done sequentially, but can instead be done using the doubling trick to get an NC\mathsf{NC} algorithm. ∎

We now have the ingredients needed to finish the proof of lemma 3.

We first find ∣E∣/288\lvert E\rvert/288 edge-disjoint faces by invoking lemma 18. If at least half of these faces are even, we return this half. Otherwise we invoke lemma 19. We have ∣E∣/576\lvert E\rvert/576 odd faces, any by possibly dropping one of them we can supply an even number f≥∣E∣/576−1f\geq\lvert E\rvert/576-1 of odd faces to the algorithm described by lemma 19 and obtain (∣E∣/576−1)2/16∣E∣=Ω(∣E∣)(\lvert E\rvert/576-1)^{2}/16\lvert E\rvert=\Omega(\lvert E\rvert) edge-disjoint even walks. This finishes the proof. ∎

3 Finding Gomory-Hu trees and minimum odd cuts

Note that if (S,S‾)(S,\overline{S}) is a minimum u−vu-v cut, then SS must consist of a number of connected components of GG together with an internally connected subset of vertices. This is because if SS contains two disjoint sets S1,S2S_{1},S_{2} that have no edges to each other, we can find a smaller u−vu-v cut by either taking S−S1S-S_{1} or S−S2S-S_{2} depending on which one still contains uu. In any case, the graph obtained by shrinking SS in GG will always remain planar.

The sequential algorithm for constructing a Gomory-Hu tree has, at any point, a tree TT defined on a partition S1,…,SkS_{1},\ldots,S_{k} of VV, and a weight function w′w^{\prime} defined on the edges of TT. The starting partition is simply VV, with TT having no edges. The partition and TT satisfy:

For each edge (Si,Sj)∈T, ∃ u∈Si, v∈Sj(S_{i},S_{j})\in T,\ \exists\ u\in S_{i},\ v\in S_{j} such that w′(Si,Sj)=f(u,v)w^{\prime}(S_{i},S_{j})=f(u,v).

The removal of edge (Si,Sj)(S_{i},S_{j}) from TT disconnects TT. This splits the partitions into two sets, and naturally defines a cut, say (S,S‾)(S,\overline{S}) in GG. This cut must be a minimum uu-vv cut in GG.

In each iteration, the sequential algorithm refines the tree by splitting one of the partitions into two as follows. It picks a partition having at least two vertices, say SiS_{i}. Let u,v∈Siu,v\in S_{i}. Let T1,…TlT_{1},\ldots T_{l} be the subtrees of TT incident at node SiS_{i}. By shrinking subtree TjT_{j} we mean identifying all vertices in TjT_{j} and replacing it by single vertex tjt_{j}. All edges incident at vertices in TjT_{j} from outside TjT_{j} are now incident at tjt_{j}, with the same weight as before. Shrinking T1,…TlT_{1},\ldots T_{l} gives a graph on Si∪{t1,…,tl}S_{i}\cup\{t_{1},\ldots,t_{l}\}. Let this graph be G′G^{\prime}; clearly it will be planar. In G′G^{\prime}, find a minimum uu-vv cut. It is easy to show that the weight of this cut will also be f(u,v)f(u,v).

This cut will partition SiS_{i} into two sets, say S′S^{\prime} and S′′S^{\prime\prime}, with u∈S′u\in S^{\prime} and v∈S′′v\in S^{\prime\prime}. Replace SiS_{i} by these two sets to obtain a partition on k+1k+1 sets. The new tree will contain the edge (S′,S′′)(S^{\prime},S^{\prime\prime}) with weight w′(S′,S′′)=f(u,v)w^{\prime}(S^{\prime},S^{\prime\prime})=f(u,v). Next, among the subtrees T1,…TlT_{1},\ldots T_{l} take the ones on the uu side (vv side) of the cut and let them be incident at S′S^{\prime} (S′′S^{\prime\prime}). The algorithm ends when each partition is a singleton vertex. The tree so found will be a Gomory-Hu tree.

We now give our NC\mathsf{NC} algorithm. The main difference lies in the way set SiS_{i} is split. We first define the notion of a central vertex for SiS_{i}. Pick a vertex r∈Sir\in S_{i} and for each remaining vertex v∈Siv\in S_{i}, find a mimimal minimum rr-vv cut in the graph G′G^{\prime} defined above after shrinking subtrees incident to SiS_{i}. Let SvS_{v} denote this cut and let Sv′=Sv∩Si{S^{\prime}_{v}}=S_{v}\cap S_{i}. We will say that rr is a central vertex for SiS_{i} if for each v∈Si, v≠rv\in S_{i},\ v\neq r, ∣Sv′∣≤∣Si∣/2|{S^{\prime}_{v}}|\leq|S_{i}|/2. Let us first show that such a vertex exists.

For any partition SiS_{i}, a central vertex rr exists for SiS_{i}.

Let TT be the eventual Gomory-Hu tree found by the sequential algorithm stated above. Remove all vertices not in SiS_{i} from TT. The resulting graph, say T′T^{\prime}, will still be connected, since the finer partitions of SiS_{i} always form a connected subtree of the tree on partitions at any stage of the algorithm. It is easy to see that there is a vertex r∈T′r\in T^{\prime} such that each subtree of T′T^{\prime} incident at rr has at most ∣T′∣/2|T^{\prime}|/2 vertices. Since TT is a Gomory-Hu tree, for each v∈Si, v≠rv\in S_{i},\ v\neq r, a minimum vv-rr cut is defined by one of the edges of TT that lies in T′T^{\prime}. It follows that each such cut satisfies ∣Sv′∣≤∣Si∣/2|{S^{\prime}_{v}}|\leq|S_{i}|/2 and hence rr is a central vertex for SiS_{i}. ∎

A central vertex for SiS_{i} can be found in NC\mathsf{NC}: For each vertex r∈Sir\in S_{i}, test if it is a central vertex by finding, in parallel, a minimal minimum vv-rr in G′G^{\prime} for each vertex v∈Si, v≠rv\in S_{i},\ v\neq r. From now on, let rr denote a central vertex for SiS_{i}. The following fact is straightforward:

Let r,u,v∈Vr,u,v\in V and let SuS_{u} and SvS_{v} be minimal minimum uu-rr and vv-rr cuts in GG, respectively. Then SuS_{u} and SvS_{v} do not cross.

Let r,v1,…vk∈Vr,v_{1},\ldots v_{k}\in V and let Sv1,…,SvkS_{v_{1}},\ldots,S_{v_{k}} be minimal minimum v1v_{1}-rr, … vkv_{k}-rr cuts in GG, respectively. Then Sv1,…,SvkS_{v_{1}},\ldots,S_{v_{k}} form a laminar family.

Let rr denote a central vertex for SiS_{i} that is found by the algorithm. By corollary 1, the cuts SvS_{v}, for each vertex v∈Si, v≠rv\in S_{i},\ v\neq r form a laminar family. Let M1,…,MlM_{1},\ldots,M_{l} be the maximal sets of this laminar family. Clearly, we can split SiS_{i} into the ll sets M1∩Si,…,Ml∩SiM_{1}\cap S_{i},\ldots,M_{l}\cap S_{i} and attach subtrees to appropriate sets as given by M1,…,MlM_{1},\ldots,M_{l}. This can be done for all sets SiS_{i} of the current partition, in parallel. This defines one iteration of our parallel algorithm. Clearly, after each iteration, the cardinality of the largest set in the partition drops by a factor of 2 and therefore only O(log⁡n)O(\log n) such iterations are needed. Hence we get:

There is an NC\mathsf{NC} algorithm for obtaining a Gomory-Hu tree for an edge-weighted planar graph.

Now we use Padberg and Rao’s theorem that states that the Gomory-Hu tree of a graph must contain a minimum odd cut as one of its edges [PR82] to finish the proof of lemma 11.

We first find a Gomory-Hu tree, then try all of the cuts obtained by removing an edge of the tree. We return the minimum among cuts that split the vertices into odd pieces. Clearly all of this can be done in parallel, and hence the algorithm is in NC\mathsf{NC}. ∎

An alternative way of finding a minimum odd cut SS is to use the Pickard-Queyranne structure of minimum ss-tt cuts [PQ80]. However, that method is more cumbersome to describe.

Extensions

In this section we will build on the machinery established in the previous sections to prove two generalizations of theorem 1.

There is an NC\mathsf{NC} algorithm which given an edge-weighted planar graph with polynomially bounded weights, returns a minimum weight perfect matching in it.

For a fixed integer kk, assume that we are given a weight function on the edges of planar graph G=(V,E)G=(V,E),

and we wish to find a minimum weight perfect matching in GG. Recall that in section 6.1, for the purpose of finding a perfect matching in GG, we had defined 0/10/1 weights on edges given by function ww. Now, define the following composite weight function, cc; its least significant log⁡n\log n bits correspond to ww and the rest of the bits correspond to WW.

Clearly cc is polynomially bounded and can be used in place of ww to carry out the NC\mathsf{NC} algorithm given in the previous sections. The algorithm will return a minimum weight perfect matching w.r.t. weights given by cc. Since ww is 0/10/1, for any perfect matching, the sum of weights according to ww is at most n/2n/2. Therefore in computing the weight of a perfect matching according to cc, there will be no carry over from the least significant log⁡n\log n bits to the rest. Hence the minimum weight perfect matching w.r.t. cc will also be a minimum weight perfect matching w.r.t. WW. ∎

There is an NC\mathsf{NC} algorithm which given a bounded-genus graph, returns a perfect matching in it, if it has one.

In order to derive our algorithm for planar graphs, we used planarity in exactly three ways, and here we will show how one can obtain the same results for graphs embeddable on orientable surfaces of bounded genus.

Ω(∣E∣)\Omega(\lvert E\rvert) edge-disjoint even walks (lemma 3): We used planarity to extract Ω(∣E∣)\Omega(\lvert E\rvert) edge-disjoint faces and then argued that by pairing up the faces we get Ω(∣E∣)\Omega(\lvert E\rvert) edge-disjoint even walks.

Counting perfect matchings (lemma 1): We used planarity to argue that we can count the number of minimum weight perfect matchings and hence get a point inside a face of the matching polytope \PM(G,w)\PM(G,w) when ww is polynomially bounded.

Finding the minimum odd cut (using theorem 3): We used the fact that minimal minimum ss-tt cuts can be computed in NC\mathsf{NC} for planar graphs [Joh87], in order to prove that we can construct Gomory-Hu trees and find the minimum odd cut.

Note that given a graph, one can find an embedding onto a surface of genus g=O(1)g=O(1) in NC\mathsf{NC} if one exists [EK14]. So from now on, we assume this embedding is given to us. We now address how each of lemmas 3, 1 and 3 can be proved for bounded genus graphs.

For lemma 3, note that we simply need to obtain Ω(∣E∣)\Omega(\lvert E\rvert) edge-disjoint cycles in our graph. Pairing up odd cycles can be done as before using a spanning tree. In planar graphs these cycles were obtained from the faces, and we used Euler’s formula ∣V∣−∣E∣+∣F∣=2\lvert V\rvert-\lvert E\rvert+\lvert F\rvert=2 to argue that in graphs without degree 11 vertices and with at most half of the vertices having degree 22, there must be Ω(∣E∣)\Omega(\lvert E\rvert) faces. We still have an Euler’s formula in the case of bounded genus graphs, but with 22 replaced by a (negative) constant. The proof still works as before and one can show that ∣F∣≥a∣E∣−b\lvert F\rvert\geq a\lvert E\rvert-b for some a>0a>0, which implies that ∣F∣=Ω(∣E∣)\lvert F\rvert=\Omega(\lvert E\rvert).

For lemma 1, it is enough to be able to count matchings. To be more precise, given weights ww over the edges of the graph, we simply need to compute the perfect matching generating function

in NC\mathsf{NC} as long as the bit complexity of ww is polynomially bounded. Mahajan and Varadarajan showed how this can be done in NC\mathsf{NC} by slightly modifying an algorithm of Gallucio and Loebl [MV00, GL99]. Their method reduces computing the matching generating function to taking a linear combination of Pfaffians over planar graphs.

Finally, for finding minimum odd cuts in bounded genus graphs: We will show that we can use the methods of Borradaile et al. to find the minimum odd cut in NC\mathsf{NC} [Bor+14]. The algorithm of Borradaile et al. allows one to find minimum cuts between all pairs of vertices in bounded genus graphs in nearly linear time, however we will show that a slight modification of it runs in NC\mathsf{NC}. This almost shows that one can find the minimum odd cut in NC\mathsf{NC}, because every minimum odd cut is also a minimum ss-tt cut for some ss and tt. However, one still needs to be careful about cases where there can be multiple minimum ss-tt cuts.

The main idea behind the algorithm of Borradaile et al. is that a minimum cut separating vertices ss and tt is composed of dual cycles (of which there are at most 2O(g)2^{O(g)}), all but one of which can be chosen from certain homology classes without regards to the pair ss and tt. They use this observation to reduce the problem to finding minimum cuts in 2O(g2)2^{O(g^{2})} planar graphs, where gg is the genus of the original graph. Roughly speaking, they enumerate all possible homology classes for all but one the cycles, and one by one, from each homology class they find the shortest possible cycle in the chosen homology class and perform some surgery on the graph and its embedding. These surgeries reduce the genus, until the embedding becomes planar. The surgeries are easy to perform in NC\mathsf{NC}, as long as the cycles are found in NC\mathsf{NC}.

We now point out the main technicality needed to adapt the algorithm of Borradaile et al. Although minimum cuts between all pairs of vertices can be found from the minimum cuts in the 2O(g2)2^{O(g^{2})} planarizations, it is not guaranteed that these cuts are nicely uncrossed from each other and form a Gomory-Hu tree. In fact, Borradaile et al. perturb the weights in order to have unique minimum cuts, and in order to be able to merge the Gomory-Hu trees from 2O(g2)2^{O(g^{2})} planar graphs into one Gomory-Hu tree for the original graph. We cannot afford to perturb the weights however because we do not have access to random bits. Instead we argue that a minimum odd cut can be directly found in one of the planarizations. Therefore one can produce the planarizations in NC\mathsf{NC} and then construct a Gomory-Hu tree from each and find the minimum odd cut amongst them.

Note that if the weights of the graph were slightly perturbed, then the minimum odd cut would have been the unique minimum ss-tt cut for some pair ss and tt, and we would have been able to find the unique cut in one of the planarizations. But this shows that even if the edges were not perturbed, a minimum odd cut must survive the surgeries performed on the graph for some sequence of fixed homology signatures. In other words, a minimum odd cut must be comprised of dual cycles, all but one of which are the minimum cycles from given homology classes. So a minimum odd cut must survive one of the sequences of surgeries performed on the graph, and found at the end by our algorithm for finding Gomory-Hu trees in planar graphs. ∎

We remark that all of the subroutines mentioned in the previous proof still remain in NC\mathsf{NC} for genus up to O(log⁡n)O(\sqrt{\log n}), except for the subroutine that finds the embedding of the graph. Hence, theorem 5 can be slightly strengthened to handle graphs of genus O(log⁡n)O(\sqrt{\log n}), as long as the input graph is given along with its embedding. Finally observe that the common generalization of theorems 4 and 5 easily follows.

Discussion

The main open problem of course is to go beyond bounded genus graphs and obtain an NC\mathsf{NC} perfect matching algorithm for general, or even bipartite, graphs. Below we state some more easily accessible open problems.

We note that K3,3K_{3,3}-free graphs may have genus as high as O(n)O(n). Counting the number of perfect matchings for this class of graphs is in NC\mathsf{NC} [Vaz89]. Can our algorithm be extended to obtain an NC\mathsf{NC} algorithm for the search version? We note that an NC\mathsf{NC} algorithm for finding an ss-tt min-cut in K3,3K_{3,3}-free graphs would give this result.

An interesting problem defined by Papadimitriou and Yannakakis [PY82], called Exact Matching, is the following: Given a graph GG with a subset of the edges marked red and an integer kk, find a perfect matching with exactly kk red edges. This problem is known to be in RNC\mathsf{RNC} [MVV87], even though it is not yet known to be in P\mathsf{P}. For the case of planar graphs, the decision version of this problem is known to be in NC\mathsf{NC}, though the search version is not (it is easy to check that the search version is in P\mathsf{P}). Can our techniques be used to obtain an NC\mathsf{NC} algorithm for the search version?

Very recent work [EV18] has resolved the open problem stated above about K3,3K_{3,3}-free graphs. [EV18] go further to give NC\mathsf{NC} algorithms for finding a perfect matching, a minimum weight perfect matching if the weights are polynomially bounded, and an ss-tt min-cut in one-crossing-minor-free graphs.

Acknowledgements

We wish to thank David Eppestein, László Lovász, and Satish Rao for valuable discussions.

References