Information Processing Letters 147 (2019) 77–81
Contents lists available at ScienceDirect
Information Processing Letters www.elsevier.com/locate/ipl
On the hardness of deciding the equality of the induced and the uniquely restricted matching number M. Fürst Institute of Optimization and Operations Research, Ulm University, Germany
a r t i c l e
i n f o
Article history: Received 21 December 2018 Received in revised form 19 March 2019 Accepted 20 March 2019 Available online 26 March 2019 Communicated by Marcin Pilipczuk Keywords: Induced matching Strong matching Uniquely restricted matching Computational complexity
a b s t r a c t If G ( M ) denotes the subgraph of a graph G induced by the set of vertices that are covered by some matching M in G, then M is an induced or a uniquely restricted matching if G ( M ) is 1-regular or if M is the unique perfect matching of G ( M ), respectively. Let νs (G ) and νur (G ) denote the maximum cardinality of an induced and a uniquely restricted matching in G. Golumbic, Hirst, and Lewenstein (2001) [9] posed the problem to characterize the graphs G with νur (G ) = νs (G ). We prove that the corresponding decision problem is NP-hard, which suggests that a good characterization is unlikely to be possible. © 2019 Elsevier B.V. All rights reserved.
1. Introduction We consider only simple, finite, and undirected graphs, and use standard terminology. For a graph G, and a matching M in G, let V ( M ) be the set of vertices that are covered by M, and let G ( M ) be the subgraph of G induced by V ( M ). A matching M in G is
• induced [1] if G ( M ) is 1-regular, • acyclic [8] if G ( M ) is a forest, or • uniquely restricted [9] if M is the unique perfect matching of G ( M ). The maximum cardinality of an ordinary, a uniquely restricted, an acyclic, and an induced matching is denoted by ν (G ), νur (G ), νac (G ), and νs (G ), respectively. While the ordinary matching number is tractable [4], the three remaining restricted matching numbers are NP-hard [8, 9,15]. Golumbic et al. [9] observed that a matching M in G is uniquely restricted if and only if G contains no M-alternating cycle, which implies that νur (G ) ≥ νac (G ).
E-mail address:
[email protected]. https://doi.org/10.1016/j.ipl.2019.03.011 0020-0190/© 2019 Elsevier B.V. All rights reserved.
Since every induced matching is also acyclic, we obtain that
ν (G ) ≥ νur (G ) ≥ νac (G ) ≥ νs (G ).
(1)
In order to understand how those different restricted matching numbers relate to each other, it seems to be interesting to characterize the graphs achieving equality in one or more of the inequalities in (1). On the positive side, deciding whether a given graph G satisfies ν (G ) = νs (G ) or ν (G ) = νur (G ), and deciding whether a given subcubic graph G satisfies νur (G ) = νs (G ) is tractable [2,3,6, 10–13]. On the negative side, the hardness of deciding ν (G ) = νac (G ) and νur (G ) = νac (G ) was shown in [5]. In 2001, Golumbic et al. [9] posed the problem to characterize the graphs G with νur (G ) = νs (G ). In this short note, we will prove the hardness of deciding νur (G ) = νac (G ) and νur (G ) = νs (G ). This shows that a good characterization does not exist unless NP = co-NP. Note that it is not obvious whether these two decision problems belong to NP. Theorem 1. Deciding whether a given graph G of maximum degree 4 satisfies νac (G ) = νs (G ) is NP-hard.
78
M. Fürst / Information Processing Letters 147 (2019) 77–81
Fig. 1. The construction for the proof of Theorem 1.
Theorem 2. Deciding whether a given bipartite graph G satisfies νur (G ) = νs (G ) is NP-hard. The proofs of Theorem 1 and 2 are postponed to the following sections. We close the introduction with a few notations. For a graph G and two disjoint sets X and Y of vertices of G, let
E G ( X , Y ) = {uv ∈ E (G ) : u ∈ X , v ∈ Y }, and let E G ( X ) = E (G [ X ]). For every positive integer k, let [k] = {1, . . . , k}. 2. Proof of Theorem 1 We prove the statement by a reduction from Satisfiability that remains NP-complete (cf. e.g. [7]) for instances where every clause contains two or three literals, every positive literal appears in at most two different clauses, every negative literal appears in at most one clause, and no clause contains a literal and its negation. Let be such an instance of Satisfiability with variables x1 , . . . , xn and clauses c 1 , . . . , cm . For every j ∈ [m], let |c j | be the number of literals that belong to the clause c j . Let G be a graph that arises from the union of n disjoint triangles with vertex sets X 1 , . . . , X n , and m disjoint cliques with vertex sets C 1 , . . . , C m , where |C j | = |c j | + 1 for every j ∈ [m]. For every i ∈ [n], let X i = {t i , f i , u i }. For every j ∈ [m], identify |c j | vertices in C j with the literals in the clause c j , and let v j be the vertex in C j that is not identified with a literal from the clause m c j . Let i be in [n], let w 1 and w 2 be the vertices in j =1 C j that are identified with the literal xi , and let w 3 be the vertex in m ¯ i . Now, add the j =1 C j that is identified with the literal x edges f i w 1 , f i w 2 , and t i w 3 , see Fig. 1 for an illustration. Lemma 2.1. νac (G ) = n + m. Proof. Let M arise from {u i t i : i ∈ [n]} by adding, for every j ∈ [m], an arbitrary edge of E G (C j ). Suppose, for a contradiction, that M is not an acyclic matching in G. Since d G ( M ) (u i ) = 1 and d G ( M ) (t i ) ≤ 2, neither u i nor t i are contained in any cycle of G ( M ) for every i ∈ [n]. By construction, this implies a contradiction. Hence, νac (G ) ≥ n + m. Let M = M 1 ∪ M 2 ∪ M 3 be some maximum acyclic matching with
• M 1 ⊆ ni=1 E G ( X i ), • M 2 ⊆ mj=1 E G (C j ), and
• M3 ⊆ E G
n
i =1
X i , V (G ) \
n
i =1
Xi
minimizing | M 3 |. Let j ∈ [m]. If E G (C j , V (G ) \ C j ) ∩ M 3 = ∅, then E G (C j ) ∩ M 2 = ∅. Since M is acyclic, we have that | E G (C j , V (G ) \ C j ) ∩ M 3 | ≤ 2, and, if E G (C j , V (G ) \ C j ) ∩ M 3 contains exactly one edge uv with u ∈ C j , then the matching ( M ∪ { v j u }) \ {uv } is acyclic, which is a contradiction to the minimality of | M 3 |. Therefore, | E G (C j , V (G ) \ C j ) ∩ M 3 | ∈ {0, 2}. Let i ∈ [n]. If E G ( X i , V (G ) \ X i ) ∩ M 3 = ∅, then E G ( X i ) ∩ M 1 = ∅. If E G ( X i , V (G ) \ X i ) ∩ M 3 contains exactly one edge uv with u ∈ X i , then the matching ( M ∪ {u i u }) \ {uv } is acyclic, which is a contradiction to the minimality of | M 3 |. Therefore, | E G ( X i , V (G ) \ X i ) ∩ M 3 | ∈ {0, 2}. Hence, we obtain that
νac (G ) = | M 1 | + | M 2 | + | M 3 | ≤n−
|M3 | 2
+m−
|M3 | 2
+ |M3 |
= n + m, which completes the proof.
2
Lemma 2.2. is satisfiable if and only if νac (G ) = νs (G ). Proof. Let be satisfiable, and let t : {x1 , . . . , xn } → {0, 1} be some satisfying truth assignment of . Let M arise from {u i f i : i ∈ [n] and t (xi ) = 0} ∪ {u i t i : i ∈ [n] and t (xi ) = 1} by adding, for every j ∈ [m], some edge v j w where the literal that is identified with the vertex w is true under t. Suppose that M is not an induced matching, that is, there is some edge e between two edges e 1 and e 2 in M. By construction, we may assume that e 1 = u i y i for y i ∈ { f i , t i } and some i ∈ [n], and e 2 = v j w for some j ∈ [m] where the literal that is identified with the vertex w is true under t. Thus, y i and w are adjacent. First, we assume that y i = f i . By construction, the literal that is identified with the vertex w is xi , which is a contradiction to the choice of M. Hence, we may assume that y i = t i . By construction, the literal that is identified with the vertex w is x¯ i , which is a contradiction to the choice of M. Since M has size n + m, Lemma 2.1 implies that νac (G ) = νs (G ). Let νac (G ) = νs (G ), which, by Lemma 2.1, implies that νs (G ) = n + m. Let M be some maximum induced matching maximizing |{u i : i ∈ [n]} ∩ V ( M )|. If there is some edge uv with u ∈ X i and v ∈ C j for some i ∈ [n] and j ∈ [m], then the matching M = ( M ∪ {u i u }) \ {uv } is induced, which is a contradiction to the maximality nof |{ui : i ∈ [n]} ∩ V ( M )|. n Therefore, E G i =1 X i , V ( G ) \ i =1 X i = ∅. Moreover, if
M. Fürst / Information Processing Letters 147 (2019) 77–81
79
Fig. 2. The construction for the proof of Theorem 2.
there is some edge f i t i in M for some i ∈ [n], then the matching ( M ∪ {u i f i }) \ { f i t i } is also induced, which is a contradiction to the maximality of |{u i : i ∈ [n]} ∩ V ( M )|. Since νs (G ) = n + m, this implies that either u i f i or u i t i belong to M for every i ∈ [n], and E G (C j ) ∩ M = ∅ for every j ∈ [m]. Let t : {x1 , . . . , xn } → {0, 1} be defined as t (xi ) = 0 if u i f i ∈ M and t (xi ) = 1 if u i t i ∈ M. Suppose, for a contradiction, that is not satisfied under t, that is, there is some clause c j such that no literal is true under t. By construction, there is some vertex w ∈ V ( M ) ∩ C j where its corresponding literal y is not true under t. By construction, w is adjacent to f i or t i for some i ∈ [n]. If w is adjacent to f i , then y = xi , and, since M is induced, the edge u i t i is in M, which implies that t (xi ) = 1, a contradiction. Hence, we may assume that w is adjacent to t i . This implies that y = x¯ i and that the edge u i f i is in M, that is, t (¯xi ) = 1, a contradiction. 2 3. Proof of Theorem 2 Given a boolean formula in conjunctive normal form, Exact Satisfiability is the problem is to decide whether there is a truth assignment of the variables so that every clause contains exactly one true literal. If there is such a truth assignment, then the instance is exact satisfiable. It is well-known that Exact Satisfiability remains NP-complete (cf. e.g. [14]) when restricted to instances where the literals occur only positively, every literal occurs at most three times, every clause has size exactly three, and no literal appears twice in one clause. Let be such an instance of Exact Satisfiability with variables x1 , . . . , xn and clauses c 1 , . . . , cm . Let G be the graph that arises from the union of n disjoint copies of a K 1,2 with vertex sets X 1 , . . . , X n , and m disjoint copies of a K 1,3 with vertex sets C 1 , . . . , C m . For every i ∈ [n], let f i and t i be the leaves of X i , and let u i be the vertex of degree two in X i . For every j ∈ [m], identify the three leaves of C j with the literals that belong to the clause c j , and let v j be the vertex of degree three min C j . Let i be in [n], let W be the set of vertices in j =1 C j that are identified with the literal xi , and let J = { j ∈ [m] : W ∩ C j = ∅}. Furthermore, let W = j ∈ J C j \ { v j } \ W . Now, add the edges f i w for every w in W , and the edges t i w for every w in W , see Fig. 2 for an illustration. Golumbic et al. [9] showed that, if G is a bipartite graph and M is some uniquely restricted matching in G, then G ( M ) has a vertex of degree 1 in G ( M ). We shall use this within the proof of the following lemma.
Lemma 3.1. νur (G ) = n + m. Proof. The matching M that arises from {u i t i : i ∈ [n]} by adding, for each j ∈ [m], an edge between v j and one of its neighbors is uniquely restricted, because all edges in M are pendant edges in G ( M ). Suppose, for a contradiction, that νur (G ) > n + m, and let M = M 1 ∪ M 2 ∪ M 3 be some maximum uniquely restricted matching with
• M 1 ⊆ ni=1 E G ( X i ), • M 2 ⊆ mj=1 E G (C j ), and n n • M3 ⊆ E G i =1 X i , V ( G ) \ i =1 X i minimizing | M 3 |. Since | M | > n + m, it follows that M 3 = ∅. Claim 1. If i ∈ [n] is such that M 3 ∩ E G ( X i , V (G ) \ X i ) = ∅, then M 1 ∩ E G ( X i ) = ∅. Proof. Suppose, for a contradiction, that M 1 ∩ E G ( X i ) = ∅. Let j ∈ [m] be such that M 3 ∩ E G ( X i , C j ) = ∅, and let w 1 , w 2 , and w 3 be the vertices in C j distinct from v j so that w 1 is adjacent to f i , and w 2 and w 3 are both adjacent to t i . First, we assume that f i w 1 and ui t i belong to M. Since v j is not covered by M, the set M = M ∪ { v j w 1 } \{ f i w 1 } is a matching in G, which, by the minimality of | M 3 |, is not uniquely restricted. Since f i is not covered by M , there is an M -alternating cycle in G disjoint from X i , which, by symmetry, can be written as v j w 1 P w 2 v j for some M -alternating path P in G. Since P is also M-alternating, the cycle w 1 P w 2 t i u i f i w 1 is M-alternating in G, which is a contradiction. Hence, by symmetry, we may assume that t i w 2 and u i f i belong to M. Since v j is not covered by M, the set M = M ∪ { v j w 2 } \ {t i w 2 } is a matching in G, which, by the minimality of | M 3 |, is not uniquely restricted. Therefore, there is an M -alternating cycle C that contains the edge v j w 2 . Since t i is not covered by M , we have that X i ∩ V (C ) = ∅. If C can be written as w 2 v j w 3 P w 2 for some M -alternating path P , then the cycle w 2 t i w 3 P w 2 is M-alternating, which is a contradiction. Hence, we may assume that C can be written as w 2 v j w 1 P w 2 for some M -alternating path P , which implies that the cycle w 2 t i u i f i w 1 P w 2 is M-alternating in G, which is a contradiction. 2 Claim 2. If j ∈ [m] is such that M 3 ∩ E G (C j , V (G ) \ C j ) = ∅, then M 2 ∩ E G (C j ) = ∅.
80
M. Fürst / Information Processing Letters 147 (2019) 77–81
Proof. Suppose, for a contradiction, that M 2 ∩ E G (C j ) = ∅. Let i ∈ [n] be such that M 3 ∩ E G ( X i , C j ) = ∅, and let w 1 , w 2 , and w 3 be the vertices in C j distinct from v j such that w 1 is adjacent to f i , and w 2 and w 3 are both adjacent to t i . First, we assume that f i w 1 and v j w 3 belong to M. Since u i is not covered by M, the set M = ( M ∪ {u i f i }) \ { f i w 1 } is a matching, which, as before, implies that there is an M -alternating cycle C that contains the edge u i f i . If v j w 3 is not contained in E (C ), then the vertices w 1 , v j , and w 3 are not contained in V (C ), which implies that C can be written as f i u i t i P f i for some M -alternating path P in G. Since P is also M-alternating, the cycle f i w 1 v j w 3 t i P f i is M-alternating, which is a contradiction. Hence, we may assume that v j w 3 is contained in E (C ). In this case, the cycle can either be written as f i P w 2 v j w 3 P t i u i f i or as f i Q w 3 v j w 2 Q t i u i f i . In the first case, the cycle f i w 1 v j w 3 P t i w 2 P f i is M-alternating in G, while in the second case the cycle w 2 Q t i w 2 is M-alternating, which, in both cases, is a contradiction. Hence, by symmetry, we may assume that t i w 2 and v j w 1 belong to M. Since u i is not covered by M, the set M = M ∪ {u i t i , v j w 2 } \ {t i w 2 , v j w 1 } is a matching, which, as before, implies that there is an M -alternating cycle C . If C contains exactly one of the edges u i t i or v j w 2 , then C can be written as f i P t i u i f i or as v j w 3 Q w 2 v j . In the first case, the cycle f i P t i w 2 v j w 1 f i is M-alternating, while in the second case the cycle w 3 Q w 2 t i w 3 is M-alternating, which, in both cases, is a contradiction. Hence, we may assume that both u i t i and v j w 2 are contained in E (C ). In this case, the cycle can either be written as f i P w 2 v j w 3 P t i u i f i or as f i Q w 3 v j w 2 t i u i f i . In the first case, the cycle w 1 f i P w 2 t i P w 3 v j w 1 is M-alternating in G, while in the second case the cycle f i Q w 3 v j w 1 f i is M-alternating in G, which, in both cases, is a contradiction. 2 By Claim 1 and 2, all edges in M 1 ∪ M 2 are pendant edges in G ( M ). Let H = G ( M 3 ). Since H is bipartite, there is a vertex u in H of degree 1. Let uv ∈ M 3 . First, we assume that u ∈ X i for some i ∈ [n]. By Claim 1, the vertex u i is not covered by M. Hence, the set M = ( M ∪ {u i u }) \ {uv } is a matching. Since u is only adjacent to vertices in G ( M ) that are covered by edges in M 2 , the matching M is uniquely restricted, which is a contradiction to the minimality of | M 3 |. Hence, we may assume that u ∈ C j for some j ∈ [m]. By Claim 2, the vertex v j is not covered by M. Hence, the set M = ( M ∪ { v j u }) \ {uv } is a matching. Since u is only adjacent to vertices in G ( M ) that are covered by edges in M 1 , the matching M is uniquely restricted, which is a contradiction to the minimality of | M 3 |. 2 Lemma 3.2. is exact satisfiable if and only if νur (G ) = νs (G ). Proof. Let be exact satisfiable, and let t : {x1 , . . . , xn } → {0, 1} be some satisfying truth assignment of such that each clause contains exactly one literal that is true under t. Let M arise from {u i f i : i ∈ [n] and t (xi ) = 0} ∪ {u i t i : i ∈ [n] and t (xi ) = 1} by adding, for each j ∈ [m], the edge v j v where v is identified with a literal in c j that is true under
t. Suppose, for a contradiction, that M is not an induced matching, that is, there is some edge e between two edges e 1 and e 2 in M. By construction, we may assume that e 1 = u i y i for y i ∈ { f i , t i } and i ∈ [n], and e 2 = v j z j , where z j is the vertex in C j that is identified with the unique literal in c j that is true under t, for some j ∈ [m]. Therefore, y i and z j are adjacent. If y i = f i , then, by construction, z j is identified with the literal xi , which is a contradiction to the choice of M. Hence, we may assume that y i = t i , which implies that t (xi ) = 1. Furthermore, by construction, z j is identified with a literal from the clause c j distinct from xi , which, by the choice of M, is also true under t, a contradiction. Hence, M is an induced matching of size n + m, which, by Lemma 3.1, implies that νur (G ) = νs (G ). Let νur (G ) = νs (G ), which, by Lemma 3.1, implies that νs (G ) = n + m. Let M = M 1 ∪ M 2 ∪ M 3 be some maximum induced matching in G with
• M 1 ⊆ ni=1 E G ( X i ), • M 2 ⊆ mj=1 E G (C j ), and n n • M3 ⊆ E G i =1 X i , V ( G ) \ i =1 X i minimizing | M 3 |. Suppose, for a contradiction, that M 3 is non-empty. Let i ∈ [n] be such that E G ( X i , V (G ) \ X i ) ∩ M 3 is non-empty. If E G ( X i , V (G ) \ X i ) ∩ M 3 = {uv } where u ∈ X i , then the matching ( M ∪ {u i u }) \ {uv } is induced, which is a contradiction to the minimality of | M 3 |. Hence, we may assume that E G ( X i , V (G ) \ X i ) ∩ M 3 = {t i v , f i w }. First, we assume that v , w ∈ C j for some j ∈ [m]. This implies that v and w are the only vertices in C j that are covered by M. Hence, the matching ( M ∪ {u i f i , v j v }) \ {t i v , f i w } is induced, which is a contradiction to the minimality of | M 3 |. Hence, we may assume that v belongs to C j for some j ∈ [m], and that w belongs to C j for some j ∈ [m] \ { j }. Again by construction, v is the only vertex in C j that is covered by M. Hence, the matching ( M ∪ {u i f i , v j v }) \ {t i v , f i w } is induced, which is a contradiction to the minimality of | M 3 |. Hence, we may assume that M 3 = ∅. Since | M | = n + m, this implies that M ∩ E G ( X i ) and M ∩ E G (C j ) are all non-empty for every i ∈ [n] and j ∈ [m]. Let t : {x1 , . . . , xn } → {0, 1} be defined as t (xi ) = 0 if u i f i ∈ M and t (xi ) = 1 if u i t i ∈ M, and suppose, for a contradiction, that is not exact satisfied under t, that is, there is some clause c = xi ∨ x j ∨ xk such that not exactly one literal is true under t. First, we assume that no literal in c is true under t. This implies that u i f i , u j f j , and uk f k belong to M, which implies that no vertex in C is covered by M, a contradiction. Hence, we may assume that at least two literals in c are true under t, which, by symmetry, implies that u i t i and u j t j both belong to M. Again by construction, this implies that no vertex in C is covered by M, a contradiction. 2 The graphs constructed in the proof of Theorem 2 have maximum degree at most 7. Replacing X 1 , . . . , X n by K 3,3 ’s where the edges of some maximum matching are subdivided once, yields the hardness for graphs of maximum degree 5. The proof of it proceeds along the lines of the proof of Theorem 2. However, the lemma corresponding to Lemma 3.1 becomes quite technical, and so the proof is omitted. Therefore, in view of [6], for restrictions imposed
M. Fürst / Information Processing Letters 147 (2019) 77–81
on the maximum degree, the only case left are the graphs with maximum degree 4. Acknowledgement I would like to thank Dieter Rautenbach for valuable suggestions that helped to improve the presentation of this note. References [1] K. Cameron, Induced matchings, Discrete Appl. Math. 24 (1989) 97–102. [2] K. Cameron, T. Walker, The graphs with maximum induced matching and maximum matching the same size, Discrete Math. 299 (2005) 49–55. [3] M.A. Duarte, F. Joos, L.D. Penso, D. Rautenbach, U.S. Souza, Maximum induced matchings close to maximum matchings, Theor. Comput. Sci. 588 (2015) 131–137. [4] J. Edmonds, Paths, trees, and flowers, Can. J. Math. 17 (1965) 449–467. [5] M. Fürst, D. Rautenbach, On some hard and some tractable cases of the maximum acyclic matching problem, arXiv:1710.08236. [6] M. Fürst, D. Rautenbach, On the equality of the induced matching number and the uniquely restricted matching number for subcubic graphs, arXiv:1807.08981.
81
[7] M.R. Garey, D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, W.H. Freeman and Co., 1979, x+338. [8] W. Goddard, S.M. Hedetniemi, S.T. Hedetniemi, R. Laskar, Generalized subgraph-restricted matchings in graphs, Discrete Math. 293 (2005) 129–138. [9] M.C. Golumbic, T. Hirst, M. Lewenstein, Uniquely restricted matchings, Algorithmica 31 (2001) 139–154. [10] F. Joos, D. Rautenbach, Equality of distance packing numbers, Discrete Math. 338 (2015) 2374–2377. [11] D. Kobler, U. Rotics, Finding maximum induced matchings in subclasses of claw-free and P 5 -free graphs, and in graphs with matching and induced matching of equal maximum size, Algorithmica 37 (2003) 327–346. [12] V.E. Levit, E. Mandrescu, Local maximum stable sets in bipartite graphs with uniquely restricted maximum matchings, Discrete Appl. Math. 132 (2004) 163–174. [13] L.D. Penso, D. Rautenbach, U. Souza, Graphs in which some and every maximum matching is uniquely restricted, J. Graph Theory 89 (2018) 55–63. [14] S. Porschen, T. Schmidt, E. Speckenmeyer, A. Wotzlaw, XSAT and NAESAT of linear CNF classes, Discrete Appl. Math. 167 (2014) 1–14. [15] L.J. Stockmeyer, V.V. Vazirani, NP-completeness of some generalizations of the maximum matching problem, Inf. Process. Lett. 15 (1982) 14–19.