The red-blue-yellow matching problem
We consider the red-blue-yellow matching problem: given two natural numbers $k_R$, $k_B$ and a graph $G$ whose edges are colored red, blue or yellow, the goal is to find a matching of $G$ that contains exactly $k_R$ red edges and exactly $k_B$ blue e…
Authors: Manuel Aprile, Marco Di Summa
The red-blue-y ello w matc hing problem Man uel Aprile, Marco Di Summa Univ ersità degli Studi di Pado v a, Dipartimen to di Matematica “T ullio Levi-Civita” Via T rieste 63, 35121 Pado v a, Italy manuel.aprile@unipd.it , disumma@math.unipd.it Abstract W e consider the red-blue-y ello w matc hing problem: given t wo nat- ural n umbers k R , k B and a graph G whose edges are colored red, blue or yello w, the goal is to find a matching of G that contains exactly k R red edges and exactly k B blue edges, and is of maximum cardi- nalit y sub ject to these constrain ts. This is a natural generalization of the w ell kno wn red-blue matc hing problem, whose complexit y status is unkno wn: although a randomized p olynomial-time algorithm exists, a deterministic algorithm has remained elusiv e for nearly four decades. The best known deterministic approach to the red-blue matching prob- lem, due to Y uster (2012), gives an additive appro ximation. In this pap er, w e sho w a similar result for the red-blue-yello w matc hing prob- lem, giving a p olynomial-time deterministic algorithm that, under nat- ural assumptions, finds a matching satisfying the color requirements almost exactly and has cardinality within 3 of the optimal solution. Our algorithm is a mix of classic linear programming techniques and ad ho c existence results on restricted classes of graphs suc h as paths and cycles. As a key ingredient, we prov e a curious top ological prop erty of plane curv es, whic h is a strengthened version of a result b y Grandoni and Zenklusen (2010) in the related con text of budgeted matc hings. 1 In tro duction Researc h on matc hing problems has been related to computational complex- it y since the celebrated work of Edmonds [ 1 ], where the very concept of a 1 p olynomial-time algorithm is introduced. A prominent v arian t of the classi- cal matching problem is the r e d-blue matching pr oblem , also known as exact matching pr oblem : giv en a graph G , where each edge is colored red or blue, and an in teger k ≥ 0 , it asks whether there is a p erfect matching of G contain- ing exactly k red edges. First in tro duced by P apadimitriou and Y annak akis [ 2 ], this problem gained p opularity after Mulm uley , V azirani, and V azirani [ 3 ] gav e a randomized (p olynomial-time) algorithm for it. (Throughout the pap er, all algorithms are meant to b e p olynomial-time, so w e will omit to sp ecify this.) The question of whether the problem admits a deterministic algorithm has b een op en for almost four decades, despite a large amoun t of w ork [ 4 , 5 , 6 ]. This issue is most imp ortan t due to the p opular conjecture that P = RP , i.e., that all problems that admit a randomized algorithm also admit a deterministic algorithm [ 7 ]. Muc h researc h has b een done on v ariations and extensions of the problem (see for instance [ 6 , 8 ]), with implications for other areas, such as integer pro- gramming: indeed, exact matching can b e mo deled as an integer program with a co efficient matrix that is “nearly” totally unimo dular (see [ 9 ]), and randomized algorithms for the w eighted version of the exact matc hing prob- lem, giv en in [ 10 ], lie at the core of algorithms for certain classes of in teger programs with b ounded sub determinan ts [ 11 , 12 ]. While a deterministic algorithm for the red-blue matc hing problem is y et to b e found, a line of research fo cused on obtaining approximate results: in particular, Y uster [ 4 ] considered th e problem of finding matchings that ha v e exactly k red edges and are “almost” maxim um, meaning that they ha ve at most one edge less than the maximum. Other w orks [ 13 , 14 , 15 , 16 ] studied a w eighted version of the problem, where, instead of colors, w e are giv en m ultiple weigh t functions defined on the edges of the graph, and the solution m ust comply with the resp ective budgets. In this case, exact constraints are replaced by inequality constrain ts, leading to PT ASs. Our work lies b etw een these tw o approac hes, as w e consider the follo wing RBY (r e d-blue-yel low) matching pr oblem : Giv en a graph where each edge is colored red, blue, or yello w, and giv en nonnegativ e in teger n umbers k R , k B , what is the maximum cardinalit y of a matc hing with exactly k R red edges and k B blue edges? Clearly , the ab o ve problem generalizes the red-blue matc hing problem. Ev en more, already the question of whether there exists any matc hing that 2 exactly satisfies the ab ov e color requirements generalizes the red-blue matc h- ing problem. Hence, while the RBY matc hing problem can b e solv ed via the randomized algorithm for exact matc hing (see [ 10 ]), a deterministic exact approac h is for now out of reac h. W e will how ev er giv e an algorithm to find a matching that almost satisfies the color requirements (losing at most one blue edge) and is large with respect to the optim um v alue of the natural linear-programming relaxation of the problem. In particular, we will obtain an additive approximation guaran tee, thus making our result incomparable with the aforementioned PT ASs on the (multi-)budgeted version of match- ing (see, for instance, [ 14 , 15 ]): indeed, while those supp ort more general constrain ts than our color requiremen ts, the approximation guarantee is a multiplic ative one. A t the end of this section, w e detail further connections b et ween those pap ers and ours, describing in particular how they can b e used to obtain weak er v ersions of our result. Before we further describe our con tribution, w e state the precise result of Y uster [ 4 ] which is our starting p oint. In the following, adopting standard notation from graph theory , w e denote b y α ′ ( G ) the maxim um size of a matc hing in a giv en graph G , without color restrictions. Moreov er, to simplify the exp osition, w e sa y “red-blue(-yello w) colored graph” to indicate a graph where eac h edge is colored red or blue (or y ellow). Theorem 1. [ 4 , The or em 1.1] Ther e is a deterministic algorithm that, given a r e d-blue c olor e d gr aph G and an inte ger k ≥ 0 , either c orr e ctly asserts that ther e is no matching of size α ′ ( G ) with exactly k r e d e dges, or r eturns a matching of size at le ast α ′ ( G ) − 1 with exactly k r e d e dges. W e remark that this algorithm migh t return a matching of size α ′ ( G ) − 1 with k red edges even when there is one of size α ′ ( G ) . The ab ov e result can b e in terpreted as follows. 1 Let us denote by P M ( G ) the matc hing p olytop e of G , i.e., the conv ex hull of all incidence vectors of matc hings of G . Throughout the pap er, w e denote b y E the set of edges of G , and w e write x ( F ) := P e ∈ F x e for any F ⊆ E . Consider the linear program (LP) max { x ( E ) : x ∈ P M ( G ) , x ( R ) = k } , where R is the set of red edges of G . Assume that the LP is feasible (otherwise there is of course no matc hing with exactly k red edges) and has optimal v alue α ∗ . Then, there is a deterministic algorithm that finds a matc hing with k red edges 1 The following is actually sligh tly stronger than what is shown in [ 4 ], but it can b e deriv ed without muc h difficult y . 3 and cardinalit y at least ⌈ α ∗ ⌉ − 1 (where this v alue turns out to b e at least α ′ ( G ) − 1 , i.e., the matching is maximum or almost maxim um). Let us sk etch this algorithm. First, one solves the aforemen tioned LP (this can b e done in p olynomial time thanks to the classical result of Edmonds [ 17 ]). If the optimal solution is integer, the algorithm returns the corresp onding matching of G . Otherwise, the h yp erplane x ( R ) = k cuts an edge of P M ( G ) and thus one can obtain an optimal solution lying in the relativ e in terior of an edge of P M ( G ) , whic h is therefore a conv ex combination of (the incidence vectors of ) t wo adjacen t matchings of G . These can b e sho wn to b e maximum, or almost maxim um, matc hings of G , one with more than k red edges, one with less, and their symmetric difference is a path or an ev en cycle. By pro ving a simple result on the almost p erfect matchings of paths and ev en cycles, one finds that it is alwa ys p ossible to select edges from the symmetric difference in order to obtain an almost maximum matching with exactly k red edges. In particular, the following holds: Prop osition 2. [ 4 , L emma 2.2] L et G b e a r e d-blue c olor e d even cycle, and let M 0 (r esp., M 1 ) b e the p erfe ct matching of al l even (r esp., o dd) e dges of G . Then, for any inte ger k b etwe en | M 0 ∩ R | and | M 1 ∩ R | ther e exists an almost maximum matching of G with exactly k r e d e dges. In this pap er, we giv e a v ersion of Y uster’s results in the more general setting of red-blu e-y ellow colored graphs, where we ha ve a requirement on the n umber of red edges that we wan t to satisfy exactly , and a requirement on the num b er of blue edges that we w ant to satisfy almost exactly . The follo wing is our main result. Theorem 3. Ther e is a deterministic algorithm that, given a r e d-blue-yel low c olor e d gr aph G (thus, with e dge set E = R ˙ ∪ B ˙ ∪ Y ) and inte gers k R , k B ≥ 0 such that the LP max { x ( E ) : x ∈ P M ( G ) , x ( R ) = k R , x ( B ) = k B } is fe asible and has optimal value α ∗ , finds a matching M of G with | M | ≥ ⌊ α ∗ ⌋ − 3 , exactly k R r e d e dges, and k B or k B − 1 blue e dges. Similarly to the algorithm of Theorem 1 describ ed ab ov e, our algorithm starts b y solving the LP in the statement. Again, there is an optimal solution that lies in the relativ e in terior of a lo w-dimensional face of P M ( G ) , hence w e obtain a small n umber of matc hings to deal with. The union (or symmetric 4 Figure 1: In the cycle ab ov e, a matching with tw o red edges cannot hav e any blue edges. difference) of these matc hings can b e in general hard to study . Indeed, if, for example, the matc hings are three and disjoin t, one obtains a 3-regular graph that is uniquely 3-edge colorable, a mysterious class of graphs that has connections to the circuit double co ver conjecture and other op en problems (see [ 18 , 19 ]). T o the b est of our kno wledge, nothing is kno wn on the existence of large matchings in suc h graphs, or in general colored 3-regular graphs. Ho wev er, we will b e able to restrict ourselv es to pairs of matchings, and in particular we will only need to study almost p erfect matchings of a (red- blue-y ellow colored) cycle or path. W e will fo cus on the case of the cycle, as it easily implies the other cases. Pro ving an extension of Prop osition 2 (whose pro of is rather simple) to red-blue-y ellow colored cycles will be a crucial step in the pro of of Theorem 3 , requiring substan tial w ork. In order to appreciate the difference, we first note that, when w e hav e requiremen ts on tw o colors, a straightforw ard extension of Prop osition 2 (i.e., the existence of an almost maxim um matc hing with k R red edges and k B blue edges) fails. Indeed, consider a red-blue-yello w colored cycle and let k R b e b et ween | M 0 ∩ R | and | M 1 ∩ R | , and similarly , let k B b e b etw een | M 0 ∩ B | and | M 1 ∩ B | . Is there alw ays an almost maxim um matching of the cycle with exactly k R red edges and k B blue edges? The answer is negative: for instance, in the cycle in Figure 1 , one p erfect matc hing (say , the one containing the ev en edges) has four blue edges and the other has t w o red edges (and no blue edge), but there is no matching with t wo red edges and one blue edge. This leads to the question of which further conditions could b e necessary to guaran tee the existence of an almost maxim um matc hing. Indeed, the colored cycles arising as solutions to our LP are not general, but enjoy a con vexit y prop ert y relating the colors of o dd edges, even edges, and the n umbers k R , k B . A similar prop erty is exploited in [ 13 ] in the con text of budgeted matc hings: 5 there, a nice lemma ab out plane curves ensures the existence of matc hings of large cardinalit y whose w eight do es not exceed a giv en budget. W e state the lemma here, as it will b e the starting p oint of our result on cycles. Let f : [0 , τ ] → R 2 b e a contin uous piecewise-linear map, hence Im( f ) is a piecewise-linear (i.e., p olygonal) plane curve. (In the pap er, w e will often iden tify a map f as ab ov e with the corresp onding curve Im( f ) .) W e define f ∞ : R → R as the extension of f by perio dicit y: that is, for ev ery t ∈ R , f ∞ ( t ) = k ( f ( τ ) − f (0)) + f ( r ) , if t = k τ + r with k ∈ Z and 0 ≤ r < τ . (1) F urthermore, giv en q ∈ R 2 , we write f + q to denote the map t 7→ f ( t ) + q for t ∈ [0 , τ ] . The follo wing is a restatemen t of Lemma 1 in [ 13 ], whic h easily follo ws from its pro of. Lemma 4. [ 13 , L emma 1] L et f : [0 , τ ] → R 2 b e a c ontinuous pie c ewise- line ar map, and let q b e a p oint in the op en se gment b etwe en f (0) and f ( τ ) . Then the curves f ∞ and f + q − f (0) interse ct: in p articular, ther e exist u ∈ [0 , 2 τ ] and v ∈ [0 , τ ] with v < u < v + τ such that f ∞ ( u ) = f ( v ) + q − f (0) . Giv en tw o contin uous maps f , g : [0 , τ ] → R 2 , a pair ( u, v ) ∈ R × [0 , τ ] such that f ∞ ( u ) = g ( v ) will b e called an interse cting p air for ( f ∞ , g ) . Thus, the ab o ve result states the existence of an intersecting pair for ( f ∞ , f + q − f (0)) with the additional prop ert y v < u < v + τ . When reading the pro of of the ab o ve lemma in [ 13 ], which is based on Jordan curv e theorem, it seems reasonable to believe that not only m ust the t wo curves in tersect, but they m ust also cr oss . The notion of tw o plane curves crossing app ears to b e intuitiv e, but is actually quite subtle and requires some carefulness (and assumptions), esp ecially when one w ants to define wher e a crossing happ ens (see Section 4 for a brief discussion ab out this). F or our purp oses, b esides assuming that f and g are con tinuous and piecewise linear, w e can also supp ose that f ∞ is injectiv e. Then, as w e will verify in Section 4 again using Jordan curve theorem, f ∞ divides R 2 in to t wo top ologically connected comp onents (meaning that R 2 \ Im( f ∞ ) consists of t w o connected comp onen ts). W e sa y that a pair ( u, v ) ∈ R × (0 , τ ) is a cr ossing p air for ( f ∞ , g ) if: • f ∞ ( u ) = g ( v ) ; • there exists s ∈ (0 , v ] and ε > 0 suc h that 6 – g ([ s, v ]) ⊆ f ∞ ( R ) , – g (( s − ε, s )) , g (( v , v + ε )) are con tained in opp osite “sides” of f ∞ (i.e., in different components of R 2 \ Im( f ∞ ) ). When the ab ov e conditions are met, w e say that g crosses f ∞ . More generally , if ( u, v ) is a crossing pair and I ⊆ R , J ⊆ [0 , τ ] are real interv als suc h that u is in the interior of I and v is in the interior of J , w e say that g | J crosses f ∞ | I . Note that g is allo wed to ov erlap with f ∞ at more than one p oin t: when this happ ens, i.e., when s < v , w e say that the crossing is overlapping ; otherwise, when s = v , the crossing is simple . W e also remark that a crossing pair ( u, v ) for ( f ∞ , g ) m ust satisfy 0 < v < τ b y definition. Thus, throughout the pap er, we will often omit to sp ecify this condition. In Section 4 we will sho w the following: Lemma 5 (Crossing Lemma) . L et f : [0 , τ ] → R 2 b e a c ontinuous pie c ewise- line ar map such that f ∞ is inje ctive, and let q b e a p oint on the se gment b etwe en f (0) and f ( τ ) such that q ∈ Im( f ) . Then ther e exists a cr ossing p air ( u, v ) for ( f ∞ , f + q − f (0)) such that v < u < v + τ . q q Figure 2: Examples of crossing pairs, with f sho wn in blac k, its extension f ∞ in gra y , and f + q − f (0) in red. Squares indicate crossings. Figure 2 shows some examples of crossing pairs satisfying the conditions of Lemma 5 . Lemma 5 will b e crucial in showing the extension of Prop osition 2 (see Theorem 7 in Section 2 ) that w e need to prov e Theorem 3 . W e also b elieve that this lemma could b e used in other contexts to pro ve the existence of com binatorial ob jects with sp ecial prop erties. 7 W e conclude this section with t w o remarks on how existing results, and in particular Lemma 4 , can lead to weak er forms of our Theorem 3 . • The first weak er guarantee follo ws from an application of the algorithm for m ulti-budgeted matc hing problems describ ed in [ 15 , Section 4.3]. F or each p ossible num b er of yello w edges in an optimal solution, an instance of the matc hing problem with one budget p er color is defined and that algorithm is run. The algorithm achiev es an additive error of 13 when there are three budgets. Applied to our instance, one can sho w that it yields a matching whose size is within 13 of the optimal v alue and whose violations of the color requiremen ts sum up to at most 13. W e remark that our algorithm, apart from having a m uc h b etter guaran tee, is also more efficien t, as it do es not need guessing and hence only solves one LP (as in the statement of Theorem 3 ) instead of man y . • A b etter guaran tee comes from a refinement of the arguments in [ 15 ] (also app earing in [ 13 ]), in particular the application of Lemma 4 . As w e detail in Section 2 , by defining appropriate curves and finding in- tersecting pairs for them, we obtain a weak er v ersion of our result on cycles. This, in turn, implies a w eaker version of our Theorem 3 , where w e allow a loss of t wo on the required num b er of blue edges instead of one (see the discussion at the end of Section 2.2 ). It will require applying the Crossing Lemma, together with additional case analysis, to pro v e our result. Outline The pap er is organized as follows. Section 2 con tains the afore- men tioned result on cycles and paths, and its pro of, whic h exploits the Cross- ing Lemma (Lemma 5 ). In Section 3 , w e sho w ho w this leads to the pro of of our main result (Theorem 3 ). Section 4 con tains the pro of of the Crossing Lemma. Finally , in Section 5 we di scuss some op en questions and p ossible extensions of our results, in particular to the case of more than three colors. 2 Cycles and paths In this section, we consider a colored graph G = ( V , E ) , whose edge set E is partitioned in to three subsets R , B , Y , (red, blue, and y ellow edges). W e will privilege t wo colors, say red and blue, and c ho ose them as co ordinates 8 to represen t matc hings in the p lane: in particular, with every matching M of G , we associate a p oint p M = ( | R ∩ M | , | B ∩ M | ) ∈ R 2 . The goal of this section is to show the following theorem. Before stating it, we remark that whenever we consider a path or a cycle, w e assume that the edges are n umbered starting from zero: in the case of a path, edge 0 is one of the extremal edges of the path, whereas, for a cycle, it is an arbitrary edge, and the edges are n umbered consecutiv ely along the path or the cycle. Theorem 6. L et G b e a c olor e d p ath or c olor e d even cycle, and denote by M 0 , M 1 the matchings of even and o dd e dges r esp e ctively, with | M 0 | ≥ | M 1 | . Assume that ( k R , k B ) is an inte ger p oint on the se gment b etwe en p M 0 , p M 1 . Then ther e is a matching M of G with | M | ≥ | M 1 | − 1 , exactly k R r e d e dges, and k B or k B − 1 blue e dges. This matching c an b e found efficiently. Theorem 6 is actually a consequence of the follo wing result, which only concerns ev en cycles. Theorem 7. L et G b e a c olor e d even cycle of length 2 ℓ and denote by M 0 , M 1 the p erfe ct matchings of even and o dd e dges, r esp e ctively. Assume that ( k R , k B ) is an inte ger p oint on the se gment b etwe en p M 0 , p M 1 . Then: 1. If Y = ∅ , ther e is a matching M of G with | M | ≥ ℓ − 1 and p M = ( k R , k B ) . 2. If Y = ∅ , ther e is a matching M of G with | M | ≥ ℓ − 1 and p M = ( k R , k B − 1) . W e first show ho w Theorem 7 implies Theorem 6 . Pr o of of The or em 6 . If G is an even cycle, Theorem 7 clearly implies the existence of the desired matching. If G is a path of ev en length, w e identify the tw o extremes of G , th us obtaining an even cycle. By applying Theorem 7 , w e obtain a matching that is also matching for G and satisfies all the requiremen ts. No w, let G be an o dd path, say an M 0 -augmen ting path of length 2 ℓ − 1 . W e add a dummy y ellow edge joining the extremes of the path, in order to turn it into an ev en cycle, and apply Theorem 7 , th us obtaining a matching M of size at least ℓ − 1 . Possibly removing the dummy edge from M , w e find the desired matching with at least ℓ − 2 = | M 1 | − 1 edges. Finally , in eac h of these cases a matc hing with the prop erties of Theorem 6 can b e found efficien tly by insp ection, as every matching of size at least | M 1 | − 1 leav es exp osed at most t wo no des. 9 Remark 8. The b ound on | M | given in Theorem 6 is tigh t. Consider, for instance, the o dd path whose color sequence is B R Y R Y B Y B Y R Y R B, and choose k R = 3 , k B = 2 . Here | M 0 | = 7 , | M 1 | = 6 , p M 0 = (0 , 2) , and p M 1 = (4 , 2) , thus ( k R , k B ) b elongs to the segment b et ween p M 0 , p M 1 . Ho w ever, the only matchings with three red edges and tw o blue edges ha ve no y ellow edges, and the only matc hin gs with three red edges and one blue edge ha v e at most one y ellow edge. Thus, these matchings hav e size at most 5. This shows that the b ound of Theorem 6 is tight for o dd paths. By attac hing a y ellow edge to the last no de of the path ab ov e, w e obtain an ev en path for which the b ound of the theorem is tight. The same holds if w e turn the ev en path in to a cycle by iden tifying its extreme no des. 2.1 Pro of of Theorem 7 : preliminary results The rest of the section is dedicated to proving Theorem 7 . W e b egin with a brief pro of o verview. In this subsection, w e observe that the theorem is easier to pro ve in certain cases. W e therefore rule out th ese cases by formulating a series of assumptions, whic h we may impose throughout the argumen t. These assumptions simplify both the notation and the structure of the pro of. In Section 2.2 , we in tro duce the notions of go o d paths and imbalance curve, whic h are crucial ingredients for the pro of. By exploiting the existence of in tersecting pairs related to our imbalance curv e, we will make a first step to ward pro ving Theorem 7 , showing a w eaker v ersion already mentioned at the end of Section 1 . Finally , in Section 2.3 , w e exploit additional structural prop erties, such as the existence of crossing pairs, and complete the pro of through a case analysis. In the follo wing w e assume that the h yp otheses of 7 are satisfied. In particular, G is a colored cycle whose edges are n um b ered from 0 to 2 ℓ − 1 , for some integer ℓ ≥ 2 . A first easy observ ation is that Theorem 7 holds if ( k R , k B ) coincides with p M 0 (resp., p M 1 ,), as in this case it is sufficient to c ho ose M = M 0 (resp., M 1 ). Therefore, in the rest of the section we will w ork under the follo wing assumption: Assumption 1. The inte ger p oint ( k R , k B ) b elongs to the op en se gment b e- twe en p M 0 , p M 1 . No w, let P be a non trivial even path in G , or G itself. W e say that P is b alanc e d if eac h color app ears the same num b er of times on the ev en edges 10 of P and on the odd edges of P , i.e., | P ∩ C ∩ M 0 | = | P ∩ C ∩ M 1 | for eac h C ∈ { R, B , Y } . (W e often abuse notation and use P to refer to the edge set of P .) T w o incident edges of the same color are an example of a balanced path. T o simplify the exp osition, w e call P a balanced p ath ev en when P = G . Lemma 9. In pr oving The or em 7 , it is sufficient to c onsider cycles that do not c ontain b alanc e d p aths. Pr o of. Assume b y con tradiction that Theorem 7 holds for cycles without balanced paths, but there is some cycle G con taining a balanced path P that violates the theorem. W e c ho ose G of minimum length, and, after fixing G , w e also take P of minim um length. Note that P has an even n umber of edges. By Assumption 1 , p M 0 = p M 1 , i.e., G is not balanced. Thus, P = G . F urthermore, w e claim that | P | ≤ | G | − 4 . Indeed, if | P | = | G | − 2 , the balancedness of P implies that p M 1 − p M 0 ∈ { 0 , ± 1 } 2 . Then the only inte- ger p oin ts on the segment b etw een p M 0 , p M 1 are p M 0 , p M 1 themselv es. This con tradicts Assumption 1 , and therefore | P | ≤ | G | − 4 . Let G ′ b e obtained from G by contracting P to a single vertex. By the ab o ve observ ations, G ′ is a cycle with an even n um b er of edges. W e analyze three cases. 1. Assume first that G has no yello w edges. In this case, it is easy to see that P must ha v e length t w o: if not, b y the minimalit y of P , there are no pairs of consecutiv e red-red or blue-blue edges in G (RR and BB rep etitions, for short), th us all ev en edges are red and all o dd edges are blue (or the other wa y around), and there is no balanced path, a con tradiction. Therefore P has length tw o, and to fix ideas w e assume that P consists of t w o consecutiv e red edges. Then G ′ is a cycle of length 2 ℓ − 2 that satisfies the h yp otheses of Theorem 7 with ( k R , k B ) replaced b y ( k R − 1 , k B ) . By the minimality of G , the theorem holds for G ′ and th us there is a matching M ′ in G ′ of size ℓ − 2 suc h that p M ′ = ( k R − 1 , k B − 1) . In G , M ′ is a matc hing that leav es exp osed at least one of the extreme no des of P . W e can then augment M ′ with one of the edges of P , th us obtaining a matc hing M of size ℓ − 1 suc h that p M = ( k R , k B − 1) . This contradicts the assumption that G violates Theorem 7 . 11 2. Assume now that G ′ (and hence G ) has at least one yello w edge. Since P is balanced, b oth its o dd and its ev en edges hav e h R red and h B blue edges for some h R , h B ∈ Z ≥ 0 . Hence, G ′ satisfies the h yp otheses of Theorem 7 with p M 0 , p M 1 , ( k R , k B ) all decreased by ( h R , h B ) . Giv en a matching M ′ of G ′ with | M ′ | = h − 1 (where 2 h is the length of G ′ ) and p M ′ = ( k R − h R , k B − h B ) , a matching M of G with | M | = ℓ − 1 and p M = ( k R , k B ) is obtained by adding to M ′ either the o dd or the ev en edges of P . 3. W e are left with the case in whic h G has y ellow edges but G ′ has none. In this case, rather than exploiting Theorem 7 for G ′ , we prov e it directly for G . Note that P con tains yello w edges, th us, due to the minimalit y of P , G has no BB or RR rep etition. As G ′ has ev en length and con tains no y ellow edges, this implies that the edges of G ′ alternate b et ween red and blue. No w, let us renum b er the edges 2 of G starting from the last y ellow edge of P : that edge is n umbered 0, and it is follow ed by a sequence of alternating red and blue edges that con tains all the edges of G ′ . T o fix ideas, say that edge 1 is red, edge 2 is blue, and so forth, as the other case is analogous. If G ′ has 2 h edges, and we define h R , h B as in the previous case, we ha ve that p M 0 = ( h R , h B + h ) and p M 1 = ( h R + h, h B ) . By Assumption 1 , there exists λ ∈ (0 , 1) suc h that ( k R , k B ) = λp M 0 + (1 − λ ) p M 1 , implying ( k R , k B ) = ( h R + (1 − λ ) h, h B + λh ) , (2) from whic h it follows that λh , (1 − λ ) h are integer n umbers. Define no w the follo wing sequence of matc hings: M (0) = M 0 \ { 0 } , M ( i ) = M ( i − 1) ∪ { 2 i − 1 } \ { 2 i } for i = 1 , . . . , h . Notice that all these matc hings hav e size ℓ − 1 . W e hav e p M (0) = p M 0 = ( h R , h B + h ) b ecause edge 0 is yello w, and then the sequence pro ceeds b y exc hanging one red edge for a blue edge. In particular, b ecause of ( 2 ), M ((1 − λ ) h ) has k R red edges and k B blue edges, which contradicts the assumption that G violates Theorem 7 . This concludes the pro of. 2 Ren umbering the edges migh t sw ap the role of M 0 and M 1 , but this do es not affect the h yp otheses of Theorem 7 . 12 Because of the ab o ve lemma, from no w on, in proving Theorem 7 w e can mak e the follo wing assumption: Assumption 2. G do es not c ontain b alanc e d p aths. In p articular, G do es not c ontain two c onse cutive e dges of the same c olor, i.e., the c oloring is prop er (b orr owing the term fr om classic al e dge c oloring). Lemma 9 (and in particular Assumption 2 ) easily implies the second case of Theorem 7 , i.e., when there are no yello w edges. This red-blue case was already shown in [ 4 ] (as mentioned in Section 1 ), but enforcing the coloring to b e prop er mak es the pro of immediate, as demonstrated b elow. Observ ation 10. The or em 7 holds under the additional assumption that Y = ∅ . Pr o of. If Y = ∅ , Assumption 2 implies that the edges of G alternate b et ween red and blue: let us say that all edges of M 0 are red and all edges of M 1 are blue. Since ( k R , k B ) is a conv ex combination of p M 0 , p M 1 , w e ha ve k R + k B = ℓ . Then, the desired matc hing is obtained b y selecting the first k R edges of M 0 and all the blue edges not incident with them, whose num b er is ℓ − k R − 1 = k B − 1 . Th us, from no w on we can fo cus on the first case of Theorem 7 : Assumption 3. G c ontains at le ast one yel low e dge, i.e., Y = ∅ . 2.2 Go o d paths and the im balance curv e Giv en a path P of G (or P = G ), let P 0 = P ∩ M 0 (resp., P 1 = P ∩ M 1 ) b e the set of its ev en (resp., o dd) edges. W e define the imb alanc e of P as the p oin t δ ( P ) = ( | P 1 ∩ R | − | P 0 ∩ R | , | P 1 ∩ B | − | P 0 ∩ B | ) ∈ R 2 . Notice that an even path is balanced if and only if δ ( P ) = (0 , 0) . No w, let G and ( k R , k B ) b e as in Theorem 7 . F or eac h i ∈ { 0 , 1 } , define r i = | M i ∩ R | and b i = | M i ∩ B | . Also, let q = ( k R − r 0 , k B − b 0 ) . W e sa y that a nontrivial even path P of G is go o d if it starts at an even edge and satisfies δ ( P ) = q . “ P starts at an even edge” means that its edge n umbers are of the form 2 v , . . . , 2 u − 1 with v < u < v + ℓ , where, here and in the sequel, the num b ering 2 v , . . . , 2 u − 1 m ust b e taken mo dulo 2 ℓ . 13 In order to show Theorem 7 , w e will show the existence of paths that are go o d and also ha ve some useful extra prop erties. T o this end, let us no w define a piecewise linear curv e d : [0 , ℓ ] → R 2 , as follows: d ( t ) = δ ( { 0 , . . . , 2 t − 1 } ) for every t ∈ { 0 , . . . , ℓ } , and the curv e is obtained by linearly interpolating the p oints d (0) , . . . , d ( ℓ ) . W e call d the imb alanc e curve of G . Let us giv e some intuition on the crucial role of curve d , whic h tracks the im balance of the initial p ortions of our cycle. Notice that d (0) = (0 , 0) , d ( ℓ ) = p M 1 − p M 0 , and the p oin t q = ( k R − r 0 , k B − b 0 ) is on the segmen t b etw een d (0) , d ( ℓ ) . Moreov er, if d con tains q , in particular if d ( t ) = q for some in teger t , then b y definition of d the path from edge 0 to edge 2 t − 1 has imbalance q , i.e., it is a go o d path. More generally , w e can obtain a go o d path b y finding in tegers u, v with u > v suc h that d ( u ) − d ( v ) = q . As we will verify , this corresp onds to lo oking for an in tersecting pair for ( d ∞ , d + q ) (see Figure 3 for an in tuition). Hence, in the follo wing we will study the b ehavior of d in order to show the existence of the desired intersecting (actually , crossing) pair and go o d path. x R x B d ( ℓ ) d (0) = (0 , 0) q d ( v ) d ( u ) Figure 3: The imbalance curve d : [0 , ℓ ] → R 2 , with ℓ = 9 , corresp onding to the 18-edge cycle with the follo wing coloring (where the edges are num b ered from 0 to 17): Y B Y B Y R Y R Y B R B Y R B R B R. The p oin t q (in red) b elongs to the segmen t b et ween d (0) , d ( ℓ ) . While d do es not contain q , it do es con tain several pairs of p oin ts whose difference is exactly q , in particular d ( u ) and d ( v ) . As the reader can easily v erify , this translates in to the existence of in tersecting pairs for ( d ∞ , d + q ) (some of which are crossing pairs). In the rest of the pap er, w e will alw ays see d (and ev ery other related 14 d ( t ) − d ( t − 1) 2 t − 2 2 t − 1 ( − 1 , 0) R Y ← ( 1 , 0) Y R → ( 0 , − 1) B Y ( 0 , 1) Y B ( − 1 , 1) R B ( 1 , − 1) B R T able 1: Correspondence b et ween mo ves of d and edge colors. curv e) as an oriented curve, where the orien tation is in the direction of in- creasing t . W e remark that d ( t ) − d ( t − 1) = δ ( { 2 t − 2 , 2 t − 1 } ) for every t ∈ { 1 , . . . , ℓ } . (3) This vector depends exclusively on the color of the edges 2 t − 2 , 2 t − 1 , and can only assume the v alues (0 , ± 1) , ( ± 1 , 0) , ( − 1 , 1) , (1 , − 1) . (The v alue (0 , 0) is ruled out b ecause of Assu mption 2 .) T able 1 describ es the correspondence b et ween the segments of d and the color of the edges of the cycle G , where the arro ws indicate the orien tation of the curv e. W e refer to the segments of d as moves of d . The following observ ation is straigh tforward giv en the ab ov e considerations on the mov es of d . (Here and in the follo wing, by “translation of d ” w e mean the curv e t 7→ d ( t ) + u for some u ∈ R 2 .) Observ ation 11. One has d ( t ) ∈ Z 2 if and only if t is inte ger, and every br e akp oint 3 of d is inte ger. L et ¯ d b e any tr anslation of d by an inte ger ve ctor. If d and ¯ d interse ct (i.e. d ( u ) = ¯ d ( v ) for some u, v ∈ [0 , ℓ ] ), then they interse ct at an inte ger p oint (henc e u, v ∈ Z ). The following lemma makes the connection b etw een go o d paths and in- tersecting pairs explicit. Lemma 12. L et u, v b e inte gers such that 0 < v < ℓ , v < u < v + ℓ , and d ∞ ( u ) = d ( v ) + q . Then the p ath P = { 2 v , . . . , 2 u − 1 } , wher e the numb ering is mo dulo 2 ℓ , is go o d. 3 Giv en a piecewise-linear contin uous function f : I → R 2 defined on a nondegenerate in terv al I ⊆ R , w e call br e akp oints of f the v alues t in the interior of I where f is not differen tiable. 15 Pr o of. First, consider the case u ≤ ℓ . Then d ( v ) + q = d ∞ ( u ) = d ( u ) , i.e., q = d ( u ) − d ( v ) , which, by definition of d , is exactly the imbalance of P ; hence P is go o d. Consider now the case u > ℓ . Then d ( v ) + q = d ∞ ( u ) = d ( u − ℓ ) + d ( ℓ ) , and furthermore, u − ℓ < v . Hence, by applying again the definition of d , we ha ve: q = d ( ℓ ) − ( d ( v ) − d ( u − ℓ )) = δ ( { 0 , . . . , 2 ℓ − 1 } ) − δ ( { 2( u − ℓ ) , . . . , 2 v − 1 } ) = δ ( P ) . Notice that Lemma 4 guaran tees the existence of an in tersecting pair ( u, v ) for ( d ∞ , d + q ) , and Observ ation 11 guaran tees that u, v are integer. Hence, go o d paths alwa ys exist. The next theorem shows that this already brings us very close to pro ving Theorem 7 . Theorem 13. L et G and ( k R , k B ) b e as in The or em 7 , and assume that P is a go o d p ath. Then ther e is a matching M of size ℓ − 1 with exactly k R r e d e dges and k B or k B − 1 blue e dges. Pr o of. Let P = { 2 v , . . . , 2 u − 1 } with v < u < v + ℓ . Let us denote by r in 0 , r in 1 the n umber of ev en and o dd red edges of P , respectively , and b y r out 0 , r out 1 the num b er of ev en and o dd red edges outside P . Define similarly b in 0 , b in 1 , b out 0 , b out 1 . Considering the “red” comp onen t, we ha ve k R − r 0 = q R = r in 1 − r in 0 , where the second equalit y follows from the fact that P is a go o d path and th us satisfies δ ( P ) = q . As r 0 = r in 0 + r out 0 , we obtain r in 1 + r out 0 = k R . Similarly , b in 1 + b out 0 = k B . Thus, the set M consisting of the o dd edges in P and the ev en edegs not in P has k R red edges and k B blue edges. W orking mo dulo 2 ℓ , w e can write M = { 2 v + 1 , 2 v + 3 , . . . , 2 u − 1 } ∪ { 2 u, 2 u + 2 , . . . , 2 v − 2 } . Note that | M | = ℓ , and M \ { 2 u − 1 } , M \ { 2 u } are b oth matchings. (W e call suc h a set M a quasi-matching .) Hence, b y remo ving from M one of the edges 2 u − 1 , 2 u that is not red (there exists at least one b y Assumption 2 ), w e obtain a matching of size ℓ − 1 with exactly k R red edges and k B or k B − 1 blue edges. W e remark that Theorem 13 giv es a w eaker version of Theorem 7 , where w e allow our matc hing to hav e one less blue edge than required also when Y = ∅ . One easily sees that this is still sufficien t to pro ve Theorem 6 . 16 Moreo ver, this w eak er v ersion of Theorem 7 leads to a w eak er v ersion of our main result (Theorem 3 ), where we obtain a matc hing with at most t wo few er blue edges than required (i.e., k B − 2 , k B − 1 or k B blue edges), while satisfying the other prop erties. This will b e explained at the end of Section 3 . In the next section, w e tak e the last step to pro ve Theorem 7 . 2.3 Pro of of Theorem 7 : Exploiting a crossing Recall that out goal is to sho w the existence of a matc hin g of size ℓ − 1 with k R red edges and k B blue edges, whic h we will refer to as a desir e d matching. W e first sho w that, in certain sp ecial cases, the proof of Theorem 13 already giv es us a desired matc hing. Observ ation 14. L et P = { 2 v , . . . , 2 u − 1 } b e a go o d p ath in G . If at le ast one of the e dges 2 u − 1 , 2 u , 2 v − 2 , 2 v + 1 is yel low, then a desir e d matching exists. Pr o of. W e refer to the pro of of Theorem 13 , and recall that M is the quasi- matc hing obtained in the pro of. W e see that if one of the edges 2 u − 1 , 2 u is yello w, the matching obtained from M by remo ving that edge has k B blue edges and is thus a desired matching. Assume now that edges 2 u − 1 , 2 u are not yello w, and edge 2 v + 1 is y ellow. Then, thanks to Assumption 2 , one of the edges 2 u − 1 , 2 u is red and the other is blue, and edge 2 v is red or blue. Starting from M and exchanging edge 2 v + 1 with edge 2 v , and removing the edge among 2 u − 1 , 2 u that has the same color as 2 v , yields a desired matching. W e can reason analogously if 2 v − 2 is yello w. The ab ov e observ ation allows us to make the follo wing assumption: Assumption 4. F or any go o d p ath P = { 2 v , . . . , 2 u − 1 } of G , none of the e dges 2 u − 1 , 2 u , 2 v − 2 , 2 v + 1 is yel low. W e now resume our in vestigation of the imbalance curve d . Due to As- sumption 2 , w e can restrict the b ehavior of d : the follo wing can b e easily c heck ed via T able 1 . Observ ation 15. W e c an exclude the fol lowing set of two c onse cutive moves for d : 17 W e no w consider the curv e d ∞ , i.e., the extension of d by perio dicity defined according to ( 1 ) (with τ = ℓ ). W e hav e the following simple obser- v ation: Observ ation 16. L et ˆ G b e the gr aph isomorphic to G under the fol lowing r enumb ering of the e dges: e dge 2 b e c omes e dge 0, e dge 3 b e c omes e dge 1, and so on. L et ˆ d b e the c orr esp onding imb alanc e curve. Then Im( ˆ d ∞ ) is a tr anslation of Im( d ∞ ) . Pr o of. Using the definition of d , it is easy to c hec k that ˆ d ∞ ( t ) = d ∞ ( t + 1) − d (1) for any t ∈ R . Due to the p erio dicity of d ∞ and ˆ d ∞ , this concludes the pro of. W e no w prov e an imp ortant lemma that will allow us to prov e Theorem 7 . Recall that q ∈ R 2 is defined as q = ( k R − r 0 , k B − b 0 ) . Lemma 17. Under Assumptions 1 – 4 , and p ossibly after r enumb ering the e dges of the cycle, we have that: 1. d ∞ is inje ctive. 2. Ther e exists a cr ossing p air ( u, v ) ∈ Z 2 for ( d ∞ , d + q ) such that v < u < v + ℓ . 3. If the cr ossing is overlapping, one of the fol lowing holds: (a) ther e is some i ∈ { 1 , . . . , v − 1 } such that d ∞ ([ u − i, u ]) and d ([ v − i, v ]) + q form pr e cisely the overlapping p art of the cr ossing; (b) ther e is some i ∈ 1 , . . . , min v − 1 , v − u + ℓ 2 − 1 such that d ∞ ([ u, u + i ]) and d ([ v − i, v ]) + q form pr e cisely the overlapping p art of the cr ossing. Note that the injectivit y of d ∞ stated in prop erty 1 of the ab ov e lemma ensures that the notion of a crossing pair is w ell defined. F urthermore, recall that, b y definition of crossing pair, prop erty 2 also gives the conditions 0 < v < ℓ and d ∞ ( u ) = d ( v ) + q . The tw o sub cases of prop erty 3 corresp ond to ov erlapping crossings where d ∞ and d + q hav e (a) the same orientation or (b) opp osite orien tations in the ov erlapping part. In case (a), d ∞ ( u − j ) = d ( v − j ) + q for j = 0 , . . . , i , while in case (b), d ∞ ( u + j ) = d ( v − j ) + q for j = 0 , . . . , i . In b oth cases, i is maximal with resp ect to this prop ert y . See Figure 4 for an illustration of these t w o cases. 18 Pr o of of L emma 17 . 1. Assume by contradiction that d ∞ is not injectiv e: then, as d ∞ is the extension of d b y p eriodicity , there are distinct u, v ∈ [0 , ℓ ) with d ( u ) − d ( v ) = k ∆ for some k ∈ Z ≥ 0 , where we write ∆ = d ( ℓ ) for brevity . Fix a minim um such k . Note that u, v can b e assumed to b e in teger by Observ ation 11 . • If k = 0 , there are integers u, v ∈ { 0 , . . . , ℓ − 1 } with u > v and d ( u ) = d ( v ) , leading to δ ( { 2 v , . . . , 2 u − 1 } ) = 0 . Th us, there is a balanced path, contradicting Assumption 2 . • If k ≥ 1 , there are integers u, v ∈ { 0 , . . . , ℓ − 1 } with u = v and d ( u ) = d ( v ) + k ∆ . Supp ose first that k = 1 and u > v : then w e hav e δ ( { 2 v , . . . , 2 u − 1 } ) = ∆ ; since δ ( { 0 , . . . , 2 ℓ − 1 } ) = ∆ , w e obtain δ ( { 2 u, . . . , 2 ℓ − 1 , 0 , . . . , 2 v − 1 } ) = 0 , contradicting Assumption 2 . In all other cases, there is a path P such that either δ ( P ) = k ∆ (if u > v and k > 1 ) or δ ( P ) = − k ∆ (if u < v ), in which case the path Q = E \ P satisfies δ ( Q ) = ( k + 1)∆ . W e only treat the first case, as, by renaming k := k + 1 and P := Q , the second case reduces to the first. Let us c hange the num b ering of the cycle so that it starts from P : its first edge (which is even) b ecomes edge 0, its second edge b ecomes edge 1, and so on. By rep eatedly applying Observ ation 16 , one can see that, if d is updated consequently , the only effect of the renum b ering is that d ∞ is translated, and therefore the minimalit y of k is unaffected. Let ˜ d b e the restriction of (the up dated) d to the edges of P , i.e., ˜ d is defined on [0 , ℓ ′ ] , with ℓ ′ = | P | / 2 , and satisfies ˜ d ( t ) = d ( t ) for every t ∈ [0 , ℓ ′ ] . In particular, ˜ d (0) = d (0) = (0 , 0) and ˜ d ( ℓ ′ ) = δ ( P ) = k ∆ . Since ∆ is in the op en segmen t betw een ˜ d (0) and ˜ d ( ℓ ′ ) , we can apply Lemma 4 to ˜ d and ∆ : we ha ve that there exist i ∈ [0 , 2 ℓ ′ ] and j ∈ [0 , ℓ ′ ] suc h that j < i < j + ℓ ′ and ˜ d ∞ ( i ) = ˜ d ( j ) + ∆ . Again, i, j can b e assumed to b e in teger. No w, w e distinguish t wo cases again. If i ≤ ℓ ′ , then d ( i ) = ˜ d ( i ) = ˜ d ∞ ( i ) = ˜ d ( j ) + ∆ = d ( j ) + ∆ , so the path { 2 j, . . . , 2 i − 1 } has imbalance equal to ∆ and therefore its complement is a balanced path, con tradicting Assumption 2 . Otherwise, i > ℓ ′ and ˜ d ( j ) + ∆ = ˜ d ∞ ( i ) = ˜ d ( i − ℓ ′ ) + ˜ d ( ℓ ′ ) − ˜ d (0) = ˜ d ( i − ℓ ′ ) + k ∆ , which giv es d ( j ) − d ( i − ℓ ′ ) = ˜ d ( j ) − ˜ d ( i − ℓ ′ ) = ( k − 1)∆ , con tradicting the minimalit y of k . 19 2. Due to Assumption 3 , w e can fix the num b ering of the cycle so that at least one of the edges ℓ − 2 , 1 is yello w; since these t wo edges hav e differen t parity , this can b e done without c hanging which edges of G are ev en and which are o dd. No w, w e verify that q / ∈ Im( d ) . If q ∈ Im( d ) , then, as q ∈ Z 2 , q = d ( t ) for some t ∈ { 0 , . . . , ℓ } . If q = d (0) = (0 , 0) , w e obtain ( k R , k B ) = ( r 0 , b 0 ) = p M 0 , con tradicting Assumption 1 . Similarly , if q = d ( ℓ ) = ( r 1 − r 0 , b 1 − b 0 ) , we find ( k R , k B ) = p M 1 , again a con tradiction. So t ∈ { 1 , . . . , ℓ − 1 } , which implies that P = { 0 , . . . , 2 t − 1 } is a go o d path, contradicting Assumption 4 . Thus, q / ∈ Im( d ) . The existence of a (not necessarily integer) crossing pair now follows from Lemma 5 . By Observ ation 11 , we see that u, v ∈ Z . 3. If the crossing is ov erlapping, there are tw o cases, dep ending on whether the orientation of d ∞ and d + q in the o verlapping part is the same or not. In the first case, w e ha v e d ∞ ([ u − i, u ]) = d ([ v − i ′ , v ]) + q for some i, i ′ > 0 that are breakp oints of d , where we tak e i, i ′ maximal. Notice that i ′ < v b y definition of crossing pair. Moreo ver, due to the structure of d , we hav e i = i ′ ∈ Z > 0 , implying i ∈ { 1 , . . . , v − 1 } . In the second case, w e ha v e d ∞ ([ u + i, u ]) = d ([ v − i ′ , v ]) + q for some i, i ′ > 0 , and as ab o ve w e conclude i = i ′ ∈ Z > 0 and i ≤ v − 1 . The b ound on i follo ws from the fact that if u + j = v − j + ℓ for some j ∈ { 1 , . . . , i } , then d ( v − j ) + q = d ∞ ( u + j ) = d ( v − j ) + d ( ℓ ) , leading to q = d ( ℓ ) , a con tradiction to part 1. Hence, w e m ust ha ve u + i < v − i + ℓ , leading to prop erty (b). F rom now on, we will w ork with a num b ering of the edges of G satisfying the conditions of Lemma 17 . W e now start the actual pro of of Theorem 7 . W e first summarize our approac h. The existence of a crossing pair ( u, v ) , together with Lemma 12 , implies that there is a go o d path P = { 2 v , . . . , 2 u − 1 } with certain prop erties on the edges close to its extremes. If the crossing is o verlapping, there are m ultiple go o d paths with additional prop erties. W e will call d in (resp., d out ) the mo ve of d ∞ righ t b efore (resp., after) the ov erlapping part, and w e define ¯ d in (resp., ¯ d out ) similarly for d + q (see b elo w for the precise definitions). Then, w e will distinguish some cases: 1. The crossing is simple; 20 2. The crossing is ov erlapping of t yp e (a) (we refer to Lemma 17 ), i.e., d ∞ and d + q ha v e the same orientation in the o verlapping part. 3. The crossing is o verlapping of t yp e (b), i.e., d ∞ and d + q ha ve opp osite orien tations in the ov erlappin g part. (See Figure 4 for an illustration of the last tw o cases.) x R x B q d ( ℓ ) d (0) (a) x R x B q d ( ℓ ) d (0) (b) Figure 4: Examples of an ov erlapping crossing of t yp e (a) (left) and of type (b) (right), where w e only show d (black) and d + q (red). In b oth cases, the crossing pair is ( u, v ) = (6 , 3) and the “length” of the o verlapping part is i = 2 . At the side of each plot we draw (translates of ) the vectors d in , ¯ d out , d out , ¯ d in , in clo ckwise order, with d in = (1 , 0) in b oth cases. W e will conclude the pro of of Theorem 7 b y arguing that in eac h case there is a contradiction. Case 1 : The crossing is simple W e define d in := d ∞ ( u ) − d ∞ ( u − 1) , ¯ d in := d ( v ) − d ( v − 1) , d out := d ∞ ( u + 1) − d ∞ ( u ) , ¯ d out := d ( v + 1) − d ( v ) . In this case, the four vectors − d in , d out , − ¯ d in , ¯ d out are all distinct (where w e c hanged the sign of the “in” vectors so that all vectors p oin t aw a y from the 21 crossing p oin t d ∞ ( u ) = d ( v ) + q ), and “cross” in the sense that they alternate b et ween vectors d ∗ and ¯ d ∗ in, sa y , clo c kwise order. W e will rule out all the cases in whic h such crossings can o ccur. Recall that P = { 2 v , . . . , 2 u − 1 } is a go o d path, b y Lemma 12 . By equation ( 3 ), and using Assumptions 2 and 4 , the p ossible mo ves for d in and d out are those listed in T able 2 . 2 u − 2 2 u − 1 R B B R Y B Y R → d in 2 u 2 u + 1 R B B R R Y ← B Y d out T able 2: P ossible mov es for d in and d out in Case 1 . Note also that, again by Assumptions 2 and 4 , ¯ d in has the same p ossible mo ves as d out , and ¯ d out has the same p ossible mov es as d in . Moreov er, not all com binations for d in , d out are allo w ed, due to Observ ation 15 . Th us, w e obtain the follo wing cases, whic h w e depict graphically: the black dot represen ts the crossing p oint. F or ( d in , d out ) , the p ossible mo ves are: Notice that the last t wo p ossibilities can b e ruled out b ecause they cannot lead to a simple crossing. F or ( ¯ d in , ¯ d out ) , the p ossible mo ves are: As ab o ve, the last four p ossibilities can b e ruled out b ecause they cannot lead to a simple crossing. Finally , it is easy to chec k that none of the remaining com binations of mov es for ( d in , d out ) and ( ¯ d in , ¯ d out ) leads to a simple crossing (either b ecause tw o segments coincide or b ecause i t is not a crossing at all). This concludes the pro of in this case. Case 2 : The crossing is ov erlapping of type (a) By Lemma 17 , d ∞ ([ u − i, u ]) and d ([ v − i, v ]) + q form precisely the o v erlapping part of 22 the crossing, i.e., there is some i ∈ { 1 , . . . , v − 1 } such that, for j = 0 , . . . , i , d ∞ ( u − j ) = d ( v − j ) + q , where i maximal with respect to this prop erty . Also recall that, due to Lemma 12 , P j = { 2( v − j ) , . . . , 2( u − j ) − 1 } is a go o d path for j = 0 , . . . , i . By subtracting equation d ∞ ( u − j − 1) = d ( v − j − 1) + q from d ∞ ( u − j ) = d ( v − j ) + q , for j = 0 , . . . , i − 1 , w e obtain d ∞ ( u − j ) − d ∞ ( u − j − 1) = d ( v − j ) − d ( v − j − 1) for j = 0 , . . . , i − 1 . Since mo ves of d are in one-to-one corresp ondence with pairs of colors via equation ( 3 ), this implies that the edges 2( v − j ) − 1 and 2( u − j ) − 1 hav e the same color, and so do the edges 2( v − j ) − 2 and 2( u − j ) − 2 , for j = 0 , . . . , i − 1 . Moreo v er, b y Assumption 4 , for j = 0 , . . . , i edges 2( v − j ) − 2 , 2( v − j ) + 1 , 2( u − j ) − 1 , 2( u − j ) are not y ellow. This, b y Assumption 2 , implies that the edges from 2( v − i ) to 2 v − 1 form an alternating sequence of red and blue; say that the even edges are red and the o dd edges are blue, the other case b eing analogous. Then, the same holds for the edges from 2( u − i ) − 1 to 2 u , where, for the first and the last edge, w e again used Assumption 2 along with the fact that they are not yello w. Hence, the ov erlapping part is diagonal and consists of mov es of the t yp e , and also each of the edges 2( v − i ) − 2 , 2 v + 1 is red or blue. No w, w e define d in := d ∞ ( u − i ) − d ∞ ( u − i − 1) , ¯ d in := d ( v − i ) − d ( v − i − 1) , d out := d ∞ ( u + 1) − d ∞ ( u ) , ¯ d out := d ( v + 1) − d ( v ) . By ( 3 ), ¯ d in and ¯ d out dep end on the color of the edges 2( v − i ) − 2 , 2( v − i ) − 1 and 2 v , 2 v + 1 , resp ectiv ely . As eac h of the edges 2( v − i ) − 2 , 2 v + 1 is red or blue, the p ossible cases for ¯ d in , ¯ d out are: ¯ d in ∈ { , ← , } , ¯ d out ∈ { , , →} . (The mov e is ruled out in b oth cases b y the injectivity of d ∞ .) Similarly , as edge 2( u − i ) − 1 is blue while edge 2 u is red, the p ossible cases for d in , d out are: d in ∈ { , } , d out ∈ { , ←} . Ho wev er, it is easy to chec k that in any combination of mov es, ¯ d in and ¯ d out lie in the same one of the t wo regions determined b y d ∞ , con tradicting the fact that ( u, v ) is a crossing pair. (See Figure 5 , left.) 23 x R x B ¯ d in d out d in ¯ d out x R x B ¯ d out d out d in ¯ d in Figure 5: An example of the contradictions obtained in case 2 (left) and in case 3 (right). The possible mo ves for v ectors d in , d out , ¯ d in , ¯ d out conflict with ( u, v ) b eing a crossing pair for ( d ∞ , d + q ) . Case 3 : The crossing is o v erlapping of t yp e (b) By Lemma 17 , d ∞ ([ u, u + i ]) and d ([ v − i, v ]) + q form precisely the o verlapping part of the crossing, i.e., there is some integer i ∈ 1 , . . . , min v − 1 , v − u + ℓ 2 − 1 suc h that d ∞ ( u + j ) = d ( v − j ) + q for j = 0 , . . . , i , where i is maximal with resp ect to this prop erty . The condition v < u and the b ound i ≤ v − u + ℓ 2 − 1 imply v − j < u + j < v − j + ℓ for j = 0 . . . , i , so, b y Lemma 12 , path P j = { 2( v − j ) , . . . , 2( u + j ) − 1 } is go o d. By subtracting equation d ∞ ( u + j − 1) = d ( v − j + 1) + q from d ∞ ( u + j ) = d ( v − j ) + q , for j = 1 , . . . , i , w e obtain d ∞ ( u + j ) − d ∞ ( u + j − 1) = d ( v − j ) − d ( v − j + 1) = − ( d ( v − j + 1) − d ( v − j )) for j = 1 , . . . , i . Since mov es of d are in one-to-one corresp ondence with pairs of colors via ( 3 ), and opp osite mov es of d corresp ond to swapping colors, edges 2( v − j ) + 1 and 2( u + j ) − 2 ha v e the same color, and so do edges 2( v − j ) and 2( u + j ) − 1 , for j = 1 , . . . , i . Moreov er, by Assumption 4 , for j = 0 , . . . , i none of the edges 2( v − j ) − 2 , 2( v − j ) + 1 , 2( u + j ) − 1 , 2( u + j ) is y ellow. This, b y Assumption 2 , implies that the edges from 2( v − i ) to 2 v − 1 form an alternating sequence of red and blue; say that the ev en edges hav e color red and the o dd edges hav e color blue. Then, the opp osite holds for the edges from 2 u − 1 to 2( u + i ) (i.e., the o dd edges are red and the even are blue), where for the first and the last edge w e again used Assumption 2 and the 24 fact that they are not yello w. Hence the o verlapping segmen t is diagonal, and also each of the edges 2( v − i ) − 2 , 2 v + 1 is red or blue. No w, w e define d out := d ∞ ( u + i + 1) − d ∞ ( u + i ) , ¯ d in := d ( v − i ) − d ( v − i − 1) , d in := d ∞ ( u ) − d ∞ ( u − 1) , ¯ d out := d ( v + 1) − d ( v ) . As eac h of the edges 2( v − i ) − 2 , 2 v + 1 is red or blue, the p ossible cases for ¯ d in , ¯ d out are: ¯ d in ∈ { , ← , } , ¯ d out ∈ { , , →} . The p ossible cases for d in , d out are: d in ∈ { , →} , d out ∈ { , } , where we used the fact that edge 2( u + i ) is blue and edge 2 u − 1 is red. Ho wev er, it is easy to chec k that in any combination of mov es, ¯ d in and ¯ d out lie in the same one of the t wo regions determined b y d ∞ , con tradicting the fact that ( u, v ) is a crossing pair. (See Figure 5 , righ t.) This settles the last case and completes the pro of of Theorem 7 . 3 Main result and pro of In this section we prov e our main result, Theorem 3 . The k ey ingredients are t wo extensions of Theorem 6 . In the first, we extend Theorem 6 to the case in which the p oint ( k R , k B ) has only one in teger comp onen t, which we tak e to b e the first one. Lemma 18 (F ractional version) . L et G b e a c olor e d p ath or even cycle, and denote by M 0 , M 1 the matchings of even and o dd e dges, r esp e ctively. Assume that ( k R , k B ) is on the se gment b etwe en p M 0 , p M 1 , with k R inte ger. Then ther e is a matching M with | M | ≥ | M 1 | − 1 , exactly k R r e d e dges, and ⌈ k B ⌉ or ⌈ k B ⌉ − 1 blue e dges. This matching c an b e found efficiently. Pr o of. By reasoning exactly as in the pro of of Theorem 6 , w e can assume that G is an ev en cycle. Clearly , w e can also restrict ourselves to the case where k B is not integer, as otherwise we can just apply Theorem 7 . This implies, in particular, that ( k R , k B ) is in the op en segment betw een p M 0 , p M 1 . W e use the notation p M 0 = ( r 0 , b 0 ) and p M 1 = ( r 1 , b 1 ) . 25 Consider the im balance curve d defined in Section 2 , and let q = ( k R − r 0 , k B − b 0 ) and ⌈ q ⌉ = ( k R − r 0 , ⌈ k B ⌉ − b 0 ) . Now, if there exists a path P that starts at an ev en edge and satisfies δ ( P ) = ⌈ q ⌉ , we can argue exactly as in the pro of of Theorem 13 to find a desired matching, and w e are done. T o sho w the existence of such a path P , it suffices to find an in tersecting pair ( ¯ u, ¯ v ) for C suc h that ¯ v < ¯ u < ¯ v + ℓ , and then argue as in Lemma 12 . T o find such an intersecting pair, w e will start from the existence of an in tersecting pair ( u, v ) for ( d ∞ , d + q ) , whic h is guaran teed by Lemma 4 , and w e will sho w that, by rounding u, v up or do wn as needed, w e can obtain an in tersecting pair for ( d ∞ , d + ⌈ q ⌉ ) (see Figure 6 ). This plan, which can b e easily chec ked b y hand, requires how ever a fair amoun t of details. Consider the curv e d + q : the images of its breakp oin ts are of the form ( x, y + β ) for x, y ∈ Z , where β = k B − ⌊ k B ⌋ . Hence, eac h of the segments ( d + q ) | [ t,t +1] with t ∈ { 0 , . . . , ℓ − 1 } can b e horizontal (with extremes ( x, y + β ) , ( x + 1 , y + β ) ), v ertical (with extremes ( x, y + β ) , ( x, y + 1 + β ) ), or diagonal (with extremes ( x, y + β ) , ( x + 1 , y − 1 + β ) ), where x, y ∈ Z . Clearly , the curve d + ⌈ q ⌉ is obtained b y translating d + q by (0 , 1 − β ) . Moreo ver, since q = ( k R , k B ) − p M 0 and ( k R , k B ) is in the op en segmen t b etw een p M 0 and p M 1 , the p oint q is in the op en segmen t b et ween d (0) = (0 , 0) and d ( ℓ ) = p M 1 − p M 0 . Lemma 4 then guaran tees the existence of an in tersecting pair ( u, v ) for ( d ∞ , d + q ) suc h that v < u < v + ℓ ; thus, d ∞ ( u ) = d ( v ) + q . Now, using the fact that the p ossible mo ves of d are only those listed in T able 1 , it is easy to verify that there is also an intersecting pair ( ¯ u, ¯ v ) for ( d ∞ , d + ⌈ q ⌉ ) obtained by suitably c ho osing ¯ u ∈ {⌊ u ⌋ , ⌈ u ⌉} and ¯ v ∈ {⌊ v ⌋ , ⌈ v ⌉} . Therefore, if this intersecting pair satisfies ¯ v < ¯ u < ¯ v + ℓ , we are done. T o conclude, we need to deal with the cases in which condition ¯ v < ¯ u < ¯ v + ℓ is violated. Assume first that ¯ v ≥ ¯ u . Then, as v < u , w e m ust hav e ¯ v ∈ { ¯ u, ¯ u + 1 } . If ¯ v = ¯ u , from d ∞ ( ¯ u ) = d ( ¯ v ) + ⌈ q ⌉ (which holds b ecause ( ¯ u, ¯ v ) is an intersecting pair for ( d ∞ , d + ⌈ q ⌉ ) ) we obtain ⌈ q ⌉ = (0 , 0) , whic h implies k R = r 0 , ⌈ k B ⌉ = b 0 . Thus, M 0 is a desired matching in this case. If ¯ v = ¯ u + 1 , then w e necessarily hav e ¯ u = ⌊ u ⌋ , ¯ v = ⌈ v ⌉ , and u, v hav e the same in teger part. But then, the intersection p oin t d ∞ ( u ) = d ( v ) + q b elongs to iden tical mov es of d ∞ and d + q . Since the first comp onen t of q is integer and the second is fractional, this cannot happ en if these identical mo ves are b oth horizontal or b oth diagonal, and it follows that they are b oth vertical. F urthermore, the conditions ¯ u = ⌊ u ⌋ , ¯ v = ⌈ v ⌉ imply that these are mov es of the t yp e ↓ . Then, ⌈ q ⌉ = d ∞ ( ¯ u ) − d ( ¯ v ) = d ∞ ( ¯ u ) − d ∞ ( ¯ u + 1) = (0 , 1) , which implies k R = r 0 , ⌈ k B ⌉ = b 0 + 1 . Th us, again, M 0 is a desired matching. 26 No w assume that ¯ u ≥ ¯ v + ℓ . Then, as u < v + ℓ , w e must h a ve ¯ u ∈ { ¯ v + ℓ, ¯ v + ℓ +1 } . If ¯ u = ¯ v + ℓ , then ⌈ q ⌉ = d ∞ ( ¯ u ) − d ( ¯ v ) = d ( ℓ ) = ( r 1 − r 0 , b 1 − b 0 ) , hence k R = r 1 , ⌈ k B ⌉ = b 1 , and M 1 is a desired matching. If ¯ u = ¯ v + ℓ + 1 , then w e necessarily hav e ¯ u = ⌈ u ⌉ , ¯ v = ⌊ v ⌋ , and u, v + ℓ ha ve the same in teger part. As ab o ve (using also the p erio dicit y of d ∞ ), this implies that the in tersection p oin t d ∞ ( u ) = d ( v ) + q b elongs to identical mo ves of d ∞ and d + q , which m ust b e vertical. F urthermore, the conditions ¯ u = ⌈ u ⌉ , ¯ v = ⌊ v ⌋ imply that these are mov es of the type ↑ . Then, ⌈ q ⌉ = d ∞ ( ¯ u ) − d ( ¯ v ) = d ∞ ( ¯ v + ℓ + 1) − d ∞ ( ¯ v ) = d ( ℓ ) + (0 , 1) = ( r 1 − r 0 , b 1 − b 0 + 1) . This implies k R = r 1 , ⌈ k B ⌉ = b 1 + 1 , and th us M 1 is a desired matching. Finally , just as in Theorem 6 , a desired matching can b e found efficien tly b y insp ection. q ⌈ q ⌉ Figure 6: Example of the pro of of Lemma 18 , with d sho wn in black, d + q in red, ⌈ q ⌉ in yello w and d + ⌈ q ⌉ in gray , and the crossing indicated b y a square. (Notice that q lies in the segmen t b et ween d (0) and d (5) .) In this example, u = 3 , v = 4 / 3 , and by setting ¯ u = 3 , ¯ v = 1 we obtain a crossing pair for ( d ∞ , d + ⌈ q ⌉ ) . W e no w need to extend Theorem 6 in a different direction: in the hypothe- ses of that theorem, the graph G is the union of t wo (disjoint) matchings whose corresp onding incidence vectors are adjacen t vertices in the matc h- ing p olytop e. W e no w examine the case where G is the union of an y t wo matc hings. Lemma 19 (T w o general matc hings) . L et G b e a c olor e d gr aph that is the union of any two matchings M 0 , M 1 , with | M 0 | ≥ | M 1 | . Assume that ( k R , k B ) is an inte ger p oint on the se gment b etwe en p M 0 , p M 1 . Then ther e is a matching M with | M | ≥ | M 1 | − 2 , exactly k R r e d e dges, and k B or k B − 1 blue e dges. 27 If G c ontains no cycles, the b ound on the c ar dinality c an b e impr ove d to | M | ≥ | M 1 | − 1 . In al l c ases, M c an b e found efficiently. Pr o of. First, for an y edge e that is in b oth M 0 and M 1 , w e remo ve e from M 0 and M 1 , w e include it in the final matc hing M , and modify ( k R , k B ) according to its color (e.g., we decrease k R b y 1 if e is red). This preserves the prop ert y that ( k R , k B ) is on the segmen t b etw een p M 0 , p M 1 . Hence, we can assume that M 0 and M 1 are disjoint. F urthermore, w e know that the connected comp onents of G are paths and ev en cycles in whic h the edges alternate b et ween M 0 and M 1 . Since for a single connected comp onent the result follows from Theorem 6 , in the follo wing w e assume that G has at least t wo comp onen ts. W e can also assume that in an y comp onent D of G there are no consec- utiv e edges with the same color, i.e., the coloring is prop er. Indeed, assume that there is a comp onent D that contains tw o consecutiv e edges of the same color, say blue. Consider the instance resulting after contracting these tw o edges to a single no de. 4 A matching in the con tracted instance yields a matc hing in the original instance with one more blue edge, hence our desired matc hing exists if a similar matching exists in the contracted instance, where k B is reduced b y 1. Therefore, from no w on we assume that the coloring is prop er. W e now distinguish t wo cases. 1. Assume that | M 0 | > | M 1 | or G contains some yello w edges. In this case, the idea is to glue the comp onents of G in to a single cycle (similarly to what is done in [ 13 ]) and then apply Theorem 7 . W e pro ceed as follo ws: • First, we “open up” each cycle, turning it into an ev en path; • Then, while there are b oth an M 0 -augmen ting path and an M 1 - augmen ting path, we patc h them together (by identifying an end- p oin t of each) in to an even path; • Now, w e are left with | M 0 | − | M 1 | paths that are M 1 -augmen ting, and w e attac h a dummy edge colored y ellow to eac h of them; • Finally , we identify the endp oin ts of the paths obtained in this w ay (including the original even paths) to create a cycle C . 4 Con tracting ma y pro duce a trivial comp onent or t wo parallel edges, but this do es not affect the correctness of the argumen t. 28 It is easy to chec k that this can b e done so that in C the edges in M 0 are even, and the edges in M 1 along with the dummy edges are o dd. Notice that C has 2 | M 0 | edges, | M 0 | − | M 1 | of whic h are dumm y , and the h yp otheses of Theorem 7 hold for C and ( k R , k B ) . Since | M 0 | > | M 1 | or G contains some y ellow edges, C has at least one y ellow edge. Then, from Theorem 7 , w e obtain a matching M of C of size |C | / 2 − 1 = | M 0 | − 1 , with k R red edges and k B blue edges. No w, since | M | = |C | / 2 − 1 , M lea v es exp osed exactly t w o no des u 1 , u 2 in C ; denote by D 1 (resp., D 2 ) a comp onent of G containing u 1 (resp., u 2 ). 5 Then all the edges of M that in C app ear on the same path connecting u 1 , u 2 ha ve the same parity . Thus, after removing the dummy edges, the only thing that could preven t M from b eing a matching in G is if M contains tw o consecutive edges from D 1 or D 2 . This is p ossible only if, for some i ∈ { 1 , 2 } , D i is an (ev en) cycle and the tw o consecutive edges of D i b elonging to M are the first and the last edge of D i (seen as a path in C ). Ho w ever, this cannot happ en for b oth D 1 and D 2 , as there is an even num b er of edges separating the last edge of D 1 and the first edge of D 2 in C , and on this path M takes edges with the same parity . Hence, by removing the dumm y edges and at most one more edge from M (whic h we can c ho ose not to b e red, since the coloring is prop er), w e obtain a matching satisfying the requiremen ts. In particular, the cardinalit y of this matc hing is at least | M 1 | − 2 , whic h impro ves to | M 1 | − 1 when no comp onen t is a cycle, b ecause in this case only the dumm y edges m ust b e remov ed. 2. Supp ose no w that | M 0 | = | M 1 | and G does not contain an y y ellow edges. Hence, G consists of ev en cycles and paths in which the edges alternate b etw een red and blue, b ecause the coloring is prop er. More- o ver, we can assume that all the paths are ev en: indeed, if there is, sa y , an M 0 -augmen ting path, then since | M 0 | = | M 1 | there m ust b e an M 1 -augmen ting path and we can join them together, obtaining a new instance with an ev en alternating path. If this creates t w o consecutiv e edges of the same color, w e can con tract them to a single no de as ar- gued ab ov e. Again as ab o ve, a matching in the new instance satisfying the prop erties in the thesis yields a matching in the original instance 5 When u 1 (resp., u 2 ) is a no de of C obtained by iden tifying t wo no des of G b elonging to t wo distinct comp onents, we can c ho ose D 1 (resp., D 2 ) to b e either comp onent. 29 with the same prop erties. Note that p M 0 and p M 1 (hence ( k R , k B ) as w ell) lie on the line of equation x R + x B = ℓ , with ℓ = | M 0 | = | M 1 | . Using the notation p M 0 = ( r 0 , b 0 ) and p M 1 = ( r 1 , b 1 ) , this reads r 0 + b 0 = r 1 + b 1 = ℓ . Consider an y comp onen t D of G , and say that D has 2 h D edges. W e w ould like to select the even or the o dd edges of D to b e part of our desired matc hing and recurse on G \ D . Since when there is a single component one can in vok e Theorem 6 , this will giv e a matching with at least | M 1 | − 1 edges satisfying the color requirements. Let r D 0 (resp., b D 0 ) b e the num b er of red (resp., blue) edges of M 0 ∩ D , and define r D 1 , b D 1 analogously . W e ha ve r D 0 + b D 0 = r D 1 + b D 1 = h D . The p oin ts p 0 = ( r 0 − r D 0 , b 0 − b D 0 ) , k 0 = ( k R − r D 0 , k B − b D 0 ) , p 1 = ( r 1 − r D 1 , b 1 − b D 1 ) , k 1 = ( k R − r D 1 , k B − b D 1 ) all lie on the line of equation x R + x B = ℓ − h D : p 0 , p 1 represen t the matc hings M 0 , M 1 restricted to G \ D , while k 0 (resp., k 1 ) represen ts the requiremen ts on our matc hing once w e hav e selected the even (resp., o dd) edges of D . T o apply recursion, w e need to prov e that, if the comp onen t D is carefully c hosen, at least one of k 0 , k 1 b elongs to the segmen t b et ween p 0 , p 1 . T o fix ideas, supp ose without loss of generality r 1 ≥ r 0 (implying b 1 ≤ b 0 ), i.e, p M 1 lies low er and to the right with respect to p M 0 . W e further distinguish t w o sub cases. (a) Assume first that, in all comp onents, the o dd edges are red and the ev en edges are blue, i.e., r D 1 = b D 0 = h D and r D 0 = b D 1 = 0 for ev ery comp onen t D , and also r 1 = b 0 = ℓ and r 0 = b 1 = 0 . Let us choose a comp onen t D of smallest size. Then h D ≤ ℓ/ 2 , and thus, as k R + k B = ℓ , at least one of k R , k B is ≥ h D . Since k 0 = ( k R , k B − h D ) and k 1 = ( k R − h D , k B ) , we see that one of the p oin ts k 0 , k 1 has non-negativ e comp onents and hence lies on the segmen t b et ween p 0 , p 1 . (See Figure 7 , left.) (b) W e are left with the case where in some comp onen t D the o dd edges are blue and the ev en edges are red. Cho osing that com- p onen t, w e see that actually b oth k 0 and k 1 lie on the segmen t 30 b et ween p 0 , p 1 : indeed, in this case, the segment betw een p 0 , p 1 is exactly the segment containing x − ( h D , 0) , x − (0 , h D ) for each x in the segment betw een p M 0 , p M 1 . (See Figu re 7 , right.) This completes the analysis for case 2. Finally , to conclude the pro of, w e remark that the ab o v e arguments giv e an efficient algorithm to find a matc hing satisfying the requirements (where the algorithm will b e recursiv e in case 2). Thus, a desired matching can b e found efficien tly . x R x B p M 0 p M 1 k p 0 p 1 k 1 k 0 x R x B p M 0 p M 1 k p 0 p 1 k 0 k 1 Figure 7: Examples for the pro of of Lemma 19 . In the left figure, w e ha ve r 1 = b 0 = 8 , r 0 = b 1 = 0 , and h D = 2 . In this case, the p oin t k 0 is on the segmen t b et ween p 0 , p 1 . In the righ t figure, we hav e r 1 = b 0 = 8 , r 0 = b 1 = 2 , and h D = 2 . Then k 0 , k 1 are b oth on the segmen t b etw een p 0 , p 1 . Remark 20. The ab o ve result is tight. Indeed, let G b e the union of t wo cycles C and C ′ of length 8, with color sequences R Y R Y R Y R Y and B Y B Y B Y B Y, resp ectiv ely . Let M 0 b e the p erfect matc hing formed b y all red and blue edges, and M 1 b e the p erfect matching formed b y all y ellow edges. Then ( k R , k B ) := (2 , 2) is on the segment joining p M 0 and p M 1 . It is immediate to see that no matc hing of G whose restriction to C or C ′ is p er- fect can ha v e k R red edges and k B or k B − 1 blue edges. Th us, an y matc hing M with k R red edges and k B or k B − 1 blue edges satisfies | M | ≤ | M 1 | − 2 . 31 Before pro ving our main theorem, w e need a final easy observ ation. Observ ation 21. L et P ⊆ R n b e a p olytop e with 0/1 vertic es. If P has dimension 2, then P is a triangle or a p ar al lelo gr am. Pr o of. Assume that P has at least four vertices, one of which can b e assumed to b e the origin without loss of generality . That is, P con tains at least four pairwise distinct p oin ts 0 , x, y , z with 0/1 co ordinates. Since P has dimension 2, there exist λ, µ ∈ R suc h that z = λx + µy . Let i ∈ { 1 , . . . , n } b e an index suc h that x i = y i , say x i = 0 and y i = 1 without loss of generality . Then z i = µ , and therefore µ ∈ { 0 , 1 } . If µ = 0 , w e obtain z = λx , whic h is p ossible only if z ∈ { 0 , x } , a contradiction. Thus µ = 1 , hence z = λx + y . As x and y differ in at least one comp onen t, this gives λ ∈ {− 1 , 0 , 1 } . But λ = 0 b ecause z = y , thus λ ∈ {− 1 , 1 } and z = x + y or y = x + z . In b oth cases, P has exactly four v ertices that form a parallelogram. W e are no w ready to show our result on general graphs, which w e restate here for conv enience. Theorem ( 3 , restated) . Ther e is a deterministic algorithm that, given a r e d- blue-yel low c olor e d gr aph G (thus, with e dge set E = R ˙ ∪ B ˙ ∪ Y ) and inte gers k R , k B ≥ 0 such that the LP max { x ( E ) : x ∈ P M ( G ) , x ( R ) = k R , x ( B ) = k B } is fe asible and has optimal value α ∗ , finds a matching M of G with | M | ≥ ⌊ α ∗ ⌋ − 3 , exactly k R r e d e dges, and k B or k B − 1 blue e dges. Pr o of. Let x ∗ b e a basic optimal solution of the LP . Then x ∗ b elongs to a face F of P M ( G ) of dimension at most tw o, and thus F is a singleton, a segment, or a tw o-dimensional p olytop e. As P M ( G ) (hence, F ) has only 0/1 vertices, b y Observ ation 21 in the latter case F is a triangle or a parallelogram. By c ho osing a minimal face, we can assume that x ∗ lies in the relative interior of F . Ev ery vertex x of F is the characteristic vector of a matching M , and the ob jectiv e v alue x ( E ) at x is equal to | M | . F urthermore, if x, x ′ are adjacent v ertices of F (and th us of P M ( G ) ), the symmetric difference b etw een the corresp onding matchings is an alternating cycle or an alternating path, and th us − 1 ≤ | M | − | M ′ | ≤ 1 . No w, let M − , M + b e a smallest and a largest matching (resp ectively) corresp onding to a v ertex of F . By the ab o ve observ ations, if F is a segment 32 or a triangle, then | M + | ≤ | M − | + 1 , whic h implies ⌊ α ∗ ⌋ = | M − | b ecause x ∗ is in the relativ e in terior of F ; and if F is a parallelogram, then | M + | ≤ | M − | +2 , whic h implies ⌊ α ∗ ⌋ ≤ | M − | + 1 . Thus, summarizing, ⌊ α ∗ ⌋ ≤ | M − | + 1 , and ⌊ α ∗ ⌋ = | M − | if F is not a parallelogram. (4) Let π : R n → R 2 b e the linear function defined as follo ws: π ( x ) = ( x ( R ) , x ( B )) . Note that π ( x ∗ ) = ( k R , k B ) , and if x is a v ertex of P M ( G ) , then x is the characteristic vector of a matc hing M such that π ( x ) = p M . Moreo ver, since x ∗ is in the relative interior of F , ( k R , k B ) is in the relativ e in terior of π ( F ) . Note also that although the dimension of π ( F ) can be smaller than that of F , the linearity of π implies that π ( F ) is a singleton, a segmen t, a triangle, or a parallelogram. W e consider eac h of these cases separately . 1. If π ( F ) is a singleton, then π ( F ) = { ( k R , k B ) } , and thus every matching M that corresp onds to a vertex of F satisfies p M = ( k R , k B ) . If w e c ho ose a maximum matc hing M among these, we ha v e | M | ≥ α ∗ . 2. If π ( F ) is a segmen t, then there exist adjacen t vertices x 0 , x 1 of F (corresp onding to matchings M 0 , M 1 , resp ectiv ely) such that ( k R , k B ) is on the segment b et ween π ( x 0 ) = p M 0 and π ( x 1 ) = p M 1 . W e assume | M 0 | ≥ | M 1 | without loss of generality . F urthermore, we can assume that M 0 ∩ M 1 = ∅ , as otherwise we can include in M every edge of M 0 ∩ M 1 , and translate p M 0 , p M 1 and ( k R , k B ) by an iden tical integer v ector. No w, Theorem 6 yields a matching M that satisfies the color requiremen ts and is of size | M | ≥ | M 1 | − 1 ≥ | M − | − 1 ≥ ⌊ α ∗ ⌋ − 2 , where the last inequality follows from ( 4 ). (With some care, one can actually c ho ose adjacent vertices x 0 , x 1 suc h that ⌊ α ∗ ⌋ = | M 1 | and thus sho w that | M | ≥ ⌊ α ∗ ⌋ − 1 .) 3. If π ( F ) is a triangle, then F is also a triangle with v ertices correspond- ing to some distinct matchings M 1 , M 2 , M 3 . Thus, π ( F ) has v ertices p M 1 , p M 2 , p M 3 . Recall that ( k R , k B ) lies in the relative in terior of π ( F ) . (See Figure 8 for an illustration of this case.) The line of equation x R = k R in tersects the b oundary of π ( F ) at precisely t wo p oints, whic h we denote by ( k R , k ′ B ) and ( k R , k ′′ B ) , with k ′ B < k ′′ B . Without loss of generality , ( k R , k ′ B ) b elongs to the segment p M 1 p M 2 , and ( k R , k ′′ B ) b elongs to the segment p M 2 p M 3 . W e construct a 33 x R x B p M 1 p M 2 p M 3 ( k R , k B ) p M ′′ p M ′ ( k R , k ′′ B ) ( k R , k ′ B ) Figure 8: An example for case 3 of the pro of of Theorem 3 . matc hing M ′ from M 1 ∪ M 2 as follo ws. First, b y arguing as in the pre- vious case, we can assume that M 1 ∩ M 2 = ∅ . Then, w e apply Lemma 18 : we obtain a matc hing M ′ with | M ′ | ≥ min {| M 1 | , | M 2 |} − 1 , k R red edges, and at most ⌈ k ′ B ⌉ blue edges. Similarly , w e obtain a matc hing M ′′ , where | M ′′ | ≥ min {| M 2 | , | M 3 |} − 1 and M ′′ has k R red edges and at least ⌈ k ′′ B ⌉ − 1 blue edges. As k B is an integer satisfying k ′ B < k B < k ′′ B , we ha ve ⌈ k ′ B ⌉ ≤ k B ≤ ⌈ k ′′ B ⌉ − 1 , and th us the p oint ( k R , k B ) lies on the segmen t p M ′ p M ′′ . W e now apply Lemma 19 to M ′ , M ′′ and ( k R , k B ) to obtain a matching that meets the color requiremen ts and is of size at least min {| M ′ | , | M ′′ |} − 2 ≥ | M − | − 3 = ⌊ α ∗ ⌋ − 3 , where the equation follo ws from ( 4 ). 4. If π ( F ) is a parallelogram, then F is also a parallelogram with v ertices x 1 , x 2 , x 3 , x 4 , where x i is adjacent to x i +1 for each i ∈ { 1 , 2 , 3 , 4 } (with index 5 identified with 1). Note that x 1 − x 2 = x 4 − x 3 , x 2 − x 3 = x 1 − x 4 , and these tw o vectors hav e disjoint supp ort b ecause they are consecutiv e edges of a parallelogram with 0/1 v ertices. If we denote by M i the matc hing whose characteristic vector is x i (for i ∈ { 1 , 2 , 3 , 4 } ), then π ( F ) has v ertices p M 1 , . . . , p M 4 , in this order. Also, recall that M i △ M i +1 is an alternating cycle or an alternating path for eac h i . Since M i △ M i +1 coincides with the supp ort of x i − x i +1 for eac h i , 34 the ab ov e observ ations sho w that there is no common edge b etw een D ′ := M 1 △ M 2 = M 3 △ M 4 and D ′′ := M 2 △ M 3 = M 1 △ M 4 . W e can actually sho w that D ′ and D ′′ are also no de-disjoin t. In fact, assume that there exist t wo adjacen t edges e, f with e ∈ D ′ and f ∈ D ′′ , and supp ose without loss of generalit y e ∈ M 1 \ M 2 . W e ha v e the follo wing c hain of implications: e ∈ M 1 ⇒ f / ∈ M 1 ⇒ f ∈ M 4 ⇒ e / ∈ M 4 ⇒ e ∈ M 3 . This yields e ∈ M 3 \ M 2 ⊆ D ′′ , which contradicts the fact that e ∈ D ′ and D ′ , D ′′ are edge-disjoint. Thus, D ′ , D ′′ are no de-disjoint. Note also that M 1 , . . . , M 4 coincide outside of D ′ ∪ D ′′ . As already pointed out, the cardinalities of the largest and smallest matc hings among M 1 , . . . , M 4 differ by at most t wo, i.e., | M + | ≤ | M − | + 2 . W e note here that if | M + | = | M − | + 2 , then D ′ and D ′′ m ust b e o dd paths. Thus, ⌊ α ∗ ⌋ ≤ | M − | + 1 (as in ( 4 )), with equalit y holding only if D ′ and D ′′ are o dd paths. As in the previous case, w e consider the line of equation x R = k R , whic h intersects the b oundary of π ( F ) at precisely tw o p oin ts ( k R , k ′ B ) and ( k R , k ′′ B ) , with k ′ B < k ′′ B . Without loss of generalit y , ( k R , k ′ B ) is on the segmen t p M 1 p M 2 and ( k R , k ′′ B ) is on the segment p M i p M j , where ( i, j ) ∈ { (2 , 3) , (3 , 4) } . By arguing as in the previous case, w e obtain a matc hing M ′ that has k R red edges and at most ⌈ k ′ B ⌉ blue edges, and satisfies | M ′ | ≥ min {| M 1 | , | M 2 |} − 1 . Similarly , we can construct a matc hing M ′′ that has k R red edges and at least ⌈ k ′′ B ⌉ − 1 blue edges, and satisfies | M ′′ | ≥ min {| M i | , | M j |} − 1 . Note that M ′ coincides with M 1 and M 2 outside of D ′ . Similarly , if ( i, j ) = (2 , 3) (resp., ( i, j ) = (3 , 4) ), M ′′ coincides with M i and M j outside of D ′′ (resp., D ′ ). Then, as M 1 , . . . , M 4 coincide outside of D ′ ∪ D ′′ , we see that also M ′ , M ′′ coincide outside of D ′ ∪ D ′′ , i.e., M ′ △ M ′′ ⊆ D ′ ∪ D ′′ . F ollowing again the argumen ts of the previous case, from Lemma 19 w e obtain a matching M that meets the color requirement and satisfies | M | ≥ ( min {| M ′ | , | M ′′ |} − 2 ≥ | M − | − 3 if M ′ △ M ′′ con tains a cycle, min {| M ′ | , | M ′′ |} − 1 ≥ | M − | − 2 otherwise. No w, if ⌊ α ∗ ⌋ ≤ | M − | , then | M | ≥ ⌊ α ∗ ⌋ − 3 . Otherwise, as shown ab o ve, ⌊ α ∗ ⌋ = | M − | + 1 and D ′ , D ′′ m ust b e no de-disjoin t o dd paths. 35 As M ′ △ M ′′ ⊆ D ′ ∪ D ′′ , M ′ △ M ′′ con tains no cycles and thus again | M | ≥ ⌊ α ∗ ⌋ − 3 . This concludes the analysis of all cases and th us finishes the pro of. As men tioned at the end of Subsection 2.2 , a weak er version of Theorem 7 can b e obtained b y exploiting the existence of an intersecting pair rather than a crossing pair. In this w eak er v ersion, the num b er of blue edges is allo wed to b e one unit smaller than k B also when Y = ∅ . F urthermore, this is sufficien t to pro ve Theorem 6 . By just going trough all the ab o ve pro ofs again, one can verify that in this relaxed setting Lemma 18 can still b e derived, while Lemma 19 b ecomes w eaker: the num b er of blue edges can only b e guaranteed to b e b etw een k B − 2 and k B . With these results, one obtains a w eaker v ersion of Theorem 3 , where the matching can hav e at most t wo few er blue edges than required. 4 Crossing pairs and the Crossing Lemma In Section 1 we gav e the notion of crossing pair under the assumption that f ∞ divides the plane into tw o connected comp onen ts. Although this is intuitiv ely clear, we provide a formal pro of here. W e then prov e the Crossing Lemma (Lemma 5 ). The classical Jordan curv e theorem asserts that ev ery plane simple closed curv e divides the plane into t wo connected comp onents (a b ounded one and an unbounded one). More formally , if γ : [0 , 1] → R 2 is a con tinuous map suc h that γ (0) = γ (1) and γ | [0 , 1) is injective (or, equiv alently and more concisely , if γ : S 1 → R 2 is a con tinuous injectiv e map, where S 1 is the unit circle), then R 2 \ Im( γ ) consists of t wo connected comp onen ts. A sligh tly different v ersion of this theorem states that every simple closed curv e on the 2-dimensional sphere S 2 divides S 2 in to tw o connected comp onen ts, and is formalized as ab o ve with R 2 replaced by S 2 . W e refer the reader to [ 20 ] for the pro ofs of these results. The follo wing v ariant of the ab ov e theorems is certainly known, and just as in tuitively clear. How ev er, since we were unable to find a reference, we pro vide here a short pro of. Lemma 22. Every c ontinuous inje ctive map γ : R → R 2 such that lim t →±∞ ∥ γ ( t ) ∥ = ∞ divides R 2 into two c onne cte d c omp onents. 36 Pr o of. Since R is homeomorphic to the in terv al (0 , 1) , and R 2 is homeomor- phic to S 2 \ { N } (where N is the north pole) via the stereographic pro- jection, γ is equiv alent to a curv e γ ′ : (0 , 1) → S 2 \ { N } , with the prop erty lim t → 0 γ ′ ( t ) = lim t → 1 γ ′ ( t ) = N . If we extend γ ′ b y setting γ ′ (0) = γ ′ (1) = N , w e obtain a contin uous map γ ′ : [0 , 1] → S 2 suc h that γ ′ | [0 , 1) is injectiv e. W e conclude b y applying the sphere v ersion of Jordan curve theorem. Since, in the assumptions of the Crossing Lemma, f ∞ is an injective map, it is clear that lim t →±∞ ∥ f ∞ ( t ) ∥ = ∞ . Thus, by Lemma 22 , f ∞ divides the plane into tw o connected comp onents, and the notion of crossing pair given in Section 1 is defined prop erly . Remark 23. The notion that g crosses f ∞ can b e easily formalized ev en if f and g are only assumed to b e con tinuous (with f ∞ injectiv e), without requiring them to b e piecewise-linear: one only has to require that g in tersects b oth connected comp onen ts of R 2 \ Im( f ∞ ) . Unfortunately , things b ecome far more delicate when one wan ts to identify a p oint where the crossing happ ens. Indeed, on the one hand, it is clear from the definition that ( u, v ) is a crossing pair for ( f ∞ , g ) if and only if, informally sp eaking and ignoring p ossible o verlappings, v is the p oint where g leav es one comp onent of R 2 \ Im( f ∞ ) and en ters the other comp onen t; thus, the term “crossing” app ears to b e appropriate. On the other hand, how ever, the situation is not alw ays so clear: for instance, there are examples where f ∞ ( u ) = g ( v ) but, for every ε > 0 , each of g (( v − ε, v )) and g (( v , v + ε )) intersects b oth comp onents of R 2 \ Im( f ∞ ) . In this situation, it is not even clear if one would say that g crosses f ∞ there. But for piecewise-linear functions, our definition precisely matc hes the in tuitiv e notion of crossing. W e are ready to prov e the Crossing Lemma, which w e restate here. Lemma ( 5 , restated) . L et f : [0 , τ ] → R 2 b e a c ontinuous pie c ewise-line ar map such that f ∞ is inje ctive, and let q b e a p oint on the se gment b etwe en f (0) and f ( τ ) such that q ∈ Im( f ) . Then ther e exists a cr ossing p air ( u, v ) for ( f ∞ , f + q − f (0)) such that v < u < v + τ . Pr o of. W e use the notation f ( t ) = ( f 1 ( t ) , f 2 ( t )) to sp ecify the comp onen ts of f ( t ) . Moreov er, w e define the map g := f + q − f (0) . Claim 24. The lemma holds in gener al if it holds whenever al l the fol lowing additional c onditions ar e satisfie d: f (0) = (0 , 0) , f 1 ( τ ) > 0 , f 2 ( τ ) = 0 , and min t ∈ [0 ,τ ] f 2 ( t ) = min t ∈ R f ∞ 2 ( t ) = 0 . 37 Pr o of of claim. Since all the properties inv olved in the statemen t of the lemma are inv arian t under isometries, and since f (0) = f ( τ ) b y injectivity , w e can assume without loss of generality that f 2 (0) = f 2 ( τ ) and f 1 (0) < f 1 ( τ ) (by applying a rotation), min t ∈ [0 ,τ ] f 2 ( t ) = min t ∈ R f ∞ 2 ( t ) = 0 (v ertical translation), and f ( a ) = (0 , 0) for some a ∈ [0 , τ ) (horizontal translation). It remains to show that w e can further assume a = 0 . Define ˜ f , ˜ g : R → R 2 b y setting ˜ f ( t ) = f ∞ ( t + a ) and ˜ g ( t ) = g ∞ ( t + a ) for t ∈ R . Note that ˜ f (0) = (0 , 0) , ˜ f 1 ( τ ) = f 1 ( τ ) − f 1 (0) > 0 , ˜ f 2 ( τ ) = 0 , and min t ∈ R ˜ f 2 ( t ) = 0 . Thus, the restriction ˜ f | [0 ,τ ] and the point ˜ q := q − f (0) satisfy all the assumptions of b oth the lemma and the claim. Assuming that the lemma holds when all these conditions are met, and noting that ˜ f | [0 ,τ ] ∞ = ˜ f , there is a crossing pair ( ˜ u, ˜ v ) for ( ˜ f , ˜ g | [0 ,τ ] ) such that ˜ v < ˜ u < ˜ v + τ . No w, if ˜ v + a < τ , setting u = ˜ u + a and v = ˜ v + a giv es v < u < v + τ ; sin ce the tw o comp onen ts of R 2 determined b y ˜ f are the same as those determined by f ∞ , ( u, v ) is the desired crossing pair for ( f ∞ , g ) . If ˜ v + a > τ , by p erio dicity w e can take u = ˜ u + a − τ and v = ˜ v + a − τ . T o conclude, we sho w that the case ˜ v + a = τ is imp ossible. Indeed, if ˜ v + a = τ then g ( τ ) = ˜ g ( ˜ v ) = ˜ f ( ˜ u ) = f ( τ ) − f (0) + f ( ˜ u + a − τ ) , where the first equality follo ws from the definition of ˜ g and the fact that 0 < ˜ v < τ , the second one holds b ecause ( ˜ u, ˜ v ) is a crossing pair for ( ˜ f , ˜ g | [0 ,τ ] ) , and the third one is by definition of ˜ f and the fact that τ < ˜ u + a < 2 τ (as ˜ v < ˜ u < ˜ v + τ ). It follows that q = g ( τ ) − f ( τ ) + f (0) = f ( ˜ u + a − τ ) , con tradicting the assumption q ∈ Im( f ) . ⋄ In the remainder of the pro of, w e assume that the prop erties of Claim 24 are satisfied. In particular, this implies that q 2 = 0 and f ∞ 2 ( k τ ) = 0 for eac h k ∈ Z . Claim 25. If t 1 , t 2 ∈ R satisfy t 1 < t 2 and f ∞ 2 ( t 1 ) = f ∞ 2 ( t 2 ) = 0 , then f ∞ 1 ( t 1 ) < f ∞ 1 ( t 2 ) . Pr o of of claim. Since min t ∈ R f ∞ 2 ( t ) = 0 , if f ∞ 2 ( ¯ t ) = 0 for some ¯ t that is not a breakpoint of f ∞ , then f ∞ 2 ( t ) = 0 for ev ery t b et ween the tw o breakp oints immediately preceding and following ¯ t . Therefore, it suffices to prov e the claim under the assumption that t 1 and t 2 are b oth breakp oints. If the claim do es not hold, then there exist breakp oin ts t 1 and t 2 suc h that t 1 < t 2 , f ∞ 2 ( t 1 ) = f ∞ 2 ( t 2 ) = 0 , and f ∞ 1 ( t 1 ) > f ∞ 1 ( t 2 ) (where the last 38 inequalit y is strict by the injectivit y of f ∞ ). Since f ∞ 1 (0) < f ∞ 1 ( τ ) , t 0 := t 2 − τ satisfies f ∞ 2 ( t 0 ) = 0 and f ∞ 1 ( t 0 ) < f ∞ 1 ( t 2 ) . Now, define a closed curv e γ b y concatenating the following tw o pieces: (i) f ∞ ([ t 0 , t 1 ]) ; (ii) any arc joining f ∞ ( t 1 ) and f ∞ ( t 0 ) fully con tained in the halfplane x 2 < 0 , except for its extreme p oints. By Jordan’s theorem, γ divides the plane in to tw o connected comp onen ts —a b ounded one and an unbounded one. The p oint f ∞ ( t 2 ) is in the b ounded region. If w e take any t 3 > t 2 suc h that f ∞ ( t 3 ) is in the un b ounded region, the curve f ∞ ([ t 2 , t 3 ]) must cross γ . As f ∞ 2 ( t ) ≥ 0 for ev ery t , f ∞ ([ t 2 , t 3 ]) crosses the piece (i) of γ (i.e., f ∞ ([ t 0 , t 1 ]) ), con tradicting the injectivit y of f ∞ . ⋄ Giv en any t w o breakp oin ts t 1 , t 2 of f ∞ suc h that t 1 < t 2 , f ∞ 2 ( t 1 ) = f ∞ 2 ( t 2 ) = 0 and f ∞ 2 ( t ) > 0 for every br e akp oint t ∈ ( t 1 , t 2 ) , we construct a closed curve by concatenating the follo wing t w o pieces: (i) f ∞ ([ t 1 , t 2 ]) ; (ii) an y arc joining f ∞ ( t 2 ) and f ∞ ( t 1 ) fully contained in the halfplane x 2 < 0 and in the v ertical strip f ∞ 1 ( t 1 ) < x 1 < f ∞ 1 ( t 2 ) , except for its extreme p oin ts. W e call bubble the top ologically closed b ounded region determined b y this closed curve. W e say that (i) is the upp er b oundary of the bubble. Note that either f ∞ 2 ( t ) > 0 for ev ery t ∈ ( t 1 , t 2 ) or f ∞ 2 ( t ) = 0 for ev ery t ∈ [ t 1 , t 2 ] . In the former case w e sa y that the bubble is fat , in the latter case w e call it slim . The p oin ts f ∞ ( t 1 ) and f ∞ ( t 2 ) are resp ectively the left and right extreme of the bubble. By the previous claim and the injectivity of f ∞ , tw o distinct bubbles share at most one p oin t, and if they share a p oint, this is an extreme of both of them. The bubbles are naturally ordered from left to righ t, based on the p osition of their extremes. Before pro ceeding, we need the follo wing fact: Claim 26. L et I ⊆ R and J ⊆ [0 , τ ] b e two close d intervals that c oincide mo dulo τ (i.e., { z mo d τ : z ∈ I } = { z mo d τ : z ∈ J } ) , wher e J c ontains 0 or τ , and define Z f ,I = f ∞ ( I ) ∩ { x ∈ R 2 : x 2 = 0 } , Z g ,J = g ( J ) ∩ { x ∈ R 2 : x 2 = 0 } . Then Z f ,I ⊆ Z g ,J . Pr o of of claim. T o simplify the notation, in this pro of we write Z f and Z g for Z f ,I and Z g ,J , respectively . Since Z f and Z g are con tained in the x 1 axis, w e will ignore the second comp onent and view these sets as subsets of R . It will also b e useful to embed these sets in R /a Z (the circle of length a ), where a = f 1 ( τ ) − f 1 (0) = f 1 ( τ ) . Thus, giv en a num b er w ∈ R , we write [ w ] to denote w mo d a ; similarly , for a subset S ⊆ R , w e write [ S ] = { [ w ] : w ∈ S } . 39 Assume by contradiction Z f ⊆ Z g , which implies [ Z f ] ⊆ [ Z g ] . As I = J mo dulo τ and g ( t ) = f ( t ) + q for every t ∈ [0 , τ ] , w e ha ve [ Z g ] = [ Z f + q 1 ] and therefore [ Z f ] ⊆ [ Z f + q 1 ] . Since [ Z f ] and [ Z f + q 1 ] hav e the same 1-dimensional measure in R /a Z , this implies that [ Z f + q 1 ] \ [ Z f ] has zero measure in R /a Z . Then, as Z f is a finite union of (p ossibly degenerate) closed interv als, [ Z f + q 1 ] \ [ Z f ] can only con tain some isolated p oints. But the num b er of isolated p oints in [ Z f ] and [ Z f + q 1 ] is the same, so the tw o sets coincide. Th us [ Z f ] = [ Z g ] . Since J contains 0 or τ and [ q 1 ] = [ g 1 (0)] = [ g 1 ( τ )] , this implies that [ q 1 ] ∈ [ Z f ] . In other words, also using q 2 = 0 , there are some t ∈ I and k ∈ Z such that f ∞ ( t ) = q + k ( a, 0) = q + k f ( τ ) . Since f ∞ 2 ( k τ ) = f ∞ 2 (( k + 1) τ ) = 0 , by Claim 25 we find that t ∈ [ k τ , ( k + 1) τ ] , th us, by definition of f ∞ , q ∈ f ([0 , τ ]) . This contradicts the assumptions of the lemma. ⋄ Claim 27. Ther e exists a cr ossing p air ( u, v ) for ( f ∞ , g ) with 0 < u < 2 τ . Pr o of of claim. Since g (0) = q / ∈ f ([0 , τ ]) , g (0) is in the interior of a fat bubble; due to the p erio dicit y of f ∞ , g ( τ ) is also in the interior of a fat bubble. Let B 0 b e the bubble con taining g (0) , and order the subsequent bubbles from left to righ t as B 1 , . . . , B k , where B k con tains g ( τ ) . Clearly , k ≥ 1 . Since g 1 (0) > f ∞ 1 (0) , g 1 ( τ ) < f ∞ 1 (2 τ ) , and f ∞ 2 (0) = f ∞ 2 (2 τ ) = 0 , the upp er b oundaries of B 0 , . . . , B k are con tained in f ∞ ([0 , 2 τ ]) . Assume by contradiction that there is no crossing pair ( u, v ) for ( f ∞ , g ) with 0 < u < 2 τ . Then g can cross the b oundary of the bubbles B 0 , . . . , B k only at their extremes. F urthermore, b y Claim 25 (which also applies to g b ecause g is obtained b y translating f ), Im( g ) cannot contain the left extreme of B 0 . This implies that g goes through all the bubbles B 0 , . . . , B k in this order. In particular, Im( g ) con tains the right extreme of each of B 0 , . . . , B k − 1 , and if B i s a slim bubble for some i ∈ { 1 , . . . , k − 1 } then Im( g ) contains the segmen t joining its extremes. T o v erify that this is not p ossible, we now rephrase the ab ov e prop erty . Let p b e any point on the upp er b oundary of B 0 , where p is not an extreme of B 0 , and let s b e suc h that f ∞ ( s ) = p . Note that f ∞ ( s + τ ) is on the upp er b oundary of B k . Then, defining I = [ s, s + τ ] and J = [0 , τ ] , and using the notation of Claim 26 , the prop ert y stated in the previous paragraph can b e expressed as Z f ,I ⊆ Z g ,J , whic h con tradicts Claim 26 . ⋄ Claim 28. If ther e is no cr ossing p air ( u, v ) for ( f ∞ , g ) with v < u ≤ τ , then ther e is a cr ossing p air with τ < u < 2 τ . 40 Pr o of of claim. Assume by contradiction that no crossing pair satisfies v < u ≤ τ or τ < u < 2 τ . Then every crossing pair with 0 < u < 2 τ also satisfies u ≤ v . By Claim 27 , there exists a crossing pair with this prop ert y , and we c ho ose the one maximizing u . Consider the list of consecutive bubbles B 0 , . . . , B k , where the upp er b oundary of B 0 con tains f ∞ ( u ) = g ( v ) , and B k is the (fat) bubble con- taining g ( τ ) in its interior. In case u is a breakp oint with f ∞ 2 ( u ) = 0 (i.e., f ∞ ( u ) is an extreme of tw o bubbles), we n um b er the bubbles so that f ∞ ( u ) is an extreme of b oth B 0 and B 1 . Note that k ≥ 1 , b ecause the right extreme of B 0 is at most τ (as u ≤ v < τ ) and the left extreme of B k is at least τ (as g 1 ( τ ) > f ∞ 1 ( τ ) ). By Claim 25 and the fact that g ( τ ) b elongs to the segmen t joining f ∞ ( τ ) and f ∞ (2 τ ) , the breakp oin ts of f ∞ delimiting B k b elong to the in- terv al [ τ , 2 τ ] . Therefore the upper b oundaries of B 1 , . . . , B k are con tained in f ∞ ([ u, 2 τ ]) . F urthermore, b y the maximalit y of u , g do es not cross f ∞ | ( u, 2 τ ) . Then g can only enter and leav e the bubbles B 1 , . . . , B k at their extremes. In particular, as g ( τ ) is in B k , g en ters B k at one of its extremes. Ho w ev er, Claim 25 applied to g implies that g en ters B k at its left extreme. By pro- ceeding bac kwards, we see that g go es through all the bubbles B 1 , . . . , B k in this order. In particular, for ev ery t ∈ [ u, τ ] suc h that f ∞ 2 ( t ) = 0 there exists t ′ ∈ [ v , τ ] ⊆ [ u, τ ] suc h that g ( t ′ ) = f ∞ ( t ) . This contradicts Claim 26 with I = J = [ u, τ ] . ⋄ A symmetric argument sho ws the following: Claim 29. If ther e is no cr ossing p air ( u, v ) for ( f ∞ , g ) with τ ≤ u < v + τ , then ther e is a cr ossing p air with 0 < u < τ . Pr o of of claim. Assume that no crossing pair satisfies τ ≤ u < v + τ or 0 < u < τ . Then every crossing pair with 0 < u < 2 τ also satisfies u ≥ v + τ . By Claim 27 , there exists a crossing pair with this prop ert y , and we choose the one minimizing u . Consider the list of consecutiv e bubbles B 0 , . . . , B k , where B 0 is the (fat) bubble containing g (0) in its interior, and the upp er b oundary of B k con tains f ∞ ( u ) = g ( v ) . In case u is a breakp oin t with f ∞ 2 ( u ) = 0 , w e num b er the bubbles so that f ∞ ( u ) is an extreme of both B k − 1 and B k . Note that k ≥ 1 , b ecause the right extreme of B 0 is at most τ (as g 1 (0) < f ∞ 1 ( τ ) ) and the left extreme of B k is at least τ (as u ≥ v + τ > τ ). 41 Since the breakp oints of f ∞ delimiting B 0 b elong to the interv al [0 , τ ] , the upp er b oundaries of B 0 , . . . , B k − 1 are con tained in f ∞ ([0 , u ]) . F urthermore, b y the minimalit y of u , g do es not cross f ∞ | (0 ,u ) . Then g can only en ter and lea v e the bubbles B 0 , . . . , B k − 1 at their extremes. Therefore, as g (0) is in B 0 , g leav es B 0 at its righ t extreme and then goes through all the bubbles B 1 , . . . , B k − 1 in this order. In particular, for ev ery t ∈ [ τ , u ] suc h that f ∞ 2 ( t ) = 0 there exists t ′ ∈ [0 , v ] ⊆ [0 , u − τ ] such that g ( t ′ ) = f ∞ ( t ) . This con tradicts Claim 26 with I = [ τ , u ] and J = [0 , u − τ ] . ⋄ No w, if there is a crossing pair with v < u ≤ τ or τ ≤ u < v + τ , then w e are done, as the inequalities v < u < v + τ are satisfied. Th us, we assume that this is not the case. Then, by the t wo claims ab ov e, there are tw o crossing pairs ( u, v ) and ( u ′ , v ′ ) with 0 < u < τ < u ′ < 2 τ , and we c ho ose them with u maximal and u ′ minimal. It follows that g do es not cross f ∞ | [ u,u ′ ] . If v < u or u ′ < v ′ + τ , we are done again. Therefore in the following w e assume v ≥ u and u ′ ≥ v ′ + τ . Note further that since u < u ′ , the tw o crossing pairs do not coincide, and thus w e also hav e v = v ′ . Assume first that v ′ < v , and let ( ¯ u, ¯ v ) b e the intersecting pair for ( f ∞ , g ) with τ < ¯ u ≤ u ′ , 0 < ¯ v ≤ v ′ , and ¯ v minimal with resp ect to these properties. (This is well defined, as in the worst case one has ( ¯ u, ¯ v ) = ( u ′ , v ′ ) .) Let γ b e the curv e obtained b y concatenating g ([0 , ¯ v ]) , f ∞ ([ τ , ¯ u ]) , and an arc joining f ∞ ( τ ) and g (0) con tained in the halfplane x 2 < 0 , except for its extremes (see Figure 9 ). This is a closed curve b ecause f ∞ ( ¯ u ) = g ( ¯ v ) , and it is simple by the minimality of ¯ v . F or ε > 0 sufficiently small, f ∞ ( τ − ε ) is in the b ounded region delimited b y γ , otherwise f ∞ ([0 , τ ]) would in tersect f ∞ ([ ¯ u, 2 τ ]) , con tradicting the injectivity of f ∞ . Because g do es not cross f ∞ | [ u,u ′ ] , this implies that f ∞ | [ u,τ ] is en tirely contained in this b ounded region, and therefore so is, in particular, the p oin t f ∞ ( u ) = g ( v ) . On the other hand, g ( τ ) is in the unbounded region, b ecause g 1 ( τ ) > f ∞ 1 ( τ ) . Th us g | [ v ,τ ] m ust cross γ , which is not p ossible since g is injective (b ecause so is f and g is a translation of f ) and do es not cross f ∞ | [ u,u ′ ] . Assume no w that v < v ′ . Let γ b e the simple closed curve obtained by gluing together g ([0 , τ ]) and an arc joining g (0) and g ( τ ) contained in the halfplane x 2 < 0 , except for its extremes. W e assign to γ the orien tation induced by g . Thus, as g 1 (0) < g 1 ( τ ) , γ is oriented clo c kwise, which means that the bounded (resp., unbounded) region lies on the righ t (resp., left) side of γ . Since g does not cross f ∞ | [ u,u ′ ] , we hav e that f ∞ ([ u, u ′ ]) is fully con tained in either the b ounded or the un b ounded region, where w e consider 42 x 2 g (0) f ( τ ) g ( τ ) g (0) f ∞ ( u ) = g ( v ) f ∞ ( ¯ u ) = g ( ¯ v ) Figure 9: Case v ′ < v of the pro of of Lemma 5 . The relev ant pieces of f ∞ (resp., g ) are shown in blac k (resp., red), while γ is sho wn in yello w. these as closed regions (i.e., we include γ in b oth of them). W e analyze these t wo cases separately . • Supp ose first that f ∞ ([ u, u ′ ]) lies in the un b ounded region delimited by γ . Given an y t ∈ [ u, u ′ ] such that g 1 (0) < f ∞ 1 ( t ) < g 1 ( τ ) and f ∞ 2 ( t ) = 0 , the curve g must contain the p oint f ∞ ( t ) , otherwise f ∞ ( t ) would b e in the in terior of the bounded region. In particular, this is true for t = τ , and w e let s ∈ [0 , τ ] b e suc h that g ( s ) = f ∞ ( τ ) . Note that s = v , as g ( v ) = f ∞ ( u ) and u = τ . If s < v (i.e., g passes through f ∞ ( τ ) b efore reaching g ( v ) = f ∞ ( u ) ), then g must go through all the bubbles formed b y f ∞ | [ τ ,u ′ ] b efore reach- ing g ( v ) . This implies that g ([ s, v ]) contains all the p oints of f ∞ ([ τ , u ′ ]) that lie on the x 1 axis. As s ≥ 0 and v < v ′ ≤ u ′ − τ , the latter still holds if g ([ s, v ]) is replaced b y g ([0 , u ′ − τ ]) . This con tradicts Claim 26 with I = [ τ , u ′ ] and J = [0 , u ′ − τ ] . Otherwise, when s > v (i.e., g passes through g ( v ) = f ∞ ( u ) b efore reac hing f ∞ ( τ ) ), after visiting g ( v ) , g m ust go through all the bubbles formed b y f ∞ | [ u,τ ] b efore reaching f ∞ ( τ ) , and then must go through all the bubbles formed by f ∞ | [ τ ,u ′ ] b efore reac hing g ( v ′ ) = f ∞ ( u ′ ) . Th us, g ([ v , v ′ ]) (and therefore also g ([0 , τ ]) ) con tain s all the p oin ts of f ∞ ([ u, u ′ ]) that lie on the x 1 axis. As u + τ ≤ v + τ < v ′ + τ ≤ u ′ , the latter still holds if f ∞ ([ u, u ′ ]) is replaced by f ∞ ([ u, u + τ ]) . This con tradicts Claim 26 with I = [0 , τ ] and J = [ u, u + τ ] . • Supp ose no w that f ∞ ([ u, u ′ ]) lies in the b ounded region delimited by γ . As ab ov e, u + τ < u ′ , and th us f ∞ ( u + τ ) is in the b ounded region. 43 Note that f ∞ ( u + τ ) = g ∞ ( v + τ ) b y the p erio dicity of f ∞ and g ∞ . Since g ∞ is injective (as it is a translation of f ∞ , whic h is injective), f ∞ ( u + τ ) = g ∞ ( v + τ ) lies in the interior of the b ounded region, and th us, as lim t →±∞ ∥ g ∞ ( t ) ∥ = ∞ , g ∞ m ust enter and lea v e the b ounded region, i.e., g ∞ m ust cross γ . This implies that g ∞ is not injectiv e, a con tradiction. This concludes the pro of of the Crossing Lemma. 5 Op en questions and p ossible extensions The main result of this pap er (Theorem 3 ) gives a deterministic algorithm that, for an y instance of the red-blue-y ellow matc hing problem, returns a matc hing that satisfies exactly one color requiremen t (say red) and almost exactly another color requiremen t (i.e., missing at most one blue edge), and has large size (i.e., a large num b er of yello w edges), provided that the asso- ciated LP is feasible. This lea ves a n umber of questions op en. First, the asso ciated LP tells us something ab out the matc hings that satisfy exactly b oth color constraints: if it has optimal v alue α ∗ , then this is an upper b ound on the size of an y suc h matc hing, and if instead the LP is not feasible, then no suc h matching exists. How ev er, solving this LP do es not say anything ab out the existence of matchings satisfying the red constrain t exactly and missing one blue edge. This dra wback lies at the heart of the difficulty of solving similar problems (including the original red- blue matc hing problem) via linear programming approac hes, whic h fo cus on matchings that are “close” to the optimal fractional solution and ignore further, p otentially b etter solutions. W e stress that problems such as deciding whether tw o matc hings are at distance tw o in the matc hing p olytop e are NP- complete even for bipartite graphs, see, for instance, [ 21 ]. W e b eliev e that the difficulty in “navigating” the matching p olytop e is a fundamen tal barrier that deterministic approaches would hav e to o vercome in order to solve the red-blue matc hing problem. Second, one can wonder whether the low er b ound on the size of the match- ing obtained by our algorithm can b e improv ed. Giv en that the b ounds in some of the intermediate results (Theorem 6 , Lemma 19 ) are b est p ossible, impro ving Theorem 3 w ould require either applying these results in a radi- cally different w ay , or, w e susp ect, completely new techniques. In particular, 44 instead of studying pairs of matchings in the face containing the optimal fractional solution as in the pro of of Theorem 3 , it would b e in teresting to directly consider the union of all suc h matc hings: in the most interesting case, the instance obtained is a 3-regular graph that is uniquely 3-edge col- orable. What can w e sa y ab out large, colored matc hings in those graphs? This leads us to the simplest non-trivial version of the red-blue matc hing problem: does it admit a deterministic algorithm if we restrict the input graph to b e 3-regular, or even uniquely 3-edge-colorable? Finally , it is natural to try to extend our results to the setting of h -colored graphs, for a constant h ≥ 4 . By applying the results from [ 15 ] in a similar w ay as describ ed at the end of Section 1 , one can get a matching that is not to o far aw ay from the optimal solution in terms of size and color requirements; ho wev er, the error gro ws roughly as h 2 . By a refining similar to that done in this pap er, one migh t b e able to obtain an analogue of Theorem 3 where, after solving a single LP , one gets a matching that is reasonably close to the optimum and almost satisfies all color requiremen ts. T o this end, w e form ulate the following conjecture, that can b e seen as a generalization of Theorem 7 . T o a set of edges M that is colored with (at most) h colors, we asso ciate a vector p M ∈ Z h + whose i -th co ordinate is the n umber of edges of color i in M . Notice that this sligh tly differs from the notation used in the rest of the pap er: before we had h = 3 but only considered tw o co ordinates (red and blue). How ever, it is easy to see that, for h = 3 , the following statemen t is implied by Theorem 7 : Conjecture 30. L et G b e a cycle of length 2 ℓ c olor e d with h c olors, and denote by M 0 , M 1 the p erfe ct matchings of even and o dd e dges, r esp e ctively. L et k ∈ Z h b e a p oint on the se gment b etwe en p M 0 and p M 1 . Then, ther e is matching M of size at le ast ℓ − h + 2 such that p M ≤ k (c omp onent-wise) and ∥ p M − k ∥ 1 ≤ h − 2 . If the conjecture is true, it could b e conceiv able to prov e a close analogue of Theorem 3 for a general constant n um b er of colors. W e recall that for the budgeted version of the problem, where color re- quiremen ts are replaced by (a constant num b er of ) general linear inequalities, p olynomial-time appro ximation sc hemes are known ([ 14 , 15 ]). In particular, [ 15 ] uses a geometrical existence result from Stromquist and W o o dal [ 22 ], coming from the Ham Sandwic h Theorem, that seems to serve a similar role as our Crossing Lemma (Lemma 5 ), and could help in our setting as well. As a first step in this direction, we observ e that the following holds: 45 Lemma 31. 6 L et S b e a cyclic se quenc e of c olors chosen fr om a set of d ≥ 2 c olors, and let k ∈ Z d b e a p oint in the se gment b etwe en the origin and p S . Then S c ontains a set S ′ that is the union of d − 1 intervals and satisfies p S ′ = k . T o prov e the ab ov e result, we use the following theorem. (W e call cir cle a nondegenerate closed in terv al with its endp oint iden tified. Below, it is im- plicit that all measures on a circle C are defined at least on the Borel subsets of C , with resp ect to its standard top ology . Also, recall that a probabilit y measure µ is non-atomic if µ ( { x } ) = 0 for an y x .) Theorem 32 (Stromquist and W o o dal [ 22 ]) . L et d ≥ 2 and let µ 1 , . . . , µ d , b e non-atomic pr ob ability me asur es on a cir cle C . F or e ach λ ∈ [0 , 1] , ther e exists a subset K ⊆ C that is the union of at most d − 1 intervals and satisfies µ i ( K ) = λ for e ach i = 1 , . . . , d . Pr o of of L emma 31 . Denote by n the length of S and by n i the n um b er of elemen ts of S that ha ve color i , for eac h i ∈ { 1 , . . . , d } . In other words, n i is the i -th comp onen t of p S . Without loss of generality , w e assume n i ≥ 1 for eac h i . Let C b e the circle of length n . W e partition C into n sub-interv als I 1 , . . . , I n of unit length, where each I j is colored as the j -th elemen t of S . F or each color i ∈ { 1 , . . . , d } , let µ i b e the measure on C such that µ i ( X ) is the length of the p ortion of X that has color i (i.e., the length of the i n tersection of X with the union of interv als of color i ). Eac h µ i is clearly a non-atomic measure, and ˜ µ i := µ i /n i is a non-atomic probabilit y measure. If λ ∈ [0 , 1] is such that k = λp S , Theorem 32 gives a subset K ⊆ C that is the union of at most d − 1 interv als and satisfies ˜ µ i ( K ) = λ for eac h i . Thus, µ i ( K ) = n i λ = k i . No w, w e could just take S ′ = { j ∈ S : I j ⊆ K } and w e would b e done if each I j w ere either disjoint from K or contained in K . How ev er, this prop ert y is easily attainable. Indeed, whenev er one of the interv als that form K starts or ends with a prop er p ortion of a sub-interv al I j , say of color i , the in tegrality of k i implies that there are other sub-in terv als of color i that are only partially con tained in K . Remo ving all these sub-in terv als and including all of I j in K do es not increase the n umber of interv als that form K , while preserving the color coun t. Iterating this, w e obtain the aforementioned prop ert y and th us our desired set S ′ . 6 F or h = 2 , this statemen t app ears to b e similar in spirit to the Cycle Lemma [ 23 ]. 46 Lemma 31 implies the v alidity of Conjecture 30 in the sp ecial case where all edges of M 0 ha ve colors 1 , . . . , h − 1 and all edges of M 1 ha ve color h . Indeed, applying Lemma 31 to the sequence of colors in M 0 (with d = h − 1 and k restricted to the first d co ordinates) gives a subset of M 0 with the desired colors. This corresp onds to the union of at most h − 2 paths in G , and by considering the symmetric difference b etw een M 1 and all these paths w e obtain a matching M satisfying Conjecture 30 . A c kno wledgemen ts. The authors are deeply indebted to Mic hele Conforti for helpful discussions that ignited and n urtured the pro ject. W e are also grateful to tw o anonymous review ers for their careful reading of this rather tec hnical w ork. Their useful suggestions impro v ed the presen tation of the pap er. This work has b een partially funded b y the SID pro ject “Net work opti- mization problems under extra constraints” un der the BIRD 2024 program sp onsored by the Univ ersity of P adua. The work of M. Di Summa has b een partially funded b y the Europ ean Union - NextGenerationEU under the National Reco very and Resilience Plan (NRRP), Mission 4 Comp onen t 2 Inv estment 1.1 - Call PRIN 2022 No. 104 of F ebruary 2, 2022 of Italian Ministry of Universit y and Researc h; Pro ject 2022BMBW2A (sub ject area: PE - Physical Sciences and Engineer- ing) “Large-scale optimization for sustainable and resilient energy system”, CUP I53D23002310006. References [1] J. Edmonds. “ Paths, trees, and flow ers”. In: Canadian Journal of Math- ematics 17 (1965), pp. 449–467. doi : 10.4153/CJM- 1965- 045- 4 . [2] C. H. Papadimitriou and M. Y annak akis. “ The complexity of restricted spanning tree problems”. In: Journal of the ACM (JA CM) 29.2 (1982), pp. 285–309. doi : 10.1145/322307.322309 . [3] K. Mulm uley, U. V. V azirani, and V. V. V azirani. “ Matc hing is as easy as matrix inv ersion”. In: Combinatoric a 7.1 (1987), pp. 105–113. doi : 10.1007/BF02579206 . 47 [4] R. Y uster. “ Almost exact matc hings”. In: Algorithmic a 63 (2012), pp. 39– 50. doi : 10.1007/978- 3- 540- 74208- 1_21 . [5] R. Gurjar, A. Ko rw ar, J. Messner, and T. Thierauf. “ Exact p erfect matc hing in complete graphs”. In: ACM T r ansactions on Computation The ory (TOCT) 9.2 (2017), pp. 1–20. doi : 10.1145/3041402 . [6] N. El Maalouly. “ Exact Matc hing: Algorithms and Related Problems”. In: 40th International Symp osium on The or etic al Asp e cts of Computer Scienc e (ST A CS 2023) . 2023, 29:1–29:17. doi : 10 . 4230 / LIPIcs . STACS.2023.29 . [7] V. Kabanets and R. Impagliazzo. “ Derandomizing polynomial identit y tests means proving circuit lo wer b ounds”. In: Pr o c e e dings of the thirty- fifth annual ACM symp osium on The ory of c omputing . 2003, pp. 355– 364. doi : 10.1145/780542.780595 . [8] A. Dürr, N. El Maalouly, and L. W ulf. “ An Appro ximation Algorithm for the Exact Matc hing Problem in Bipartite Graphs”. In: Appr oxi- mation, R andomization, and Combinatorial Optimization. Algorithms and T e chniques (APPR OX/RANDOM 2023) . 2023, 18:1–18:21. doi : 10.4230/LIPIcs.APPROX/RANDOM.2023.18 . [9] M. Aprile, S. Fiorini, G. Joret, S. Kober, M. T. Seweryn, S. W eltge, and Y. Y uditsky . “ In teger programs with nearly totally unimodular matrices: the cographic case”. In: Pr o c e e dings of the 2025 Annual ACM- SIAM Symp osium on Discr ete Algorithms (SOD A) . SIAM. 2025, pp. 2301– 2312. doi : 10.1137/1.9781611977912.91 . [10] P . M. Camerini, G. Galbiati, and F. Maffioli. “ Random pseudo-p olynomial algorithms for exact matroid problems”. In: Journal of Algorithms 13.2 (1992), pp. 258–273. doi : 10.1016/0196- 6774(92)90018- 8 . [11] M. Nägele, R. San tiago, and R. Zenklusen. “ Congruency-constrained TU problems b eyond the bimo dular case”. In: Mathematics of Op er a- tions R ese ar ch 49.3 (2024), pp. 1303–1348. doi : 10.1287/moor.2023. 1381 . [12] M. Nägele, C. Nöb el, R. Santiago, and R. Zenklusen. “ Adv ances on strictly ∆ -mo dular IPs”. In: Mathematic al Pr o gr amming (2024), pp. 1– 30. doi : 10.1007/s10107- 024- 02148- 2 . 48 [13] F. Grandoni and R. Zenklusen. “ Approximation sc hemes for multi- budgeted indep endence systems”. In: Eur op e an Symp osium on A lgo- rithms . Springer. 2010, pp. 536–548. doi : 10.1007/978- 3- 642- 15775- 2_46 . [14] C. Chekuri, J. V ondrák, and R. Zenklusen. “ Multi-budgeted matc h- ings and matroid intersection via dep enden t rounding”. In: Pr o c e e dings of the twenty-se c ond annual A CM-SIAM symp osium on Discr ete Algo- rithms . SIAM. 2011, pp. 1080–1097. doi : 10.1137/1.9781611973082. 82 . [15] F. Grandoni, R. Ra vi, M. Singh, and R. Zenklusen. “ New approaches to multi-ob jective optimization”. In: Mathematic al Pr o gr amming 146 (2014), pp. 525–554. doi : 10.1007/s10107- 013- 0703- 7 . [16] I. Doron-Arad, A. Kulik, and H. Shachnai. “ An EPT AS for Budgeted Matc hing and Budgeted Matroid In tersection via Represen tative Sets”. In: International Col lo quium on Automata, L anguages and Pr o gr am- ming . 2023, 49:1–49:16. doi : 10.4230/LIPIcs.ICALP.2023.49 . [17] J. Edmonds. “ Maxim um matc hing and a p olyhedron with 0,1-v ertices”. In: Journal of R ese ar ch of the National Bur e au of Standar ds B 69.1-2 (1965), pp. 125–130. doi : 10.6028/jres.069B.013 . [18] C.-Q. Zhang. “ Hamiltonian weigh ts and unique 3-edge-colorings of cu- bic graphs”. In: Journal of Gr aph The ory 20.1 (1995), pp. 91–99. doi : 10.1002/jgt.3190200110 . [19] C.-Q. Zhang. “ On strong 1-factors and Hamilton w eights of cubic graphs”. In: Discr ete Mathematics 230.1-3 (2001), pp. 143–148. doi : 10 . 1016/ S0012- 365X(00)00077- 7 . [20] J. Munkres. T op olo gy (Se c ond Edition) . P earson New In ternational Edi- tions, 2014. isbn : 978-0131816299. [21] J. Cardinal and R. Steiner. “ Inapproximabilit y of shortest paths on p er- fect matching p olytop es”. In: Mathematic al Pr o gr amming 210.1 (2025), pp. 147–163. doi : 10.1007/s10107- 023- 02025- 4 . [22] W. Stromquist and D. R. W o o dall. “ Sets on which several measures agree”. In: Journal of Mathematic al A nalysis and Applic ations 108.1 (1985), pp. 241–248. doi : 10.1016/0022- 247X(85)90021- 6 . 49 [23] N. Dersho witz and S. Zaks. “ The cycle lemma and some applications”. In: Eur op e an Journal of Combinatorics 11.1 (1990), pp. 35–40. doi : 10.1016/S0195- 6698(13)80053- 4 . 50
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment