Abstract 1 Introduction 2 Preliminaries 3 NP-Hardness 4 Conclusion References

Geodetic Set on Graphs of Constant Pathwidth and Feedback Vertex Set Number

Prafullkumar Tale ORCID Indian Institute of Science Education and Research Pune, India
Abstract

In the Geodetic Set problem, the input consists of a graph G and a positive integer k. The goal is to determine whether there exists a subset S of vertices of size k such that every vertex in the graph is included in a shortest path between two vertices in S. Kellerhals and Koana [IPEC 2020; J. Graph Algorithms Appl 2022] proved that the problem is 𝖶[1]-hard when parameterized by the pathwidth or the feedback vertex set number of the input graph. They posed the question of whether the problem admits an 𝖷𝖯-algorithm when parameterized by the combination of these two parameters. We answer this in the negative by proving that the problem remains 𝖭𝖯-hard even on graphs of constant pathwidth and feedback vertex set number.

Keywords and phrases:
Geodetic Sets, NP-hardness, Constant Treewidth
Copyright and License:
[Uncaptioned image] © Prafullkumar Tale; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Parameterized complexity and exact algorithms
Related Version:
Full Version: https://arxiv.org/abs/2504.17862
Funding:
Research supported by INSPIRE Faculty Fellowship offered by Department of Science and Technology, Government of India.
Editors:
Akanksha Agrawal and Erik Jan van Leeuwen

1 Introduction

Consider a simple undirected graph G with vertex set V(G) and edge set E(G). For two vertices u,vV(G), let I(u,v) be the set of all vertices in G that are part of some shortest path between u and v. For a subset S of vertices, we generalize this definition to I(S) by taking the union of I(u,v) for all pairs of vertices u,v in S. A subset of vertices T is said to be covered by S if TI(S). A set of vertices S is a geodetic set if V(G) is covered by S. In the Geodetic Set problem, the input is a graph G and a positive integer k, and the objective is to determine whether there is a geodetic set of size k. This problem was introduced in 1993 by Harary, Loukakis, and Tsouros [27]. We refer readers to [9, 21] for application of the problem. See [22, 37] for a broader discussion on geodesic convexity in graphs.

The Geodetic Set problem falls under the broad category of metric graph problems. These problems are defined using a metric on the graph, with the shortest distance between two vertices being the most commonly used metric. Metric graph problems include many important 𝖭𝖯-complete graph problems such as Distance d-Dominating Set (also called (k,d)-Center), Distance d-Independent Set (also called d-Scattered Set), and Metric Dimension to name a few. These problems have played a central role in the development of both classical and parameterized algorithms and complexity theory [32, 33, 3, 35, 4, 10, 23, 29, 11], as they behave quite differently from their more “local” (neighborhood-based) counterparts such as Dominating Set or Independent Set.

Due to the non-local nature of metric graph problems, most algorithmic techniques fail to yield positive results. Consider the case of the Metric Dimension problem in which an input is a graph G and an integer k, and the objective is to determine whether there is a set S of at most k vertices such that for every pair of distinct vertices u and v, there exists a vertex in S that has different distances to u and v. In a seminal paper, Hartung and Nichterlein [28] proved that the problem is 𝖶[2]-hard when parameterized by the solution size k. This motivated the structural parameterization of the problem. See, for example, Galby et al. [25] for an overview. The complexity of Metric Dimension parameterized by treewidth remained an open problem for a long time, until Bonnet and Purohit [5] made the first breakthrough by proving that the problem is 𝖶[1]-hard when parameterized by pathwidth. This result was strengthened in two directions: Li and Pilipczuk [35] proved that it is para-𝖭𝖯-hard when parameterized by pathwidth, whereas Galby et al. [25] showed that the problem is 𝖶[1]-hard when parameterized by pathwidth plus the feedback vertex set number of the graph.

Continuing the exploration of hardness results, we mention some results that hold for both Metric Dimension and Geodetic Set. Foucaud et al. [23] demonstrated that these two problems on graphs of bounded diameter admit double exponential conditional lower bounds when parameterized by treewidth, along with a matching algorithm. The same set of authors also proved that both problems admit “exotic” conditional lower bounds when parameterized by the vertex cover number [24]. Bergougnoux et al. [4] showed that enumerating minimal solution sets for both problems in split graphs is equivalent to enumerating minimal transversals of hypergraphs, arguably the most important open problem in algorithmic enumeration.

As illustrated in the examples above, Metric Dimension and Geodetic Set behave similarly concerning hardness results. Kellerhals and Koana [34] proved that Geodetic Set is 𝖶[1]-hard when parameterized by the pathwidth and feedback vertex set number (and the solution size) combined, a result similar to that of Galby et al. [25] regarding Metric Dimension. However, a counterpart to the result of Li and Pilipczuk [35] for Geodetic Set is not yet known. More formally, we do not know the complexity of the Geodetic Set problem on graphs of constant treewidth. Chakraborty et al. [8] mentioned the possibility of obtaining 𝖷𝖯-algorithm parameterized by the treewidth. Kellerhals and Koana [34] posed an even stronger question: Does Geodetic Set admit an 𝖷𝖯-algorithm when parameterized by the pathwidth and feedback vertex set number? We answer these questions in the negative.

Theorem 1.

Geodetic Set is 𝖭𝖯-complete even on graphs of pathwidth at most 17 and feedback vertex set number at most 13.

This result is particularly surprising in light of the closely related problem Geodetic Hull. In Geodetic Hull, the input is a graph G and an integer k, and the objective is to determine whether there is a vertex set S of size k such that Ij[S]=V(G) for some j>0, where I0[S]=S and Ij[S]=I[Ij1[S]] for j>0. It is easy to see that both these problems are trivial on trees since selecting all leaves is both necessary and sufficient for a solution. Kante et al. [30] proved, among other things, that the problem admits an 𝖷𝖯-algorithm parameterized by treewidth. Hence, while Geodetic Hull is polynomial-time solvable on graphs of constant treewidth, Geodetic Set remains 𝖭𝖯-hard.

Related Work.

As is often the case with metric-based problems, Geodetic Set is computationally hard – even on highly structured graph classes. See [2, 7, 8, 9, 12, 13, 18, 19, 20, 21, 27] for various earlier hardness results. Geodetic Set can be solved in polynomial time on split graphs [19, 20], well-partitioned chordal graphs [1], outerplanar graphs [36], ptolemaic graphs [22], cographs [19], distance-hereditary graphs [31], block-cactus graphs [21], solid grid graphs [8, 12], and proper interval graphs [21]. A two-player game variant of Geodetic Set was introduced in [6].

As mentioned before, Kellerhals and Koana in [34] studied the parameterized complexity of Geodetic Set. They observed that a reduction from [19] implies that the problem is 𝖶[2]-hard when parameterized by the solution size – even for chordal bipartite graphs. They proved the problem to be 𝖶[1]-hard for the parameters solution size, feedback vertex set number, and pathwidth, combined [34]. On the positive side, they showed that Geodetic Set is 𝖥𝖯𝖳 for the parameters treedepth, modular-width (more generally, clique-width plus diameter), and feedback edge set number [34]. Chakraborty et al. [8] proved that the problem is 𝖥𝖯𝖳 on chordal graphs when parameterized by the treewidth. On the approximation side, it is known that the minimization variant of the problem is 𝖭𝖯-hard to approximate within a factor of o(logn), even on graphs of diameter 2 [9] and subcubic bipartite graphs of arbitrarily large girth [15].

2 Preliminaries

For an integer n, we let [n]={1,,n}. We use standard graph-theoretic notation and refer the reader to [16] for any undefined notation. For an undirected graph G, the sets V(G) and E(G) denote its set of vertices and edges, respectively. Two vertices u,vV(G) are adjacent or neighbors if (u,v)E(G). We say a vertex v is a pendant vertex if its degree is one. A vertex v is a branching vertex if its degree is at least three. A path is a collection of vertices {v1,v2,,v} such that (vi,vi+1)E(G) for every i in [1]. In this case, v1 and v are two endpoints, whereas all the other vertices are called internal vertices. We say a path is simple if all its internal vertices have degree precisely two. The length of a path is the number of edges in it. The distance between two vertices u,v in G, denoted by dist(u,v), is the length of a shortest path connecting u to v. For a subset S of V(G), we denote the graph obtained by deleting S from G by GS. Recall that a subset SV(G) is a geodetic set if for every uV(G) there exist s1,s2S such that u lies on a shortest path from s1 to s2. Consider a pendant vertex v in G. Note that v does not belong to any shortest path between any pair x,y of vertices which are distinct from v. Hence, v belongs to every geodetic set of G. This observation was also made in [13].

We refer readers to Cygan et al. [14] for unspecified terms related to parameterized complexity. We define some of the parameters mentioned in this article. For a graph G, a set XV(G) is a feedback vertex set of G if GX is an acyclic graph. The feedback vertex set number of graph G, denoted by 𝚏𝚟𝚜(G), is the size of a minimum feedback vertex set of G. We denote by 𝚝𝚠(G) and 𝚙𝚠(G) as the treewidth and pathwidth of graph G, respectively. It is easy to verify that 𝚝𝚠(G)𝚏𝚟𝚜(G)+1 and 𝚝𝚠(G)𝚙𝚠(G) whereas 𝚙𝚠(G) and 𝚏𝚟𝚜(G) are incomparable.

We define an equivalent definition of pathwidth via mixed search games. In a mixed search game, a graph G is considered a system of tunnels. Initially, all edges are contaminated by a gas. An edge is cleared by placing searchers at both its endpoints simultaneously or by sliding a searcher along the edge. A cleared edge is re-contaminated if there is a path from an uncleared edge to the cleared edge without any searchers on its vertices or edges. A search is a sequence of operations that can be of the following types: (i) placement of a new searcher on a vertex; (ii) removal of a searcher from a vertex; (iii) sliding a searcher on a vertex along an incident edge to its other endpoint and placing the searcher there. A search strategy is winning if, after its termination, all edges are cleared. The mixed search number of a graph G, denoted by ms(G), is the minimum number of searchers required for a winning strategy of mixed searching on G. Takahashi et al. [38] proved that 𝚙𝚠(G)ms(G)𝚙𝚠(G)+1, which we use to bound the pathwidth of the graphs obtained in the reduction.

3 NP-Hardness

In this section, we prove that the problem is para-𝖭𝖯-hard when parameterized by pathwidth and the feedback vertex set number of the input graph. We present a polynomial-time reduction from the 3-Dimensional Matching problem, which is known to be 𝖭𝖯-hard [26, SP 1]. For notational convenience, we work with the following definition of the problem. The input consists of a universe 𝒰={α,β,γ}×[n], a family 𝒮 of m subsets of 𝒰 such that for every set S𝒮, S={(α,a),(β,b),(γ,c)} for some a,b,c[n]. The goal is to find a subset 𝒮𝒮 of size n that partitions 𝒰.

Reduction

The reduction takes as input an instance (𝒰,𝒮) of 3-Dimensional Matching and returns an instance (G,k) of Geodetic Set in polynomial time where pathwidth plus feedback vertex set number of G is a constant. Recall that a branching vertex is a vertex of degree at least three. We start by specifying the common branching vertices in G and the lengths of simple paths connecting them.

Figure 1: The figure shows the ith copy of set-encoding gadget {z2i,z1i}XiYi, element-encoding gadgets encoding elements of the form (α,a), (β,b), (γ,c) and (γ,c), for some a,b,c,c[n], and the common branching vertices. Each solid (black or red) edge represents a path of fixed length which is either M2 or M21. Each dotted (blue or red) edge represents a path whose length depends on the set or element corresponding to one of its endpoints. Apart from the internal vertices in the red edges, all the other vertices are covered by pendant vertices in the graph. For clarity, we show connecting paths starting at only one vertex in Xi. Moreover, it only shows one of the nine vertices, viz xpα, that are adjacent to x and are connected to g2 and g3.

Common Branching Vertices.

The reduction starts constructing G by adding the following vertices: {g1,g2,g3,g4}, {pα,qα,rα}, {pβ,qβ,rβ}, and {pγ,qγ,rγ}. All set-encoding gadgets and element-encoding gadgets, which we define below, are connected via these common branching vertices. These common branching vertices are denoted using grey shaded region in all the figures. Apart from the vertices in {qα,qβ,qγ}, the reduction adds pendant vertices adjacent to each common branching vertex. In all the figures, vertices that are adjacent to a pendant vertex are highlighted by enclosed squares around them. Define an integer M such that M𝒪(n2) and for any a[n], we have 0.99M2M22aM,M2+2aM1.01M2. The reduction connects g1 to g2 and g3 to g4 using a path of length M2 for each connection. See Figure 1.

Set-encoding Gadget.

The reduction adds n identical set-encoding gadgets denoted by 𝒮1,𝒮2,,𝒮n. For any i[n], set-encoding gadget 𝒮i contains sets of vertices Xi, Yi, and two auxiliary vertices z1i and z2i. Sets Xi and Yi contain m vertices each. The reduction adds matching edges across Xi and Yi. Each of these matching edges and their endpoints corresponds to a unique set in 𝒮. Then, the reduction replaces each of these matching edges with a simple path of length M2. For each vertex in Yi, the reduction adds a pendant vertex adjacent to it. It connects z1i with every vertex in {z2i}Xi using a simple path of length M2 for each connection.

We now specify how the vertices mentioned above are connected to common branching vertices. The reduction connects (i) g1 to z1i and z2i, (ii) g2 to z1i, and (iii) g4 to every vertex in Yi, using paths of length M2 for each connection. It connects g2 to every vertex in Yi using a path of length M21. We remark that these are the only paths that are of length M21. To specify the connection to the remaining common branching vertices, consider a set S={(α,a),(β,b),(γ,c)} in 𝒮 and the vertex x corresponding to it in Xi. The reduction connects x to all the remaining common branching vertices such that

  • dist(x,pα)=M2+2aM, dist(x,qα)=M2aM, and dist(x,rα)=M22aM;

  • dist(x,pβ)=M2+2bM, dist(x,qβ)=M2bM, and dist(x,rβ)=M22bM; and

  • dist(x,pγ)=M2+2cM, dist(x,qγ)=M2cM, and dist(x,rγ)=M22cM.

See Figure 2 for an illustration.

Now, consider the vertex on the path connecting x to pα which is adjacent to x. We denote this vertex by xpα. The reduction connects xpα with g2 and g3 using the paths of length M2 each. It repeats this process to add vertices xqα, xrα, xpβ, xqβ, xrβ, xpγ, xqγ, and xrγ, and their connection to g2 and g3.

Figure 2: On the left of the grey (shaded) area: Connection between some common branching vertices and a vertex x in Xi which corresponds to set S={(α,a),(β,b),(γ,c)}, for some a,b,c[n]. The figure also shows vertices xpα, xqα, and xrα. On the right of the grey (shaded) area: Connection between some common vertices and element-encoding gadget encoding (α,a) for some a[n].

Element-Encoding Gadget.

Consider an element (α,a) in 𝒰. The reduction adds three vertices uaα,vaα and waα. It adds a pendant vertex adjacent to uaα and another pendant vertex adjacent to waα. It connects waα with uaα and vaα using a simple path of length M2 for each connection.

The reduction connects uaα with {pα,qα,rα} using simple paths such that

  • dist(uaα,pα)=M22aM, dist(uaα,qα)=M2+aM, and dist(uaα,rα)=M2+2aM.

It connects vaα (only) to qα such that dist(vaα,qα)=M2+aM. See Figure 2 for an illustration. Consider the vertex in the simple path connecting qα and uaα which is adjacent with qα. We denote the vertex by qaα. The reduction adds a pendant vertex and makes it adjacent with qaα.

The reduction repeats the constructions for elements (β,b) and (γ,c) in 𝒰. In the first case, the vertices in the gadgets are connected to {pβ,qβ,rβ} whereas in the latter case they are connected to {pγ,qγ,rγ}.

Finally, for any vertices of the type waα, wbβ, and wcγ added in the above steps, the reduction connects each of them to g4 using simple paths of length M2 for each connection. See Figure 1.

This completes the construction. Suppose P is the collection of all the pendant vertices in G. The reduction returns (G,k=n+|P|) as an instance of Geodetic Set.

Note that each edge in Figure 1 corresponds to a simple path whose length is at least 0.99M2 and at most 1.01M2. Hence, the distance between any two vertices in Figure 1, where we use an edge to denote a simple path connecting two of its endpoints, is proportional to their distance in G.

Define P to be the collection of all the pendants vertices in G. To prove the correctness of the reduction, we first argue that vertices in P covers most of the vertices in G. We argue that the only vertices they do not cover are internal vertices in the red edges of Figure 1. We define these uncovered vertices as follows. Define Vg1 as the collection of all the internal vertices in the simple path connecting g1 to z1i for any i[n]. For every a[n], define Vaα as the collection of internal vertices in the simple path connecting qα to uaα and simple path connecting uaα to waα. Define Vα=a[n]Vaα. Similarly, define Vβ and Vγ.

Recall that I(u,v) denotes the set of vertices in G that are part of some shortest path between u and v. Also, we generalize this definition to set S by taking the union of I(u,v) for all pairs of vertices u,v in S.

Lemma 2.

Let P be the collection of pendant vertices in G. Then, V(G)(Vg1VαVβVγ)=I(P).

Proof.

We first prove that V(G)(Vg1VαVβVγ)I(P). By the construction, any vertex u in G is adjacent with at most one pendant vertex. We use pndt(u) to denote the pendant vertex adjacent with u, if it exists. We first consider the partition of vertices in G based on the simple paths they are part of.

Consider the simple paths ending at 𝒈𝟏.

From the construction, I(pndt(g1),pndt(g2)) contains all the vertices in the simple path connecting g1 and g2. Similarly, I(pndt(z2i),pndt(g1)) covers all the vertices in the simple path connecting z2i and g1 for every i[n]. Note that the statement of the lemma excludes the vertices in simple paths connecting g1 and z1i.

