Polynomial-time algorithm for weighted efficient domination problem on diameter three planar graphs

Polynomial-time algorithm for weighted efficient domination problem on diameter three planar graphs

Information Processing Letters 140 (2018) 25–29 Contents lists available at ScienceDirect Information Processing Letters www.elsevier.com/locate/ipl...

246KB Sizes 0 Downloads 57 Views

Information Processing Letters 140 (2018) 25–29

Contents lists available at ScienceDirect

Information Processing Letters www.elsevier.com/locate/ipl

Polynomial-time algorithm for weighted efficient domination problem on diameter three planar graphs G. Abrishami, F. Rahbarnia ∗ Department of Applied Mathematics, Ferdowsi University of Mashhad, P. O. Box 1159, Mashhad 91775, Iran

a r t i c l e

i n f o

Article history: Received 22 July 2017 Received in revised form 27 July 2018 Accepted 13 August 2018 Available online 20 August 2018 Communicated by Marcin Pilipczuk Keywords: Graph algorithms Efficient domination Weighted efficient domination Planar graph Diameter

a b s t r a c t A set D of vertices in a graph G is an efficient dominating set (e.d.s. for short) of G if D is an independent set and every vertex not in D is adjacent to exactly one vertex in D. The efficient domination (ED) problem asks for the existence of an e.d.s. in G. The minimum weighted efficient domination problem (MIN-WED for short) is the problem of finding an e.d.s. of minimum weight in a given vertex-weighted graph. Brandstädt, Fiˇcur, Leitert and Milaniˇc (2015) [3] stated the running times of the fastest known polynomial-time algorithms for the MIN-WED problem on some graphs classes by using a Hasse diagram. In this paper, we update this Hasse diagram by showing that, while for every integer d such that d = 3k or d = 3k + 2, where k ≥ 1, the ED problem remains NP-complete for graphs of diameter d, the weighted version of the problem is solvable in time O (| V (G )| + | E (G )|) in the class of diameter three bipartite graphs and in time O (| V (G )|5 ) in the class of diameter three planar graphs. © 2018 Elsevier B.V. All rights reserved.

1. Introduction Let G = ( V , E ) be a simple graph. The distance between two vertices u and v of a connected graph G, denoted d G (u , v ), is the number of edges in a shortest path from u to v. The eccentricity e G (u ) of a vertex u, of a connected graph G, is max{d G (u , v )| v ∈ V (G )}. The radius of a connected graph G, rad(G), is the minimum eccentricity among the vertices of G, while the diameter of G, diam(G), is the maximum eccentricity. A neighbor of a vertex v in the graph G is a vertex adjacent to v. The open neighborhood of v, denoted N G ( v ), is the set of all neighbors of v. The closed neighborhood of v is N G [ v ] = { v } ∪ N G ( v ). For a subset S of vertices  of G, the closed neighborhood of S, denoted N G [ S ], is v ∈ S N G [ v ]. For k ≥ 1, we use the notation [k] = {1, . . . , k}. Recall that

*

Corresponding author. E-mail addresses: [email protected] (G. Abrishami), [email protected] (F. Rahbarnia). https://doi.org/10.1016/j.ipl.2018.08.002 0020-0190/© 2018 Elsevier B.V. All rights reserved.

the path graph and the complete graph on n vertices are denoted by P n and K n , respectively. A set D of vertices in a graph G is an efficient dominating set (e.d.s. for short) of G if D is an independent set and every vertex not in D is adjacent to exactly one vertex in D. Note that not every graph has an e.d.s. The efficient domination (ED) problem asks for the existence of an e.d.s. in G. The minimum weighted efficient domination problem (MIN-WED for short) is the problem of finding an efficient dominating set of minimum weight in a given vertex-weighted graph. The notion of efficient domination was introduced by Biggs [2] under the name perfect code. Later, Bange, Barkauskas and Slater [1] showed that the ED problem is NP-complete. Furthermore, they showed that the ED problem is solvable in polynomial time on trees. Many papers have studied the complexity of the ED problem and also the weighted version of the ED problem on special graph classes. Brandstädt et al. [3] presented an interesting Hasse diagram of the poset of most of such graph classes. For each class, they stated the complexity of weighted version of the ED problem. In par-

26

G. Abrishami, F. Rahbarnia / Information Processing Letters 140 (2018) 25–29

ticular, the ED problem is known to be NP-complete [5] for 2P 3 -free graphs and thus for P 7 -free graphs and solvable in polynomial time for weighted version of the ED problem on P 5 -free and also P 6 -free graphs. Brandstädt, Milaniˇc and Nevries [4] presented polynomial-time algorithms for weighted version of the ED problem for various subclasses of 2P 3 -free graphs as well as of P 7 -free graphs, including ( P 2 + P 4 )-free graphs and other classes. Moreover, they showed in [4] that the ED problem is NPcomplete for planar bipartite graphs with maximum degree three. Recently, Brandstädt and Mosca [5] found an O(| V (G )|5 | E (G )|) time solution for the weighted version of the ED problem on P 6 -free graphs which improved the time bound of (at least) O (| V (G )|576 ) due to Lokshtanov et al. [6]. Moreover, they showed in [5] that the weighted version of the ED problem is solvable in linear time for P 5 -free graphs. According to the mentioned results, all open questions regarding the complexity of the ED problem on P k -free graphs were answered. Now, we focus on similar questions for the complexity of the ED problem on graphs of diameter k. Note that for every k ≥ 2, every connected P k -free graph is of diameter at most k − 2. In particular, this implies that the ED problem on graphs of diameter at most three, resp. four, is at least as difficult as on P 5 -free, resp. P 6 -free graphs. It is easy to see that a graph G of diameter two has an e.d.s. if and only if rad(G ) = 1. Therefore, the ED problem is solvable in linear time for graphs of diameter two. To the best of our knowledge, the question for the complexity of the ED problem on graphs of diameter k, where k ≥ 3, remained unsolved. In this paper, we prove that for every integer d such that d = 3k or d = 3k + 2, where k ≥ 1, the ED problem remains NP-complete for graphs of diameter d. Furthermore, we show that the MIN-WED problem is solvable in time O (| V (G )|5 ) in the class of diameter three planar graphs. Finally, we present a simple algorithm for the MIN-WED problem in time O (| V (G )| + | E (G )|) for the class of diameter three bipartite graphs. The main results of this paper are the following: 1. In Section 2, by using a new graph construction, which we call a semi-Mycielski graph, we prove that the ED problem is NP-complete on diameter three graphs. Furthermore, by using the reduction establishing NPcompleteness of the ED problem for chordal graphs due to Yen and Lee [7, Theorem 2], we show that the ED problem is NP-complete on diameter five graphs. 2. In Section 3, we study the complexity status of the ED problem on graphs with larger diameter. We prove that for every integer d such that d = 3k or d = 3k + 2, where k ≥ 1, the ED problem remains NP-complete for graphs of diameter d. 3. In Section 4, we show that if a planar graph G of diameter three has an e.d.s., then G has an e.d.s. of size at most 4. Thus, we obtain an O (| V (G )|5 ) time algorithm for solving the MIN-WED problem on diameter three planar graphs. Finally, we present an algorithm in time O (| V (G )| + | E (G )|) for solving the MIN-WED problem on diameter three bipartite graphs.

2. Graphs with small diameter Our aim in this section is to prove that the ED problem for the class of diameter three graphs and also for the class of diameter five graphs is NP-complete. Theorem 1. The ED problem is NP-complete on diameter three graphs. In order to prove Theorem 1, we define the semiMycielski graph of a graph G. Let G be a graph with vertex set V (G ), where V (G ) = { v 1 , v 2 , . . . , v n }. The semiMycielski graph of G, denoted R (G ), is the graph obtained from G by taking a vertex-disjoint copy of a complete graph K n with vertex set V ( K n ) = {u 1 , u 2 , . . . , un } and join u i to N G [ v i ] for every i ∈ [n]. The following lemma proves that if G has diameter at least three, then the vertices of R (G ) have eccentricity 2 or 3. Moreover, R (G ) has diameter three. Lemma 2. Let G be a graph with the vertex set { v 1 , v 2 , . . . , v n } such that diam(G ) ≥ 3. Then the graph R (G ) with the vertex set { v 1 , v 2 , . . . , v n } ∪ {u 1 , u 2 , . . . , un } has the following properties: (i) For all i ∈ [n], we have e R (G ) ( v i ) ≤ 3. (ii) For all i ∈ [n], we have e R (G ) (u i ) = 2. (iii) There are at least two distinct vertices v s and v t in V (G ) such that e R (G ) ( v t ) = e R (G ) ( v s ) = 3. (iv) diam( R (G )) = 3. Proof. Let v j ∈ V (G ) for some j ∈ [n]. Consider an arbitrary vertex v i ∈ V (G ) for some i ∈ [n]. If d G ( v j , v i ) ≥ 4, then in the graph R (G ), there is a path, v j , u j , u i , v i , of length three from v j to v i . Thus, d R (G ) ( v j , v i ) ≤ 3. If d G ( v j , v i ) ≤ 3, then it is easy to see that d R (G ) ( v j , v i ) = d G ( v j , v i ) ≤ 3. Now consider an arbitrary vertex u i ∈ {u 1 , u 2 , . . . , un }. If i = j, then d R (G ) ( v j , u i ) = 1. Otherwise, if i = j and v i v j ∈ / E ( R (G )), then d R (G ) ( v j , u i ) = 2, since there is a path v j , u j , u i of length two from v j to u i . If i = j and v i v j ∈ E ( R (G )), then by definition of R (G ), v j u i ∈ E ( R (G )). Hence, d R (G ) ( v j , u i ) = 1. Thus, for an arbitrary vertex x of V ( R (G )), we have d R (G ) ( v j , x) ≤ 3. It follows that e R (G ) ( v j ) ≤ 3, establishing (i). The proof of (ii) is similar to (i). Thus, diam( R (G )) ≤ 3. Since diam(G ) ≥ 3, there are at least two distinct vertices v s and v t in V (G ) such that e G ( v t ) = e G ( v s ) ≥ 3. It is easy to see that e R (G ) ( v t ) = e R (G ) ( v s ) = 3. Therefore, diam( R (G )) = 3. This completes the proof of Lemma 2. 2 The vertices of eccentricity two play an important role in the graph R (G ). The following lemma shows that such vertices are not in any e.d.s. of R (G ). Lemma 3. If u is an arbitrary vertex of a graph G such that e G (u ) = 2, then for every e.d.s. D of G, u ∈ / D. Proof. Suppose, to the contrary, that u ∈ D. Since e G (u ) = 2, we have N G [ N G [u ]] = V (G ). By definition of e.d.s., we note that N G [ N G [u ]] ∩ D = {u }. Thus, D = {u }.

G. Abrishami, F. Rahbarnia / Information Processing Letters 140 (2018) 25–29

