Hardness and approximation for the geodetic set problem in some graph classes
Dibyayan Chakraborty, Florent Foucaud, Harmender Gahlawat, Subir Kumar Ghosh, Bodhayan Roy
HHardness and approximation for the geodetic setproblem in some graph classes
Dibyayan Chakraborty
Indian Statistical Institute, Kolkata, [email protected]
Florent Foucaud
Univ. Orléans, INSA Centre Val de Loire, LIFO EA 4022, F-45067 Orléans Cedex 2, France.fl[email protected]
Harmender Gahlawat
Indian Statistical Institute, Kolkata, [email protected]
Subir Kumar Ghosh
Ramakrishna Mission Vivekananda Educational and Research [email protected]
Bodhayan Roy
Indian Institute of Technology, [email protected]
Abstract
In this paper, we study the computational complexity of finding the geodetic number of graphs. Aset of vertices S of a graph G is a geodetic set if any vertex of G lies in some shortest path betweensome pair of vertices from S . The Minimum Geodetic Set (MGS) problem is to find a geodeticset with minimum cardinality. In this paper, we prove that solving the
MGS problem is NP-hard onplanar graphs with a maximum degree six and line graphs. We also show that unless P = NP , thereis no polynomial time algorithm to solve the MGS problem with sublogarithmic approximationfactor (in terms of the number of vertices) even on graphs with diameter 2. On the positive side, wegive an O (cid:0) √ n log n (cid:1) -approximation algorithm for the MGS problem on general graphs of order n .We also give a 3-approximation algorithm for the MGS problem on the family of solid grid graphswhich is a subclass of planar graphs.
Theory of computation → Graph algorithms analysis.
Keywords and phrases
Planar graph, Geodetic Set, Approximation
Digital Object Identifier
Funding
Florent Foucaud : Partially supported by the ANR project HOSIGRA (ANR-17-CE40-0022).
Acknowledgements
This research is funded by the IFCAM project “Applications of graph homo-morphisms” (MA/IFCAM/18/39). We would like to thank Ajit A. Diwan for the many helpfulpointers that he provided.
Suppose there is a city-road network (i.e. a graph) and a bus company wants to open busterminals in some of the cities. The buses will go from one bus terminal to another (i.e.from one city to another) following the shortest route in the network. Finding the minimumnumber of bus terminals required so that any city belongs to some shortest route betweensome pair of bus terminals is equivalent to finding the geodetic number of the correspondinggraph. Formally, an undirected simple graph G has vertex set V ( G ) and edge set E ( G ).For two vertices u, v ∈ V ( G ), let I ( u, v ) denote the set of all vertices in G that lie in some © Dibyayan Chakraborty,Florent Foucaud, Harmender Gahlawat, Subir Kumar Ghosh, BodhayanRoy;licensed under Creative Commons License CC-BY42nd Conference on Very Important Topics (CVIT 2016).Editors: John Q. Open and Joan R. Access; Article No. 23; pp. 23:1–23:12Leibniz International Proceedings in InformaticsSchloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany a r X i v : . [ c s . D M ] S e p shortest path between u and v . A set of vertices S is a geodetic set if ∪ u,v ∈ S I ( u, v ) = V ( G ).The geodetic number , denoted as g ( G ), is the minimum integer k such that G has a geodeticset of cardinality k . Given a graph G , the Minimum Geodetic Set (MGS) problem is tocompute a geodetic set of G with minimum cardinality. In this paper, we shall study thecomputational complexity of the MGS problem in various graph classes.The notion of geodetic sets and geodetic number was introduced by Harary et al. [18].The notion of geodetic number is closely related to convexity and convex hulls in graphs,which have applications in game theory, facility location, information retrieval, distributedcomputing and communication networks [2, 19, 15, 22, 10]. In 2002, Atici [1] proved thatfinding the geodetic number of arbitrary graphs is NP-hard. Later, Dourado et al. [9, 8]strengthened the above result to bipartite graphs, chordal graphs and chordal bipartite graphs.Recently, Bueno et al. [3] proved that the
MGS problem remains NP-hard even for subcubic graphs. On the positive side, polynomial time algorithms to solve the
MGS problem areknown for cographs [8], split graphs [8], ptolemaic graphs [12], outer planar graphs [21] and proper interval graphs [11]. In this paper, we prove the following theorem. (cid:73)
Theorem 1.
The
MGS problem is NP-hard for planar graphs of maximum degree . Then we focus on line graphs. Given a graph G , the line graph of G , denoted by L ( G )is a graph such that each vertex of L ( G ) represents an edge of G and two vertices of L ( G )are adjacent if and only if their corresponding edges share a common endpoint in G . Agraph H is a line graph if H ∼ = L ( G ) for some G . Some optimisation problems which aredifficult to solve in general graphs admit polynomial time algorithms when the input is aline graph [14, 17]. We prove the following theorem. (cid:73) Theorem 2.
The
MGS problem is NP-hard for line graphs.
From a result of Dourado et al. [8], it follows that solving the
MGS problem is NP-hardeven for graphs with diameter at most 4. On the other hand, solving the
MGS problem ongraphs with diameter 1 is trivial (since those are exactly complete graphs). In this paper,we prove that unless P=NP, there is no polynomial time algorithm with sublogarithmicapproximation factor for the
MGS problem even on graphs with diameter at most 2. A universal vertex of a graph is adjacent to all other vertices of the graph. We shall prove thefollowing stronger theorem. (cid:73)
Theorem 3.
Unless P=NP, there is no polynomial time o (log n ) -approximation algorithmfor the MGS problem even on graphs that have a universal vertex, where n is the number ofvertices in the input graph. On the positive side, we show that a reduction to the
Minimum Rainbow Subgraphof Multigraph problem (defined in Section 3.1) gives the first sublinear approximationalgorithm for the
MGS problem on general graphs. (cid:73)
Theorem 4.
Given a graph, there is a polynomial-time O ( √ n log n ) -approximation al-gorithm for the MGS problem where n is the number of vertices. Then we focus on solid grid graphs, an interesting subclass of planar graphs. A gridembedding of a graph is a collection of points with integer coordinates such that each pointin the collection represents a vertex of the graph and two points are at a distance one if andonly if the vertices they represent are adjacent in the graph. A graph is a grid graph if ithas a grid embedding. A graph is a solid grid graph if it has a grid embedding such thatall interior faces have unit area. Approximation algorithms for optimisation problems like hakraborty et al. 23:3
Longest path, Longest Cycle, Node-Disjoint Path etc. on grid graphs and solid gridgraphs have been studied [4, 20, 6, 25, 23, 27]. In this paper, we prove the following theorem. (cid:73)
Theorem 5.
Given a solid grid graph, there is an O ( n ) time -approximation algorithmfor the MGS problem, even if the grid embedding is not given as part of the input. Here n isthe number of vertices in the input graph. Note that recognising solid grid graphs is NP-complete [16].
Organisation of the paper:
In Section 2, we prove the hardness results for planar graphs,line graphs and graphs with diameter 2. In Section 3, we present our approximationalgorithms. Finally we draw our conclusions in Section 4.
In Section 2.1, we prove that the
MGS problem is NP-hard for planar graphs with maximumdegree 6 (Theorem 1). Then in Section 2.2 we prove that the
MGS problem is NP-hard forline graphs (Theorem 2). In Section 2.3 we prove the inapproximability result (Theorem 3).
Given a graph G , a subset S ⊆ V ( G ) is a dominating set of G if any vertex in V ( G ) \ S hasa neighbour in S . The problem Minimum Dominating set (MDS) consists in computinga dominating set of an input graph G with minimum cardinality. To prove Theorem 1, weshall reduce the NP-complete MDS problem on subcubic planar graphs [13] to the
MGS problem on planar graphs with maximum degree 6.Let us describe the reduction. From a subcubic planar graph G with a given planarembedding, we construct a graph f ( G ) as follows. Each vertex v of G will be replaced bya vertex gadget G v . This vertex gadget has vertex set { c v , t v , t v , t v } ∪ { x vi,j , y vi,j , z vi,j | ≤ i < j ≤ } . There are no other vertices in f ( G ). For the edges within G v , vertex t vi (for0 ≤ i ≤
2) is adjacent to vertices c v , x vi,i +1 , y vi,i +1 , x vi − ,i , y vi − ,i (indices taken modulo 3).Moreover, for each pair i, j with 0 ≤ i < j ≤ x vi,j is adjacent to c v and y vi,j , and y vi,j isadjacent to z vi,j . We now describe the edges outside of the vertex-gadgets. They will dependon the embedding of G . We assume that the edges incident with any vertex v are labeled e vi with 0 ≤ i < deg G ( v ), in such a way that the numbering increases counterclockwise around v with respect to the embedding (thus the edge vw will have two labels: e vi and e wj ). Considertwo vertices v and w that are adjacent in G , and let e vi and e wj be the two labels of edge vw in G . Then, t vi is adjacent to t wj , y vi,i +1 is adjacent to y wj − ,j and y vi − ,i is adjacent to y wj +1 ,j (indices are taken modulo the degree of the original vertex of G ). It is clear that a planarembedding of f ( G ) can easily be obtained from the planar embedding of G . Thus f ( G ) isplanar and has maximum degree 6. The construction is depicted in Figure 1, where v and w are adjacent in G and the edge vw is labeled e v and e w .We will show that G has a dominating set of size k if and only if f ( G ) has a geodetic setof size 3 | V ( G ) | + k .Assume first that G has a dominating set D of size k . We construct a geodetic set S of f ( G ) of size 3 | V ( G ) | + k as follows. For each vertex v in G , we add the three vertices z vi,j (0 ≤ i < j ≤
2) of G v to S . If v is in D , we also add vertex c v to S .Let us show that S is indeed a geodetic set. First, we observe that, in any vertex gadget G v that is part of f ( G ), the unique shortest path between two distinct vertices z vi,j , z vi ,j haslength 4 and goes through vertices y vi,j , t vk and y vi ,j (where { k } = { i, j } ∩ { i , j } ). Thus, it C V I T 2 0 1 6 c v t v x v , y v , z v , t v x v , y v , z v , t v x v , y v , z v , c w t w x w , y w , z w , t w x w , y w , z w , t w x w , y w , z w , Figure 1
Illustration of the reduction used in the proof of Theorem 1. Here, two vertex gadgets G v , G w are depicted, with v and w adjacent in G . Dashed lines represent potential edges to othervertex-gadgets. only remains to show that vertices c v and x vi,j (0 ≤ i < j ≤
2) belong to some shortest pathof vertices of S . Assume that v is a vertex of G in D . The shortest paths between c v and z vi,j have length 3 and one of them goes through vertex x vi,j . Thus, all vertices of G v belongto some shortest path between vertices of S . Now, consider a vertex w of G adjacent to v and let z wi,j be the vertex of G w that is farthest from c v . The shortest paths between c v and z wi,j have length 6; one of them goes through vertices c w and x wi,j ; two others go through thetwo other vertices x wi ,j and x wi ,j . Thus, S is a geodetic set.For the converse, assume we have a geodetic set S of f ( G ) of size 3 | V ( G ) | + k . We willshow that G has a dominating set of size k . First of all, observe that all the 3 | V ( G ) | verticesof type z vi,j are necessarily in S , since they have degree 1. As observed earlier, the shortestpaths between those vertices already go through all vertices of type t vi and y vi,j . However, noother vertex lies on a shortest path between two such vertices: these shortest paths alwaysgo through the boundary 6-cycle of the vertex-gadgets. Let S be the set of the remaining k vertices of S . These vertices are there to cover the vertices of type c v and x vi,j . We constructa subset D of V ( G ) as follows: D contains those vertices v of G whose vertex-gadget G v contains a vertex of S . We claim that D is a dominating set of G . Suppose by contradictionthat there is a vertex v of G such that neither G v nor any of G w (with w adjacent to v in G ) contains any vertex of S . Here also, the shortest paths between vertices of S always gothrough the boundary 6-cycle of G v and thus, they never include vertex c v , a contradiction.Thus, D is a dominating set of size k , and we are done. In this section, we prove that the
MGS problem remains NP-hard on line graphs. For agraph G and edges e, e ∈ E ( G ), define d ( e, e ) = 1 if e, e shares a vertex and d ( e, e ) = i if e shares a vertex with an edge e with d ( e, e ) = i −
1. A path between two edges e, e isdefined in the usual way. (cid:66) Observation A.
A path between two edges e, e of a graph G corresponds to a path betweenthe vertices e and e in L ( G ).Given a graph G , a set S ⊆ E ( G ) is a line geodetic set of G if every edge e ∈ E ( G ) \ S belongs to some shortest path between some pair of edges { e, e } ⊆ S . Observation A impliesthe following. (cid:66) Observation B.
A graph G has a line geodetic set of cardinality k if and only if L ( G ) hasa geodetic set of size k . hakraborty et al. 23:5 ba cd (a) (b) Figure 2 (a) A triangle-free graph G and (b) the graph H G . We shall show (in Lemma 10) that finding a line geodetic set of a graph with minimumcardinality is NP-hard. Then Observation B shall imply that solving the
MGS problem online graphs is NP-hard. For the above purpose we need the following definition. Given agraph G , a set S ⊆ E ( G ) is a good edge set if for any edge e ∈ E ( G ) \ S , there are two edges e , e ∈ S such that (i) e lies in some shortest path between e and e , and (ii) d ( e , e ) is 2or 3. (cid:73) Lemma 6.
Computing a good edge set of a triangle-free graph with minimum cardinalityis NP-hard.
Proof.
We shall reduce the NP-complete
Edge Dominating set problem on triangle-freegraphs [26] to the problem of computing a good edge set of a graph with minimum cardinalityon triangle-free graphs. Given a graph G , a set S ⊆ E ( G ) is an edge dominating set of G ifany edge e ∈ E ( G ) \ S shares a vertex with some edge in S . The Edge Dominating Set problem is to compute an edge dominating set of G with minimum cardinality.Let G be a triangle-free graph. For each vertex v ∈ V ( G ), take a new edge x v y v .Construct a graph G ∗ whose vertex set is the union of V ( G ) and the set { x v , y v } v ∈ V ( G ) and E ( G ∗ ) = E ( G ) ∪ { vx v } v ∈ V ( G ) ∪ { x v y v } v ∈ V ( G ) . Notice that G ∗ is a triangle-free graph andwe shall show that G has an edge dominating set of cardinality k if and only if G ∗ has agood edge set of cardinality k + n where n = | V ( G ) | .Let S be an edge dominating set of G . For each v ∈ G , let H v be written as x v , y v , z v .Notice that the set S ∪ { x v y v } v ∈ V ( G ) forms a good edge set of G ∗ and has cardinality k + n .Let S be a good edge set of G ∗ of size at most k + n . Notice that for each v ∈ V ( G ), S mustcontain the edge x v y v . Hence, the cardinality of the set S ∩ E ( G ) is at most k . Moreover,for each e ∈ E ( G ∗ ) ∩ E ( G ), there is an edge e ∈ S which is at distance 2 from e . As S isa good edge set of G ∗ , any edge in E ( G ) \ S shares a vertex with some edge of S . Hence S ∩ E ( G ) is an edge dominating set of G of cardinality at most k . (cid:74) For a triangle-free graph G , let H G be the graph with V ( H G ) = V ( G ) ∪ { a, b, c, d } and E ( H G ) = E ( G ) ∪ { ab, cd } ∪ E where E = { bv } v ∈ V ( G ) ∪ { cv } v ∈ V ( G ) . See Figure 2(a) andFigure 2(b) for an example. We prove the following proposition. (cid:73) Lemma 7.
For a triangle-free graph G , there is a line geodetic set Q of H G with minimumcardinality such that Q ∩ E = ∅ . Proof.
For a set S ⊆ E ( H G ), an edge f ∈ S covers an edge e ∈ E ( H G ), if there is anotheredge f ∈ S such that e lies in the shortest path between f and f . Notice that the edges { ab, cd } lie in any line geodetic set of H G and all edges in E are covered by ab and cd . Firstwe prove the following claims. (cid:66) Claim 8.
Let Q be a line geodetic set of H G and e ∈ E ∩ Q . If e does not cover any edgeof E ( G ), then Q \ { e } is a line geodetic set of G ∗ . C V I T 2 0 1 6
The proof of the above claim follows from the fact that all edges in E ∪ { ab, cd } are coveredby ab and cd . (cid:66) Claim 9.
Let Q be a line geodetic set of H G and e ∈ E ∩ Q . There is another edge e ∈ E ( G ) \ Q such that ( Q ∪ { e } ) \ { e } is a line geodetic set of H G .To prove the claim above, first we define the ecentricity of an edge e ∈ E ( H G ) to be themaximum shortest path distance between e and any other edge in E ( H G ). Notice that theecentricity of any edge in E is two and the ecentricity of any edge of E ( G ) in H G is atmost three. Now remove all edges from E ∩ Q which do not cover any edge of E ( G ). ByClaim 1, the resulting set, say Q , is a line geodetic set of H G . Let e be an edge Q ∩ E and let { f , f , . . . , f k } ⊆ E ( G ) \ Q be the set of edges covered by e . Since the ecentricityof e is two, there must exist e , e , . . . , e k in Q such that f i has a common endpoint withboth e and e i for each i ∈ { , , . . . , k } . Therefore the distance between e and e i is twofor each i ∈ { , , . . . , k } . As G is triangle-free, e i = e j for any i, j ∈ { , , . . . , k } . Chooseany edge f j ∈ { f , f , . . . , f k } . Observe that the distance between f j and e i is two when i = j . Therefore, for each i ∈ { i, , . . . , j − , j + 1 , . . . k } , the edge f i lies in the shortestpath between f j and e i . Therefore, ( Q ∪ { f j } ) \ { e } is a line geodetic set of H G .Given any line geodetic set P of H G , we can use the arguments used in Claim 1 andClaim 2 repeatedly on P to construct a line geodetic set Q of H G such that | Q | ≤ | P | and Q ∩ E = ∅ . Thus we have the proof. (cid:74)(cid:73) Lemma 10.
Computing a line geodetic set of a graph with minimum cardinality is NP-hard.
Proof.
We shall reduce the NP-complete problem of computing a good edge set of a triangle-free graph with minimum cardinality (Lemma 6). Let G be a triangle-free graph. Constructthe graph H G as stated above (just before Lemma 7). The set E is also defined as before.We shall show that a triangle-free graph G has a good edge set of cardinality k if and only if H G has a line geodetic set of cardinality k + 2.Let P be a good edge set of G . Notice that, for each edge e ∈ E ( G ), there are two edges e , e ∈ P such that e belongs to a shortest path between e and e in H G . Also any edge of E belongs to a shortest path between the edges ab and cd in H G . Hence P ∪ { ab, cd } is aline geodetic set of H G with cardinality k + 2.Let Q be a line geodetic set of H G of size k + 2. Notice that { ab, cd } ⊆ Q and let Q = Q \ { ab, cd } . Due to Lemma 7, we can assume that Q does not contain any edge of E . Let e be an edge in E ( G ) \ Q and let e , e ∈ Q such that e lies in some shortest pathbetween e and e in H G . Since the distance between e and e is at most three in H G , itfollows that Q is a good edge set of G with cardinality k . (cid:74) Given a graph G , a set S ⊆ V ( G ) is a of G if any vertex w ∈ V ( G ) \ S has at least two neighbours in S . The problem is to compute a 2-dominating set ofgraphs with minimum cardinality. We shall use the following result. (cid:73) Theorem 11 ([5, 7]) . Unless P = N P , there is no polynomial time o (log n ) -approximationalgorithm for the problem on triangle-free graphs. We observe the following. hakraborty et al. 23:7 (cid:73)
Lemma 12.
Let G be a triangle-free graph and G be the graph obtained by adding anuniversal vertex v to G . A set S of vertices of G is a geodetic set if and only if S \ { v } is a -dominating set of G . Proof.
Let S be a geodetic set of G . Observe that for any vertex u ∈ V ( G ) \ S there mustexist vertices u , u ∈ S \ { v } such that u ∈ I ( u , u ) and u u / ∈ E ( G ). Hence, S is a2-dominating set of G . Conversely, let S be any 2-dominating set of G . For any two vertex u ∈ V ( G ) \ S there exist v, v ∈ S such that uv, uv ∈ E ( G ). Since G is triangle-free, v and v are non-adjacent. Hence, u ∈ I ( v, v ) and S ∪ { v } is a geodetic set of G . (cid:74) The proof of Theorem 3 follows due to Lemma 12 and Theorem 11.
In Section 3.1 and Section 3.2 we present approximation algorithms for the
MGS problemon general graphs and solid grid graphs, respectively.
We will reduce the
Minimum Geodetic Set problem to the
Minimum Rainbow Subgraphof Multigraph (MRSM) problem. A subgraph H of an edge colored multigraph G is colorful if H contains at least one edge of each color. Given an edge colored multigraph G , the MRSM problem is to find a colorful subgraph of G of minimum cardinality. Thefollowing is a consequence of a result due to Tirodkar and Vishwanathan [24]. (cid:73) Theorem 13 ([24]) . Given an edge colored multigraph G , there is a polynomial time O ( √ n log n ) -approximation algorithm to solve the MRSM problem where n = | V ( G ) | . We note that Tirodkar and Vishwanathan [24] proved the above theorem for simplegraphs only, but the proof works for multigraphs as well.Given a graph G form an edge colored multigraph H G as follows. The vertex set of H G is the same as G . For each subset { u, v, w } ⊆ V ( G ) such that u lies in some shortest pathbetween v and w , add an edge in H G between v and w having the color u . Observe that, G has a geodetic set of cardinality k if and only if H G has a colorful subgraph with k vertices.The proof of Theorem 4 follows from Theorem 13. In this section, we shall give a linear time 3-approximation algorithm for the
MGS problem onsolid grid graphs. From now on G shall denote a solid grid graph and R is a grid embeddingof G where every interior face has unit area.Let G be a solid grid graph. A path P of G is a corner path if (i) no vertex of P is a cutvertex, (ii) both end-vertices of P have degree 2, and (iii) all vertices except the end-verticesof P have degree 3. See Figure 3(a) for an example. Observe that for a corner path P , eitherthe x -coordinates of all vertices of P are the same or the y -coordinates of all vertices of P are the same. Moreover, all vertices of a corner path lie in the outer face of G . The nextobservation follows from the definition of corner path and the fact that G is a solid gridgraph. (cid:66) Observation C.
Let P be a corner path of G . Consider the set Q = { v ∈ V ( G ) : v / ∈ V ( P ) , N ( v ) ∩ P = ∅} . Then Q induces a path in G . Moreover, if the x -coordinates (resp. C V I T 2 0 1 6 (a) (b) (c)
Figure 3 (a) The black and gray vertices are the vertices of the corner paths. The gray verticesindicate the corner vertices. (b) The gray vertices are vertices of the red path. Vertices in the shadedbox form a rectangular block. (c) Example of a solid grid graph whose number of corner vertices isexactly three times the geodetic number. the y -coordinates) of all the vertices of P are the same, then the x -coordinates (resp. the y -coordinates) of all vertices in Q are the same.We shall use Observation C to prove a lower bound on the geodetic number of G in terms ofthe number of corner paths of G . (cid:73) Lemma 14.
Any geodetic set of G contains at least one vertex from each corner path. Proof.
Without loss of generality, we assume the x -coordinates of all vertices of P arethe same. By Observation C, the set { v ∈ V ( G ) : v / ∈ V ( P ) , N ( v ) ∩ P = ∅} in-duces a path Q and the x -coordinates of all vertices in Q are the same. Now con-sider any two vertices a, b ∈ V ( G ) \ V ( P ) and with a path P between a and b thatcontains one of the end-vertices, say u , of P . Observe that P can be expressed as P = a c c . . . c t d f f . . . f t u g h h . . . h t b such that { d, g } ⊆ V ( Q ) and { f , f , . . . , f t } ⊆ V ( P ). Then there is a path P = a c c . . . c t d f . . . f t g h h . . . h t b where for 2 ≤ i ≤ t , f i is the vertex in Q which is adjacent to f i in G . Observe that the lengthof P is strictly less than that of P . Therefore u / ∈ I ( a, b ) whenever a, b ∈ V ( G ) \ V ( P ).Hence any geodetic set of G contains at least one vertex from P . (cid:74) Any geodetic set of G contains all vertices of degree 1. Inspired by the above fact andLemma 14, we define the term corner vertex as follows. A vertex v of G is a corner vertex if v has degree 1 or v is an end-vertex of some corner path. See Figure 3(a) for an example.Observe that two corner paths may have at most one corner vertex in common. Moreover, acorner vertex cannot be in three corner paths. Therefore it follows that the cardinality ofthe set of corner vertices is at most 3 · g ( G ). (cid:73) Remark 15.
Note that there are solid grid graphs whose number of corner vertices is exactlythree times the geodetic number. See Figure 3(c) for one such example.Now we prove that the set of all corner vertices of G is indeed a geodetic set of G . Weshall use the following proposition of Ekim and Erey [10]. (cid:73) Theorem 16 ([10]) . Let F be a graph and F , . . . , F k its biconnected components. Let C be the set of cut vertices of G . If X i ⊆ V ( F i ) is a minimum set such that X i ∪ ( V ( F i ) ∩ C ) is a minimum geodetic set of F i then ∪ ki =1 X i is a minimum godetic set of F . The next observation follows from Theorem 16. hakraborty et al. 23:9 (cid:66)
Observation D.
Let C ( G ) be the set of corner vertices of G and S be the set of cut verticesof G . Let { H , H , . . . , H t } be the set of biconnected components of G . The set C ( G ) is ageodetic set of G if and only if ( C ( G ) ∩ V ( H i )) ∪ ( S ∩ V ( H i )) is a geodetic set of H i for all1 ≤ i ≤ t .From now on, C ( G ) is the set of corner vertices of G and H , H , . . . , H t are the bicon-nected components of G . Due to Theorem 16 and Observation D, it is enough to show thatfor each 1 ≤ i ≤ t , the set ( C ( G ) ∩ V ( H i )) ∪ ( S ∩ V ( H i )) is a geodetic set of H i . First, weintroduce some more notations and definitions below.Let H be a biconnected component of G . Recall that each vertex of H is a pair of integersand each edge is a line segment with unit length. An edge e ∈ E ( H ) is an interior edge if allinterior points of e lie in an interior face of H . For a vertex v ∈ V ( H ), let P v denote themaximal path such that all edges of P v are interior edges and each vertex in P v has the same x -coordinate as v . Similarly, let P v denote the maximal path such that all edges of P v areinterior edges and each vertex in P v has the same y -coordinate as v . A path P of H is a redpath if (i) there exists a v ∈ V ( H ) such that P ∈ { P v , P v } and (ii) at least one end-vertex of P is a cut-vertex or a vertex of degree 4. A vertex v of H is red if v lies on some red path.See Figure 3(b) for an example. (cid:73) Definition 17.
A subgraph F of H is a rectangular block if F satisfies the followingproperties. For any two vertices ( a , b ) , ( a , b ) of F , we have that any pair ( a , b ) with a ≤ a ≤ a and b ≤ b ≤ b is a vertex of F . Let a, a be the maximum and minimum x -coordinates of the vertices in F . The x -coordinate of any red vertex of F must be equal to a or a . Similarly, let b, b be themaximum and minimum y -coordinates of the vertices in F . The y -coordinate of any redvertex of F must be equal to b or b . Observe that H can be decomposed into rectangular blocks such that each non-red vertexbelongs to exactly one rectangular block. See Figure 3(b) for an example. Let B , B , . . . , B k be a decomposition of H into rectangular blocks. Recall that C ( G ) is the set of cornervertices of G and S is the set of cut vertices of G . We have the following lemma. (cid:73) Lemma 18.
For each ≤ i ≤ k , there are two vertices x i , y i ∈ ( C ( G ) ∩ V ( H )) ∪ ( S ∩ V ( H )) such that V ( B i ) ⊆ I ( x i , y i ) . Proof.
Let X ∈ { B , B , . . . , B k } be an arbitrary rectangular block. A vertex v of X is a northern vertex if the y -coordinate of v is maximum among all vertices of X . Analogously, western vertices, eastern vertices and southern vertices are defined. A vertex of X is aboundary vertex if it is either northern, western, southern or an eastern vertex of X . Let nw ( X ) be the vertex of X which is both a northern vertex and a western vertex. Similarly, ne ( X ) denotes the vertex which is both northern vertex and eastern vertex, sw ( X ) denotesthe vertex of X which is both southern and western vertex and se ( X ) denotes the vertex of X which is both southern and eastern vertex.First we prove the lemma assuming that all boundary vertices of X are red vertices. Let a (resp. b ) denote the vertex with minimum y -coordinate such that P a (resp. P b ) contains sw ( X ) (resp. se ( X )). Similarly, let c (resp. d ) denote the vertex with maximum y -coordinatesuch that P c (resp. P d ) contains nw ( X ) (resp. ne ( X )). Let a (resp. c ) denote the vertexwith minimum x -coordinate such that P a (resp. P b ) contains sw ( X ) (resp. nw ( X )). Let b (resp. d ) denote the vertex with maximum x -coordinate such that P b (resp. P d ) contains C V I T 2 0 1 6 se ( X ) (resp. ne ( X )). Observe that the vertices a , a, b, b , d , d, c, c lie on the exterior face ofthe embedding.For two vertices i, j ∈ { a , a, b, b , d , d, c, c } , let P ij denote the path between i, j that canbe obtained by traversing the exterior face of the embedding in the counter-clockwise directionstarting from i . Observe that, if both P a a and P d d (resp. P bb and P cc ) contain a corner orcut vertex each, say f, f , then { sw ( X ) , ne ( X ) } ⊆ I ( f, f ) (resp. { nw ( X ) , se ( X ) } ⊆ I ( f, f ))and therefore V ( X ) ⊆ I ( f, f ). Now consider the case when at least one of the paths in { P a a , P d d } does not contain any corner vertex or cut vertex and when at least one of thepaths in { P b b , P cc } does not contain any corner vertex or cut vertex. Due to symmetry ofrotation and reflection on grids, without loss of generality we can assume that both P a a and P bb have no corner vertex or cut vertex. Observe that in this case there must be a cornervertex f in P ab whose x -coordinate is the same as that of b and therefore of se ( X ). If P cc contains a corner vertex f , then { nw ( X ) , se ( X ) } ⊆ I ( f, f )) and therefore V ( X ) ⊆ I ( f, f ).Otherwise, there must be a corner vertex f in P c a whose y -coordinate is the same asthat of c and therefore of nw ( X ). Hence we have { nw ( X ) , se ( X ) } ⊆ I ( f, f ) and therefore V ( X ) ⊆ I ( f, f ) in this case also.Now we consider the case when there are some non-red boundary vertices of X . Let v bea non-red vertex of X . Without loss of generality, we can assume that v is a western vertex of X . Now we redefine the vertices a, a , b, b , c, c , d, d as follows. Let a = sw ( X ), c = nw ( X )and a (resp. b ) be the vertex with minimum y -coordinate such that there is a path from a to sw ( X ) (resp. from b to se ( X )) containing vertices with the same x -coordinate as that of sw ( X ) (resp. se ( X )). Similarly, let c (resp. d ) be the vertex with maximum y -coordinatesuch that there is a path from c to nw ( X ) (resp. from d to ne ( X )) containing vertices withthe same x -coordinate as that of nw ( X ) (resp. ne ( X )). Finally, let d (resp. b ) be thevertex with maximum x -coordinate such that there is a path from d to ne ( X ) (resp. from b to se ( X )) containing vertices with the same y -coordinate as that of ne ( X ) (resp. se ( X )).Using similar arguments on the paths P ij with i, j ∈ { a , a, b, b , d , d, c, c } as before, we canshow that there exists corner vertices f, f such that V ( X ) ⊆ I ( f, f ). Thus we have theproof. (cid:74) By Observation D and Lemma 18, C ( G ) is a geodetic set of G . Time complexity:
If the grid embedding of G is given as part of the input, then the set ofcorner vertices can be computed in O ( | V ( G ) | ) time by simply traversing the exterior face ofthe embedding. Otherwise, the set of corner vertices can be computed in O ( | V ( G ) | ) time asfollows (we shall only describe the procedure to find corner vertices of degree two as the othercase is trivial). Let H be a biconnected component of G , v be a vertex of H having degree 2and u , x be its neighbours. If both u and x have degree 4, then v is not a corner vertex.Moreover, if at least one of u and x have degree 2 then v is a corner vertex. Otherwise,apply the following procedure. Assume u has degree 3 and denote v as u − for technicalreasons. Set i = 0. As H is a biconnected solid grid graph, u i and x i must have exactly onecommon neighbour which is different from u i − . Denote this vertex as x i +1 . Let u i +1 be theneighbour of u i different from both x i +1 and u i − . If deg H ( u i +1 ) = 4 or u i +1 is a cut vertexin G then terminate. If deg G ( u i +1 ) = 2 then v is a corner vertex. Otherwise, set i = i + 1and repeat the above steps. Observe that, when the above procedure terminates either weknow that v is a corner vertex or there is no corner path that contains both u and v . Nowswapping roles of u and x in the above procedure, we can decide if v is a corner vertex.We can find all the corner vertices of H by applying the above procedure to all vertices ofdegree 2 of H . Similarly by applying the above procedure to all the biconnected components hakraborty et al. 23:11 of G , we can find all corner vertices. Notice that, the total running time of the algorithmremains linear in the number of vertices of G .This completes the proof of Theorem 5. In this paper, we studied the computational complexity of the
MGS problem in variousgraph classes. We proved that the
MGS problem remains NP-hard on planar graphs andline graphs. This motivates the following question. (cid:66)
Question 1.
Are there constant factor approximation algorithms for the
MGS problemon planar graphs and line graphs?We gave an O ( √ n log n )-approximation algorithm for the MGS problem on generalgraphs and proved that unless P=NP, there is no polynomial time o (log n )-approximationalgorithm for the MGS problem even on graphs with diameter 2. The following is a naturalquestion in this direction. (cid:66)
Question 2.
Is there a O (log n )-approximation algorithm for the MGS problem on generalgraphs ?
References M. Atici. Computational complexity of geodetic set.
International journal of computermathematics , 79(5):587–591, 2002. F. Buckley and F. Harary. Geodetic games for graphs.
Quaestiones Mathematicae , 8(4):321–334,1985. L.R. Bueno, L.D. Penso, F. Protti, V.R. Ramos, D. Rautenbach, and U.S. Souza. On thehardness of finding the geodetic number of a subcubic graph.
Information Processing Letters ,135:22–27, 2018. G. Călinescu, A. Dumitrescu, and J. Pach. Reconfigurations in graphs and grids.
SIAMJournal on Discrete Mathematics , 22(1):124–138, 2008. M. Chlebík and J. Chlebíková. Approximation hardness of dominating set problems in boundeddegree graphs.
Information and Computation , 206(11):1264–1275, 2008. J. Chuzhoy and D.H.K Kim. On approximating node-disjoint paths in grids. In
APPROX/RAN-DOM , pages 187–211. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 2015. I. Dinur and D. Steurer. Analytical approach to parallel repetition. In
STOC , pages 624–633.ACM, 2014. M.C. Dourado, F. Protti, D. Rautenbach, and J.L. Szwarcfiter. Some remarks on the geodeticnumber of a graph.
Discrete Mathematics , 310(4):832–837, 2010. M.C. Dourado, F. Protti, and J.L. Szwarcfiter. On the complexity of the geodetic and convexitynumbers of a graph. In
ICDM , volume 7, pages 101–108. Ramanujan Mathematical Society,2008. T. Ekim and A. Erey. Block decomposition approach to compute a minimum geodetic set.
RAIRO-Operations Research , 48(4):497–507, 2014. T. Ekim, A. Erey, P. Heggernes, P. van’t Hof, and D. Meister. Computing minimum geodeticsets of proper interval graphs. In
LATIN , pages 279–290. Springer, 2012. M. Farber and R.E. Jamison. Convexity in graphs and hypergraphs.
SIAM Journal onAlgebraic Discrete Methods , 7(3):433–444, 1986. M.R. Garey and D.S. Johnson.
Computers and intractability , volume 29. W.H.Freeman NewYork, 2002.
C V I T 2 0 1 6 M.U. Gerber and V.V. Lozin. Robust algorithms for the stable set problem.
Graphs andCombinatorics , 19(3):347–356, 2003. O. Gerstel and S. Zaks. A new characterization of tree medians with applications to distributedsorting.
Networks , 24(1):23–29, 1994. A. Gregori. Unit-length embedding of binary trees on a square grid.
Information ProcessingLetters , 31(4):167–173, 1989. V. Guruswami. Maximum cut on line and total graphs.
Discrete applied mathematics ,92(2-3):217–221, 1999. F. Harary, E. Loukakis, and C. Tsouros. The geodetic number of a graph.
Mathematical andComputer Modelling , 17(11):89–95, 1993. T.W Haynes, M. Henning, and C.A. Tiller. Geodetic achievement and avoidance games forgraphs.
Quaestiones Mathematicae , 26(4):389–397, 2003. A. Itai, C.H. Papadimitriou, and J.L. Szwarcfiter. Hamilton paths in grid graphs.
SIAMJournal on Computing , 11(4):676–686, 1982. M. Mezzini. Polynomial time algorithm for computing a minimum geodetic set in outerplanargraphs.
Theoretical Computer Science , 745:63–74, 2018. S.L. Mitchell. Another characterization of the centroid of a tree.
Discrete Mathematics ,24(3):277–280, 1978. A.A. Sardroud and A. Bagheri. An approximation algorithm for the longest cycle problem insolid grid graphs.
Discrete Applied Mathematics , 204:6–12, 2016. S. Tirodkar and S. Vishwanathan. On the approximability of the minimum rainbow subgraphproblem and other related problems.
Algorithmica , 79(3):909–924, 2017. B.Y. Wu. A 7/6-approximation algorithm for the max-min connected bipartition problem ongrid graphs. In
CGGA , pages 188–194. Springer, 2010. M. Yannakakis and F. Gavril. Edge dominating sets in graphs.
SIAM Journal on AppliedMathematics , 38(3):364–372, 1980. W. Zhang and Y. Liu. Approximating the longest paths in grid graphs.