Consider the simple paths ending at 𝒈𝟐.

From the construction, I(pndt(z2i),pndt(g2)) covers all the vertices in the simple path connecting z1i to g2 for every i[n]. Consider vertices x in Xi and y in Yi which are the part of ith set-encoding gadget 𝒮i for some i in [n]. I(pndt(y),pndt(g2)) covers all the vertices in the simple path connecting y to g2. Also, I(pndt(g2),pndt(g3)) covers all the vertices in the path connecting g2 with xpα. A similar statement is true for the other branching vertices adjacent to x.

Consider the simple paths ending at 𝒈𝟑.

From the construction, I(pndt(g3),pndt(g4)) contains all the vertices in the simple path connecting g3 and g4. As argued in the previous paragraph, I(pndt(g2),pndt(g3)) covers all the vertices in the path connecting g3 with all the branching vertices like xpα that are adjacent with x.

Consider the simple paths ending at 𝒈𝟒.

For all such paths, there other endpoints are adjacent to some pendant vertex. By the construction, the shortest path between the pendant vertices adjacent to the endpoints covers all the vertices in the simple path.

Consider the simple paths ending at 𝒑𝜶, 𝒑𝜷 or 𝒑𝜸.

All the simple paths ending at pα can be partitioned into two parts: ones that have the other endpoint in a set-encoding gadget (i.e. xpα for some x in Xi for some i[n]) or ones that have the other endpoint in an element-encoding gadget (i.e. uaα for some a[n]). In the second case, both the endpoints of the simple path are adjacent to pendant vertices. Hence, by the construction, the shortest path between the pendant vertices adjacent to the endpoints cover all the vertices in the simple path. In the first case, suppose the other endpoint of the simple path is xpα for some x in Xi. Consider vertex x and the unique vertex y in Yi which is at the distant M2 from x. By the construction, there is a shortest path from pα to y that contains x. Hence, I(pndt(pα),pndt(y)) covers all the vertices in the simple path connecting pα to x. Since x is an arbitrary point in Xi, the statement is true for all the vertices in the first type of simple path. These vertices are also covered by I(pndt(pα),pndt(g3)). A similar set of arguments implies that all the vertices in the simple path ending at pβ and pγ are covered by vertices in P.

Consider the simple paths ending at 𝒒𝜶, 𝒒𝜷 or 𝒒𝜸.

Once again, all the simple paths ending at qα can be partitioned into two parts: ones that have the other endpoint in a set-encoding gadget (i.e. xqα for some x in Xi for some i[n]) or ones that have the other endpoint in an element-encoding gadget (i.e. uaα or vaα for some a[n]). Fix an integer a[n] and recall that qaα is adajcent with qα. Using the same arguments as in the above paragraph, I(pndt(qaα),pndt(y)) covers all the vertices in the simple path connecting qα and x. This proves the claim for the vertices in the first type of path. I(pndt(qaα),pndt(uaα)) covers all the vertices in the path connecting qaα and ua. Note that the vertices in the simple path connecting qaα and va are in Vα, which are excluded in the statement of the lemma. A similar set of arguments implies that all the vertices in the simple path ending at qβ and qγ are covered by vertices in P.

Consider the simple paths ending at 𝒓𝜶, 𝒓𝜷 or 𝒓𝜸.

A similar set of arguments regarding paths ending at pα, pβ or pγ proves that all the vertices in simple paths ending at rα, rβ or rγ are covered by vertices in P.

Consider the simple paths whose endpoints are contained in a set-encoding gadget.

Consider a set-encoding gadget 𝒮i for a fixed i in [n]. The shortest paths connecting z2i and g3 covers all vertices in simple paths connecting z2i to z1i and z1i to x for every x in Xi. As argued before, there is a shortest path from pα to y, for any y in Yi, that contains the corresponding x in Xi. Hence, I(pndt(pα),pndt(y)) covers all the vertices in the simple path connecting x to y. This implies that all the vertices in 𝒮i, except the vertices in Vg1 are covered. Recall that Vg1 contains the internal vertices of the path connecting g1 with z1i.

Consider the simple paths whose both endpoints are contained in an element-encoding gadget.

Consider an element-encoding gadget encoding (α,a) for some a in [n]. By the construction, I(pndt(uaα),pndt(waα)) covers all the vertices in the simple path connecting uaα and waα. We remark that the vertices in the simple path connecting vaα and waα are part of Vα and hence excluded from the statement of the lemma. Using similar arguments for elements of the form (β,b) and (γ,c) for some b,c in [n].

The arguments above imply that V(G)(Vg1VαVβVγ)I(P). It remains to prove that no vertex in (Vg1VαVβVγ) is covered by the vertices in P.

Consider the vertices in Vg1 which are in the ith copy of set-encoding gadget for some i in [n]. It is easy to see that vertices in P{pndt(z2i),pndt(g1)} can not cover the vertices mentioned in the previous sentence. Any shortest path whose one endpoint is pndt(z2i) and other endpoint is in P{pndt(g1)} contains either {g1,g2} or {z1i,g2}. Hence, none of such paths can cover vertices in the path connecting g1 and z1i. Similarly, any shortest path whose one endpoint is pndt(g1) and other endpoint is in P{pndt(z2i)} contains g2 and hence can not contain z1i. This implies that P can not cover any vertex in Vg1.

Consider the vertices in Vα. It is easy to verify that vertices in Vα are not covered by the shortest path between any two common branching vertices. Also, the shortest paths between the pendant vertices in the element-encoding gadget do not cover vertices in Vα. Consider vertices in Vα, which are part of the element-encoding gadget corresponding to element (α,a) for some a in [n]. Any shortest path between the vertices in P that can cover these vertices has pndt(waα) as one of its endpoint and should contain qα. By the construction, no path connecting pndt(waα) to any of the pendant vertex adjacent with common branching vertices contains qα. It is easy to see for pα, rα, g3 and g4. For the remaining common vertices, it is sufficient to prove that the shortest path from pndt(waα) to g2 do not contain qα. Note that the path from waα to g2 that contains qα and xqα for some x in Xi, is of length close to 4M2. However, the shortest path from pndt(waα) to g2 is of length 3M2 and contains y in some Yi and g4. This implies that P does not cover any vertex in Vα. Using similar arguments, the statement holds for vertices in Vβ and Vγ which concludes the proof of the lemma.