Since e G (u ) = 2, there is a vertex v ∈ V (G ) such that d G (u , v ) = 2. But v is not dominated by D, a contradiction. 2 Lemma 4. If G is a graph of diameter at least three, then D is an e.d.s. of G if and only if D is an e.d.s. of R (G ). Proof. It is easy to see that if G has an e.d.s. D, then D is an e.d.s. for R (G ). Now suppose that R (G ) has an e.d.s. D . Since G has diameter at least three, by Lemmas 2(ii) and 3, D ∩ {u 1 , u 2 , . . . , un } = ∅. Hence, D ⊂ V (G ). Therefore, D is an e.d.s. of G. 2 Now we are in the position to prove our main Theorem 1, establishing the NP-completeness of the ED problem on diameter three graphs. Proof of Theorem 1. We make a reduction from the ED problem on general graphs. Since the ED problem is solvable in polynomial time on graphs of diameter at most two, we may assume that the input graph is of diameter at least three. Let G be a graph of diameter at least three and let D ⊆ V (G ). Construct R (G ) from G. Lemma 2(iv) implies that diam( R (G )) = 3. By Lemma 4, D is an e.d.s. of G if and only if D is an e.d.s. of R (G ). We note that the process of constructing R (G ) from G can clearly be done in polynomial time. Therefore, if there is a polynomial-time algorithm for solving the ED problem on diameter three graphs, then there is a polynomial-time algorithm for solving the ED problem on general graphs. 2 For proving the NP-completeness of the ED problem on diameter five graphs, we use the reduction establishing NP-completeness of the ED problem for chordal graphs due to Yen and Lee [7, Theorem 2]. Because our proof for this result is influenced by the proof of Theorem 2 in [7], we adopt the notation introduced in their proof. Consider a family F = { S 1 , S 2 , . . . , S n } of sets where each S i is a subset of a set X = {x1 , x2 , . . . , xm }. An exact cover is a subfamily F ∗ of pairwise disjoint sets of F such that each element in X is contained in exactly one subset in F ∗ . Yen and Lee [7, Theorem 2] reduce the exact cover problem, which is NP-complete, to the ED problem on chordal graphs. For an instance of the exact cover problem, they construct a graph G as follows. First, each element x j is a vertex and each set S i is a vertex and x j is adjacent to S i if and only if x j ∈ S i . For each S i , add a new vertex ai adjacent to the vertex S i . We next add edges into the graph G to make X a clique. We note that the resulting graph so constructed is a chordal graph. More precisely,

V (G ) = { S 1 , . . . , S n } ∪ {x1 , . . . , xm } ∪ {a1 , . . . , an } and E (G ) consists of (1) x j S i for all x j ∈ S i , 1 ≤ j ≤ m, 1 ≤ i ≤ n, (2) S i ai for all 1 ≤ i ≤ n, (3) xi x j for all i = j, 1 ≤ i ≤ m, 1 ≤ j ≤ m.

27

It is easy to see that G is a connected graph with diameter at most 5. We note that if F has at least one pair of disjoint sets, then diam(G ) = 5, and if not, then the exact cover problem on such families of sets can be solved in polynomial time. Hence, we suppose that F has at least one pair of disjoint sets. Yen and Lee in [7, Theorem 2] show that the exact cover problem has a positive answer, i.e., F has a subfamily F ∗ of pairwise disjoint sets whose union is equal to X if and only if there exists an e.d.s. for G. As a consequence of this result, one can prove that the ED problem is NP-complete on graphs of diameter 5. Corollary 1. The ED problem is NP-complete on graphs of diameter 5. 3. Graphs of larger diameter In this section we continue the study on the complexity status of the ED problem on graphs with fixed diameter. We state our result formally in the following theorem. Theorem 5. Let d be an integer such that d = 3k or d = 3k + 2, where k ≥ 1. Then the E D problem is NP-complete on graphs of diameter d. In order to explain the proof of Theorem 5, we need a new definition. Let G be a graph and v be an arbitrary vertex of G. Let m be an integer, where m ≥ 2. We construct a new graph, called P m (G , v ), from G in the following way. For the path P m , let V ( P m ) = { p 1 , p 2 , . . . , pm } so that the degrees of p 1 and pm are one. By joining the vertex v of G to the vertex p 1 of P m , we obtain the graph P m (G , v ). Proposition 1. Let G be a graph and v be a vertex of G. Let k be a positive integer. Then G has an e.d.s. if and only if P 3k (G , v ) has an e.d.s. Proof. Let D be an e.d.s. of G. Let V ( P 3k(G , v )) = V (G ) ∪ { p 1 , . . . , p 3k }. If v ∈ D, then let D = D ∪ p 3t |t ∈ [k] ; oth  erwise, let D = D ∪ p 3t −1 |t ∈ [k] . It is easy to see that D is an e.d.s. of P 3k (G , v ). Now, let P 3k (G , v ) have an e.d.s. D . We claim that p 1 ∈ / D . Suppose, to the contrary, that p 1 ∈ D . This implies that { p 2 , p 3 } ∩ D = ∅. It is not hard to see that { p 3t −2 |t ∈ [k]} ⊂ D . Therefore, p 3k−2 ∈ D and { p 3k , p 3k−1 } ∩ D = ∅. Thus, p 3k is not dominated by any vertex of D , a contradiction. Hence, p 1 ∈ / D . Thus, v is dominated by a vertex in D ∩ V (G ). Let D = D ∩ V (G ). It is easy to see that D is an e.d.s. for G. 2 Lemma 6. Let k and t be positive integers. If the ED problem is NP-complete on graphs of diameter k, then the ED problem is also NP-complete on graphs of diameter k + 3t. Proof. Let G be a graph of diameter k and v be a vertex of G such that e G ( v ) = k. Let H = P 3t (G , v ), where t ≥ 1. It is easy to see that diam( H ) = k + 3t. By Proposition 1, G has an e.d.s. if and only if H has an e.d.s. Therefore, if there exists a polynomial-time algorithm for solving the ED problem on graphs with diameter k + 3t, then there exists

