How many matchings cover the nodes of a graph?

11/18/2018 ∙ by Dehia Ait Ferhat, et al. ∙ 0

Given an undirected graph, are there k matchings whose union covers all of its nodes, that is, a matching-k-cover? A first, easy polynomial solution from matroid union is possible, as already observed by Wang, Song and Yuan (Mathematical Programming, 2014). However, it was not satisfactory neither from the algorithmic viewpoint nor for proving graphic theorems, since the corresponding matroid ignores the edges of the graph. We prove here, simply and algorithmically: all nodes of a graph can be covered with k> 2 matchings if and only if for every stable set S we have |S|< k·|N(S)|. When k=1, an exception occurs: this condition is not enough to guarantee the existence of a matching-1-cover, that is, the existence of a perfect matching, in this case Tutte's famous matching theorem (J. London Math. Soc., 1947) provides the right `good' characterization. The condition above then guarantees only that a perfect 2-matching exists, as known from another theorem of Tutte (Proc. Amer. Math. Soc., 1953). Some results are then deduced as consequences with surprisingly simple proofs, using only the level of difficulty of bipartite matchings. We give some generalizations, as well as a solution for minimization if the edge-weights are non-negative, while the edge-cardinality maximization of matching-2-covers turns out to be already NP-hard. We have arrived at this problem as the line graph special case of a model arising for manufacturing integrated circuits with the technology called `Directed Self Assembly'.



There are no comments yet.


page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

In this paper, we consider simple graphs, that is, graphs with no loops or parallel edges. We start with a few definitions and notations.

We denote by a graph with node set and edge set . When no confusion may arise, we denote by and the number of nodes in and the number of edges in respectively.

Given a graph , an edge set covers a node if there is an edge of incident to . A family of edge sets covers the nodes covered by its union. A matching is a pairwise node-disjoint subset of edges; a matching is perfect if it covers A -matching is a collection of node-disjoint edges and circuits; a 2-matching is perfect if it covers A matching--cover is a set of matchings that cover The union of (the edges of) these matchings will also be called a matching--cover. The cardinality or weight (in edge-weighted graphs) of a matching--cover is the cardinality or weight of its edge-set. We denote by the matching number, that is, the size of a maximum matching of the graph .

Given we denote by the set of neighbors of nodes in , that is, . We let denote the set of edges with exactly one extremity in ; is the degree of node ; is the maximum degree. For , denotes the graph induced by , with node set , and all edges of with both end nodes in . A path is a connected subgraph with all degrees at most two, and with at least one node of degree less than two. The nodes of degree one, if any, are its end nodes. A circuit is a connected subgraph with all degrees exactly two.

A -star graph, consisting of a stable set of size and an additional node joined to all nodes of , shows that the minimum number of matchings that cover all nodes can be as large as the maximum degree. A naïve answer to the title question could then be nourished by Vizing’s theorem [17] stating that all edges of a graph can be covered by at most matchings.

Actually, Kőnig’s “edge-coloring theorem” [10, 11] already implies that matchings are always enough to cover all nodes at least once (since a spanning tree is a bipartite graph). This is best possible in terms of the maximum degree. However, obviously there are graphs for which a smaller number of matchings than the maximum degree is sufficient (eg. , the complete graph on four vertices).

Now, for any stable set (if ), is a lower bound on the number of matchings needed to cover the vertex set as shown by Lemma 1.

Lemma 1.

If is a connected graph with vertices and is a non-empty stable set, then at least matchings are needed to cover the vertex set.


If a matching--cover exists, then , because one matching can cover at most nodes of the stable set . ∎

A key result of the paper is that the maximum of these ratios is equal to the minimum number of matchings in a cover, provided that the maximum is strictly greater than one:

Corollary 1.

The minimum number of matchings that cover all nodes of a graph is equal to the maximum of over non-empty stable sets of the graph, unless this maximum is , in which case it is 1 or 2 according to whether a perfect matching exists or not.

For an example, on the -star graph the maximum is and indeed, the minimum number of matchings covering is also .

The condition of this theorem in the exceptional case reveals a remarkable connection and clarifies the exception. The condition coincides then with the following necessary and sufficient condition of Tutte for the existence of -matchings:

Theorem 1 (Tutte, 1953, [15]).

Let be a graph. There exists a perfect -matching in if and only if for each stable set .

The minimum value where a matching--cover exists was calculated by Wang, Song and Yuan in time . This algorithm was published in [19] where the authors corrected their previous paper [18]. The authors also show that the problem can be solved using matroid union (of matching matroids) and hence the node-weighted version of the problem can also be solved in polynomial time. Besides the new good characterization theorem, our solution is conceptually simpler (we do not use blossoms and the Gallai-Edmonds theorem for the case ). This leads to further advantages: we provide a faster implementation and a solution of the edge-weighted version for non-negative weights.

In Section 2 we state and prove the key result of the paper in a simple form, providing a “good characterization theorem” for the existence of matching--covers. In Section 3 we clarify connections with two other combinatorial objects, connecting matching--covers to previously studied notions, thereby enriching the available tools. As an immediate consequence the polynomial decidability of the existence, and solvability of weighted versions (for non-negative weights) is deduced. In Section 4 the results and tools are used to widen the context of our work. Finally, in Section 5 we describe the practical problem that has been the source of our study.

2 Existence of a matching--cover

In this Section we prove the key existence result concerning matching--covers, that is, Theorem 2. At the technical level, this is almost all we need. The rest of the paper consists in realizing connections and consequences, then considering weighted versions and generalizations.

We keep in this section the somewhat naïve state of ignoring the connections that we are discussing (and have realized) later. These connections are discussed in the next section. The goal here is to show a self-contained first proof for matching--covers without these connections.

Theorem 2.

Let be a connected graph, and be an integer. There exists a matching--cover in if and only if for each stable set of .


We have already checked the only if part in Lemma 1.

Claim 1: If and for every then contains matchings that cover the same nodes as .

While there is an edge such that both and are covered by at least two edges of , delete from . At the end of the procedure, the connected components of are stars of degree at most . We can thus build matchings covering the same node set as by assigning the edges in each star to a different matching.

In order to prove the if part of the theorem, let be a union of matchings that covers a maximum number of nodes. We choose to be inclusionwise minimal among these maximum choices.

Let be the set of nodes incident to at most one edge of , let be the rest of the nodes of , and let be the nodes of not covered by . By the minimality of , and by Claim 1, no edge of connects two nodes of . We show that implies that there exists a stable set such that . Let us assume that .

Let be the set of nodes of reachable from by an alternating path, that is, a path with nodes alternating between and , and edges alternating between and . Let the set of nodes of reachable from by an alternating path, clearly .

Claim 2: The nodes in are incident to exactly edges of .

Indeed, suppose there is a node in incident to less than edges of . This node is reachable from by an alternating path by construction. Interchanging edges of and along this alternating path yields a set with covering more nodes of (because a node of that was not covered is now covered), and hence, by Claim 1, there exists a set of matchings that cover more nodes than , a contradiction.

Claim 3: is a stable set.

We prove that there is no edge from to any node of , which implies in particular that is a stable set and that . Indeed, assume to the contrary that there is an edge for some and . By definition, there is an alternating path from some to , and since the last edge of is in (or ), But then could be extended with to an alternating path (not completely alternating between and , since its last two nodes, and are both in , which is not disturbing) from to . Interchanging edges of and along this alternating path yields a set with (because ), covering more nodes of , and hence, by Claim 1, there exists a set of matchings that cover more nodes than , a contradiction.

Claim 4:

Each vertex of was marked from a vertex of and hence . Moreover, there is no edge from any to a node since the existence of such an edge in would prove (and by the definition of if is incident to an edge in , then there is only one such edge and it was used as the last edge of the alternating path reaching , i.e., it comes from ). The claim follows.

By Claim 2, Claim 3 and Claim 4, , and since , we have . ∎

At first sight, it is surprising that the condition of Theorem 2 is the same as that of a Theorem of Berge and Las Vergnas [1], which concerns seemingly different combinatorial objects. The proof also revealed connections to Lovász and Plummer’s Exercise [12, Exercise 10.2.28] and in turn to Heinrich, Hell, Kirkpatrick, Liu [7]. We will clarify these connections in Section 3. We can readily deduce from Theorem 2 the main result claimed in the introduction and a pleasant minimax formula for the maximum number of nodes covered by matchings.

See 1

Corollary 2.

Given and , the maximum number of nodes that can be covered by matchings is is a stable set.


It is obvious that we cannot cover more. In the proof of the theorem above the number of uncovered nodes is . ∎

Theorem 2 can actually also be extended to the case where we wish to cover only a subset of the vertices. This is the purpose of the next theorem.

Theorem 3.

Given a graph , an integer and there are matchings whose union covers if and only if for each stable set , we have .


Let be a union of matchings that covers a maximum number of nodes of ; furthermore, let be inclusionwise minimal among these maximum choices. Let and the sets defined in the proof of Theorem 2 but now let the nodes of not covered by . We can repeat the previous proof. However, Claim 3 should be replaced as follows.

Claim 3’: is a stable set and .

First suppose that there is an . There is an alternating path from some to by the definition of , after interchanging along such a path becomes covered (and becomes uncovered), a contradiction.

From this point we can follow the original proof. ∎

Corollary 3.

Given graph , integer and the maximum number of nodes in that can be covered by matchings is is a stable set.


It is obvious that we cannot cover more. In the proof of the theorem above the number of uncovered -nodes is . ∎

The proofs of Theorem 2 and Theorem 3 can be straightforwardly turned to algorithms. Consider the proof of Theorem 2 for instance. If we orient the edges of from to and the edges of from to , then determining and is an accessibility problem (they are the nodes accessible from ), so they can be found by Breadth First Search in time . Either we can do the interchange and increase the number of nodes that are covered or we find a stable set presenting the obstacle. After increasing the number of covered nodes, we may need to delete some edges of in order to make it inclusionwise minimal, and we may need to redefine sets . These steps can easily be done in time . Decomposing into matchings can also be done in time . Therefore the proof readily provides an algorithm which correctly determines either a matching--cover or an obstacle in time .

Suppose now that the goal is to find the smallest for which a matching--cover exists (ignoring the distinction between the cases and ). Starting with we execute the previous algorithm, and if an obstacle is found, then we increase by one and start it again. If we implement the corresponding algorithm naïvely the running time is . However we can use the matchings from the previous iteration to warm-start the next one. Either the number of covered nodes or increases in each step, and the complexity of the corresponding algorithm then remains , matching the time bound of [19].

There is another, conceptually more complicated algorithm of Hell and Kirkpatrick [9] for the related -factor problem that runs in time if . We will see in the next section that this algorithm can also be used to decide whether a matching--cover exists or not. Using binary search for we need to run it for at most times, consequently the minimum , for which a matching--cover exists, can be be found in time if the answer is at least two.

Now suppose that we have to make a distinction between the cases and . If the algorithm finds a matching--cover, then we need an algorithm for finding a perfect matching (in this case is the right answer) or an obstacle (when is the right answer). Although this is technically much more difficult, there are several time algorithms for that, see e.g., Section 24.4 in [13]. Therefore the unconstrained minimum of can be determined in time.

3 Connections

In this section we define two other notions seemingly different from one another and from matching--covers. We reveal the somewhat surprising but simple, and at the same time, fruitful connection of the three, and also the limits of this connection.

A -star packing is a (not necessarily spanning) subgraph whose components are -star graphs with . If a -star packing covers every node it is called perfect. A -factor is an edge set where every has at least and at most incident edges. The cardinality of a matching-k-cover, a -star packing or a -factor is the number of edges in the corresponding set.

We will realize now that, as long as we are interested in minimizing the cardinality (or more generally any non-negative cost function on the edge set), the perfect -star packing problem, the -factor problem, and the matching--cover problem coincide. In contrast, if we have negative costs on some edges, each problem might behave very differently.

Let us first notice the obvious containments between three corresponding sets: each perfect -star packing is clearly a matching--cover, and each matching--cover is obviously a -factor. None of these containments is reversible though: two node-disjoint -stars joined by an edge is a matching--cover on nodes, but not a -star packing (even though it contains a perfect -star packing); and an odd circuit is a -factor, but not a matching--cover (even if it contains one). However, their inclusionwise minimal elements are the same:

Theorem 4.

Let be a graph, and . Then is an inclusionwise minimal perfect -star packing if and only if it is an inclusionwise minimal matching--cover, which in turn holds if and only if it is an inclusionwise minimal -factor. Consequently, a minimum weight matching--cover can be found in polynomial time for non-negative weights.


Because of the aforementioned containments between the three sets, it is sufficient to prove that each inclusionwise minimal -factor is a perfect -star packing. This is clear: while there exists an edge between two nodes both incident to more than one edge in a -factor, one can delete this edge, and we get a -factor again. A -factor without such an edge is a perfect -star packing.

Since the minimum of non-negative weight functions on non-negative vectors is always attained on vectors of inclusionwise minimal support, it is sufficient to check that one of the three problems can be solved in polynomial time for non-negative weights. This is well-known for

-factors. Indeed, a -factor of minimum weight can be found in (strongly) polynomial time for any objective function for instance by the reductions of Tutte [16] and Edmonds’s minimum cost matching algorithm [3, 2], see also [13, 35.2, p. 586] or [5]. ∎

Before concluding erroneously about the total confusability of the three defined notions, let us check now how they behave with respect to objective functions having also negative coordinates. The task of minimizing an arbitrary cost function on a family of sets includes maximizing the cardinality of the sets in the family. The complexities of the three corresponding cardinality maximization problems are already quite different:

  • Maximizing the cardinality of a matching--cover is NP-hard already for , since finding a matching--cover of size in a cubic graph is equivalent to the existence of two edge-disjoint perfect matchings, which is the three-edge-coloring problem of cubic graphs, a well-known NP-complete problem [6].

  • Maximizing the cardinality of a -star packing is NP-hard: there exists a -star packing of cardinality at least if and only if there exists a “perfect 3-star packing”. This problem has been proved to be NP-complete by Hell and Kirkpatrick [8].

  • For any cost function maximizing the cost of a -factor is polynomially solvable, see e.g., [13, 35.2, p. 586].

4 Variants

In this section we state several variants and generalizations of Theorem 2.

We first consider the case where we need to cover the nodes of more than once. Suppose lower bounds are given on vertices. A matching--cover is -bounded if every vertex is covered by at least pairwise edge-disjoint matchings, such that, if denotes the union of the matchings, then for each .

Again, if is allowed, the problem has a particular nature different from the restricted case where for every . While for the solution is polynomially solvable, even if harder than for , the case is already NP-hard: defining for all in a -regular graph, an -bounded matching--cover exists if and only if the graph is -edge-colorable, which is NP-hard to decide [6].

However, our results can be generalized without any major change if for every , despite an additional difficulty that can be overcome with invoking another piece of the literature.

Recall the ultimate explanation given by Theorem 4 for the tractability of matching--covers.

Inclusionwise minimal -factors are -star packings, and thus matching -covers.

The last implication was not explicitly explained, since it is obvious: a -star is -edge-colorable, and so are the edges of a -star packing, and this is why the set of these edges is a matching--cover.

Is the same true for -factors, that is, subgraphs with for every ? The answer is yes whenever but it is no more trivial, our proof uses a less known theorem about edge-coloring:

Lemma 2.

Let for all An inclusionwise minimal -factor is an -bounded matching--cover.


Let be an inclusionwise minimal -factor. Since is inclusionwise minimal, and , no edge of connects and if . By Fournier’s [4] generalization of Vizing’s [17] theorem, in this case is -edge-colorable. ∎

It follows that our results can be generalized to -bounded matching--covers:

For non-negative weights a polynomial algorithm directly follows from Lemma 2, since we know this for -factors. For the cardinality case the direct proofs and algorithms of Section 2 arrive at the following theorem. By Lemma 2 this theorem is equivalent to the theorem of Heinrich, Hell, Kirkpatrick and Liu [7] stating that the same condition is necessary and sufficient for the existence of an -factor.

Theorem 5.

Let be a graph, and . There exists an -bounded matching--cover in if and only if for every

Let us generalize now the problem to an arbitrary family of subgraphs allowed to be used for covering the vertices of .

Let be a family of subgraphs of . An --cover consists of elements of that altogether cover every node of . If is the family of all matchings of , then we get back matching--covers. What happens if we allow some richer family that can be used in the cover? We are going to see a few examples with interesting answers closely related to matching--covers.

First we examine the case where is the family of -matchings. Interestingly enough, we get the same answer as for matching--covers, but is not an exception anymore.

Theorem 6.

Let be a graph, and be an integer. There exists a -matching--cover in if and only if for each stable set of .


For this is Theorem 1.

For it is enough to prove that an edge-minimal -matching--cover is also a matching--cover.

Let be the -matchings in an edge-minimal cover. First observe that has no even circuit component: such a component could be replaced by any of its perfect matchings, replacing the edge-set by a proper subset, a contradiction.

Suppose now that is an odd circuit component of some . If has a node covered by some , , then replace in by a perfect matching of : the set of covered nodes does not change, but the set of edges is replaced by a proper subset, a contradiction again.

Finally, if is an odd circuit node-disjoint from every other , then we express it as the union of two (not node disjoint) matchings covering all nodes of , replace by in and add to any . This is possible, since . ∎

We can also handle the case of -star-packings.

Lemma 3.

Let , and be the set of -star-packings. An edge-set is an inclusionwise minimal --cover if and only if it is a matching--cover.


By Theorem 4 the components of an edge-minimal matching--cover are -stars with , and can be thus covered by at most matchings. The other direction is obvious. ∎

Again, polynomial solvability of the minimization of non-negative weight functions and the solution of problems solvable for matching--covers can be adapted to --covers. For instance:

Theorem 7.

Let be a graph, be an integer, and be the set of -star-packings. There exists an --cover in if and only if for each stable set of .

A path-packing is a subgraph whose components are paths. Again, inclusionwise minimal path-packing-k-covers are exactly the inclusionwise minimal -star-- covers

Corollary 4.

Let be a graph, be an integer, and be the set of path-packings. There exists an --cover in if and only if for each stable set of .


A -star-packing is a path-packing. Given a path-packing, some edges of the paths can be deleted resulting in a -star-packing. ∎

The reader is invited to state any combination of the many possible variants of the theorems and algorithms including -bounds, node-weights etc., according to tastes and needs.

5 From the manufacturing of integrated circuits to -matching-cover

Our interest in the matching--cover problem stemmed from the study of an application in the manufacturing of integrated circuits. More specifically, we were interested in the optimization of the manufacturing of one particular type of components called vias (basically vertical connectors between different layers of an integrated circuit).

The main process used in the manufacturing of vias is called (photo)lithography. Lithography is a technology that uses light to transfer an arrangement of (2-dimensional) geometric features from a mask to a light-sensitive chemical photoresist on the silicon wafer. The nature of the process, and diffraction in particular, imposes a minimum distance between two features in order to obtain a proper transfer. Trying to transfer simultaneously two vias (typically equal size disk features when viewed from the top) that are at a distance below would result in the production of a ‘dumbbell-shaped’ object on the wafer.

One way of transfering an arrangement (a.k.a. layout) of vias where some are at a distance below is to decompose the layout into several subsets of vias that respect the minimum distance restriction and to transfer the corresponding sub-layout iteratively. This procedure is known as multiple patterning. Because the masks are expensive, manufacturers are interested in minimizing the number of multiple patterning steps. Decomposing the layout into a minimum number of feasible sub-layouts readily translates into a graph coloring problem: the vias are the nodes of the graph and there is an edge between two nodes if the corresponding vias are below the minimal distance.

Now a new technology, called Directed Self Assembly (DSA), offers an alternative to pure multiple patterning. The technology allows to correct ‘dumbbell-shaped’ objects after their creation at a relatively low cost, if they respect certain properties. Actually the technology allows to correct even longer ‘pea pod-shaped’ objects resulting from the improper transfer of a sequence of (aligned) vias that are below the minimum distance. The precise shapes of the objects that can later be corrected through DSA technology is not yet explicitly known. However there are techniques to check whether a pattern is feasible or not.

Manufacturers want to exploit DSA technology in order to minimize the number of multiple patterning steps. Suppose that we are given a layout of vias and a complete list of the different grouping of vias that we can later correct through DSA technology. We can create a graph whose nodes are all the feasible grouping (including singletons) and where two nodes are adjacent if the (minimum) distance between the corresponding groups is below (in particular two groups containing a same via will always be in conflict). We now want to find a set of nodes in such that (i) the unions of the vias in the groups corresponding to the set covers all original vias and (ii) the chromatic number of is minimum among all such . Observe that the set of nodes containing a given via form a (non necessarily maximal) clique. Let us call the set of all such cliques. The problem is equivalent to determine the minimum number of colors needed to partially color the nodes of so that each clique of is hit by (at least) one of the colors.

We might call the underlying graph coloring problem the clique-hitting coloring problem. The problem is obviously hard as it contains (proper) graph coloring as a special case (for a given graph, choose each single node as one of the cliques of ). Now the matching--cover appears to be a special case of this problem where the graph is the line graph of a graph and the set of cliques are the cliques stemming from the (maximal) stars in centered in each vertex (that is, , for all .

Acknowledgment: We thank Mentor Graphics for their role beyond the finances of a doctoral work: the problem analyzed here originates from their practical initiatives, related to new technology.

Thanks are due to Frédéric Maffray for discovering that matching--covers have been studied in [18]. Our main results seem to be complementary to theirs. Trying to understand the connections we went into the flaw of [18] but were reassured by the soon appearing [19]. Our main results compared to these are the theorems that provide an appropriate framework for simple proofs and algorithm, moreover to some generalizations.


  • [1] C. Berge and M. Las Vergnas, On the existence of subgraphs with degree constraints, Indagationes Mathematicae , 81(1), (1978), pp. 165–176.
  • [2]

    J. Edmonds and E.  L. Johnson, Matching: a well-solved class of integer linear programs,

    Combinatorial Structures and their Applications, Guy, Harary, Sauer, Schönheim eds., (1970), pp. 89–92.
  • [3] J. Edmonds, Maximum matching and a polyhedron with 0, 1-vertices, Journal of Research of the National Bureau of Standards B, 69 (125-130), (1965), pp. 55–56.
  • [4] J. C. Fournier, Coloration des aretes d’un graphe, Cahiers Centre Etudes Recherche Oper., 15, (1973), pp. 311–314.
  • [5] A. Gerards, Matching, Chapter 3 in Handbooks of Operations Research and Management Science, 7, (1995), pp. 135–223.
  • [6] I. Holyer, The NP-completeness of edge-coloring, SIAM Journal on Computing, 10, pp. 718–720.
  • [7] K. Heinrich, P. Hell, D. G. Kirkpatrick and G. Liu, A simple existence criterion for -factors, Discrete Mathematics, 85, (1990), pp. 313–317.
  • [8] P. Hell and D. G. Kirkpatrick, Packings by complete bipartite graphs, SIAM Journal on Algebraic and Discrete Methods, 7, (1986), pp. 199-209.
  • [9] P. Hell and D. G. Kirkpatrick, Algorithm for Degree Constrained Graph Factors of Minimum Deficiency, Journal of Algorithms, 14, (1993), pp. 115–138.
  • [10] D. Kőnig, Graphok és alkalmazásuk a determinánsok és a halmazok elméletére [in Hungarian], Matematikai és Természettudományi Értesítő, 34, (1916), pp. 453–465.
  • [11] D. Kőnig, Über Graphen und ihre Anwendung auf Determinantentheorie und Mengenlehre, Mathematische Annalen, 77 (4), (1916), pp. 453–465. (English translation by Ágnes Cseh, )
  • [12] L. Lovász and M. D. Plummer, Matching theory, North-Holland mathematics studies. North-Holland, Amsterdam, New York, 1986.
  • [13]

    A. Schrijver, Combinatorial Optimization, Springer-Verlag, Berlin, Heidelberg, 2003.

  • [14] W. T. Tutte, The factorization of linear graphs, J. London Math. Soc., 22, (1947), pp. 107–111.
  • [15] W. T. Tutte, The -factors of oriented graphs, Proc. Amer. Math. Soc., 4, (1953), pp. 922–931.
  • [16] W. T. Tutte, A short proof of the factor theorem for finite graphs, Canad. J. of Math., 6, (1954), pp. 347–352.
  • [17]

    V. G. Vizing, On an estimate of the chromatic class of a

    -graph, [in Russian],
    Diskret. Analiz., 3, (1964), pp. 25–30.
  • [18] X. Wang, X. Song and Y. Yuan, On matching cover of graphs, Mathematical Programming, 147(1), (2014), pp. 499–518.
  • [19] X. Wang, X. Song and Y. Yuan, A note on Matching Cover Algorithm, arXiv:1612.00943, December 6, (2016)