In the following two lemmas, we prove that the reduction is safe.

Lemma 3.

If (𝒰,𝒮) is a Yes-instance of 3-Dimensional Matching then (G,k) is a Yes-instance of Geodetic Set.

Proof.

Without loss of generality, suppose {S1,S2,,Sn} is a collection of n sets in collection of 𝒮 (which contains m sets) that partitions all the vertices in 𝒰. For every i in [n], consider a vertex in Xi in the set-encoding gadget 𝒮i corresponding to set Si. Define set Q={x11,x22,,xnn}, where xii is in Xi. Recall that P is the collection of all the pendant vertices in G. It is easy to see that |PQ|=k. Due to Lemma 2, to prove that PQ is a geodetic set of G, it is sufficient to prove that Q covers vertices in Vg1VαVβVγ. See the paragraph above Lemma 2 for the definition of these sets. Also, recall that for any vertex u, pndt(u) denotes the unique pendant vertex adjacent to it, if one exists.

For a fixed i in [n], I(xii,pndt(g1)) covers all the vertices in the simple path connecting z1i to g1. As this is true for any i in [n], Q covers vertices in Vg1. Suppose Si={(α,a),(β,b),(γ,c)} for some a,b,c in [n]. Consider vertex xii in Xi. We argue that the shortest paths between xii and waα covers the vertices in Vα that are part of the element-encoding gadget that is encoding element (α,a). Consider Figure 2 with a=a. In this case, all three paths from xii to uaα via pα, qα, and qα as the same length of 2M2. This implies the shortest distance between xii and waα is 3M2. Moreover, the path connecting xii to waα that contains qα and vaα is the shortest path between these two vertices. Hence, the shortest path between xii and pndt(waα) covers all the vertices in Vα that are part of element-encoding gadget. As {S1,S2,,Sn} partitions 𝒰, (exactly) one of these n set contains element (α,a) for every a in [n], all the vertices in Vα are covered by a vertex in Q and a vertex in P. Using the similar arguments, all the vertices in Vβ and Vγ are covered by vertices in PQ. This concludes the proof of the lemma.

Lemma 4.

If (G,k) is a Yes-instance of Geodetic Set then (𝒰,𝒮) is a Yes-instance of 3-Dimensional Matching.

Proof.

Recall that P is the collection of all the pendant vertices in G, and P is a subset of any geodetic set of G. Suppose PQ is the geodetic set of G of size of k, and hence |Q|n. By Lemma 2, vertices in Q covers all the vertices in Vg1VαVβVγ. See the paragraph before Lemma 2 for the definition of these sets.

We first prove that Q contains at least one vertex in the ith copy of set-encoding gadget 𝒮i for every i in [n]. Assume, for the sake of contradiction, that this is not the case for an index i. Recall that Vg1 is the union of internal vertices connecting paths g1 and z1i for i in [n]. Define Vig1 as the set of vertices in Vg1 which are in 𝒮i. Consider a vertex, say h, in Vig1. As PQ is a geodetic set of G, there are two vertices in it, say s1 and s2, that covers the vertex h. By Lemma 2, s1 and s2 are not in P. By the above assumption, s1 and s2 are not in 𝒮i. Consider the shortest path from s1 to s2 that contains the vertex h. Suppose that the paths enter and exit 𝒮i via common branching vertices c1 and c2. Consider the case when {c1,c2}{qα,qβ,qγ}=. In this case, the shortest path between pndt(c1) and pndt(c2) also contains the vertex h. However, this contradicts Lemma 2, which states vertices in P can not cover any vertex in Vg1. Consider the other case when the shortest path enters 𝒮i via, say, qα. In this case, the above arguments can be extended to the shortest path from pndt(qaα) for some a in [n]. This also leads to contradiction to Lemma 2. Hence, our assumption is wrong and Q contains at least one vertex in 𝒮i.

As the cardinality of Q is at most n, this implies that Q contains exactly one vertex in 𝒮i for every i in [n]. Let q be the unique vertex in Q which is in 𝒮i. We determine the position of Q in 𝒮i using the fact that the shortest paths from q to some other vertices in (PQ){q} covers all the uncovered vertices in the set-encoding gadget 𝒮i. We now restrict the possible cases for this other vertex in PQ. Let h be the other vertex in (PQ){q}, so the shortest path from q to h covers some vertices in Vig1. By the arguments above, h is not in 𝒮i. As argued in the previous paragraph, the vertices covered by the shortest path from q to h are also covered by the shortest path from q to pndt(c) where c is a common branching vertex or the vertex with pendant neighbor which is adjacent to either qα, qβ, or qγ. Hence, while considering the cases of shortest path from q to h, it is sufficient to check the cases when h is one of the vertex mentioned in the previous sentence. Note that as no vertex in Q is present in any element-encoding gadget, vertices in Q, which are in set-encoding gadgets, are also used to cover the uncovered vertices in the element-encoding gadget. We use this property to narrow the location of q in 𝒮i.

We partition 𝒮i into the following parts and prove that q can be located in particular types of parts. By the construction, deleting all the common branching vertices results in a collection of trees. Consider 𝒮i and root it at z1i.

  • For a vertex x in Xi, consider the vertex xpα adjacent with it and on the path connecting pα. Define xpα-part as the subtree rooted at xpα. Similarly, define xpβ-part and xpγ-part. In Figure 3, xpα-part is highlighted in blue.

  • For every y in Yi, define y-part as subtree rooted at y, which is highlighted using orange color in Figure 3.

  • For every x in Xi and the corresponding y in Yi, i.e. the unique vertex in Yi which is at distance M2 from x, define (x,y)-part as the collection of internal vertices of the path from x to y. See the brown edge in Figure 3.

  • For every x in Xi, define (z1i,x]-part as the vertex x and the internal vertices of the path from x to z1i. See the green part in Figure 3. Note that the part contains x but not z1i.

  • Let h,h1 and h2 be the middle points of the paths from z1i to z2i, from z1i to g1, and from z2i to g2, respectively. Define z1i-part as the tree rooted at z1i with h,h1 and h2 as its leaves. This is highlighted by the purple color in Figure 3.

  • All the remaining vertices are considered as left-over part, highlighted using cyan color in Figure 3. Note that this is the only disconnected part in the partition.