28

G. Abrishami, F. Rahbarnia / Information Processing Letters 140 (2018) 25–29

a polynomial-time algorithm for solving the ED problem on graphs of diameter k. 2 We are now in a position to prove Theorem 5. Recall its statement. Theorem 5. Let d be an integer such that d = 3k or d = 3k + 2, where k ≥ 1. Then the E D problem is NP-complete on graphs of diameter d. Proof. Theorem 1 and Corollary 1 imply that the ED problem is NP-complete on graphs of diameter three and also on graphs of diameter five. By Lemma 6, for an arbitrary positive integer t, the ED problem is NP-complete on graphs of diameter 3 + 3t and also on graphs of diameter 5 + 3t. Let k = t + 1. Therefore, for an integer d such that d = 3k or 3k + 2, the ED problem is NP-complete on graphs of diameter d. 2 If the ED problem is NP-complete on graphs with diameter 4, then Lemma 6 implies that for an arbitrary integer d such that d = 3k + 1, where k ≥ 1, the ED problem is NPcomplete on graphs of diameter d. In this case, for every positive integer k , the complexity status of the ED problem on graphs of diameter k is known. We have yet to determine whether the ED problem on graphs of diameter 4 is NP-complete, and pose this as an open question. 4. Diameter three planar or bipartite graphs Our aim in this section is to prove the following theorem. Theorem 7. The MIN-WED problem is solvable in time O(| V (G )|5 ) in the class of diameter three planar graphs. In order to prove Theorem 7, we need to use the edge contraction concept. In a graph G, contraction of an edge e with its end vertices x and y is the replacement of x and y with a single new vertex with neighborhood ( N G (x) ∪ N G ( y )) \ {x, y }. If G is a planar graph and e is an edge of G, then the graph obtained from G by contracting the edge e is a planar graph. In this paper, we also use the term “contraction” for vertices. In a graph G, contraction of a vertex v is the contraction of all edges incident to v. For a set S of vertices of a graph G, contraction of S is the contraction of all vertices belonging to S. We say that a graph H is a minor of G if H is obtained from G by deletion or contraction of edges or vertices. By an H -minor of G, where H is an arbitrary graph, we mean a minor of G that is isomorphic to H . Lemma 8. If G is a diameter three graph with no K m -minor that has an e.d.s. S, then | S | ≤ m − 1. Proof. Suppose to the contrary that | S | ≥ m. Let x and y be two distinct vertices in S. Since G has diameter three, d(x, y ) ≤ 3. The set S is an e.d.s. of G. Hence, d(x, y ) ≥ 3. Consequently, d(x, y ) = 3. Therefore, the distance between every two distinct vertices of S is three. It is easy to see

