Information and Computation 256 (2017) 196–211
Contents lists available at ScienceDirect
Information and Computation www.elsevier.com/locate/yinco
Exact algorithms for Maximum Induced Matching Mingyu Xiao a,∗ , Huan Tan b a b
School of Computer Science and Engineering, University of Electronic Science and Technology of China, Chengdu 611731, China University of Electronic Science and Technology of China, Chengdu 611731, China
a r t i c l e
i n f o
Article history: Received 31 July 2015 Available online 11 July 2017 Keywords: Exact algorithms Graph algorithms Maximum induced matching
a b s t r a c t This paper studies exact algorithms for the Maximum Induced Matching problem, in which an n-vertex graph is given and we are asked to find a set of maximum number of edges in the graph such that no pair of edges in the set have a common endpoint or are adjacent by another edge. This problem has applications in many different areas. We give several structural properties of the problem and show that the problem can be solved in O ∗ (1.4231n ) time and polynomial space or O ∗ (1.3752n ) time and exponential space. © 2017 Elsevier Inc. All rights reserved.
1. Introduction Recently, there has been an increasing interest in designing fast and nontrivial exact exponential algorithms for basic NP-hard graph problems. Many interesting exact algorithms have been developed for Maximum Independent Set (MIS) [6, 16,23], 3-Coloring [1], Feedback Vertex Set [5,21], Dominating Set [6,10,20], Edge dominating Set [19,22] and many others. Maximum Independent Set is undoubtedly one of the most important problems in exact algorithms. There is a long list of contributions to the running-time bounds of exact algorithms and it can be solved in O ∗ (1.1996n ) time and polynomial space now [23]. Maximum Independent Set is to find a maximum induced regular graph of degree 0. Gupta, Raman and Saurabh [11] studied exact algorithms for finding maximum induced regular graphs of degree r ≥ 0 and presented an algorithm with running time O ∗ ((2 − ξ )n ), where 0 < ξ < 1 depends on r. The special case that r = 1, i.e., the problem to find a maximum induced regular graph of degree 1, is known as Maximum Induced Matching (MIM). In this paper, we will study structural properties and exact algorithms for Maximum Induced Matching. To find an induced matching (i.e., an induced regular graph of degree 1) of maximum size in a graph has received much attention because of the growing number of applications. Stockmeyer and Vazirani [18] showed that MIM has applications in the risk-free marriage problem – to find a maximum number of married couples such that each married person is compatible with no married person other than his/her spouse. Golumbic and Lewenstein [9] demonstrated some applications of induced matchings in secure communication channels, VLSI design and network flow problems. Golumbic and Laskar [8] gave the relations between the size of a maximum induced matching and the irredundancy number of a graph. MIM is also a subtask of the important problem of finding a strong edge coloring (i.e., a proper coloring of the edges such that no edge is adjacent to two edges of the same color) using a small number of colors (see [4,15] for more information). It is not surprising that MIM has been extensively studied on computational and algorithmic aspects. Although MIM is polynomial-time solvable in trees [9], chordal graphs [2], circular arc graphs [8], interval graphs [9] and many others, it has been known to be NP-hard in bipartite graphs with maximum degree 4 for more than 30 years [18]. In fact, it remains NP-hard even in planar 3-regular graphs or in planar bipartite graphs with degree-2 vertices in one part and
*
Corresponding author. E-mail addresses:
[email protected] (M. Xiao),
[email protected] (H. Tan).
http://dx.doi.org/10.1016/j.ic.2017.07.006 0890-5401/© 2017 Elsevier Inc. All rights reserved.
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
197
Fig. 1. Illustrations for dominated vertices, dominated edges and satellites.
degree-3 vertices in the other part [4,12]. Kobler and Rotics [13] also showed the NP-hardness of MIM in Hamiltonian graphs, claw-free graphs, chair-free graphs, line graphs and regular graphs. MIM is hard to approximate or design parameterized algorithms. It is APX-complete even in d-regular graphs for each fixed d ≥ 3 [4]. There is also an approximation algorithm with asymptotic performance ratio d − 1 for MIM in d-regular graphs [4]. In general graphs, MIM cannot be approximated within a factor of n1/2− in polynomial time for any > 0 unless P = N P [15]. Take the size k of the induced matching as the parameter. To decide whether there is an induced matching of size at least k is W[1]-hard even in bipartite graphs, but fixed-parameter tractable in planar graphs, line graphs, graphs of bounded treewidth and graphs of girth at least 6 [14]. In terms of exact algorithms for MIM, Gupta, Raman and Saurabh [11] first gave an algorithm with running-time bound O ∗ (1.6957n ) and then improved it to O ∗ (1.4786n ). We also note another similar algorithm with the same running-time bound O ∗ (1.4786n ) [3]. In a previous version of this paper [25], we obtain a running-time bound of O ∗ (1.4391n ). In this paper, we will improve the running-time bound to O ∗ (1.4231n ) with polynomial space and O ∗ (1.3752n ) with exponential space. First, we use an effective method to deal with ‘satellites’ of vertices with degree ≥ 5 and then we can improve the bottleneck in previous algorithms. Then, we improve the sub-algorithm to compute a maximum induced matching in graphs with maximum degree 4 and get the claimed result of O ∗ (1.4231n ). Finally, we use the classical dynamic programming to further improve the running-time bound to O ∗ (1.3752n ). Unlike previous algorithms, our algorithms will not use fast algorithms for Maximum Independent Set as a subalgorithm to deal with graphs with maximum degree 4. Note that in this paper we will use a modified O -notation that suppresses all polynomially bounded factors. For two functions f and g, we write f (n) = O ∗ ( g (n)) if f (n) = g (n) · ply (n) for some polynomial function ply (n). 2. Preliminaries In this paper, a graph always means a simple and undirected graph. Let G = ( V , E ) be a graph with n = | V | vertices and m = | E | edges. We may simply use v to denote the set { v } of a singleton. The vertex set and edge set of a graph G are denoted by V (G ) and E (G ), respectively. The set of endpoints of edges in an edge set E is denoted by V ( E ). For a subgraph (resp., a vertex subset) X , the subgraph induced by V ( X ) (resp., X ) is simply denoted by G [ X ], and G [ V − V ( X )] (resp., G [ V − X ]) is also written as G − X . For a vertex subset X , let E ( X ) denote the set of edges between X and V − X . Especially, E ( v ) is the set of edges incident on the vertex v. Let N ( X ) denote the set of neighbors of X , i.e., the vertices y ∈ V − X adjacent to a vertex x ∈ X , and denote N ( X ) ∪ X by N [ X ]. Let N 2 ( v ) denote the set of vertices with distance exactly 2 from v. The degree of a vertex v in a graph G, denoted by d( v ), is defined to be the number of neighbors of v in G. A vertex v is dominated by a neighbor u of it if v is adjacent to all neighbors of u. An edge v 1 v 2 is dominated by another edge u 1 u 2 if N [{ v 1 , v 2 }] ⊇ N [{u 1 , u 2 }]. A vertex u ∈ N 2 ( v ) is called a satellite of v if there is a neighbor p of v such that N [ p ] − N [ v ] = {u }. The vertex p is also called the parent of the satellite u at v. Fig. 1 gives illustrations for dominated vertices, dominated edges and satellites. A vertex subset V is called an independent set of a graph if there is no edge between any two vertices in V . An edge subset E is called an induced matching of a graph if the induced graph G [ V ( E )] has maximum degree 1. We will use β(G ) to denote the size of a maximum induced matching in G. For dominated vertices and satellites, we will use the following bounds on the number of vertices adjacent to an edge. Lemma 1. In a graph without dominated vertices, for any edge vu it holds that
| N [{ v , u }]| ≥ 2 + max{d( v ), d(u )}. Proof. Without loss of generality, we assume that d( v ) ≥ d(u ). Note that vertex u has a neighbor w not in N [ v ], otherwise v would be dominated by u. Then N [u ] − N [ v ] contains at least one vertex w. Since N [{ v , u }] = N [ v ] ∪ N [u ] = N [ v ] ∪ ( N [u ] − N [ v ]), we know that | N [{ v , u }]| = | N [ v ]| + | N [u ] − N [ v ]| ≥ (d( v ) + 1) + 1 = d( v ) + 2. 2 Lemma 2. If a vertex v is not dominated by another vertex and has no satellites, then for any edge vu incident on v it holds that
| N [{ v , u }]| ≥ 3 + d( v ).
198
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
Fig. 2. Constructing L (G )<2> from G.
Proof. Let u be an arbitrary neighbor of v. If N [u ] ⊆ N [ v ], then v is dominated by u. If u has only one neighbor w not in N [ v ], then w is a satellite of v. When v is not dominated by another vertex and has no satellites, u must have at least two neighbors not in N [ v ], i.e., | N [u ] − N [ v ]| ≥ 2. Since N [{ v , u }] = N [ v ] ∪ N [u ] = N [ v ] ∪ ( N [u ] − N [ v ]), we know that | N [{ v , u }]| = | N [ v ]| + | N [u ] − N [ v ]| ≥ (d( v ) + 1) + 2 = d( v ) + 3. 2 2.1. Relations to Maximum Independent Set Maximum Induced Matching is to find an induced regular subgraph of degree 1 and Maximum Independent Set is to find an induced regular subgraph of degree 0. We show some relations between them. There is a simple reduction from Maximum Independent Set to Maximum Induced Matching. For a graph G, we construct a new graph G from G by adding a new degree-1 vertex v for each vertex v in G such that v is adjacent to v. It is not hard to prove that the graph G has an independent set of size k if and only if the graph G has an induced matching of size k. There is also a method to reduce an instance of Maximum Induced Matching to an instance of Maximum Independent Set. This technique seems to have been introduced first by Cameron [2] and has been used in several previous algorithms to solve Maximum Induced Matching in some special graph classes. For a graph G = ( V , E ), let L (G ) denote the line graph of G and G
denote the graph with vertex set V and edge set { v j v k | v j , v k ∈ V & the distance between v j and v k in G is at most i }. Fig. 2 illustrates how to construct L (G )<2> from G. It is not hard to observe that Proposition 1. [2] A graph G has an induced matching of size k if and only if L (G )<2> has an independent set of size k. Note that the number of vertices in L (G )<2> equals to the number of edges in G. When the graph G has not many edges, it is possible to use fast algorithms for MIS to solve MIM based on the above proposition. But when the graph is a dense graph, this method will not be effective. 2.2. Branch-and-search algorithms We use the branch-and-search technique in our algorithm. We may search a maximum induced matching of a given graph by recursively branching on the current graph into several smaller graphs until the instance becomes polynomially solvable or satisfies some properties. This paradigm will generate a search tree T in the algorithm. The root of T represents the original instance. Each of other nodes in T represents a sub instance generated by applying a branching rule on the instance corresponding to its parent node. For each no-leaf node of T , the algorithm applies a branching rule and uses polynomial time. Therefore, the exponential part of the running time of the search algorithm is decided by the size of the search tree T . To evaluate the size of T , we need to analyze all branches in it. In our algorithm, we will adopt the number n of vertices in the graph as the measure to evaluate the performance of branches. Since the number of leaves is at least one half of the number of nodes in any search tree, we prefer to upper bound the number of leaves for the sake of presentation. Let C (n) denote the maximum number of leaves in the search tree T generated by the algorithm for any graph with at most n vertices. Assume that, on a node of T , we branch on a graph G with n vertices into l branches such that in the i-th branch the number of vertices decreases by at least ai . This gives a recurrence
C (n) ≤ C (n − a1 ) + C (n − a2 ) + · · · + C (n − al ). There are standard techniques to solve linear recurrences [17,7]. A solution to this linear recurrence is of the form C (n) = cn , l where c is the unique positive real root of the function f (x) = 1 − i =1 x−ai . The value c is also called the branching factor of the recurrence. Let γ be the maximum branching factor among all branching factors in the search tree. Then the size of the search tree T is bounded by γ n [7]. So in our algorithm, we will analyze all branching operations and find the ones l l with the maximum branching factor. Note that for two recurrences C (n) ≤ i =1 C (n − ai ) and C (n) ≤ i =1 C (n − b i ) with ai ≥ b i (i = 1, 2, . . . , l), the branching factor of the first recurrence is not greater than this of the second one. This property will be frequently used in our analysis.
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
199
We can design branch-and-search algorithms for MIM mainly because of the following fact: Fact 1. Let G be a graph, if a vertex v is not in a maximum induced matching, then β(G ) = β(G − v ); if there is a maximum induced matching containing an edge vu, then β(G ) = β(G − N [{ v , u }]) + 1. Proof. Let S be a maximum induced matching of G such that vertex v ∈ / V ( S ). We can see that S is still an induced matching of G − v and then β(G ) = | S | ≤ β(G − v ). On the other hand, for a maximum induced matching S of G , it is still an induced matching of G and then β(G − v ) = | S | ≤ β(G ). So the first claim holds. Assume that S ∗ is a maximum induced matching of G containing vu. No edge in S ∗ − { vu } contains a vertex in N [{ v , u }] because S ∗ is an induced matching. Thus, S ∗ − { vu } is an induced matching of G − N [{ v , u }]. We get that β(G − N [{ v , u }]) ≥ | S ∗ − { vu }| = β(G ) − 1. On the other hand, for a maximum induced matching S of G − N [{ v , u }], S ∪ { vu } is an induced matching of G. We get that β(G ) ≥ | S | + 1 = β(G − N [{ v , u }]) + 1. We know that the second claim also holds. 2 3. The main idea to design algorithms By Proposition 1, we can reduce MIM to MIS and use fast algorithms for MIS to solve MIM when the number of edges in the input graph is not too large. When the maximum degree of the graph is at most 4, the number of edges in the graph is at most two times of the number of vertices. For this case, we can solve MIM in O ∗ (1.19962n ) = O ∗ (1.4391n ) time by using the O ∗ (1.1996n )-time algorithm for MIS in [23]. When the graph has vertices of degree ≥ 5, we will use some branching rules to search a solution. This is an initial idea to design our algorithms. We have a simple branching rule: (B1) Branching on a vertex v of degree d is to generate d + 1 branches by either excluding v from the maximum induced matching or including each edge incident on v to the maximum induced matching. By Fact 1, we know that
β(G ) = max{β(G − v ), max (β(G − N [{ v , u i }]) + 1)}. ui ∈N (v )
(1)
Recall that we use C (n) to denote the number of leaves in the search tree generated by our algorithm when runs on a graph with at most n vertices. Let d = d( v ) be the degree of v. In the branch where edge vu i is included to the maximum induced matching in the above branching operation, at least d + 1 vertices in N [ v ] ⊆ N [{ v , u i }] are deleted. We can get the following recurrence
C (n) ≤ C (n − 1) + d · C (n − (d + 1)).
(2)
Note that it is possible N [ v ] = N [{ v , u i }], since u i may be adjacent to vertices only in N [ v ]. We use Rule (B1) only to deal with vertices of degree ≥ 5. Then we have d ≥ 5 in (2). In fact, (2) has the largest branching factor when d = 5. For this case, we get C (n) ≤ C (n − 1) + 5C (n − 6) and the branching factor is 1.5532. To improve the above result in (2), we can first use effective operations to deal with dominated vertices and then branch on vertices v of degree ≥ 5 with Rule (B1) only when each neighbor u of v is adjacent to at least one vertex in V − N [ v ]. By Lemma 1, we can improve (2) to
C (n) ≤ C (n − 1) + d · C (n − (d + 2)).
(3)
For the worst case that d = 5, the branching factor is 1.4786. This is the idea how the algorithms in [11] and [3] get the running-time bound of O ∗ (1.4786n ). In this paper, we investigate more structural properties of MIM and deal with satellites of vertices of degree ≥ 5 in effective ways. Then we can guarantee that each neighbor u i of v is adjacent to at least two vertices in V − N [ v ] when branching on a vertex v of degree ≥ 5 with Rule (B1). By Lemma 2 we can improve (2) to
C (n) ≤ C (n − 1) + d · C (n − (d + 3)).
(4)
For the worst case that d = 5, the branching factor is 1.4231. Now the bottleneck case is to use fast algorithms for MIS in [23] to solve the problem in graphs with degree at most 4 in O ∗ (1.4391n ). If we reduce the problem in graphs of maximum degree 4 to an instance of Maximum Independent Set, then we can only get the result of O ∗ (1.4391n ) as long as no better algorithm for MIS is proposed. In Section 6, we consider the structure of graphs with maximum degree 4 and propose a fast algorithm to find a maximum induced matching in graphs with maximum degree 4. Then we can improve the running-time bound to O ∗ (1.4231n ). The bottleneck case becomes the case to deal with degree-5 vertices again. In our algorithm, each step only generates induced subgraphs of the original graph. This property allows us to further improve the running-time bound to O ∗ (1.3752n ) by using the dynamic programming. The idea is to save the solutions to instances of small size to avoid solving them twice. These are given in Section 7. In the next section, we first give some structural properties that will be used to design our algorithms.
200
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
Fig. 3. Illustrations for pendent edges, chains and strongly dominated vertices.
4. Structural properties Lemma 3. Let G be an induced subgraph of a graph G. If G has a maximum induced matching S such that S ⊆ E (G ), then any maximum induced matching of G is also a maximum induced matching of G. Proof. Note that S is also an induced matching of G . Since S is a maximum induced matching of G, we know that the size of a maximum induced matching of G is not smaller than the size of a maximum induced matching of G, i.e., β(G ) ≥ β(G ). Furthermore, any induced matching of G is also an induced matching of G, because G is an induced subgraph of G. We know that any maximum induced matching of G is also a maximum induced matching of G. 2 The property in Lemma 3 is called the induced subgraph property of MIM. The induced subgraph property will be used to prove some lemmas. Lemma 4. If a graph G has two nonadjacent vertices v and u such that N ( v ) = N (u ), then β(G ) = β(G ), where G = G − { v }. Proof. Note that G is an induced subgraph of G. By the induced subgraph property in Lemma 3, to prove this lemma we only need to show that there is a maximum induced matching S of G such that S ⊆ E (G ). Let S be a maximum induced matching of G. If S does not contain any edge incident on v, we simply let S = S . Otherwise, S contains an edge v v incident on v. Note that u is adjacent to v and N [ v ] ∪ {u } ⊆ N [{ v , v }]. No vertex in N [ v ] ∪ {u } − { v , v } ⊆ N [{ v , v }] − { v , v } is an endpoint of an edge in S , since S is an induced matching. Therefore, S = ( S − { v v }) ∪ {uv } is also a maximum induced matching of G, which does not contain the vertex v. 2 An edge vu is called pendent if one endpoint v of it is a degree-1 vertex and the neighbor set of the other endpoint u induces two cliques, i.e., G [ N (u )] consists of two cliques. Note that one clique in G [ N (u )] contains only one vertex v. See Fig. 3(a) for an illustration. We have the following lemma to deal with pendent edges. Lemma 5. If a graph has a pendent edge vu, then there is a maximum induced matching containing vu. Proof. We assume that v is a degree-1 vertex. Let S be an arbitrary maximum induced matching in the graph. There is an edge e ∈ S incident on at least one vertex in N [u ], otherwise we could add vu to S to obtain a larger induced matching. Note that each vertex in N [u ] − { v } is either adjacent to an endpoint of e or being an endpoint of e. We can see that S = ( S − {e }) ∪ { vu } is a maximum induced matching containing vu. 2 Note that if a degree-1 vertex is adjacent to a degree-2 vertex or adjacent to a degree-3 vertex contained in a triangle, then the edge incident on the degree-1 vertex is a pendent edge. A path of 5 vertices v 1 v 2 v 3 v 4 v 5 is called a chain if the three inner vertices v 2 , v 3 and v 4 are degree-2 vertices and there is no edge between v 1 and v 5 . See Fig. 3(b) for an illustration. We can use the following lemma to deal with chains. Lemma 6. Let G be a graph having a chain v 1 v 2 v 3 v 4 v 5 , and G ∗ be the graph obtained from G by deleting { v 2 , v 3 , v 4 } and adding a new edge between v 1 and v 5 . It holds that
β(G ) = β(G ∗ ) + 1. Proof. Let S ∗ be a maximum induced matching in G ∗ . If v 1 v 5 ∈ S ∗ , then ( S ∗ − v 1 v 5 ) ∪ { v 1 v 2 , v 4 v 5 } is an induced matching of size β(G ∗ ) + 1 in G. Otherwise, at least one vertex of v 1 and v 5 , say v 1 is not in V ( S ∗ ). We can see that S ∗ ∪ { v 2 v 3 } is an induced matching of size β(G ∗ ) + 1 in G. So we have that
β(G ) ≥ β(G ∗ ) + 1.
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
201
Let S be a maximum induced matching in G and E 0 = { v 1 v 2 , v 2 v 3 , v 3 v 4 , v 4 v 5 }. If S does not contain any edge in E 0 , then S must contain an edge e incident on v 1 , otherwise there would exist an induced matching S ∪ { v 2 v 3 } of larger size. Note that we can replace e with v 1 v 2 in S to get another maximum induced matching. So we assume that S is a maximum induced matching in G such that S ∩ E 0 = ∅. If | S ∩ E 0 | ≥ 2, then the only possible case is that S ∩ E 0 = { v 1 v 2 , v 4 v 5 }. For this case, we can see that ( S − { v 1 v 2 , v 4 v 5 }) ∪ { v 1 v 5 } is an induced matching of size β(G ) − 1 in G ∗ . Otherwise | S ∩ E 0 | = 1. For this case, we can see that at least one of v 1 and v 5 is not in V ( S − E 0 ), otherwise { v 1 , v 5 } ⊆ V ( S − E 0 ) and v 2 , v 4 ∈ / V ( S ), which implies that S ∩ E 0 = ∅. So S − E 0 is an induced matching of size β(G ) − 1 in G ∗ . Then we have
β(G ∗ ) ≥ β(G ) − 1. The above two relations imply that β(G ) = β(G ∗ ) + 1.
2
The operation to construct G ∗ from G in the above lemma is called the chain reduction. Note that the chain reduction will introduce a new edge to the graph and then the resulting graph is not an induced subgraph of the original graph. This is the only operation in the algorithm that does not create an induced subgraph of the original graph. So after an operation of the chain reduction our algorithm branches with Rule (B1) on an endpoint of the new edge immediately to eliminate the new edge. This will guarantee each subgraph after each step of the algorithm is an induced subgraph of the original graph. Recall that for two vertices v and u, if N [ v ] ⊇ N [u ], we say that v is dominated by u. We also say that a vertex v is strongly dominated by two neighbors u 1 and u 2 if v is dominated by u 1 and u 2 , respectively, and there is an edge between u 1 and u 2 . See Fig. 3(c) for an illustration for strongly dominated vertices. A dominated vertex is weakly dominated if it is not strongly dominated by two neighbors. We use the following properties in our algorithms. Lemma 7. If a graph G contains a strongly dominated vertex v, then β(G ) = β(G ), where G = G − { v }. Proof. Note that G is an induced subgraph of G. By the induced subgraph property in Lemma 3, to prove this lemma we only need to show that there is a maximum induced matching S of G such that S ⊆ G . Assume that v is strongly dominated by u 1 and u 2 . Let S be a maximum induced matching of G. If S does not contain any edge incident on v, we simply let S = S . Otherwise, S contains an edge e incident on v. We can see that S = ( S − {e }) ∪ {u 1 u 2 } is also a maximum induced matching of G. The reason is that N [{u 1 , u 2 }] ⊆ N [ v ] and then there is no edge between V ( S − {e }) and N [{u 1 , u 2 }]. 2 Lemma 8. Let v be a vertex dominated by u. If there is a maximum induced matching S such that v ∈ V ( S ), then there is a maximum induced matching S containing edge vu. Proof. If vu ∈ S but u = u, then we obtain another maximum induced matching S = ( S − { vu }) ∪ { vu } containing vu.
2
Lemma 8 has been used to design a branching rule to deal with dominated vertices in previous algorithms [11]. In our algorithms, we will use it to design a branching rule for some weakly dominated vertices. (B2) Branching on a weakly dominated vertex v means to generate two instances by deleting v from the graph or include an edge vu to the maximum induced matching, where u dominates v. Note that if v is weakly dominated by a degree-1 vertex u, then in the branch where v is removed, the vertex u becomes a degree-0 vertex, which can be removed directly. So for this case, we simply assume that v and u are removed in the first branch. We also consider another special kind of weakly dominated vertices, which are dominated by a degree-2 vertex in a triangle. Lemma 9. If there is a degree-2 vertex v in a triangle vu 1 u 2 , then there is a maximum induced matching either containing one edge in { vu 1 , vu 2 } or containing no edge incident on a vertex in { v , u 1 , u 2 }. Especially, if at least one vertex in {u 1 , u 2 } is of degree ≤ 3, then there is a maximum induced matching containing one edge in { vu 1 , vu 2 }. Proof. By Lemma 8, we know that there is a maximum induced matching either containing vu 1 (resp., vu 2 ) or not containing any edge incident on u 1 (resp., u 2 ). If there is a maximum induced matching not containing any edge incident on u 1 or u 2 , then this maximum induced matching does not contain any edge incident on a vertex in { v , u 1 , u 2 }. So the first claim in the lemma holds. If one of {u 1 , u 2 }, say u 1 is of degree ≤ 3 and there is a maximum induced matching S not containing any edge incident on a vertex in { v , u 1 , u 2 }, then u 1 must be adjacent to an edge e in S, otherwise we can add vu 1 into S to get a larger induced matching. Since u 1 is of degree ≤ 3, we know that u 1 is not adjacent to two edges in S. Then S = ( S − {e }) ∪ { vu 1 } is also a maximum induced matching, which contains one edge in { vu 1 , vu 2 }. So if one of {u 1 , u 2 } is of degree ≤ 3, there is always a maximum induced matching containing one edge in { vu 1 , vu 2 }. 2
202
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
Based on Lemma 9, we can design a good branching rule to deal with degree-2 vertices in triangles. (B3) Branching on a degree-2 vertex v with two adjacent neighbors u 1 and u 2 means (i) to generate three subbranches by either removing { v , u 1 , u 2 } from the graph or including each of vu 1 and vu 2 to the maximum induced matching if both of u 1 and u 2 are of degree ≥ 4; (ii) to generate two subbranches by including either vu 1 or vu 2 to the maximum induced matching otherwise. Next, we discuss dominated edges. Recall that an edge u 1 u 2 dominates another edge v 1 v 2 if N [{u 1 , u 2 }] ⊆ N [{ v 1 , v 2 }]. Assume that edge u 1 u 2 dominates edge v 1 v 2 in a graph. We can see that if the graph has a maximum induced matching containing v 1 v 2 , then the graph also has a maximum induced matching containing u 1 u 2 . Using this property of dominated edges, we can get a refined version of Rule (B1) by ignoring some branches of including dominated edges to the maximum induced matching. Let v be a vertex and E 1 be a subset of E ( v ) such that each edge in E 1 is dominated by an edge in E 2 = E (v ) − E 1 . (B4) Branching on a vertex v with edge set E 2 is to generate | E 2 | + 1 branches by either excluding v from the maximum induced matching or including each edge in E 2 to the maximum induced matching. 5. The initial algorithm and its analysis We will use MIM(G ) to denote our initial algorithm that is to compute the size of a maximum induced matching in the input graph G. For the purpose of presentation, our algorithm returns the size of a maximum induced matching instead of the maximum induced matching itself. Our algorithm MIM(G ) is a recursive algorithm that consists of 13 steps, each of which except the last step will call the algorithm itself. We assume that when executing a step all previous steps can not be applied anymore. We will analyze the correctness and running time of each step after describing it. The algorithm is organized as follows. In the first three steps, we just reduce the graph without branching. Step 4 will branch on weakly dominated vertices with a branching factor at most 1.3803. After Step 4, the graph has no dominated vertices. Steps 5–9 are going to deal with degree-2 vertices in the graph. Step 5 and Step 6 will branch on three adjacent degree-2 vertices with a branching factor at most 1.2651. Step 7 will branch on two adjacent degree-2 vertices with a branching factor at most 1.3413. After Step 7, each degree-2 vertex in the graph is adjacent to two vertices of degree ≥ 3. Step 8 will deal with degree-2 vertices with at least a neighbor of degree ≥ 4 by branching with a branching factor at most 1.4231. In Step 9, the algorithm will deal with degree-2 vertices with two degree-3 neighbors and the branching factor is at most 1.3802. After Step 9, the graph has no degree-2 vertex anymore. Step 10 is going to deal with a special case of degree-3 vertices. When there is a degree-3 vertex in a triangle, the algorithm will branch with a branching factor at most 1.4227. After all the above ten steps, the algorithm can branch on satellites of vertices of degree ≥ 5 with a branching factor at most 1.4228. Finally, we can branch on vertices of degree ≥ 5 with (4) in Step 12 and use fast algorithms for MIS to solve the problem in Step 13 when the graph has maximum degree 4. Step 1 (Similar vertex pairs). If the graph has two nonadjacent vertices v and u such that N ( v ) = N (u ), return MIM(G − { v }). The correctness of this step is based on Lemma 4. Step 2 (Pendent edges). If there is a pendent edge vu, return MIM(G − N [{ v , u }]) + 1. The correctness of this step is based on Lemma 5. Step 3 (Strong dominated vertices). If there is a strong dominated vertex v, return MIM(G − { v }). The correctness of this step is based on Lemma 7. Note that each application of the first three steps will decrease the number of vertices in the graph by at least 1. Step 4 (Weakly dominated vertices). If there is a vertex v weakly dominated by u in the graph G, branch on v with Rule (B2) by returning
max{MIM(G − { v }), MIM(G − N [{ v , u }]) + 1}. An illustration for Step 4 is given in Fig. 4. The correctness of this step is based on Lemma 8. Next we analyze the recurrence generated by this branch. Let d = d( v ) be the degree of v. We have that d ≥ 3, otherwise there would be a pendent edge or a strong dominated vertex. In the branch where vu is included to the maximum induced matching, the d + 1 vertices in N [ v ] are eliminated. This branch leads to the following recurrence
C (n) ≤ C (n − 1) + C (n − (d + 1)) with d ≥ 3. For the worst case that d = 3, the recurrence has a maximum branching factor of 1.3803.
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
203
Fig. 4. Step 4.
Fig. 5. Step 6.
Note that there is a dominated vertex when there is a degree-1 vertex. We have that Fact 2. The graph after Step 4 has no degree-1 vertex. Step 5 (Chains). If there is a chain v 1 v 2 v 3 v 4 v 5 , then firstly update the graph by applying the chain reduction, i.e., deleting v 2 , v 3 and v 4 and adding an edge between v 1 and v 5 , and secondly branch on v 1 with Rule (B1) by returning
1 + max{MIM(G − v 1 ), 1 + max {MIM(G − N [{ v 1 , u }])}}. u∈N (v 1 )
The correctness of the chain reduction is based on Lemma 6. Note that after branching on v 1 with Rule (B1), the newly added edge v 1 v 5 in each subgraph is eliminated and then the subgraph is an induced subgraph of the original graph. Next, we analyze the performance of this branching operation. The operation of the chain reduction reduces the number of vertices by 3 directly. Note that the degree of v 1 will not change after the chain reduction. Let d ≥ 2 denote the degree of v 1 before branching. In the branching operation, when an edge incident on v 1 is included to the maximum induced matching, at least | N [ v 1 ]| = d + 1 vertices are eliminated. We get a recurrence
C (n) ≤ C (n − 3 − 1) + d · C (n − 3 − (d + 1)) = C (n − 4) + d · C (n − 4 − d), where d ≥ 2. By letting d = 2, 3 and 4, we get branching factors 1.2335, 1.2583 and 1.2651, respectively. Let C (n) = 1.2651n . We can verify that C (n − 4) + d · C (n − 4 − d) ≥ C (n − 4) + (d + 1) · C (n − 4 − (d + 1)) holds for each d ≥ 4. Thus, the above recurrence has a branching factor not greater than 1.2651 for any d ≥ 2. Step 6 (Pentagons with three adjacent degree-2 vertices). If there is a 5-cycle v 1 v 2 v 3 v 4 v 5 such that v 2 , v 3 and v 4 are degree-2 vertices, then we branch into three branches by including each edge in { v 1 v 5 , v 2 v 3 , v 3 v 4 } to the maximum induced matching, i.e., return
1 + max{MIM(G − N [{ v 1 , v 5 }]), MIM(G − N [{ v 2 , v 3 }]), MIM(G − N [{ v 3 , v 4 }])}. An illustration for Step 6 is given in Fig. 5. The correctness of this step is based on the following observation. There are only three cases that either v 1 v 5 is in the maximum induced matching or at least one of v 1 and v 5 is not in the maximum induced matching. When v 1 (resp., v 5 ) is not in a maximum induced matching, we delete it and v 2 v 3 (resp., v 3 v 4 ) becomes
204
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
Fig. 6. Step 7.
Fig. 7. Step 8.
a pendent edge and can be included to the maximum induced matching directly. Then it is equivalent to include v 2 v 3 (resp., v 3 v 4 ) to the maximum induced matching. Next we analyze the recurrence in this step. When v 1 v 5 is included to the maximum induced matching, at least the 5 vertices in the 5-cycle are eliminated. When v 2 v 3 (resp., v 3 v 4 ) is included to the maximum induced matching, at least 4 vertices { v 1 , v 2 , v 3 , v 4 } (resp., { v 2 , v 3 , v 4 , v 5 }) are eliminated. We get a recurrence
C (n) ≤ C (n − 5) + 2C (n − 4), which has a branching factor of 1.2168. Note that after Step 6 there is no degree-2 vertex adjacent to two degree-2 vertices, otherwise either Step 5 or Step 6 could be applied in the graph. Step 7 (Pairs of adjacent degree-2 vertices). If there is a path v 1 v 2 v 3 v 4 such that v 2 and v 3 are degree-2 vertices and v 1 and v 4 are of degree ≥ 3, then we first branch on v 1 with Rule (B1) and in the subbranch where v 1 is deleted we include the pendent edge v 2 v 3 to the maximum induced matching directly, i.e., return
max{1 + max {MIM(G − N [{ v 1 , u }])}, 1 + MIM(G − { v 1 , v 2 , v 3 , v 4 })}. u∈N (v 1 )
Note that v 1 = v 4 in the path otherwise there would be some dominated vertex. An illustration for Step 7 is given in Fig. 6. Let d = d( v 1 ) be the degree of v 1 . There is no dominated vertex in this step. By Lemma 1, when an edge v 1 u incident on v 1 is included to the maximum induced matching, at least d + 2 vertices are removed. So we get a recurrence
C (n) ≤ d · C (n − (d + 2)) + C (n − 4) with d ≥ 3. For the worst case that d = 3, the recurrence has a maximum branching factor of 1.3413. Step 8 (Degree-2 vertices adjacent to a vertex of degree ≥ 4). Assume that there is a degree-2 vertex v adjacent to a vertex u 1 of degree ≥ 4. The other neighbor u 2 of v is a vertex of degree ≥ 3, since there are no two adjacent degree-2 vertices now. For this case, we first branch on u 1 with Rule (B1) and in the subbranch where u 1 is deleted we branch on the dominated vertex u 2 with Rule (B2), i.e., return
max{1 + max {MIM(G − N [{u 1 , u }])}, MIM(G − {u 1 , v , u 2 }), 1 + MIM(G − N [{ v , u 2 }])}. u ∈ N (u 1 )
An illustration for Step 8 is given in Fig. 7. Let d1 ≥ 4 and d2 ≥ 3 be the degree of u 1 and u 2 , respectively. By Lemma 1, at least d1 + 2 vertices are removed when an edge u 1 u incident on u 1 is included to the maximum induced matching, and at least d2 + 2 vertices are removed when vu 2 is included to the maximum induced matching. We get a recurrence
C (n) ≤ d1 · C (n − (d1 + 2)) + C (n − 3) + C (n − (d2 + 2)) with d1 ≥ 4, d2 ≥ 3. For the worst case that d1 = 4 and d2 = 3, the recurrence has a maximum branching factor of 1.4231.
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
205
Fig. 8. Step 9.
Step 9 (Degree-2 vertices with two degree-3 neighbors). If the graph after Step 8 still has a degree-2 vertex v, then it must have two nonadjacent degree-3 neighbors, say u 1 and u 2 . They are not adjacent because there is no dominated vertex. We give a deep analysis for this step since it will also be used to get an improved result in the next section. We consider three cases. Case 1. None of u 1 and u 2 appears in the maximum induced matching: We delete { v , u 1 , u 2 } from the graph. The number of vertices decreases by 3. Case 2. Only one of u 1 and u 2 , say u i (i ∈ {1, 2}), appears in the maximum induced matching: We can see that there is a maximum induced matching containing edge u i v. Then we include u i v to the maximum induced matching and delete N [{u i , v }] from the graph. The number of vertices decreases by at least d(u i ) + 2 = 5. Case 3. Both of u 1 and u 2 appear in the maximum induced matching. Since u 1 and u 2 are not adjacent, they must be in two different edges in the maximum induced matching. For this case, we generate up to four branches by considering all possible configurations. Let N (u 1 ) = { v , w 1 , w 2 } and N (u 2 ) = { v , w 3 , w 4 }, where it is possible { w 1 , w 2 } ∩ { w 3 , w 4 } = ∅. We first generate two branches by including u 1 w i for i = 1 and 2 to the maximum induced matching and deleting N [{u 1 , w i }] from the graph, where the resulting graph is denoted by G i . In these two branches, the number of vertices decreases by at least 5. In G i , if u 2 is deleted or becomes a degree-0 vertex, we simply ignore this branch because u 2 cannot be in an edge in the maximum induced matching anymore; if u 2 has a neighbor v ∗ dominating it or has only one neighbor v ∗ , we further include u 2 v ∗ to the maximum induced matching and delete N [{u 2 , v ∗ }] from G i by decreasing the number of vertices by at least 2; otherwise it holds N [{u 1 , w i }] ∩ { w 3 , w 4 } = ∅ in G and we further branch into two branches by including u 2 w j to the maximum induced matching and deleting N [{u 2 , w j }] from the graph for j = 3 and 4. In each branch the number of vertices decreases by at least 4 since u 2 is not dominated by a neighbor and w j is adjacent to a vertex not in N [u 2 ]. An illustration for this step is given in Fig. 8. The above branching operation will generate a recurrence covered by one of the following three:
C (n) ≤ C (n − 3) + 2C (n − 5) + 2C (n − (5 + 2)),
(5)
C (n) ≤ C (n − 3) + 2C (n − 5) + C (n − (5 + 2)) + 2C (n − (5 + 4)),
(6)
C (n) ≤ C (n − 3) + 2C (n − 5) + 4C (n − (5 + 4)).
(7)
and
The branching factor of the three recurrences are 1.3771, 1.3787 and 1.3802, respectively. Fact 3. The graph after Step 9 has no degree-2 vertex. Step 10 (Degree-3 vertices in triangles). If there is a degree-3 vertex v with three neighbors u 1 , u 2 and u 3 such that u 2 and u 3 are adjacent, then we first branch on u 1 with Rule (B1) and in the subbranch where u 1 is deleted we branch on the degree-2 vertex v in the triangle vu 2 u 3 with Rule (B3), i.e., return
max{1 + max {MIM(G − N [{u 1 , u }])}, MIM(G − { v , u 1 , u 2 , u 3 }), u ∈ N (u 1 )
1 + MIM(G − N [{ v , u 2 }]), 1 + MIM(G − N [{ v , u 3 }])} if both of u 2 and u 3 are of degree ≥ 4, and
1 + max{ max {MIM(G − N [{u 1 , u }])}, MIM(G − N [{ v , u 2 }]), MIM(G − N [{ v , u 3 }])} u ∈ N (u 1 )
206
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
Fig. 9. Step 10 with u 2 and u 3 being of degree ≥ 4.
Fig. 10. Step 10 with at least one of u 2 and u 3 being of degree 3.
if at least one of u 2 and u 3 is of degree 3. An illustration for the case that both of u 2 and u 3 are of degree ≥ 4 is given in Fig. 9 and an illustration for the case that at least one of u 2 and u 3 is of degree 3 is given in Fig. 10. Note that none of u 2 and u 3 can be a vertex of degree ≤ 2 since there is no dominated vertex. Let d ≥ 2 be the degree of u 1 . By Lemma 1, when u 1 u is included to the maximum induced matching, at least d + 2 vertices are removed. When vu i (i ∈ {2, 3}) is included to the maximum induced matching, at least 5 vertices are removed if the degree of u i is 3 and at least 6 vertices are removed if the degree of u i is at least 4. So we get recurrences
C (n) ≤ d · C (n − (d + 2)) + C (n − 4) + 2C (n − 6) with d ≥ 2,
and
C (n) ≤ d · C (n − (d + 2)) + 2C (n − 5) with d ≥ 2. When d = 3, the above two recurrences have the maximum branching factors of 1.4227 and 1.3798, respectively. Step 11 (Satellites of vertices of degree ≥ 5). Assume that there is a satellite u of a vertex v with d = d( v ) ≥ 5. Let p denote the parent of u at v. There is no vertex of degree ≤ 2 after Step 9. Vertex p cannot be a degree-3 vertex, otherwise v should be adjacent to another neighbor of p and then Step 10 could be applied. Then p is a vertex of degree ≥ 4 and u is a vertex of degree ≥ 3 with all neighbors of degree ≥ 3. We consider two cases. Case (i). There are at least two edges in E ( v ) dominated by vp: We let E 1 denote the set of edges in E ( v ) dominated by vp and E 2 = E ( v ) − E 1 . We branch on v with Rule (B4), i.e., return
max{1 + max MIM(G − N [{ v , v }]), MIM(G − { v })}. v v∈E2
An illustration for Case (i) is given in Fig. 11. There are at least two edges in E 1 and then | E 2 | ≤ d − 2. At least d + 2 vertices are deleted in each branch where an edge in E 2 is included to the maximum induced matching. We get a recurrence:
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
207
Fig. 11. Case (i) in Step 11.
Fig. 12. Case (ii) in Step 11.
C (n) ≤ C (n − 1) + (d − 2) · C (n − (d + 2)) with d ≥ 5. When d = 5, the recurrence has a maximum branching factor of 1.3995. Case (ii). There is at most one edge in E ( v ) dominated by vp: We first branch on u with Rule (B1) and in the subbranch where u is deleted we further branch on the dominated vertex v with Rule (B2), i.e., return
max{1 + max {MIM(G − N [{u , u }])}, MIM(G − {u , v }), 1 + MIM(G − N [{ v , p }]).} u ∈ N (u )
An illustration for Case (ii) is given in Fig. 12. In the branch where u and v are deleted, the number of vertices decreases by 2. In the last branch, the number of vertices decreases by | N [{ v , p }]| ≥ d + 2. To analysis the first d(u ) branches, we consider the degree of u. Case (ii-1). d(u ) = 3: Now u and p have no common neighbor otherwise there would be a degree-3 vertex in a triangle and Step 10 could be applied. We know that | N [{u , u }]| ≥ 6 for each u ∈ N (u ), since there is neither degree-2 vertex nor degree-3 vertex in a triangle. Furthermore, we have that | N [{u , p }]| ≥ 7, because p is a vertex of degree ≥ 4 and u and p have no common neighbor. So we get a recurrence
C (n) ≤ 2C (n − 6) + C (n − 7) + C (n − 2) + C (n − (d + 2)) with d ≥ 5. When d = 5, the recurrence has a maximum branching factor of 1.3881. Case (ii-2). d(u ) = 4: Note that for each common neighbor p 1 of p and u, vertex p 1 must be a neighbor of v, and edge vp is dominated by edge vp. Since there is at most one edge in E ( v ) dominated by vp in Case (ii), we know that p and u have at most one common neighbor. If u and p have no common neighbor, then | N [{u , p }]| ≥ 8 since p is of degree ≥ 4. We can get a recurrence
C (n) ≤ 3C (n − 6) + C (n − 8) + C (n − 2) + C (n − (d + 2)) with d ≥ 5. When d = 5, the recurrence has a maximum branching factor of 1.4228. If u and p have exactly one common neighbor p ∗ , then | N [{u , p }]| ≥ 7. Furthermore, we will show that there is another neighbor u = p of u such that | N [{u , u }]| ≥ 7. Let N (u ) = { p , p ∗ , w 1 , w 2 }. There is no edge between p and { w 1 , w 2 }. It is impossible that both of w 1 and w 2 are adjacent to p ∗ , otherwise p ∗ would be dominated by u. Then at least one of w 1 and w 2 , say w 1 is adjacent to at most one vertex in N (u ). Vertex w 1 can not be a degree-2 vertex or a degree-3 vertex in a triangle. Then w 1 is adjacent to at least two vertices out of N [u ] and then | N [{u , w 1 }]| ≥ 7. We can get a recurrence
C (n) ≤ 2C (n − 6) + 2C (n − 7) + C (n − 2) + C (n − (d + 2)) with d ≥ 5. When d = 5, the recurrence has a maximum branching factor of 1.4192.
208
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
Case (ii-3). d(u ) ≥ 5: For the same reason, we know that p and u have at most one common neighbor. Let d1 = d(u ). Then | N [{u , p }]| ≥ d1 + 3. We can get a recurrence
C (n) ≤ (d1 − 1) · C (n − (d1 + 2)) + C (n − (d1 + 3)) + C (n − 2) + C (n − (d + 2)) with d1 , d ≥ 5. When d1 = d = 5, the recurrence has a maximum branching factor of 1.4156. Step 12 (Vertices of maximum degree ≥ 5). If there is a vertex v of degree ≥ 5, then branch on it with Rule (B1), i.e., return
max{1 + max {MIM(G − N [{ v , u }])}, MIM(G − v )}. u∈N (v )
Since in this step there is neither dominated vertex nor vertex of degree ≥ 5 having satellites, this branch leads to (4), i.e., C (n) ≤ C (n − 1) + d · C (n − (d + 3)) with d = d( v ) ≥ 5. For the worst case that d = 5, the branching factor is 1.4231. Step 13 (Graphs with maximum degree at most 4). Construct the graph L (G )<2> in Proposition 1, use the O ∗ (1.1996n )-time algorithm for MIS [23] to compute the size θ of a maximum independent set in L (G )<2> , and return θ . Since the graph in this step is of maximum degree 4, we know that there are at most 2n vertices in L (G )<2> , where n is the number of vertices in the graph G in this step. This step can be executed in O ∗ (1.4391n ) time. We can regard that the algorithm always branches with a branching factor at most 1.4391 in this step. Before Step 13 the algorithm can always branch with a branching factor at most 1.4231. Step 13 has the worst performance. In the worst case, for example the input graph is a graph with maximum degree 4, the algorithm may only excuse Step 13 and the running time will be O ∗ (1.4391n ). Each of the first twelve steps uses polynomial space and the algorithm for MIS in [23] uses only polynomial space. We have a conclusion that Lemma 10. A maximum induced matching in a graph with n vertices can be computed in O ∗ (1.4391n ) time and polynomial space. 6. A better way to deal with degree-4 graphs In the above algorithm, the bottleneck is to deal with graphs with maximum degree 4, where we use fast algorithms for Maximum Independent Set. If we still use the mechanism to reduce the problem in graphs of maximum degree 4 to an instance of Maximum Independent Set, then we can not improve the result anymore as long as no better algorithm for MIS is proposed. In this section, we consider a method to solve MIM in graphs of maximum degree 4 directly and avoid using algorithms for MIS. Note that the graph after Step 12 is a graph containing only degree-3 and degree-4 vertices. Once the graph has a vertex of degree ≤ 2, we apply some previous steps to deal with them effectively. We assume that the first 12 steps in the above algorithm can not be applied anymore and the graph has only degree-3 and degree-4 vertices. Our algorithm is still a branch-and-search algorithm. It contains several steps. Step *1 (Regular graphs of degree 4 or 3). When the graph is a regular graph of degree 4 or 3, then arbitrarily select a vertex v and branch on it with Rule (B1), i.e., return
max{1 + max {MIM(G − N [{ v , u }])}, MIM(G − v )}. u∈N (v )
We do not analyze this step, because this step will not exponentially increase the running-time bound of the algorithm. It is based on the fact that any proper induced subgraph of a connected 3-regular (resp. 4-regular) graph is not a 3-regular (resp. 4-regular) graph. The detailed proof is given later. Step *2 (Degree-3 vertices with two degree-4 neighbors). If the graph has a degree-3 vertex v with two degree-4 neighbors u 1 and u 2 , then branch on v with Rule (B1), i.e., return
max{1 + max {MIM(G − N [{ v , u }])}, MIM(G − v )}. u∈N (v )
Since we assume no degree-3 vertex is contained in a triangle now, we can see that | N [{ v , u i }]| ≥ 7 for i = 1, 2. Then we can get a recurrence
C (n) ≤ C (n − 6) + 2C (n − 7) + C (n − 1), the branching factor of which is 1.4190. Step *3 (Degree-4 vertices with degree-3 neighbors (type-I)). In this step, we assume that v is a degree-4 vertex having a degree-3 neighbor u and N ( v ) induces two cliques. Since there is no dominated vertex or degree-3 vertex in a triangle, we know that u is not adjacent to other vertices in N ( v ) and then N ( v ) − {u } induces a triangle. Let N ( v ) − {u } = {u 1 , u 2 , u 3 }. We know that each of {u 1 , u 2 , u 3 } is a degree-4 vertex. The only possible configuration of this case is shown in Fig. 13. For this case, we first branch on u with Rule (B1) and then in the branch where u is deleted we branch on the dominated vertex u 1 with Rule (B2), i.e., return
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
209
Fig. 13. Step *3.
max{1 + max {MIM(G − N [{u , u }])}, MIM(G − {u , u 1 }), 1 + MIM(G − N [{ v , u 1 }])}. u ∈ N (u )
Let N (u ) = { v , w 1 , w 2 }. In the branch where u w i (i = 1, 2) is included to the maximum induced matching, the number of vertices decreases by at least 6. In the branch where uv is included to the maximum induced matching, the number of vertices decreases by 7. In the branch where vu 1 is included to the maximum induced matching, the number of vertices decreases by 6. Then we can get a recurrence
C (n) ≤ 2C (n − 6) + C (n − 7) + C (n − 2) + C (n − 6), the branching factor of which is 1.4013. Step *4 (Degree-4 vertices with degree-3 neighbors (type-II)). In this step, we assume that v is a degree-4 vertex having a degree-3 neighbor u and it is not of the case in Step *3. This is the hardest case in our algorithm. In fact we do not find a direct branching rule to get a recurrence with branching factor at most 1.4231. We will use a technique called ‘shift’ [21,24] to achieve our claimed result. In this step, we first branch on v with Rule (B1), i.e., return
max{1 + max {MIM(G − N [{ v , u }])}, MIM(G − v )}. u ∈N (v )
First of all, we show that there is at most one neighbor of v adjacent to only one vertex in N 2 ( v ). Assume to the contrary that two neighbors u 1 and u 2 are adjacent to only one vertex in N 2 ( v ). Then both of u 1 and u 2 are degree-4 vertices adjacent to two vertices in N ( v ) since there is no degree-3 vertex in a triangle. The degree-3 vertex u is not adjacent to any other vertex in N ( v ). Then N ( v ) − {u } induces a clique. It will become the case in Step *3. So at least three neighbors of v are adjacent to two or more vertices in N 2 ( v ). We can get a recurrence
C (n) ≤ 3C (n − 7) + C (n − 6) + C (n − 1),
(8)
the branching factor of which is 1.4602. This branching factor is worse than our claimed result of 1.4231. However, we observe that this worst case will not always happen. In the branch where v is deleted, u becomes a degree-2 vertex with two degree-3 neighbors (u is not adjacent to any degree-4 vertex because Step *2 has been applied). Then previous Step 9 can be applied in this branch to get one of (5), (6) and (7), which are much better than (8). We can combine (8) with (5), (6) and (7) respectively to get three recurrences better than (8). The combined recurrences are very long. For the purpose of presentation, we adopt the technique of ‘shift’ introduce in [21,24] to analyze this case. We remove an amount σ = 0.4 of the measure decrease in each branches of (5), (6) and (7) to obtain three worse recurrences
C (n) ≤ C (n − 3 + σ ) + 2C (n − 5 + σ ) + 2C (n − 7 + σ ),
(9)
C (n) ≤ C (n − 3 + σ ) + 2C (n − 5 + σ ) + C (n − 7 + σ ) + 2C (n − 9 + σ ),
(10)
C (n) ≤ C (n − 3 + σ ) + 2C (n − 5 + σ ) + 4C (n − 9 + σ ).
(11)
and
We say that the amount σ is saved from the recurrences (5), (6) and (7). The saved measure decrease the measure decrease of the last branch in (8) to get
C (n) ≤ 3C (n − 7) + C (n − 6) + C (n − 1 − σ ).
σ will be added to (12)
To analyze the running-time bound of our algorithm, we use (9), (10), (11) and (12) instead of (5), (6), (7) and (8). The branching factors of (9), (10), (11) and (12) are 1.4194, 1.4192, 1.4189 and 1.4166, respectively. Now we are ready to prove the following lemmas.
210
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
Lemma 11. A maximum induced matching in an n-vertex graph with maximum degree 4 can be computed in O ∗ (1.4231n ) time and polynomial space. Proof. If one of Steps 1 to 10 can be applied, we apply it to reduce the instance directly or branch with a branching factor at most 1.4231. Else if the graph is not a regular graph of degree 3 or 4, we can always find a degree-4 vertex having a degree-3 neighbor and then one of Step *2, Step *3 and Step *4 can be applied to branch with a branching factor at most 1.4231. The only remaining case is that the graph is a 3-regular or 4-regular graph. We show that the problem can be solved in O ∗ (1.4231n ) time when the input graph is a connected 3-regular graph. Any proper induced subgraph of a connected 3-regular graph is not a 3-regular or 4-regular graph. So when the input graph is a connected 3-regular graph, Step *1 will be executed for at most one time, which only takes polynomial time. For each connected component of a 3-regular graph, the algorithm runs in O ∗ (1.4231n ) time. Then for any 3-regular graph, the algorithm also runs in O ∗ (1.4231n ) time. Next, we consider the case that the input graph is a connected 4-regular graph. Any proper induced subgraph of a connected 4-regular graph is not a 4-regular graph again. So Step *1 will be executed for at most one time on a 4-regular graph. For other steps, the algorithm either branches with a branching factor at most 1.4231 or runs on an input graph of a connected 3-regular graph, which can be regarded as an algorithm with running time O ∗ (1.4231n ). So the algorithm also runs in O ∗ (1.4231n ) time for 4-regular graphs. Each step uses only polynomial space. The lemma holds. 2 After replacing Step 13 with Steps *1 to *4 in the algorithm in Section 5, we get another algorithm for Maximum Induced Matching. With Lemma 11 and its proof, we know that this algorithm runs in O ∗ (1.4231n ). Theorem 1. A maximum induced matching in an n-vertex graph can be computed in O ∗ (1.4231n ) time and polynomial space. 7. Reducing the time complexity via dynamic programming In the above algorithms, each reduction and branching rule only create instances of induced subgraphs. This property allow us to further improve the running-time bound by using the classic dynamic programming. This technique was firstly used by Robson [16] to reduce the running-time bound for Maximum Independent Set and later it was used in some other problems [10,20]. For a branch-and-search algorithm, when solving an instance, the same sub-instances can appear many times. The idea is then to store in a database the solutions to sub-instances of size at most ηn (1 ≤ η ≤ 0). Whenever a sub-instance of size at most ηn is generated, this database is checked to see whether the solution to this sub-instance is already available. This way, one ensures that a given sub-instance of size at most ηn is solved at most once. The database can be implemented in such a way that the query time is logarithmic in the number of solutions stored [16,10]. We can interpret the algorithm as follows. Firstly, we compute solutions to the instances of size at most ηn in the ηn the n database in a dynamic programming way, which takes O ∗ ( i =0 i ) time and space. In the dynamic programming, we solve instances increasing the size of the instance, by using the formula in (1). At the time when we solve an instance, all instances with a smaller size have been solved and we can retrieve each solution ηn nof them in polynomial query time. So we can solve each instance in polynomial time by using (1). There are O ∗ ( i =0 i ) instances. Totally, the algorithm uses
ηn n
O ∗ ( i =0 i ) time and space. Secondly, we use our branch-and-search method to branch with branching factors at most 1.4231 when the size of the instance is more than ηn. We get a search tree, in each leaf of which we reach an instance of size at most ηn. On each leaf our algorithm searches the database in polynomial query time. The size of the search tree is O (1.4231(n−ηn) ). By Stirling’s approximation, we know that ηn n i =0
i
= O ∗ (cn ),
where c = ηη (1−1η)1−η . Let η = 0.09705. Then c = 1.3752 and 1.4231(n−ηn) = 1.3752n . Therefore, the algorithm uses O ∗ (1.3752n ) time and space. Theorem 2. A maximum induced matching in an n-vertex graph can be computed in O ∗ (1.3752n ) time and space. 8. Concluding remarks Improved exact algorithms for Maximum Induced Matching are presented in this paper. We use three major techniques to obtain the improvement. The first one is an effective method to deal with satellites of vertices with degree at least 5. The second one is to effectively solve the problem in graphs with maximum degree 4. The last one is the dynamical programming. Unlike previous algorithms for MIM, our algorithms do not invoke fast algorithms for MIS anymore.
M. Xiao, H. Tan / Information and Computation 256 (2017) 196–211
211
Acknowledgments This work is supported by the National Natural Science Foundation of China, under grant 61370071, and the Fundamental Research Funds for the Central Universities, under grant ZYGX2015J057. References [1] R. Beigel, D. Eppstein, 3-coloring in time O (1.3289n ), J. Algorithms 54 (2) (2005) 168–204. [2] K. Cameron, Induced matchings, Discrete Appl. Math. 24 (1989) 97–102. [3] M.-S. Chang, L.-J. Hung, C.-A. Miau, An O ∗ (1.4786n )-time algorithm for the maximum induced matching problem, in: R.-S. Chang, et al. (Eds.), Advances in Intelligent Systems and Applications, in: SIST, vol. 20, 2013, pp. 49–58. [4] W. Duckwortha, D.F. Manloveb, M. Zito, On the approximability of the maximum induced matching problem, J. Discret. Algorithms 3 (1) (2005) 79–91. [5] F.V. Fomin, S. Gaspers, A.V. Pyatkin, I. Razgon, On the minimum feedback vertex set problem: exact and enumeration algorithms, Algorithmica 52 (2) (2008) 293–307. [6] F.V. Fomin, F. Grandoni, D. Kratsch, A measure & conquer approach for the analysis of exact algorithms, J. ACM 56 (5) (2009) 1–32. [7] F.V. Fomin, D. Kratsch, Exact Exponential Algorithms, Springer, 2010. [8] M.C. Golumbic, R. Laskar, Irredundancy in circular arc graphs, Discrete Appl. Math. 44 (1993) 79–89. [9] M.C. Golumbic, M. Lewenstein, New results on induced matchings, Discrete Appl. Math. 101 (2000) 157–165. [10] F. Grandoni, A note on the complexity of minimum dominating set, J. Discret. Algorithms 4 (2006) 209–214. [11] S. Gupta, V. Raman, S. Saurabh, Maximum r-regular induced subgraph problem: fast exponential algorithms and combinatorial bounds, SIAM J. Discrete Math. 26 (4) (2012) 1758–1780. [12] C.W. Ko, F.B. Shepherd, Bipartite domination and simultaneous matroid covers, SIAM J. Discrete Math. 16 (4) (2003) 517–523. [13] D. Kobler, U. Rotics, Finding maximum induced matchings in subclasses of claw-free and P5-free graphs, and in graphs with matching and induced matching of equal maximum size, Algorithmica 37 (2003) 327–346. [14] H. Mosera, S. Sikdar, The parameterized complexity of the induced matching problem, Discrete Appl. Math. 157 (2009) 715–727. [15] Y. Orlovicha, G. Finkeb, V. Gordonc, I. Zverovichd, Approximability results for the maximum and minimum maximal induced matching problems, Discrete Optim. 5 (2008) 584–593. [16] J.M. Robson, Algorithms for maximum independent sets, J. Algorithms 7 (1986) 425–440. [17] K. Rosen, Discrete Mathematics and Its Applications, McGraw–Hill, 1999. [18] L.J. Stockmeyer, V.V. Vazirani, NP-completeness of some generalizations of the maximum matching problem, Inf. Process. Lett. 15 (1) (1982) 14–19. [19] J.M. Van Rooij, H.L. Bodlaender, Exact algorithms for edge domination, Algorithmica 64 (4) (2012) 535–563. [20] J.M. Van Rooij, H.L. Bodlaender, Exact algorithms for dominating set, Discrete Appl. Math. 159 (17) (2011) 2147–2164. [21] M. Xiao, H. Nagamochi, An improved exact algorithm for undirected feedback vertex set, J. Comb. Optim. 30 (2) (2015) 214–241. [22] M. Xiao, H. Nagamochi, A refined exact algorithm for edge dominating set, Theor. Comput. Sci. 560 (2014) 207–216. [23] M. Xiao, H. Nagamochi, Exact algorithms for maximum independent set, Inf. Comput. (2017), http://dx.doi.org/10.1016/j.ic.2017.06.001. [24] M. Xiao, H. Nagamochi, An exact algorithm for maximum independent set in degree-5 graphs, Discrete Appl. Math. 199 (2016) 137–155. [25] M. Xiao, H. Tan, An improved exact algorithm for maximum induced matching, in: R. Jain, et al. (Eds.), TAMC 2015, in: Lect. Notes Comput. Sci., vol. 9076, 2015, pp. 272–283.