Figure 3: Types of partition of vertices in 𝒮i. Different colors correspond to different types of parts in the set-encoding gadget. For clarity, the figure does not show all the vertices in 𝒮i.

Using the fact that q is used to cover the vertices in Vig1, we first argue it is not in the part of the first-type or of the second type mentioned above, nor can it be in the leftover part. Assume q is in xpα-part for some x in Xi. In this case, the shortest path from q to g1 is via g2 and hence does not contain vertices in Vig1. Similarly, the shortest path from q to z2i is via g1 or via z1i and can not contain vertices in Vig1. It is easy to see that in this case, there are no paths from q to any other vertex in P can cover vertices in Vig1. Hence, q cannot be in xpα-part. Now, assume q is in y-part for some y in Yi. The shortest path from q to g1 is via g2 and to z2i is via g1 or z1i; hence, no such short paths can cover vertices in Vig1. Finally, it is easy to see that there is no vertex in the leftover part can cover any vertex in Vig1.

We now turn our attention to the remaining parts, viz (x,y)-part, (z1i,x]-part, for some x in Xi, or z1i-part. Note that the shortest path from any vertex in (z1i,x]-part or z1i-part to g1 covers all the vertices in Vig1 whereas the same is true for half the vertices in (x,y)-part which are closer to x than they are to y. In the next few paragraphs, we argue that the only vertices in the (z1i,x]-part can be used to cover the uncovered vertices in the element encoding gadget. Recall that for every a[n], define Vaα as the collection of internal vertices in the simple path connecting qα to uaα and the simple path connecting uaα to waα. We also defined Vα=a[n]Vaα and defined Vβ and Vγ in a similar way. Note that Vα, Vβ, and Vγ are the collection of uncovered vertices in the element-encoding gadget.

Suppose vertex x in Xi corresponds to set S={(α,a),(β,b),(γ,c)} and h is a vertex in (z1i,x]-part. We prove that I(h,waα) covers Vaα if and only if a=a. For a vertex h in (z1i,x]-part, suppose dist(h,x)=dh. Consider the four paths from h to waα that are of length at most dh+3M2 and contains exactly one common branching point amongst {g4,pα,qα,rα}. Consider the path from h to waα that contains x, the corresponding y, and g4. By the construction, the length of this path is dh+3M2. For the remaining three paths, consider Figure 2. The lengths of these three paths is dh+3M2+2(aa)M, dh+3M2+(aa)M, and dh+3M2+2(aa)M when it contains pα, qα, and rα, respectively. Note that I(h,waα) covers Vaα if and only the shortest path from h to waα contains qα. From the distances above, it is easy to see that this condition is true only when a=a. Following the identical arguments, we can prove that I(h,wbβ) covers Vbβ if and only if b=b, and I(h,wcγ) covers Vaγ if and only if c=c.

We next prove that no vertex from (x,y)-part or z1i-part can cover any uncovered vertex in the element-encoding gadget. Consider a vertex h in (x,y)-part. As argued in the previous paragraph, I(h,waα) can cover the vertices in Vα if and only if the shortest path from h to waα contains qα. However, the shortest path from h to waα contains g4 and hence cannot cover the vertices in Vα. Now consider the vertices in z1i-part. For any vertex h in z1i-part which is an internal vertex of path from z1i to g2, the shortest path h to waα contains g4 and hence can not cover vertices in Vα. Note that the shortest path from z1i to waα also contains g4 in it. This is implied by the fact that the distance between g2 and every vertex in Yi is M21 (instead of M2 like most of the other paths). Hence, I(z1i,waα) does not cover any vertex in Vα. For any vertex in the remaining z1i-part, the shortest path from it to waα is via zi, which contains g4. These arguments imply that q can not be in (x,y)-part or z1i- part for any x in Xi.

We are in a position to conclude the proof of the lemma. Recall that PQ is a geodetic set of G. Considering the position of vertices in Q, we construct a collection of n subsets 𝒮 of 𝒮 as follows: For every i in [n], let x be the unique vertex in Xi such that the vertex in Q is in (z1i,x]-part of 𝒮i. If x corresponds to set S, then include S in 𝒮. It is easy to see that the cardinality of 𝒮 is at most n. We argue that 𝒮 covers all the vertices in 𝒰. Consider an arbitrary element, say (α,a), in 𝒰. The vertices in Vα are part of the element-encoding gadget that encodes (α,a). By above arguments, for some i in [n], there is x in Xi such that (z1i,x1]-part of 𝒮i contains vertex q in Q with the property that I(q,waα) covers vertices in Vα in the element-encoding gadget. Suppose x corresponds to the vertex S={(α,a),(β,b),(γ,c)} for some a,b,c[n]. From the arguments above, I(q,waα) covers vertices in Vα if and only if a=a. This implies that (α,a) is covered by some set in 𝒮. Since this is an arbitrary element in 𝒰, one can conclude that 𝒮 covers all the vertices in 𝒰. This implies that (𝒰,𝒮) is a Yes-instance of 3-Dimensional Matching.

Lemma 5.

Pathwidth and feedback vertex set the number of G are at most 17 and 13, respectively.

Proof.

We present a mixed search strategy to clean G using 17 searchers to bound the pathwidth of G. Place 13 searchers on common branching vertices. These searchers will never move from their places. (This is equivalent to deleting common branching vertices and presenting a mixed search strategy using four searchers for the resulting graph.) We search the graph in 3n+n rounds, one round for each element-encoding gadget and one round for each set of set-encoding gadget, respectively.