that, by contracting all vertices of S, the resulting graph is isomorphic to K | S | . Therefore, the graph G contains a K m -minor, a contradiction. 2 Lemma 9. For every integer m ≥ 2, the MIN-WED problem is solvable in time O (| V (G )|m ) in the class of diameter three graphs with no K m -minor. Proof. Let G be a given diameter three graph with no K m -minor. By Lemma 8, all efficient dominating sets in G (if any) have less than m vertices. Therefore, a minimumweight e.d.s. in G (if there is one) can be found by examining all sets of less than m vertices, testing each of them for e.d.s. property, and comparing their weights. The time complexity of testing whether a given (constant-sized) set S ⊆ V (G ) is an e.d.s. is O (| V (G )|). Generating all sets of size at most m − 1 already requires O (| V (G )|m−1 ) time, resulting in a total runtime of O (| V (G )|m ). 2 As a consequence of the Lemma 9, we are now in a position to prove Theorem 7. Recall its statement. Theorem 7. The MIN-WED problem is solvable in time O(| V (G )|5 ) in the class of diameter three planar graphs. Proof. It is well known that a planar graph has no K 5 -minor. Hence, Lemma 9 implies that the MIN-WED problem is solvable in time O (| V (G )|5 ) in the class of diameter three planar graphs. 2 Finally, we show that the MIN-WED problem can be solved in O (| V (G )| + | E (G )|) time for diameter three bipartite graphs. This follows from the following proposition. Proposition 2. If G is a diameter three bipartite graph and G has an e.d.s. S, then | S | = 2. Proof. Let ( A , B ) be a bipartition of G. Suppose to the contrary that | S | = 2. If | S | < 2, then since G has diameter three, we clearly obtain a contradiction. Hence, | S | > 2. Let u and v be two distinct vertices of S. Since G has diameter three, d G (u , v ) = 3. Thus, u and v do not belong to the same partite set of G. Renaming the partite sets A and B if necessary, we may assume that u ∈ A. Hence, v ∈ B. Let w be a vertex of S such that w = u and w = v. Hence, d( w , v ) = 3 and d( w , u ) = 3. Therefore, w ∈ / A and w ∈ / B, a contradiction. 2 As can be seen from the proof of Proposition 2. If G is a diameter three bipartite graph with a bipartition ( A , B ), then any e.d.s. S of G is of the form {u , v } where u ∈ A, v ∈ B, and uv ∈ / E (G ). Moreover, since S is an e.d.s., we must have N G (u ) = B \ { v } and N G ( v ) = A \ {u }. Hence, all such vertex pairs {u , v } can be easily found in linear time by iterating through all vertices u ∈ A, comparing the degree of u with the size of B, and if u has a unique-nonneighbor v in B, doing a similar check for v. We would like to conclude with the following open question, stemming from our research. What is the complexity of the ED problem for planar (or bipartite) graphs of diameter k for k > 3?

G. Abrishami, F. Rahbarnia / Information Processing Letters 140 (2018) 25–29

Acknowledgements We are grateful to Professor Andreas Brandstädt for his helpful comments. We thank Professor Michael A. Henning for helping us in the revised version of this paper. The authors would like to thank referees for their constructive remarks. We also thank Amin Abrishami for his helpful comments. References [1] D.W. Bange, A.E. Barkauskas, P.J. Slater, Efficient dominating sets in graphs, in: R.D. Ringeisen, F.S. Roberts (Eds.), Applications of Discrete Mathematics, SIAM, 1988, pp. 189–199. [2] N. Biggs, Perfect codes in graphs, J. Comb. Theory, Ser. B 15 (1973) 289–296.

29

[3] A. Brandstädt, P. Fiˇcur, A. Leitert, M. Milaniˇc, Polynomial-time algorithms for weighted efficient domination problems in AT-free graphs and dually chordal graphs, Inf. Process. Lett. 115 (2015) 256–262. [4] A. Brandstädt, M. Milaniˇc, R. Nevries, New polynomial cases of the weighted efficient domination problem, in: Proceedings of the 38th International Symposium on Mathematical Foundations of Computer Science, MFCS 2013, in: Lecture Notes in Computer Science, Springer, Berlin, Heidelberg, 2013, pp. 195–206. [5] A. Brandstädt, R. Mosca, Weighted efficient domination for P 5 -free and for P 6 -free graphs, SIAM J. Discrete Math. 30 (2016) 2288–2303. [6] D. Lokshtanov, M. Pilipczuk, E.J. van Leeuwen, Independence and efficient domination on P 6 -free graphs, in: Proceedings of the Twenty-seventh Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’16, 2016, pp. 1784–1803. [7] C.-C. Yen, R.C.T. Lee, The weighted perfect domination problem and its variants, Discrete Appl. Math. 66 (1996) 147–160.