Consider an element-encoding gadget encoding an element, say (α,a) for some a in [n]. We can place three searchers on uaα, vaα, and waα, and the fourth searcher can move along the simple path connecting these vertices and with common branching vertices to clean all the edges in the connecting paths.

By the construction, deleting all the common branching vertices results in a collection of trees. Consider the set-encoding gadget 𝒮i for some i in [n] and root it at z1i. In each round, we fix a searcher on z1i. We need one searcher to clean all the edges between the simple path connecting z1i to g1 via z2i, path of length M2 connecting z1i to g1, and finally path connecting z1i to g2. Once these paths are cleaned, the searcher is free and can be used to clean the remaining part of the set-encoding gadget. We divide the remaining part of this round into m sub-rounds corresponding to each vertex in Xi. For a sub-round, fix two searchers on a vertex x in Xi and another searcher on the corresponding vertex y in Yi which is at distance M2 from x. The remaining searcher can clean all the edges in the simple paths connecting x to y, y to common vertices, and x to z1i. Next, the searcher placed on y can be relocated to each of the branching vertices adjacent to x, i.e. vertices of the form xpα. Now, the other searcher can be used to clean the subtree rooted at the branching vertex. This completes one sub-round. Completing such m sub-rounds clears all the paths in 𝒮i.

As we need 17 searchers to clean the graph, result of Takahashi et al. [38] implies that 𝚙𝚠(G)17.

As deleting all the common branching vertices results in a collection of trees, feedback vertex set number of the graph is 13.

4 Conclusion

In this article, we proved that Geodetic Set is 𝖭𝖯-complete even on graphs with constant pathwidth and feedback vertex set number answering the open question by Kellerhals and Koana [34]. In the same paper, the authors provided an 𝖥𝖯𝖳 algorithm (with impractical running time) when parameterized by treedepth (denoted by 𝚝𝚍) of the input graph. Recent work by Foucaud et al. [23] showed that Geodetic Set admits an algorithm running in time 2𝚍𝚒𝚊𝚖𝒪(𝚝𝚠)poly(|V(G)|), where 𝚍𝚒𝚊𝚖 denotes the diameter of the graph. This result, along with the fact that 𝚍𝚒𝚊𝚖 and 𝚝𝚠 are upper bounded by 2𝚝𝚍 and 𝚝𝚍+1, respectively, imply that Geodetic Set admits an algorithm running in time 22𝒪(𝚝𝚍2)poly(|V(G)|). It would be interesting to obtain an 𝖥𝖯𝖳 algorithm parameterized by treedepth with improved running time. We remark that Foucaud et al. [23] proved that the problem does not admit an algorithm running in time 22o(𝚝𝚍)poly(|V(G)|), unless the ETH fails.

As highlighted in the introduction of this article and also in [8, 34], Metric Dimension and Geodetic Set share many hardness properties. We mention one notable exception: Metric Dimension is 𝖥𝖯𝖳 when parameterized by the solution size plus the treelength [3], however, Geodetic Set is 𝖶[2]-hard when parameterized by the solution size even when treelength is a constant. See [17, Theorem 2]. Regarding the parameterized complexity of Metric Dimension when parameterized by pathwidth and feedback vertex set number of the graph, Galby et al. [25] showed that the problem is 𝖶[1]-hard. Can we improve this result to obtain a result for Metric Dimension as we did for Geodetic Set in this article?

References

  • [1] J. Ahn, L. Jaffke, O. Kwon, and P. T. Lima. Well-partitioned chordal graphs. Discrete Mathematics, 345(10):112985, 2022. doi:10.1016/J.DISC.2022.112985.
  • [2] M. Atici. Computational complexity of geodetic set. International journal of computer mathematics, 79(5):587–591, 2002. doi:10.1080/00207160210954.
  • [3] R. Belmonte, F. V. Fomin, P. A. Golovach, and M. S. Ramanujan. Metric dimension of bounded tree-length graphs. SIAM J. Discrete Math., 31(2):1217–1243, 2017. doi:10.1137/16M1057383.
  • [4] B. Bergougnoux, O. Defrain, and F. Mc Inerney. Enumerating minimal solution sets for metric graph problems. In Graph-Theoretic Concepts in Computer Science - 50th International Workshop, WG, 2024. doi:10.1007/978-3-031-75409-8_4.
  • [5] E. Bonnet and N. Purohit. Metric dimension parameterized by treewidth. Algorithmica, 83:2606–2633, 2021. doi:10.1007/S00453-021-00808-9.
  • [6] F. Buckley and F. Harary. Geodetic games for graphs. Quaestiones Mathematicae, 8(4):321–334, 1985. doi:10.1080/16073606.1985.9631921.
  • [7] L. R. Bueno, L. D. Penso, F. Protti, V. R. Ramos, D. Rautenbach, and U. S. Souza. On the hardness of finding the geodetic number of a subcubic graph. Inf. Process. Lett., 135:22–27, 2018. doi:10.1016/J.IPL.2018.02.012.
  • [8] D. Chakraborty, S. Das, F. Foucaud, H. Gahlawat, D. Lajou, and B. Roy. Algorithms and complexity for geodetic sets on planar and chordal graphs. In 31st International Symposium on Algorithms and Computation (ISAAC), 2020. doi:10.4230/LIPIcs.ISAAC.2020.7.
  • [9] D. Chakraborty, F. Foucaud, H. Gahlawat, S. K. Ghosh, and B. Roy. Hardness and approximation for the geodetic set problem in some graph classes. In Proc. of the 6th International Conference on Algorithms and Discrete Applied Mathematics (CALDAM), 2020.
  • [10] D. Chakraborty, F. Foucaud, and A. Hakanen. Distance-based covering problems for graphs of given cyclomatic number. In Fundamentals of Computation Theory - 24th International Symposium, FCT, 2023.
  • [11] D. Chakraborty, F. Foucaud, D. Majumdar, and P. Tale. Tight (double) exponential bounds for identification problems: Locating-dominating set and test cover. In 35th International Symposium on Algorithms and Computation, ISAAC, 2024.
  • [12] D. Chakraborty, H. Gahlawat, and B. Roy. Algorithms and complexity for geodetic sets on partial grids. Theoretical Computer Science, 979:114217, 2023. doi:10.1016/J.TCS.2023.114217.
  • [13] G. Chartrand, F. Harary, and P. Zhang. On the geodetic number of a graph. Networks, 39(1):1–6, 2002. doi:10.1002/NET.10007.
  • [14] M. Cygan, F. V. Fomin, L. Kowalik, D. Lokshtanov, D. Marx, M. Pilipczuk, M. Pilipczuk, and S. Saurabh. Parameterized Algorithms. Springer, 2015.
  • [15] T. Davot, L. Isenmann, and J. Thiebaut. On the approximation hardness of geodetic set and its variants. In Proc. of the 27th International Computing and Combinatorics Conference, COCOON, 2021.
  • [16] R. Diestel. Graph Theory, 4th Edition, volume 173 of Graduate texts in mathematics. Springer, 2012.
  • [17] M. Dourado, F. Protti, D. Rautenbach, and J. Szwarcfiter. Some remarks on the geodetic number of a graph. Discret. Math., 310(4):832–837, 2010. doi:10.1016/J.DISC.2009.09.018.
  • [18] M. C. Dourado, F. Protti, D. Rautenbach, and J. L. Szwarcfiter. On the complexity of the geodetic and convexity numbers of a graph. In Proc. of the International Conference on Discrete Mathematics (ICDM), volume 7 of RMS Lecture Notes Series, pages 101–108. Ramanujan Mathematical Society, 2008.
  • [19] M. C. Dourado, F. Protti, D. Rautenbach, and J. L. Szwarcfiter. Some remarks on the geodetic number of a graph. Discrete Mathematics, 310(4):832–837, 2010. doi:10.1016/J.DISC.2009.09.018.
  • [20] A. L. Douthat and M. C. Kong. Computing geodetic bases of chordal and split graph. Journal of Combinatorial Mathematics and Combinatorial Computing, pages 67–77, 1996.
  • [21] T. Ekim, A. Erey, P. Heggernes, P. van’t Hof, and D. Meister. Computing minimum geodetic sets of proper interval graphs. In Proc. of the 10th Latin American Symposium on Theoretical Informatics (LATIN 2012), 2012.
  • [22] M. Farber and R. E. Jamison. Convexity in graphs and hypergraphs. SIAM Journal on Algebraic Discrete Methods, 7(3):433–444, 1986.
  • [23] F. Foucaud, E. Galby, L. Khazaliya, S. Li, F. Mc Inerney, R. Sharma, and P. Tale. Problems in NP can admit double-exponential lower bounds when parameterized by treewidth or vertex cover. In 51st International Colloquium on Automata, Languages, and Programming, ICALP, 2024. doi:10.4230/LIPIcs.ICALP.2024.66.
  • [24] F. Foucaud, E. Galby, L. Khazaliya, S. Li, F. Mc Inerney, R. Sharma, and P. Tale. Metric dimension and geodetic set parameterized by vertex cover. In 42nd International Symposium on Theoretical Aspects of Computer Science, STACS, 2025. doi:10.4230/LIPIcs.STACS.2025.33.
  • [25] E. Galby, L. Khazaliya, F. Mc Inerney, R. Sharma, and P. Tale. Metric dimension parameterized by feedback vertex set and other structural parameters. SIAM J. Discrete Math., 37(4):2241–2264, 2023. doi:10.1137/22M1510911.
  • [26] M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, 1979.
  • [27] F. Harary, E. Loukakis, and C. Tsouros. The geodetic number of a graph. Mathematical and Computer Modelling, 17(11):89–95, 1993.
  • [28] S. Hartung and A. Nichterlein. On the parameterized and approximation hardness of metric dimension. In Proc. of the 28th Conference on Computational Complexity, CCC 2013, pages 266–276. IEEE Computer Society, 2013. doi:10.1109/CCC.2013.36.
  • [29] L. Jaffke, O j. Kwon, T. J. F. Strømme, and J. A. Telle. Mim-width III. Graph powers and generalized distance domination problems. Theoretical Computer Science, 796:216–236, 2019. doi:10.1016/J.TCS.2019.09.012.
  • [30] M. Kanté, T. Marcilon, and R. M. Sampaio. On the parameterized complexity of the geodesic hull number. Theor. Comput. Sci., 791:10–27, 2019. doi:10.1016/J.TCS.2019.05.005.
  • [31] M. M. Kanté and L. Nourine. Polynomial time algorithms for computing a minimum hull set in distance-hereditary and chordal graphs. SIAM J. Discrete Math., 30(1):311–326, 2016. doi:10.1137/15M1013389.
  • [32] I. Katsikarelis, M. Lampis, and V. Th. Paschos. Structural parameters, tight bounds, and approximation for (k, r)-center. Discret. Appl. Math., 264:90–117, 2019. doi:10.1016/J.DAM.2018.11.002.
  • [33] I. Katsikarelis, M. Lampis, and V. Th. Paschos. Structurally parameterized d-scattered set. Discrete Applied Mathematics, 308:168–186, 2022. doi:10.1016/J.DAM.2020.03.052.
  • [34] L. Kellerhals and T. Koana. Parameterized complexity of geodetic set. Journal of Graph Algorithms and Applications, 26(4):401–419, 2022. doi:10.7155/JGAA.00601.
  • [35] S. Li and M. Pilipczuk. Hardness of metric dimension in graphs of constant treewidth. Algorithmica, 84(11):3110–3155, 2022. doi:10.1007/S00453-022-01005-Y.
  • [36] M. Mezzini. Polynomial time algorithm for computing a minimum geodetic set in outerplanar graphs. Theoretical Computer Science, 745:63–74, 2018. doi:10.1016/J.TCS.2018.05.032.
  • [37] I. M. Pelayo. Geodesic Convexity in Graphs. Springer, 2013.
  • [38] A. Takahashi, S. Ueno, and Y. Kajitani. Mixed searching and proper-path-width. Theor. Comput. Sci., 137(2):253–268, 1995. doi:10.1016/0304-3975(94)00160-K.