Geodetic sets for directed acyclic planar geodetic graphs

Benedikt Georg Hein\(\null^1\) and Egon Wanke\(\null^2\)
\(\null^{1,2}\)Heinrich-Heine-Universität Düsseldorf, Germany
\(\null^1\)BeHei111@hhu.de,\(\null^2\)Egon.Wanke@hhu.de


Abstract

A set of vertices \(S\) of a directed graph \(G\) is geodetic if every vertex of \(G\) lies on a shortest path from a vertex of \(S\) to a vertex of \(S\). A directed graph is geodetic if there is at most one shortest path from every vertex of \(G\) to every vertex of \(G\). We prove the NP-completeness of the following decision problem. Given a directed acyclic planar geodetic graph \(G\) and an integer \(k\), does \(G\) have a geodetic set with at most \(k\) vertices? This implies that the question of whether \(G\) has a strong or a monitoring geodetic set with at most \(k\) vertices is also NP-complete for directed acyclic planar geodetic graphs. Furthermore, we prove that the number of vertices in a minimum geodetic set and the number of vertices in a minimum edge geodetic set can be computed in linear time for directed acyclic series-parallel graphs.

Keywords : Geodetic graph, geodetic number, strong geodetic set, monitoring geodetic set

1 Introduction↩︎

We define various geodetic sets for directed graphs that are determined in a similar way. To avoid repetitions as much as possible, the edge variants are defined using the expressions given in parentheses.

For a graph \(G=(V,E)\), let \(V(G)=V\) be the set of vertices and \(E(G)=E \subseteq V\times V\) be the set of edges of \(G\). The length of a path \(p\) is the number of its edges. Sometimes we represent paths as a sequence of vertices, sometimes as a sequence of edges, depending on what information about the paths is relevant to our considerations. A vertex \(w\) (an edge \(e\)) is covered by a path \(p\) if \(p\) contains the vertex \(w\) (the edge \(e\)). A vertex \(w\) (an edge \(e\)) is covered by a set of vertices \(S\) if there exist two vertices \(u,v \in S\) and a shortest path from \(u\) to \(v\) that covers the vertex \(w\) (the edge \(e\)).

A vertex set \(S \subseteq V(G)\) is a geodetic set (an edge geodetic set) of \(G\) if every vertex \(w \in V(G)\) (every edge \(e \in E(G)\)) is covered by a shortest path from a vertex of \(S\) to a vertex of \(S\). The vertices \(u \in S\) are always covered by the vertices in \(S\), because the path consisting of the single vertex \(u\) is always a shortest path from \(u\) to \(u\).

A vertex set \(S \subseteq V(G)\) is called a strong geodetic set (strong edge geodetic set) of \(G\) if there exists a set of shortest paths \(\cal P\), each from some vertex \(u \in S\) to some vertex \(v \in S\) such that every vertex in \(V(G)\) (every edge in \(E(G)\)) is covered by at least one of these paths. It should be noted here that, for every pair of nodes \(u, v \in S\), the set \(\cal P\) may contain at most one path from \(u\) to \(v\).

A vertex set \(S \subseteq V(G)\) is a monitoring geodetic set (monitoring edge geodetic set) of \(G\) if for each vertex \(w \in V(G)\) (edge \(e \in E(G)\)) there is a pair of vertices \(u,v \in S\) such that vertex \(w\) (edge \(e\)) is covered by all shortest path from \(u\) to \(v\).

Let \(\text{GS}(G)\), \(\text{SGS}(G)\), \(\text{MoGS}(G)\), \(\text{EGS}(G)\), \(\text{SEGS}(G)\) and \(\text{MoEGS}(G)\) be the set of all geodetic sets, strong geodetic sets, monitoring geodetic sets, edge geodetic sets, strong edge geodetic sets and monitoring edge geodetic sets, respectively, of a graph \(G\). If every vertex has at least one outgoing or at least one incoming edge then every edge geodetic set is a geodetic set, every strong edge geodetic set is a strong geodetic set and every monitoring edge geodetic set is a monitoring geodetic set. That is, for every graph \(G\) satisfying this condition it holds that \(\text{EGS}(G) \subseteq \text{GS}(G)\), \(\text{SEGS}(G) \subseteq \text{SGS}(G)\) and \(\text{MoEGS}(G) \subseteq \text{MoGS}(G)\). Furthermore, every strong geodetic (strong edge geodetic) set obviously is a geodetic set (an edge geodetic set) and every monitoring geodetic set (monitoring edge geodetic set) is a strong geodetic set (strong edge geodetic set, respectively). The second statement follows from the following fact: If a vertex \(w\) (edge \(e\)) lies on all shortest paths from a vertex \(u\) to a vertex \(v\), then we can use any shortest path \(p_{u,v}\) from \(u\) to \(v\) for the definition of a set \(\mathcal{P}\) of paths that forms a strong geodesic set (strong edge geodesic set) of \(G\). The union of the vertices \(V(p_{u,v})\) (edges \(E(p_{u,v})\)) of all these shortest paths is the entire set \(V(G)\) of vertices (\(E(G)\) of edges) of \(G\). That is, for every graph \(G\) it holds \(\text{SGS}(G) \subseteq \text{GS}(G)\), \(\text{SEGS}(G) \subseteq \text{EGS}(G)\), \(\text{MoGS}(G) \subseteq \text{SGS}(G)\) and \(\text{MoEGS}(G) \subseteq \text{SEGS}(G)\).

A graph in which there is at most one shortest path from every vertex \(u\) to every vertex \(v\) is called a geodetic graph. In a geodetic graph every geodetic set is a monitoring geodetic set and every edge geodetic set is a monitoring edge geodetic set.

That is, for every graph \(G\) it holds \(\text{MoGS}(G) = \text{GS}(G)\) and \(\text{MoEGS}(G) = \text{EGS}(G)\). The inclusions of these sets are summarized in Table 1 for general directed graphs and in Table 2 for geodetic directed graphs.

Table 1: The inclusions of geodetic sets on general directed graphs.
\(\text{MoGS}(G)\) \(\subseteq\) \(\text{SGS}(G)\) \(\subseteq\) \(\text{GS}(G)\)

90\(\subseteq\)

90\(\subseteq\)

90\(\subseteq\)

\(\text{MoEGS}(G)\) \(\subseteq\) \(\text{SEGS}(G)\) \(\subseteq\) \(\text{EGS}(G)\)
Table 2: The inclusions of geodetic sets on geodetic directed graphs.
\(\text{MoGS}(G)\) \(=\) \(\text{SGS}(G)\) \(=\) \(\text{GS}(G)\)

90\(\subseteq\)

90\(\subseteq\)

90\(\subseteq\)

\(\text{MoEGS}(G)\) \(=\) \(\text{SEGS}(G)\) \(=\) \(\text{EGS}(G)\)

The (edge) geodetic number, strong (edge) geodetic number and monitoring (edge) geodetic number of a graph \(G\) is the minimum number of vertices in a (an edge) geodetic set, strong (edge) geodetic set and monitoring (edge) geodetic set of \(G\), respectively.

Geodetic sets were first considered for undirected graphs in [@BH1990] and more formally introduced by Harrary et al. in [@HLC1993] and later in [@CHZ2002], see also [@HO2007]. A first correct proof of the NP-completeness for deciding whether a given graph \(G\) has a geodetic set less than or equal to a given number \(k\) can be found in [@Ati2002]. This Minimum Geodetic Set (MGS) problem is also NP-complete for chordal graphs and bipartite weakly chordal graphs, see [@DPRS2010]. The NP-completeness of MGS was also shown for interval graphs [@CDFGLR2020], cobipartite graphs [@EE2014], subcubic graphs [@BPPRRS2018] and subcubic partial grids of arbitrary girth [@CHB2023; @CDFGLR2020]. Chakraborty et al. [@CFGGR2020] proved the NP-completeness of MGS for undirected planar graphs and line graphs.

Geodetic sets can be computed in polynomial time on ptolemaic1 graphs[@FJ1986], co-graphs, split graphs [@DPRS2010], distance-hereditary graphs [@KN2013], proper interval graphs [@EEHHM2012], outerplanar graphs [@Mau2018], solid grids, k-trees, with fixed k [@CDFGLR2020] and complete multipartite graphs [@DIT2021]. The problem is also studied for product graphs [@BKH2008; @FMS2015], block-cactus graphs [@WWC2006], line graphs [@GAVM2012] and median graphs [@BH2008]. It has been proven that MGS is LOG-APX-hard [@DIT2021] and W[1]-hard when parameterized by some graph parameters [@KK2022].

Strong geodetic sets were first considered by Arokiaraj et al. in [@AKMTX2020]. They were studied on cartesian products of graphs [@IK2018] and on complete multipartite graphs [@IK2019]. In the context of the diameter of a graph, it was discussed by [@Irs2018]. It is shown in [@Mez2022] that the strong geodetic number of an outerplanar graph can be computed in polynomial time.

Edge geodetic sets were first studied by Atici [@Ati2003] and were analyzed for some products of graphs [@SC2010; @ACC2018]. They were also considered in the context of fuzzy graphs in [@RS2019]. Manuel et al. [@MKXAT2017] showed that the Minimum Strong Edge Geodetic Set (MSEGS) problem is NP-complete.

Monitoring edge geodetic sets are defined by Foucaud et al. in [@FNS2023]. Extensive research has been conducted on this topic in recent years, as shown in [@Has2023; @TLWL2023; @MJYL2024; @XYBZS2024; @FMMSST2025]. Therefore, it is natural to also consider a vertex version of this problem, which is referred to here simply as monitoring geodetic set.

The MGS problem on oriented graphs was studied in [@CZ2000]. In this context, the upper and lower geodetic numbers of graphs are often considered [@Lu2007; @DLW2009; @HTW2009]. The oriented version of the monitoring edge geodetic set problem was considered in [@DFMDS2025].

The term "geodetic graph" was first introduced by Ore in [@Ore1962] for undirected graphs, see also [@BH1990], and is adopted here for directed graphs. The directed version of a strong geodetic set was first defined in [@CTW2004].

In this paper, we prove the NP-completeness of the decision problem: given a directed acyclic planar geodetic graph \(G\) and an integer \(k\), does \(G\) have a geodetic set with at most \(k\) vertices? This implies that the minimum strong and the minimum monitoring geodetic set problems are also NP-complete for directed acyclic planar geodetic graphs. In Section 4, it is shown that both the geodetic number and the edge geodetic number can be computed in linear time for directed series-parallel graphs. Series-parallel graphs have been long studied in contexts such as electric circuits [@Duf1965], complexity of graph algorithms [@TNS1982], and also routing games [@Mil2006; @EFM2009].

2 Preliminaries↩︎

We will first illustrate the definitions of the different geodetic sets using the example of figure 1. The figure shows a directed graph \(G\) that has

  1. a minimum geodetic set \(S_1= \{u_5,u_7\}\) which is also a minimum edge geodetic set,

  2. a minimum strong geodetic set \(S_2= \{u_2,u_5,u_7\}\) verifiable with the shortest paths \[\begin{array}{lll} p_{u_5,u_2} & = & u_5,u_1,u_2, \\ p_{u_2,u_7} & = & u_2,u_3,u_4,u_7 \text{ and} \\ p_{u_5,u_7} & = & u_5,u_8,u_6,u_9,u_{10},u_7, \\ \end{array}\]

  3. a minimum strong edge geodetic set \(S_3= \{u_3,u_5,u_6,u_7\}\) verifiable with the shortest paths \[\begin{array}{lll} p_{u_5,u_3} & = & (u_5,u_1),(u_1,u_2),(u_2,u_3), \\ p_{u_5,u_6} & = & (u_5,u_1),(u_1,u_6), \\ p_{u_6,u_7} & = & (u_6,u_3),(u_3,u_4),(u_4,u_7), \\ p_{u_5,u_7} & = & (u_5,u_8),(u_8,u_6),(u_6,u_9),(u_9,,u_{10}),(u_{10},u_7) \text{ and} \\ \end{array}\]

  4. a minimum monitoring geodetic set \(S_3= \{u_2,u_5,u_7,u_8,u_9\}\) where

    1. \(u_1\) is on all shortest paths from \(u_5\) to \(u_2\),

    2. \(u_3\) and \(u_4\) are on all shortest path from \(u_2\) to \(u_7\),

    3. \(u_6\) is on all shortest paths from \(u_5\) to \(u_9\) and

    4. \(u_{10}\) is on all shortest path from \(u_9\) to \(u_7\),

    and

  5. a minimum monitoring edge geodetic set \(S_3= \{u_1,u_2,u_3,u_5,u_7,u_8,u_9\}\) where

    1. \((u_5,u_1)\) is on all shortest paths from \(u_5\) to \(u_1\),

    2. \((u_1,u_2)\) is on all shortest paths from \(u_1\) to \(u_2\),

    3. \((u_2,u_3)\) is on all shortest paths from \(u_2\) to \(u_3\),

    4. \((u_3,u_4)\) and \((u_4,u_7)\) are on all shortest paths from \(u_3\) to \(u_7\),

    5. \((u_5,u_8)\) is on all shortest paths from \(u_5\) to \(u_8\),

    6. \((u_1,u_6)\) and \((u_6,u_9)\) are on all shortest paths from \(u_1\) to \(u_9\),

    7. \((u_8,u_6)\) and \((u_6,u_3)\) are on all shortest paths from \(u_8\) to \(u_3\) and

    8. \((u_9,u_{10})\) and \((u_{10},u_7)\) are on all shortest paths from \(u_9\) to \(u_7\).

Graph \(G\) is not geodetic because, for example, there are two shortest paths from \(u_1\) to \(u_3\).

a

Figure 1: A directed graph \(G\). Vertices without incoming edges or without outgoing edges are drawn as squares..

The vertices without incoming edges are called terminal start vertices and the vertices without outgoing edges are called terminal end vertices. For a directed graph \(G\), let \(R(G)\) be the set of all terminal start and terminal end vertices. Terminal vertices are only on shortest paths that start or end at them. Vertex set \(R(G)\) is a subset of every geodetic set and every edge geodetic set. In the figures we draw terminal vertices as squares.

The decision problems Minimum Geodetic Set (MGS), Minimum Strong Geodetic Set (MSGS), Minimum Monitoring Geodetic Set (MMoGS), Minimum Edge Geodetic Set (MEGS), Minimum Strong Edge Geodetic Set (MSEGS) and Minimum Monitoring Edge Geodetic Set (MMoEGS) are defined as follows.

Instance:& A graph \(G\) and a positive integer \(k \leq |V(G)|\). Question:& Has \(G\) a (strong / monitoring) (edge) geodetic set with at most \(k\) vertices?**

Using a simple polynomial-time reduction from the NP-complete decision problem Exact Cover by 3 Sets (X3C), see [@GJ1979], we show that MGS is NP-hard for directed acyclic geodetic graphs. Since \(\text{GS}(G)=\text{SGS}(G)=\text{MoGS}(G)\) for geodetic graphs, it follows that MSGS and MMoGS are also NP-complete for directed acyclic geodetic graphs, where NP-membership follows from the fact that solutions can be verified in polynomial time. These statements are already known, however, we repeat the simple, unified NP-completeness proof because it treats all variants of geodetic sets considered in this paper uniformly. X3C is defined as follows.

Instance:& A set \(X\) with \(3n\) Elements and a collection \(\mathcal{C}\) of three-element subsets of \(X\). Question:& Is there a subset \(\mathcal{C}'\) of \(\mathcal{C}\) with at most \(n\) three-element sets such that every element of \(X\) occurs in exactly one member of \(\mathcal{C}'\)?**

Theorem 1. MGS is NP-complete for directed acyclic geodetic graphs.

Proof. MGS is obviously in NP. We define a directed acyclic geodetic graph \(G_{X,\mathcal{C}}\) for an X3C instance \(X=\{x_1,\ldots,x_{3n}\}\) and \(\mathcal{C}=\{C_1,\ldots,C_m\}\) such that \(G_{X,\mathcal{C}}\) has a geodetic set with at most \(7n+m\) vertices if and only if \(X,\mathcal{C}\) has a solution for X3C. The vertices and edges of \(G_{X,\mathcal{C}}\) are defined as follows (see figure 2 for an example). \[V(G_{X,\mathcal{C}}) = \{u_1,\ldots,u_m,\,\widetilde{C}_1,\ldots,\widetilde{C}_{m},\,\widetilde{x}_1,\ldots,\widetilde{x}_{3n}\,v_1,\ldots,v_{3n},\,y_1,\ldots,y_{3n},\,w_1,\ldots,w_{3n}\} \\None\] and \[\begin{array}{lll} E(G_{X,\mathcal{C}}) = & & \{(u_j,\widetilde{C}_j)~|~1 \leq j \leq m\} \\ & \cup & \{(u_j,w_i)~|~1 \leq j \leq m, \, 1 \leq i \leq 3n\} \\ & \cup & \{(\widetilde{C}_j,\widetilde{x}_i)~|~1 \leq j \leq m, \, x_i \in C_j\} \\ & \cup & \{(\widetilde{x}_i,v_i)~|~1 \leq i \leq 3n\} \\ & \cup & \{(\widetilde{x}_i,y_i)~|~1 \leq i \leq 3n\} \\ & \cup & \{(y_i,w_i)~|~1 \leq i \leq 3n\} \\ \end{array}\] Graph \(G_{X,\mathcal{C}}\) has a vertex \(\widetilde{x_i}\) for every \(x_i \in X\) and a vertex \(\widetilde{C_j}\) for every \(C_j \in \mathcal{C}\). The vertices \(v_1,\ldots,v_{3n}\) are necessary to ensure that all vertices \(\widetilde{x}_i\) and \(\widetilde{C}_{j}\) are covered. While these vertices could alternatively connected directly to the \(\widetilde{C_j}\) vertices, but doing so would make the proof harder to follow. It has \(6n+m\) terminal vertices \(u_1,\ldots,u_j,\,v_1,\ldots,v_{3n},\,w_1,\ldots,w_{3n}\) and can be constructed in polynomial time from instance \(X,\mathcal{C}\). It is easy to check that \(G_{X,\mathcal{C}}\) is geodetic.

a

Figure 2: The directed geodetic graph \(G_{X,\mathcal{C}}\) for \(X=\{x_1,\ldots,x_{12}\}\) and \(\mathcal{C}=\{C_1,\ldots,C_6\}\) with \(C_1=\{x_1,x_4,x_6\}\), \(C_2=\{x_2,x_3,x_8\}\), \(C_3=\{x_3,x_6,x_9\}\), \(C_4=\{x_5,x_7,x_{11}\}\), \(C_5=\{x_7,x_8,x_{10}\}\) and \(C_6=\{x_9,x_{10},x_{12}\}\)..

The only vertices of \(G_{X,\mathcal{C}}\) that are not already covered by shortest paths from terminal start vertices to terminal end vertices are the vertices \(y_1,\ldots,y_{3n}\). It remains to show that \(G_{X,\mathcal{C}}\) has a geodetic set with at most \(7n+m\) vertices if and only if \(X,\mathcal{C}\) has a solution for X3C.

\(\Rightarrow\) Suppose there is a subset \(\mathcal{C'} \subseteq \mathcal{C}\) with \(n\) three-element sets such that every element of \(X\) occurs in exactly one member of \(\mathcal{C'}\), then vertex set \(S=R(G_{X,\mathcal{C}}) \cup \{ \widetilde{C}_{j} ~|~ C_j \in \mathcal{C'}\}\) is a geodetic set with \((6n+m)+n = 7n+m\) vertices.

\(\Leftarrow\) Conversely, let \(S\) be a geodetic set of \(G_{X,\mathcal{C}}\) with at most \(7n+m\) vertices. Since \(G_{X,\mathcal{C}}\) has exactly \(6n+m\) terminal vertices, the set \(S\) has at most \(n\) non-terminal vertices. In order to cover the \(3n\) vertices \(y_1,\ldots,y_{3n}\) with shortest paths, at least \(n\) of the \(m\) non-terminal vertices \(\widetilde{C}_j\), \(1 \leq j \leq m\), are necessary. Thus, \(S\) has exactly \(n\) vertices \(\widetilde{C}_j\) and the set \(\{C_j ~|~ \widetilde{C}_j \in S\}\) is a solution for X3C for instance \(X,\mathcal{C}\). ◻

Theorem 2. MEGS is NP-complete for directed acyclic geodetic graphs.

Proof. The proof is similar to the proof of theorem 1. MEGS is obviously in NP. We again define a directed acyclic geodetic graph \(G_{X,\mathcal{C}}\) for an X3C instance \(X=\{x_1,\ldots,x_{3n}\}\) and \(\mathcal{C}=\{C_1,\ldots,C_m\}\) such that \(G_{X,\mathcal{C}}\) has an edge geodetic set with at most \(7n+m\) vertices if and only if \(X,\mathcal{C}\) has a solution for X3C. The vertices and edges of \(G_{X,\mathcal{C}}\) are defined as in theorem 1. The only difference is the omission of the vertices \(y_1,\ldots,v_{3n}\). These vertices are bridged with edges from the vertices \(\widetilde{x}_i\) to the vertices \(w_i\), see figure 3 for an example. \[V(G_{X,\mathcal{C}}) = \{u_1,\ldots,u_m,\,\widetilde{C}_1,\ldots,\widetilde{C}_{m},\,\widetilde{x}_1,\ldots,\widetilde{x}_{3n}\,v_1,\ldots,v_{3n},\,w_1,\ldots,w_{3n}\} \\None\] and \[\begin{array}{lll} E(G_{X,\mathcal{C}}) = & & \{(u_j,\widetilde{C}_j)~|~1 \leq j \leq m\} \\ & \cup & \{(u_j,w_i)~|~1 \leq j \leq m, \, 1 \leq i \leq 3n\} \\ & \cup & \{(\widetilde{C}_j,\widetilde{x}_i)~|~1 \leq j \leq m, \, x_i \in C_j\} \\ & \cup & \{(\widetilde{x}_i,v_i)~|~1 \leq i \leq 3n\} \\ & \cup & \{(\widetilde{x}_i,w_i)~|~1 \leq i \leq 3n\} \\ \end{array}\] It is easy to see that this graph \(G_{X,\mathcal{C}}\) is also geodetic.

a

Figure 3: The directed geodetic graph \(G_{X,\mathcal{C}}\) for \(X=\{x_1,\ldots,x_{12}\}\) and \(\mathcal{C}=\{C_1,\ldots,C_6\}\) with \(C_1=\{x_1,x_4,x_6\}\), \(C_2=\{x_2,x_3,x_8\}\), \(C_3=\{x_3,x_6,x_9\}\), \(C_4=\{x_5,x_7,x_{11}\}\), \(C_5=\{x_7,x_8,x_{10}\}\) and \(C_6=\{x_9,x_{10},x_{12}\}\)..

The only edges of \(G_{X,\mathcal{C}}\) that are not already covered by shortest paths from terminal start vertices to terminal end vertices are the edges \((\widetilde{x}_1,w_1),\ldots,(\widetilde{x}_{3n},w_{3n})\). The argument that \(G_{X,\mathcal{C}}\) has an edge geodetic set with at most \(7n+m\) vertices if and only if \(X,\mathcal{C}\) has a solution for X3C is the same as in the proof of theorem 1.

\(\Rightarrow\) Suppose there is a subset \(\mathcal{C'} \subseteq \mathcal{C}\) with \(n\) three-element sets such that every element of \(X\) occurs in exactly one member of \(\mathcal{C'}\), then vertex set \(S=R(G_{X,\mathcal{C}}) \cup \{ \widetilde{C}_{j,j} ~|~ C_j \in \mathcal{C'}\}\) is an edge geodetic set set with \(7n+m\) vertices.

\(\Leftarrow\) Conversely, let \(S\) be an edge geodetic set of \(G_{X,\mathcal{C}}\) with at most \(7n+m\) vertices. Since \(G_{X,\mathcal{C}}\) has exactly \(6n+m\) terminal vertices, the set \(S\) has at most \(n\) non-terminal vertices. In order to cover the \(3n\) edges \((\widetilde{x}_1,w_1),\ldots,(\widetilde{x}_{3n},w_{3n})\) with shortest paths, at least \(n\) of the \(m\) non-terminal vertices \(\widetilde{C}_j\), \(1 \leq j \leq m\), are necessary. Thus, \(S\) has exactly \(n\) vertices \(\widetilde{C}_j\) and the set \(\{C_j ~|~ \widetilde{C}_j \in S\}\) is a solution for X3C for instance \(X,\mathcal{C}\). ◻

The next proposition follows from the theorems 1 and 2 and the property that in geodetic graphs every (edge) geodetic set is a strong (edge) geodetic set and a monitoring (edge) geodetic set.

Proposition 1. MSGS, MMoGS, MSEGS and MMoEGS are NP-complete for directed acyclic geodetic graphs.

3 Planar geodetic graphs↩︎

Next we show the NP-completeness of MGS for directed acyclic planar geodetic graphs by a polynomial time reduction from Planar 3-Sat. The NP-completeness of Planar 3-Sat was first shown by Lichtenstein [@Lic1982].

Let \(X=\{x_1,\ldots,x_n\}\) be a set of variables and \(L=\{x_1,\overline{x_1},\ldots,x_n,\overline{x_n}\}\) be the literals of the variables of \(X\). A truth assignment of the variables is a mapping \(f:X \to \{\text{true},\text{false}\}\). Literal \(x_i\) is true under \(f\) if \(f(x_i) = \text{true}\), it is false under \(f\) if \(f(x_i) = \text{false}\). Literal \(\overline{x_i}\) is true under \(f\) if \(f(x_i) = \text{false}\), it is false under \(f\) if \(f(x_i) = \text{true}\). A clause \(C \subseteq L\) is a set of literals. A truth assignment \(f\) satisfies a clause \(C_j\) if \(C_j\) has a literal that is true under \(f\).

For a set of variables \(X\) and a set of clauses \(\mathcal{C}=\{C_1,\ldots,C_m\}\), the variable-clause graph for \(X,\mathcal{C}\) is the bipartite undirected graph with vertex set \(\{\widetilde{x}_1,\ldots,\widetilde{x}_n\} \cup \{\widetilde{C}_1,\ldots,\widetilde{C}_n\}\) and an edge between variable vertex \(\widetilde{x}_i\) and clause vertex \(\widetilde{C}_j\) if and only if clause \(C_j\) contains a literal for variable \(x_i\). See figure 4 for an example.

a

Figure 4: The bipartite planar variable-clause graph for \(X = \{x_1,x_2,x_3,x_4\}\) and \(\mathcal{C}=\{C_1,C_2,C_3,C_4\}\) with \(C_1=\{x_1,x_2,\overline{x_4}\}\), \(C_2=\{x_1,\overline{x_2},x_3\}\), \(C_3=\{\overline{x_2},x_3,x_4\}\) and \(C_4=\{\overline{x_1},\overline{x_3},x_4\}\). The white-colored vertices are the vertices of the variables. The gray-colored vertices are the vertices of the clauses..

The decision problem Planar 3-Sat is defined as follows.

Instance:& A set of variables \(X=\{x_1,\ldots,x_n\}\) and a set of clauses \(\mathcal{C}=\{C_1,\ldots,C_m\}\) over \(X\) such that each clause \(C_j \in \mathcal{C}\) has exactly three literals and the variable-clause graph \(G_{X,\mathcal{C}}\) for \(X,\mathcal{C}\) is planar. Question:& Is there a truth assignment \(f:X \to \{\text{true},\text{false}\}\) that satisfies every clause \(C_j \in \mathcal{C}\).**

Theorem 3. MGS is NP-complete for directed acyclic geodetic planar graphs.

Proof. MGS in NP because for a given set of vertices \(S\) it is easy to check that \(S\) is a geodetic set.

We now show how to create, in polynomial time, a directed acyclic planar geodetic graph \(G_{X,\mathcal{C}}\) for a given Planar 3-Sat instance \(X,\mathcal{C}\) with \(m\) clauses. The Graph \(G_{X,\mathcal{C}}\) has a geodetic set containing at most \(29 m\) vertices if and only if there is a truth assignment \(f:X \to \{\text{true},\text{false}\}\) that satisfies every clause \(C_j \in \mathcal{C}\).

The procedure is as follows. We design a gadget graph \(G^{X}_{r}\) for the variables and a gadget graph \(G^{\mathcal{C}}\) for the clauses. Let \(r_i\) be the total number of literals for variable \(x_i\) in all clauses \(C_1,\ldots,C_m\). Then in graph \(G_{X,\mathcal{C}}\) there is a copy \(G_{x_i}\) of gadget \(G^{X}_{r_i}\) for each variable \(x_i \in X\) and a copy \(G_{C_j}\) of gadget \(G^{\mathcal{C}}\) for each clause \(C_j \in \mathcal{C}\). Copy \(G_{x_i}\) is connected to copy \(G_{C_j}\) via directed edges from vertices of \(G_{x_i}\) to vertices of \(G_{C_j}\) if and only if clause \(C_j\) contains a literal for variable \(x_i\). The final resulting graph \(G_{X,\mathcal{C}}\) will be acyclic planar and geodetic and has a geodetic set with at most \(29 m\) vertices if and only if there is a truth assignment \(f:X \to \{\text{true},\text{false}\}\) for \(X\) that satisfies every clause \(C_j \in \mathcal{C}\).

  • The definition of variable gadget \(G^{X}_{r}\):

    Let \(J\) be the graph with vertex set \(V(J)=\{T,F,O,I_1,\ldots,I_6,u_1,\ldots,u_7\}\) and edge set \[E(J)=\left\{ \begin{array}{l} (O,T),(O,F),(O,u_4),(O,u_7), (T,I_1),\\ (u_1,T),(u_1,I_2),\\ (u_2,F),(u_2,I_3),\\ (u_3,I_1),\\ (u_4,u_1),(u_4,u_3),(u_4,u_5),(u_4,I_5),\\ (u_5,I_5),(u_5,I_6),\\ (u_6,u_5),(u_6,I_4),\\(u_7,u_2),(u_7,u_6),(u_7,I_6) \end{array}\right\},\] see also figure 5.

    a

    Figure 5: The graph \(J\)..

    Variable gadget \(G^{X}_{r}\) is composed from \(r\) copies \(J_1,\ldots,J_r\) of graph \(J\) in a circular manner as shown in figure 6. Let \[T^{(k)},F^{(k)},O^{(k)},I_1^{(k)},\ldots,I_6^{(k)},u_1^{(k)},\ldots,u_7^{(k)}\] be the vertices \[T,F,O,I_1,\ldots,I_6,u_1,\ldots,u_7\] of the \(k\)-th copy \(J_k\), \(1 \leq k \leq r\), in \(G^{X}_{r}\) and let \[\begin{array}{lll} T^{(\star)} & = & \{T^{(k)}~|~1 \leq k \leq r\}, \\ F^{(\star)} & = & \{F^{(k)}~|~1 \leq k \leq r\}, \\ O^{(\star)} & = & \{O^{(k)}~|~1 \leq k \leq r\}, \\ u_3^{(\star)} & = & \{u_3^{(k)}~|~1 \leq k \leq r\}, \\ u_4^{(\star)} & = & \{u_4^{(k)}~|~1 \leq k \leq r\}, \\ u_5^{(\star)} & = & \{u_5^{(k)}~|~1 \leq k \leq r\}, \\ u_7^{(\star)} & = & \{u_7^{(k)}~|~1 \leq k \leq r\} \end{array}\] The \(r\) copies of \(J\) are connected by additional edges. These are the edges from \(F^{(k)}\) to \(I^{(k')}_1\) and the edges from \(u^{(k)}_7\) to \(u^{(k')}_3\) where \(k' = (k \bmod r)+1\).

    a

    Figure 6: The figure shows variable gadget \(G^{X}_{4}\). It is used in the case where there are exactly four literals for a variable \(x_i\) in all clauses together. The gray-colored vertices are the vertices not covered by shortest paths from a terminal start to a terminal end vertex..

    The dashed lines in figure 6 show the vertices and edges of the neighboring copies of \(J\) in gadget \(G^{X}_{r}\) and the possible outgoing edges to a copy of a clause gadget \(G^{\mathcal{C}}\) in \(G_{X,\mathcal{C}}\). The dashed lines in figure 6 shows the possible outgoing edges from vertices of a copy of \(G^{X}_{r}\) to vertices of a copy of a clause gadget. Only the vertices of \(O^{(\star)} \cup T^{(\star)} \cup F^{(\star)}\) will get additional outgoing edges in \(G_{X,\mathcal{C}}\).

    Graph \(J\) has one terminal start vertex \(O\) and 6 terminal end vertices \(I_1,\ldots,I_6\). Thus variable gadget \(G^{X}_{r}\) has \(r\) terminal start vertices and \(6 r\) terminal end vertices. The terminal start vertices of the copies of \(G^{X}_{r}\) will also be terminal start vertices in \(G_{X,\mathcal{C}}\), because there will be no additional edges in \(G_{X,\mathcal{C}}\) to the vertices of these copies. The terminal end vertices of the copies of \(G^{X}_{r}\) will also be terminal end vertices in \(G_{X,\mathcal{C}}\), because there will be no additional edges in \(G_{X,\mathcal{C}}\) from these vertices of these copies.

    It is easy to check that the shortest paths from the terminal start vertices to the terminal end vertices of \(G^{X}_{r}\) cover all vertices of \(G^{X}_{r}\) except the \(2 r\) vertices of \(u_3^{(\star)} \cup u_5^{(\star)}\). These vertices are colored gray in figure 6.

    It is also easy to check that variable gadget \(G^{X}_{r}\) is acyclic, planar and geodetic, and has exactly two minimum geodetic sets \(R(G^{X}_{r}) \cup u_4^{(\star)}\) and \(R(G^{X}_{r}) \cup u_7^{(\star)}\) with \(8 r\) vertices. The first set is called a minimum geodetic set of type true and the second set is called a minimum geodetic set of type false.

    Another interesting property of the variable gadget \(G^{X}_{r}\) is the following. For each \(k\), \(1 \leq k \leq r\), there is

    1. a path from vertex \(u_4^{(k)}\) to vertex of \(T^{(k)}\) and no path from \(u_4^{(k)}\) to a vertex of \((T^{(\star)} \cup F^{(\star)}) \setminus \{T^{(k)}\}\) and

    2. a path from vertex \(u_7^{(k)}\) to vertex \(F^{(k)}\) and no path from \(u_7^{(k)}\) to a vertex of \((T^{(\star)} \cup F^{(\star)}) \setminus \{F^{(k)}\}\).

    The vertex triples \((T^{(k)},O^{(k)},F^{(k)})\), \(1 \leq k \leq r\), are called the variable ports of \(G^{X}_{r}\). For each \(k\), \(1 \leq k \leq r\), either the two vertices \(T^{(k)},O^{(k)}\) or the two vertices \(O^{(k)},F^{(k)}\) will be connected in \(G_{X,\mathcal{C}}\) via directed edges to vertices from a clause gadget \(G^{\mathcal{C}}\).

  • The definition of clause gadget \(G^{\mathcal{C}}\):

    The clause gadget \(G^{\mathcal{C}}\) has vertex set \[V(G^{\mathcal{C}})=\{\hat{I}_1,\,\hat{I}_2,\,\hat{I}_3,\,\hat{I}_4,\,\hat{I}_5,\,v_{1,1},\,v_{2,1},\,v_{2,2},\,v_{3,1},\,v_{3,2},\,v_{3,3},\,w\}\] and edge set

    \[E(G^{\mathcal{C}}) = \left\{ \begin{array}{l} (v_{1,1},\hat{I}_3),(v_{1,1},\hat{I}_1),(v_{2,1},\hat{I}_1), (v_{2,1},\hat{I}_2),(v_{3,1},\hat{I}_2),(v_{3,1},\hat{I}_3),\\ (v_{1,1},w),\\ (v_{2,1},v_{2,2}),(v_{2,2},w),(v_{2,2},\hat{I}_5),\\ (v_{3,1},v_{3,2}),(v_{3,2},v_{3,3}),(v_{3,3},w),(v_{3,3},\hat{I}_4), \\ (w,\hat{I}_1),(w,\hat{I}_2),(w,\hat{I}_3) \end{array} \right\},\] see figure 7. The vertices \(\hat{I}_1, \ldots, \hat{I}_5\) are terminal end vertices in the clause gadget and also in the final graph \(G_{X,\mathcal{C}}\), because there are no outgoing edges from vertices of a copy of a clause gadget in \(G_{X,\mathcal{C}}\). The dashed lines in figure 7 indicate all possible incoming edges from vertices of a copy of a variable gadget in \(G_{X,\mathcal{C}}\).

    a

    Figure 7: The clause gadget \(G^{\mathcal{C}}\)..

    The planar embedding given in figure 7 defines in a circle around to the left along the outer face three vertex triples \((v_{1,1},\hat{I}_1,v_{2,1})\), \((v_{2,1},\hat{I}_2,v_{3,1})\) and \((v_{3,1},\hat{I}_3,v_{1,1})\). These vertex triples are called clause ports.

  • The definition of graph \(G_{X,\mathcal{C}}\):

    The final graph \(G_{X,\mathcal{C}}\) has for each variable \(x_i \in X\) a copy \(G_{x_i}\) of variable gadget \(G^{X}_{r_i}\) and for each clause \(C_j \in \mathcal{C}\) a copy \(G_{C_j}\) of clause gadget \(G^{\mathcal{C}}\).

    Figure 8 shows the connections between the variable graphs \(G_{x_i}\) and the clause graphs \(G_{C_j}\).

    If clause \(C_j\) contains a literal for variable \(x_i\) then 4 edges are inserted from the vertices of a clause port \((T^{(k)},O^{(k)},F^{(k)})\) of \(G_{x_i}\) to the vertices of a variable port \((v_{l,1},\hat{I}_l,v_{l'.1})\) of \(G_{C_j}\). When choosing the variable port and clause port, the planar embedding of the variable clause graph of the Planar-3-Sat instance \(X,\mathcal{C}\) must be taken into account.

    If literal \(x_i \in C_j\) then the 4 edges \[(T^{(k)},v_{l,1}),~(O^{(k)},v_{l,1}),~(O^{(k)},\hat{I}_{l,1}),~(O^{(k)},v_{l',1})\] are inserted, if literal \(\overline{x_i} \in C_j\) then the 4 edges \[(O^{(k)},v_{l,1}),~(O^{(k)},\hat{I}_{l,1}),~(O^{(k)},v_{l',1}),~(F^{(k)},v_{l',1})\] are inserted.

    a

    Figure 8: The possible edges from a variable graph \(G_{x_i}\) to a clause graph \(G_{C_j}\)..

    • The top row of figure 8 (tiles 1, 2 and 3) shows the case in which literal \(x_i\) is in \(C_j\). In this case there is an edge from vertex \(T^{(k)}\) to vertex \(v_{l,1}\) of \(G_{C_j}\).

    • The bottom row of figure 8 (tiles 4, 5 and 6) shows the case in which literal \(\overline{x_i}\) is in \(C_j\).In this case there is an edge from vertex \(F^{(k)}\) to vertex \(v_{l',1}\).

    • In the first column of figure 8 (tiles 1 and 4) the vertices not covered by \(R(G_{X,\mathcal{C}})\) are colored gray.

    • In the second column of figure 8 (tiles 2 and 5), the vertices not covered by a minimum geodetic set of type true for \(G_{x_i}\) are colored gray.

    • In the third column of figure 8 (tiles 3 and 6), the vertices not covered by a minimum geodetic set of type false for \(G_{x_i}\) are colored gray.

    In the first case where literal \(x_i \in C_j\), vertex \(w\) from \(G_{C_j}\) is covered by the geodetic set of type true. This is because there is a shortest path from \(u_4^{(k)}\) via \(u_1^{(k)}\) to \(T^{(k)}\) in the copy of \(J\), see figure 5, and then either via the vertices \(v_{1,1}\) and \(w\) to vertex \(\hat{I}_{2}\), or via the vertices \(v_{2,1}\), \(v_{2,2}\) and \(w\) to vertex \(\hat{I}_{3}\) or via the vertices \(v_{3,1}\), \(v_{3,2}\), \(v_{3,3}\) and \(w\) to vertex \(\hat{I}_{1}\), respectively, see figure 8. Which cases actually occur depends on which clause port is connected to which variable port.

    In the second case where literal \(\overline{x_i} \in C_j\), vertex \(w\) from \(G_{C_j}\) is covered by the geodetic set of type false. This is because there is a shortest path from \(u_7^{(k)}\) via \(u_2^{(k)}\) to \(F^{(k)}\) in the copy of \(J\), see figure 5, and then either via the vertices \(v_{1,1}\) and \(w\) to vertex \(\hat{I}_{2}\), or via the vertices \(v_{2,1}\), \(v_{2,2}\) and \(w\) to vertex \(\hat{I}_{3}\) or via the vertices \(v_{3,1}\), \(v_{3,2}\), \(v_{3,3}\) and \(w\) to vertex \(\hat{I}_{1}\), respectively, see figure 8.

    Graph \(G_{X,\mathcal{C}}\) is acyclic, planar and geodetic.

It remains to show that if there is a truth assignment \(f:X \to \{\text{true},\text{false}\}\) that satisfies every clause \(C_j \in \mathcal{C}\) then \(G_{X,\mathcal{C}}\) has a geodetic set with at most \(29 m\) vertices and if \(G_{X,\mathcal{C}}\) has a geodetic set with at most \(29 m\) vertices then there is a truth assignment \(f:X \to \{\text{true},\text{false}\}\) that satisfies every clause \(C_j \in \mathcal{C}\).

\(\Rightarrow\) Suppose \(f:X \to \{\text{true},\text{false}\}\) is a truth assignment for \(X\) that satisfies every clause \(C_j \in \mathcal{C}\). Let \(S_{x_i}\) be a minimum geodetic set of copy \(G_{x_i}\) of type true if \(f(x_i) = \text{true}\), or of type false if \(f(x_i) = \text{false}\). Then the union of all \(S_{x_i}\), \(x_i \in X\), and the the set of all terminal vertices of all \(G_{C_j}\) is a geodetic set with \(29 m\) vertices.

\(\Leftarrow\) Suppose \(S\) is a geodetic set of \(G_{X,\mathcal{C}}\) with at most \(29 m\) vertices. Let \[u_{3}^{(k,i)},u_{4}^{(k,i)},u_{5}^{(k,i)},u_{7}^{(k,i)},\] \(1 \leq k \leq r_i\), be the vertices \[u_{3}^{(k)},u_{4}^{(k)},u_{5}^{(k)},u_{7}^{(k)}\] of gadget \(G^{X}_{r_i}\) in graph \(G_{x_i}\) of \(G_{X,\mathcal{C}}\), and let \(w^{(j)}\), \(1 \leq j \leq m\), be the vertex \(w\) of gadget \(G^{\mathcal{C}}\) in graph \(G_{C_j}\) of \(G_{X,\mathcal{C}}\). Vertex set \(S\) must contain the \(7 \cdot 3 m = 21 m\) terminal vertices of all \(G_{x_i}\), \(x_i \in X\), and the \(5 \cdot m\) terminal vertices of all \(G_{C_j}\), \(C_j \in \mathcal{C}\). In addition, \(S\) must contain \(1 \cdot 3 m\) vertices from the set \[\{u_{4}^{(k,i)},u_{7}^{(k,i)}~|~1 \leq k \leq r_i, 1 \leq i \leq n\}\] to cover all vertices \(u_{3}^{(k,i)}\) and \(u_{5}^{(k,i)}\) for \(1 \leq k \leq r_i\) and \(1 \leq i \leq n\). More precisely, \(S\) must contain for each \(x_i \in X\) all vertices \(u_{4}^{(k,i)}\) or all vertices \(u_{7}^{(k,i)}\), \(1 \leq k \leq r_i\). Since \(S\) covers all \(m\) vertices \(w^{(j)}\) of \(G_{C_j}\), \(C_j \in \mathcal{C}\), the truth assignment \(f:X \to \{\text{true},\text{false}\}\) defined by \[f(x_i) = \left\{ \begin{array}{ll} \text{true} & \text{if } S \cap V(G_{x_i}) \text{ is a minimum geodetic set of } G_{x_i} \text{ of type true}\\ \text{false} & \text{if } S \cap V(G_{x_i}) \text{is a minimum geodetic set of } G_{x_i} \text{ of type false} \end{array} \right.\] satisfies every clause \(C_j \in \mathcal{C}\).

The transformation can obviously be done in polynomial time. ◻

The following proposition is a consequence of theorem 3 and the property that in geodetic graphs a set of vertices is geodetic if and only if it is strong geodetic if and only if it is monitoring geodetic.

Proposition 2. MSGS and MMoGS are NP-complete for directed acyclic geodetic planar graphs.

Figure 9 shows a complete example of such a Graph \(G_{X,\mathcal{C}}\) constructed based on a planar 3-SAT instance. The structure of the corresponding planar embedded variable-clause graph remains clearly visible.

a

Figure 9: Example of Graph \(G_{X,\mathcal{C}}\) derived from the planar 3-SAT instance \(X = \{x_1,x_2,x_3,x_4,x_5\}\) and \(\mathcal{C} =\{C_1,C_2,C_3,C_4,C_5\}\) with \(C_1=(x_1,\overline{x_2},\overline{x_3 })\), \(C_2=(\overline{x_1},\overline{x_3},\overline{x_5})\), \(C_3=(x_1,\overline{x_4},x_5)\), \(C_4=(x_2,x_3,x_4)\) and \(C_5=(x_3,x_4,\overline{x_5})\).

4 Directed Series Parallel Graphs↩︎

Next, we show that minimum geodetic sets and minimum edge geodetic sets can be computed in linear time for directed series-parallel graphs which we also call series-parallel digraphs. Series-parallel graphs (in their undirected version) have a tree width of at most 2, but not all of them are outerplanar. They are recursively defined as follows.

Definition 1 (series-parallel diraphs, [@Epp1992]). A series-parallel digraph* is a system \(G=(V,E,s,t)\) where \((V,E)\) is a directed graph and \(s,t\in V\) are two distinct vertices. Vertex \(s\) is called the source vertex and vertex \(t\) is called the target vertex of \(G\). For an edge set \(E \subseteq V \times V\) and two vertices \(u', u \in V\), let \[\text{merge}_{u'\to u}(E) = \begin{array}{ll} & \{ (v,w) ~|~ v \not= u' \wedge w \not=u' \wedge (v,w) \in E \} \\ \cup & \{ (v,u) ~|~ v \not= u' \wedge (v,u') \in E \} \\ \cup & \{ (u,w) ~|~ w \not= u' \wedge (u',w) \in E \}. \end{array}\] We say vertex \(u'\) and vertex \(u\) are merged to vertex \(u\).
The following recursive definition generates the class of series-parallel digraphs.*

  1. \(I_{(s,t)}=(\{s,t\},\{(s,t)\},s,t)\) is a series-parallel digraph with source vertex \(s\) and target vertex \(t\). It is called the initial series-parallel digraph.

  2. If \(G=(V,E,s,t)\) and \(G'=(V',E',s',t')\) are two series-parallel digraphs with source vertices \(s,s'\) and target vertices \(t,t'\), respectively, then

    1. \(G \updownarrow G'\) with vertex set \(V \cup V' \setminus \{s'\}\) and edge set \[\text{merge}_{s'\to t}(E \cup E')\] is a series-parallel digraph with source vertex \(s\) and target vertex \(t'\) and

    2. \(G \leftrightarrow G'\) with vertex set \(V \cup V' \setminus \{s',t'\}\) and edge set \[\text{merge}_{s'\to s}(\text{merge}_{t'\to t}(E \cup E'))\] is a series-parallel digraph with source vertex \(s\) and target vertex \(t\).

Operation \(\updownarrow\) is called a series composition* and operation \(\leftrightarrow\) is called a parallel composition of two series parallel graphs.*

Series-parallel digraphs \(G=(V,E,s,t)\) are planar and cycle-free. For every vertex \(u \in V\), there is a path from \(s\) to \(u\) and a path from \(u\) to \(t\). If the directed edges are considered undirected, then series-parallel digraphs have tree-width of at most 2. Readers interested in a deeper understanding of this graph class are referred to [@Aye1978] and [@VTL1982]. An example is shown in Figure 12.

A subdivision of a directed graph \(G\) is a graph obtained by replacing directed edges \((u,v)\) in \(G\) by a new vertex \(w\) with two new directed edges \((u,w)\) and \((w,v)\). Series-parallel digraphs do not contain the diamond digraph \(\vec{D}\) from figure 10 as a subgraph. They also do not contain a subdivision of \(\vec{D}\) as a subgraph, because these graphs cannot be constructed by either a series or a parallel composition of two series-parallel digraphs.

a

Figure 10: The diamond graph \(D\), a diamond digraph \(\vec{D}\) and a subdivision \(\vec{D}'\) of \(\vec{D}\). The graphs \(\vec{D}\) and \(\vec{D}'\) are not subgraphs of series-parallel digraphs..

Theorem 4. If a vertex set \(S\) is a geodetic set (edge geodetic set) of a series-parallel digraph \(G=(V,E,s,t)\) then every vertex \(w \in V \setminus S\) (edge \(e \in E\)) lies on a shortest path from source vertex \(s\) to a vertex of \(S\) or on a shortest path from a vertex of \(S\) to target vertex \(t\).

a

Figure 11: The graphs defined by the paths \(P_{s\mapsto x}\), \(P_{x\mapsto w}\), \(P_{w\mapsto y}\), \(P_{y\mapsto t}\), \(P_{s\mapsto y}\), \(P_{x\mapsto t}\), \(P_{s'\mapsto y'}\) and \(P_{x'\mapsto t'}\) as used in the proof of theorem 4..

Proof. We first consider the case for geodetic sets. After that we consider the case for edge geodetic sets.

We prove the theorem by contradiction. For two vertices \(x,y\) contained in a geodetic set, any third vertex \(w\) is never exclusively covered by the shortest path between \(x\) and \(y\). If a vertex \(w \in V \setminus S\) lies not on a shortest path from vertex \(s\) to a vertex \(y \in S\) and not on a shortest path from a vertex \(x \in S\) to \(t\), then a subdivision of the diamond digraph \(\vec{D}\) from figure 10 is a subgraph of \(G\), which contradicts the property that series-parallel graphs do not contain a subdivision of \(\vec{D}\) as a subgraph.

Let \(x\not=s\), \(y\not=t\) and \(P_{s \mapsto x \mapsto w \mapsto y \mapsto t}\) be a path in \(G\) from vertex \(s\) via vertex \(x\) via vertex \(w\) via vertex \(y\) to vertex \(t\), where the subpath \(P_{x \mapsto w \mapsto y}\) of \(P_{s \mapsto x \mapsto w \mapsto y \mapsto t}\) from \(x\) via \(w\) to \(y\) is a shortest path. See Graph a) in figure 11. Every path in \(G\) is simple. A path cannot contain a vertex more than once, since \(G\) is cycle-free.

Next let \(P_{s \mapsto y}\) be a shortest path from \(s\) to \(y\) and \(P_{x \mapsto t}\) be a shortest paths from \(x\) to \(t\). See Graph b) in figure 11. Path \(P_{s \mapsto y}\) does not contain any vertex of path \(P_{x \mapsto w}\), since otherwise there exists a shortest path from \(s\) to \(y\) containing vertex \(w\), which contradicts our assumptions. For the same reason, path \(P_{x \mapsto t}\) does not contain any vertex of path \(P_{w \mapsto y}\).

Therefore, let \(s'\) be the last vertex of \(P_{s \mapsto y}\) that is also in \(P_{s \mapsto x}\) and \(y'\) be the first vertex of \(P_{s \mapsto y}\) that is also in \(P_{w \mapsto y}\). Let \(x'\) be the last vertex of \(P_{x \mapsto t}\) that is also in \(P_{x \mapsto w}\) and \(y'\) be the first vertex of \(P_{x \mapsto t}\) that is also in \(P_{y \mapsto t}\). See Graph c) in figure 11.

If the two subpaths \(P_{s' \mapsto y'}\) and \(P_{x' \mapsto t'}\) of \(P_{s \mapsto y}\) and \(P_{x \mapsto t}\), respectively, are vertex disjoint, then \(G\) has a subdivision of diamond digraph \(\vec{D}\) of figure 10, where \(a=s'\), \(b=x'\), \(c=y'\) and \(d=t'\). See Graph c) in figure 11. Suppose \(P_{s' \mapsto y'}\) and \(P_{x' \mapsto t'}\) have a common vertex. Then let \(z\) be the first common vertex of these two path. In this case, \(G\) also contains a subdivision of the diamond digraph \(\vec{D}\), where \(a=s'\), \(b=x'\), \(c=z\), and \(d=y'\). See Graph d) in figure 11.

The proof for edge geodetic sets is analogous. Let \((w,w')\) be an edge on a shortest path from \(x\) to \(y\). Then we consider the path \(P_{s \mapsto x \mapsto w, w' \mapsto y \mapsto t}\) with the subpaths \(P_{x \mapsto w}\) and \(P_{w' \mapsto y}\). Path \(P_{s \mapsto y}\) does not contain any vertex of path \(P_{x \mapsto w}\) and path \(P_{x \mapsto t}\) does not contain any vertex of path \(P_{w' \mapsto y}\). Therefore, let \(s'\) be the last vertex of \(P_{s \mapsto y}\) that is also in \(P_{s \mapsto x}\) and \(y'\) be the first vertex of \(P_{s \mapsto y}\) that is also in \(P_{w' \mapsto y}\). Let \(x'\) be the last vertex of \(P_{x \mapsto t}\) that is also in \(P_{x \mapsto w}\) and \(y'\) be the first vertex of \(P_{x \mapsto t}\) that is also in \(P_{y \mapsto t}\). The further argumentation is the same as for geodetic sets. ◻

Definition 2 (closed geodetic sets). A set of vertices \(S\) of a series-parallel digraph \(G=(V,E,s,t)\) is a closed geodetic set (closed edge geodetic set) of \(G\) if every vertex \(w \in V \setminus S\) (edge \(e \in E\)) lies on a shortest path from a vertex \(u \in S\) to a vertex \(v \in S\) such that \(u \not= s\) or \(v \not= t\).

Every closed geodetic set (closed edge geodetic set) \(S\) of a series-parallel digraph \(G=(V,E,s,t)\) is a geodetic set (edge geodetic set, respectively) of \(G\). If \((s,t)\) is an edge of \(G\) then \(G\) has no closed edge geodetic set. This means that every closed edge geodetic set has at least three vertices. Closed geodetic sets (closed edge geodetic set) are introduced solely for the computation of the minimum geodetic sets (minimum edge geodetic sets) in parallel composition, as stated in theorem 5 3.(b) and 6 3.(b). For this purpose, they are computed at each step.

Let \(\text{mgs}(G)\) be the number of vertices of a minimum geodetic set of \(G\), \(\text{cmgs}(G)\) be the number of vertices of a minimum closed geodetic set of \(G\) and \(\text{sp}(G)\) be the length of a shortest path from source vertex \(s\) to target vertex \(t\) in \(G\).

Theorem 5. The number of vertices in a minimum geodetic set of a series-parallel digraph can be computed as follows.

  1. (for the initial series-parallel digraph \(I_{(s,t)}\))

    1. \(\text{sp}(I_{(s,t)}) = 1\),

    2. \(\text{mgs}(I_{(s,t)}) = 2\) and

    3. \(\text{cmgs}(I_{(s,t)}) = 2\).

  2. (for a series composition of two series-parallel digraph \(G\) and \(G'\))

    1. \(\text{sp}(G \updownarrow G') = \text{sp}(G) + \text{sp}(G')\),

    2. \(\text{mgs}(G \updownarrow G') = \text{mgs}(G) + \text{mgs}(G') -2\) and

    3. \(\text{cmgs}(G \updownarrow G') = \left\{ \begin{array}{ll} \text{mgs}(G)+\text{mgs}(G')-2 & \text{if } \begin{array}[t]{ll} & ((\text{mgs}(G) > 2) \wedge (\text{mgs}(G') > 2)) \\ \vee & (\text{mgs}(G) = \text{cmgs}(G) > 2) \\ \vee & (\text{mgs}(G') = \text{cmgs}(G') > 2) \\ \end{array} \\ \text{mgs}(G)+\text{mgs}(G')-1 & \text{otherwise} \\ \end{array}\right.\).

  3. (for a parallel composition of two series-parallel digraph \(G\) and \(G'\))

    1. \(\text{sp}(G \leftrightarrow G') = \min\left\{\text{sp}(G),\text{sp}(G')\right\}\),

    2. \(\text{mgs}(G \leftrightarrow G') = \left\{\begin{array}{ll} \text{mgs}(G) + \text{mgs}(G') -2 & \text{if } \text{sp}(G) = \text{sp}(G') \\ \text{mgs}(G) + \text{cmgs}(G') -2 & \text{if } \text{sp}(G) < \text{sp}(G') \\ \text{cmgs}(G) + \text{mgs}(G') -2 & \text{if } \text{sp}(G) > \text{sp}(G') \\ \end{array} \right.\)

    3. \(\text{cmgs}(G \leftrightarrow G') = \text{cmgs}(G) + \text{cmgs}(G') -2\)

Proof. The first case is obvious. Since the initial series-parallel digraph \(I_{(s,t)}\) is explicitly defined, the values can be easily verified. The calculations of the number of edges on a shortest path from \(s\) to \(t\) in all three sub-cases 1.(a), 2.(a) and 3.(a) are also obvious. Therefore, we only consider the cases 2.(b), 2.(c), 3.(b) and 3.(c) in more detail.

  1. (series composition)

    Every geodetic set \(T\) of \(G \updownarrow G'\) has at least \(\text{mgs}(G) + \text{mgs}(G') -2\) vertices, because \(S=(T \cap V(G)) \cup \{t\}\) is a geodetic set of \(G\) and \(S'=(T \cap V(G')) \cup \{s'\}\) is a geodetic set of \(G'\). This implies that \(|T| \geq |S|+|S'|-2 \geq \text{mgs}(G) + \text{mgs}(G') -2\).

    1. Let \(S\) be a minimum geodetic set of \(G\), \(S'\) be a minimum geodetic set of \(G'\) and \(T^{\text{\,-} t,\text{\,-} s'} = (S \setminus \{t\}) \cup (S' \setminus \{s'\})\).

      Vertex set \(T^{\text{\,-} t,\text{\,-} s'}\) is a geodetic set of \(G \updownarrow G'\) with \(\text{mgs}(G)+\text{mgs}(G')-2\) vertices because in \(G \updownarrow G'\)

      1. every vertex \(u \in V(G) \setminus T^{\text{\,-} t,\text{\,-} s'}\), \(u \not = t\), is on a shortest path from a vertex of \(S \setminus \{t\}\) to a vertex of \((S \setminus \{t\}) \cup \{t'\}\),

      2. every vertex \(u \in V(G') \setminus T^{\text{\,-} t,\text{\,-} s'}\), \(u \not = s'\), is on a shortest path from a vertex of \((S' \setminus \{s'\}) \cup \{s\}\) to a vertex of \(S' \setminus \{s'\}\) and

      3. vertex \(t\) is on a shortest path from vertex \(s\) to vertex \(t'\).

    2. Let \(S\) be a minimum geodetic set of \(G\), \(S'\) be a minimum geodetic set of \(G'\) and \(T^{\text{\,-} s'} = S \cup (S' \setminus \{s'\})\).

      Vertex set \(T^{\text{\,-} s'}\) is a closed geodetic set of \(G \updownarrow G'\) with \(\text{mgs}(G)+\text{mgs}(G')-1\) because every vertex of \(V(G \updownarrow G') \setminus T^{\text{\,-} s'}\) is on a shortest path in \(G \updownarrow G'\) from a vertex of \(S\) to a vertex of \(S\) or from a vertex of \((S' \setminus \{s'\}) \cup \{t\}\) to a vertex of \((S' \setminus \{s'\}) \cup \{t\}\).

      Sometimes, however, vertex set \(T^{\text{\,-} t,\text{\,-} s'}\) as defined in case (b) is already a closed geodetic set of \(G \updownarrow G'\) with \(\text{mgs}(G)+\text{mgs}(G')-2\) vertices. This is the case if \(S\) and \(S'\) contain more vertices than one source vertex and one target vertex, i.e., \(|S| > 2\) and \(|S'| > 2\). It is also the case if \(S\) or \(S'\) contain more vertices than one source vertex and one target vertex and is itself a closed geodetic set. This is the case if and only if \(\text{mgs}(G) = \text{cmgs}(G) > 2\) or \(\text{mgs}(G') = \text{cmgs}(G') > 2\), respectively.

  2. (parallel composition)

    Every geodetic set \(T\) of \(G \leftrightarrow G'\) has at least \(\text{mgs}(G) + \text{mgs}(G') -2\) vertices because \(S=T \cap V(G)\) is a geodetic set of \(G\), \(S'=(T \cap V(G')) \cup \{s',t'\}\) is a geodetic set of \(G'\) and \(|T| = |S|+|S'|-2 \geq \text{mgs}(G) + \text{mgs}(G') -2\). Here \(|T| = |S|+|S'|-2\) because \(s'\) and \(t'\) are not vertices of \(G \leftrightarrow G'\) and thus not vertices of \(T\).

      1. Let \(\text{sp}(G) = \text{sp}(G')\), \(S\) be a minimum geodetic set of \(G\), \(S'\) be a minimum geodetic set of \(G'\) and \(T^{\text{\,-} s',\text{\,-} t'} = S \cup (S' \setminus \{t',s'\})\).

        Vertex set \(T^{\text{\,-} s',\text{\,-} t'}\) is a geodetic set of \(G \leftrightarrow G'\) with \(\text{mgs}(G)+\text{mgs}(G')-2\) vertices because every vertex \(u \in V(G \leftrightarrow G') \setminus T^{\text{\,-} s',\text{\,-} t'}\) is on a shortest path from a vertex of \(S\) to a vertex of \(S\) if \(u \in V(G)\), or from a vertex of \((S' \setminus \{s',t'\}) \cup \{s,t\}\) to a vertex of \((S' \setminus \{s',t'\}) \cup \{s,t\}\) if \(u \in V(G')\).

      2. Let \(\text{sp}(G) < \text{sp}(G')\), \(S\) be a minimum geodetic set of \(G\), \(S'_c\) be a minimum closed geodetic set of \(G'\) and \(T_c^{\text{\,-} s',\text{\,-}t'} = S \cup (S'_c \setminus \{s',t'\})\). Every minimum geodetic set for \(G \leftrightarrow G'\) has at least \(|S|+|S'|-2 = \text{mgs}(G) + \text{cmgs}(G') -2\) vertices, since the pair \(s,t\) cannot cover any vertices of \(G'\).

        Vertex set \(T_c^{\text{\,-} s',\text{\,-}t'}\) is a geodetic set of \(G \leftrightarrow G'\) with \(\text{mgs}(G)+\text{cmgs}(G')-2\) vertices because every vertex \(u \in V(G \leftrightarrow G') \setminus T_c^{\text{\,-} s',\text{\,-}t'}\) is on a shortest path

        1. from a vertex of \(S\) to a vertex of \(S\), if \(u \in V(G)\) or

        2. from a vertex of \((S'_c \setminus \{s',t'\}) \cup \{s\}\) to a vertex of \(S'_c \setminus \{s',t'\}\) or from a vertex of \(S'_c \setminus \{s',t'\}\) to a vertex of \((S'_c \setminus \{s',t'\}) \cup \{t\}\), if \(u \in V(G')\).

        Vertex set \(T_c^{\text{\,-} s',\text{\,-}t'}\) is a minimum geodetic set of \(G \leftrightarrow G'\) because \(R = T_c^{\text{\,-} s',\text{\,-}t'} \cap V(G)\) is a geodetic set of \(G\), \(R'_c = (T_c^{\text{\,-} s',\text{\,-}t'} \cap V(G')) \cup \{s',t'\}\) is a closed geodetic set of \(G'\) and \(|T_c^{\text{\,-} s',\text{\,-}t'}| = |R| + |R'_c| - 2\).

      3. If \(\text{sp}(G) > \text{sp}(G')\) then exchange \(G\) and \(G'\) and consider the case where \(\text{sp}(G) < \text{sp}(G')\).

    1. Let \(S_c\) be a minimum closed geodetic set of \(G\), \(S'_c\) be a minimum closed geodetic set of \(G'\) and \(T_{cc}^{\text{\,-} s',t'} = S_c \cup (S'_c \setminus \{s',t'\})\).

      Vertex set \(T_{cc}^{\text{\,-} s',t'}\) is a closed geodetic set of \(G \leftrightarrow G'\) because every vertex \(u \in V(G \leftrightarrow G') \setminus T_{cc}^{\text{\,-} s',t'}\) is on a shortest path

      1. from a vertex of \(S_c\) to a vertex of \(S_c \setminus \{t\}\) or from a vertex of \(S_c \setminus \{s\}\) to a vertex of \(S_c\) , if \(u \in V(G)\), or

      2. from a vertex of \((S'_c \setminus \{s',t'\}) \cup \{s\}\) to a vertex of \(S'_c \setminus \{s',t'\}\) or from a vertex of \(S'_c \setminus \{s',t'\}\) to a vertex of \((S' \setminus \{s',t'\}) \cup \{t\}\), if \(u \in V(G')\).

      Vertex set \(T_{cc}^{\text{\,-} s',t'}\) is a minimum closed geodetic set of \(G \leftrightarrow G'\) because \(R_c = T_{cc}^{\text{\,-} s',t'} \cap V(G)\) is a minimum closed geodetic set of \(G\), \(R'_c = (T_{cc}^{\text{\,-} s',t'} \cap V(G')) \cup \{s',t'\}\) is a minimum closed geodetic set of \(G'\) and \(|T_{cc}^{\text{\,-} s',t'}| = |R_c| + |R'_c| - 2\).

 ◻

a

Figure 12: Eight series-parallel digraphs \(G_1,\ldots,G_8\) defined as follows.
\(\begin{array}{llll} G_1 = I_{(s,t)} \updownarrow I_{(s,t)}, & G_2 = G_1 \updownarrow I_{(s,t)}, & G_3 = G_1 \leftrightarrow G_1, & G_4 = I_{(s,t)} \updownarrow G_3, \\ G_5 = G_1 \leftrightarrow G_2, & G_6 = G_4 \leftrightarrow G_5, & G_7 = G_6 \leftrightarrow G_2, & G_8 = G_7 \leftrightarrow I_{(s,t)}. \end{array}\).

We illustrate the calculation rules from theorem 5 using the example graphs of figure 12. \[\begin{array}{l|l|l|l} G & \text{sp}(G) & \text{mgs}(G) & \text{cmgs}(G) \\ \hline I_{(s,t)} & 1.(a) & 1.(b) & 1.(c) \\ & 1 & 2 & 2 \\ \hline G_1 = I_{(s,t)} \updownarrow I_{(s,t)} & 2.(a) & 2.(b) & 2.(c), \text{ otherwise} \\ & 1+1 = 2 & 2+2-2 = 2 & 2+2-1 = 3 \\ \hline G_2 = G_1 \updownarrow I_{(s,t)} & 2.(a) & 2.(b) & 2.(c), \text{ otherwise} \\ & 2+1 = 3 & 2+2-2 = 2 & 2+2-1 = 3 \\ \hline G_3 = G_1 \leftrightarrow G_1 & 3.(a) & 3.(b), \text{sp}(G_1) = \text{sp}(G_1) & 3.(c) \\ & \min\{2,2\} = 2 & 2+2-2 = 2 & 3+3-2 = 4 \\ \hline G_4 = I_{(s,t)} \updownarrow G_3 & 2.(a) & 2.(b) & 2.(c), \text{ otherwise} \\ & 1+2 = 3 & 2+2-2 = 2 & 2+2-1 = 3 \\ \hline G_5 = G_1 \leftrightarrow G_2 & 3.(a) & 3.(b), \text{sp}(G_1) < \text{sp}(G_2) & 3.(c) \\ & \min\{2,3\} = 2 & 2+3-2 = 3 & 3+3-2 = 4 \\ \hline G_6 = G_4 \leftrightarrow G_5 & 3.(a) & 3.(b), \text{sp}(G_4) > \text{sp}(G_5) & 3.(c) \\ & \min\{3,2\} = 2 & 3+3-2 = 4 & 3+4-2 = 5 \\ \hline G_7 = G_6 \leftrightarrow G_2 & 3.(a) & 3.(b), \text{sp}(G_6) > \text{sp}(G_2) & 3.(c) \\ & \min\{2,3\} = 2 & 5+2-2 = 5 & 5+3-2 = 6 \\ \hline G_8 = G_7 \leftrightarrow I_{(s,t)} & 3.(a) & 3.(b), \text{sp}(G_7) > \text{sp}(I_{(s,t)}) & 3.(c) \\ & \min\{2,1\} = 1 & 6+2-2 = 6 & 6+2-2 = 6 \\ \end{array}\]

The same methodology can be used, with minor adjustments, to compute minimum edge geodetic sets. However, special attention is required when dealing with series compositions with graphs where the shortest path has length one.

Let \(\text{megs}(G)\) be the number of vertices of an minimum edge geodetic set of \(G\), \(\text{cmegs}(G)\) be the number of vertices of a minimum closed edge geodetic set of \(G\). If \(G\) has no closed edge geodetic set then \(\text{cmegs}(G) = \text{undefined}\). Since the closed edge geodetic set is only required for the parallel composition and only for the graph with the longer shortest path, the process can still be formulated, even in cases where the closed edge geodetic set is undefined.

Theorem 6. The number of vertices in a minimum edge geodetic set of a series-parallel digraph can be computed as follows.

  1. (for the initial series-parallel digraph \(I_{(s,t)}\))

    1. \(\text{sp}(I_{(s,t)}) = 1\),

    2. \(\text{megs}(I_{(s,t)}) = 2\) and

    3. \(\text{cmegs}(I_{(s,t)}) = \text{\rm undefined}\).

  2. (for a series composition of two series-parallel digraph \(G\) and \(G'\))

    1. \(\text{sp}(G \updownarrow G') = \text{sp}(G) + \text{sp}(G')\),

    2. \(\text{megs}(G \updownarrow G') = \text{megs}(G) + \text{megs}(G') -2\) and

    3. \(\text{cmegs}(G \updownarrow G') = \left\{ \begin{array}{ll} \text{megs}(G)+\text{megs}(G')-2 & \text{if } \begin{array}[t]{ll} & ((\text{megs}(G) > 2) \wedge (\text{megs}(G') > 2)) \\ \vee & (\text{megs}(G) = \text{cmegs}(G)) \\ \vee & (\text{megs}(G') = \text{cmegs}(G')) \\ \end{array} \\ \text{megs}(G)+\text{megs}(G')-1 & \text{otherwise} \\ \end{array}\right.\).

  3. (for a parallel composition of two series-parallel digraph \(G\) and \(G'\))

    1. \(\text{sp}(G \leftrightarrow G') = \min\left\{\text{sp}(G),\text{sp}(G')\right\}\),

    2. \(\text{megs}(G \leftrightarrow G') = \left\{\begin{array}{ll} \text{megs}(G) + \text{megs}(G') -2 & \text{if } \text{sp}(G) = \text{sp}(G') \\ \text{megs}(G) + \text{cmegs}(G') -2 & \text{if } \text{sp}(G) < \text{sp}(G') \\ \text{cmegs}(G) + \text{megs}(G') -2 & \text{if } \text{sp}(G) > \text{sp}(G') \\ \end{array} \right.\)

    3. \(\text{cmegs}(G \leftrightarrow G') = \left\{ \begin{array}{ll} \text{\rm undefined} & \text{if } \begin{array}[t]{ll} & (\text{cmegs}(G) = \text{\rm undefined}) \\ \vee & (\text{cmegs}(G') = \text{\rm undefined}) \\ \end{array} \\ \text{cmegs}(G) + \text{cmegs}(G') -2 & \text{otherwise} \end{array}\right.\)

Proof. It is only necessary to examine cases 2.(b), 2.(c), 3.(b) and 3.(c) in more detail. Case 1 is obvious, and cases 2.(a) and 3.(a) correspond to those in theorem 5.

  1. (series composition)

    Every edge geodetic set \(T\) of \(G \updownarrow G'\) has at least \(\text{megs}(G) + \text{megs}(G') -2\) vertices, because \(S=(T \cap V(G)) \cup \{t\}\) is an edge geodetic set of \(G\) and \(S'=(T \cap V(G')) \cup \{s'\}\) is an edge geodetic set of \(G'\). This implies that \(|T| \geq |S|+|S'|-2 \geq \text{megs}(G) + \text{megs}(G') -2\).

    1. Let \(S\) be a minimum edge geodetic set of \(G\), \(S'\) be a minimum edge geodetic set of \(G'\) and \(T^{\text{\,-} t,\text{\,-} s'} = (S \setminus \{t\}) \cup (S' \setminus \{s'\})\).

      Vertex set \(T^{\text{\,-} t,\text{\,-} s'}\) is an edge geodetic set of \(G \updownarrow G'\) with \(\text{megs}(G)+\text{megs}(G')-2\) vertices because in \(G \updownarrow G'\)

      1. every edge \(e \in E(G)\) is on a shortest path from a vertex of \(S \setminus \{t\}\) to a vertex of \((S \setminus \{t\}) \cup \{t'\}\) and

      2. every edge \(e \in E(G')\) is on a shortest path from a vertex of \((S' \setminus \{s'\}) \cup \{s\}\) to a vertex of \(S' \setminus \{s'\}\).

    2. Let \(S\) be a minimum edge geodetic set of \(G\), \(S'\) be a minimum edge geodetic set of \(G'\) and \(T^{\text{\,-} s'} = S \cup (S' \setminus \{s'\})\).

      Vertex set \(T^{\text{\,-} s'}\) is a closed edge geodetic set of \(G \updownarrow G'\) with \(\text{megs}(G)+\text{megs}(G')-1\) because every edge of \(E(G \updownarrow G')\) is on a shortest path in \(G \updownarrow G'\) from a vertex of \(S\) to a vertex of \(S\) or from a vertex of \((S' \setminus \{s'\}) \cup \{t\}\) to a vertex of \((S' \setminus \{s'\}) \cup \{t\}\).

      Sometimes, however, vertex set \(T^{\text{\,-} t,\text{\,-} s'}\) as defined in case (b) is already a closed edge geodetic set of \(G \updownarrow G'\) with \(\text{megs}(G)+\text{megs}(G')-2\) vertices. This is the case if \(S\) and \(S'\) contain more vertices than one source vertex and one target vertex, i.e., \(|S| > 2\) and \(|S'| > 2\). It is also the case if \(S\) or \(S'\) contain more vertices than one source vertex and one target vertex and is itself a closed edge geodetic set. This is the case if and only if \(\text{megs}(G) = \text{cmegs}(G) > 2\) or \(\text{megs}(G') = \text{cmegs}(G') > 2\), respectively. Recall that, by definition, graphs with sp(G)= 1 do not have closed edge geodetic sets.

  2. (parallel composition)

    Every edge geodetic set \(T\) of \(G \leftrightarrow G'\) has at least \(\text{megs}(G) + \text{megs}(G') -2\) vertices because \(S=T \cap V(G)\) is an edge geodetic set of \(G\), \(S'=(T \cap V(G'))\cup \{s',t'\}\) is an edge geodetic set of \(G'\) and \(|T|=|S|+|S'|-2 \geq \text{megs}(G) + \text{megs}(G') -2\).

      1. Let \(\text{sp}(G) = \text{sp}(G')\), \(S\) be a minimum edge geodetic set of \(G\), \(S'\) be a minimum edge geodetic set of \(G'\) and \(T^{\text{\,-} s',\text{\,-} t'} = S \cup (S' \setminus \{t',s'\})\).

        Vertex set \(T^{\text{\,-} s',\text{\,-} t'}\) is an edge geodetic set of \(G \leftrightarrow G'\) with \(\text{megs}(G)+\text{megs}(G')-2\) vertices because in \(G \updownarrow G'\)

        1. every edge \(e \in E(G)\) is on a shortest path from a vertex of \(S\) to a vertex of \(S\) and

        2. every edge \(e \in E(G')\) is on a shortest Path from a vertex of \((S' \setminus \{s',t'\}) \cup \{s,t\}\) to a vertex of \((S' \setminus \{s',t'\}) \cup \{s,t\}\).

      2. Let \(\text{sp}(G) <\text{sp}(G')\), \(S\) be a minimum edge geodetic set of \(G\), \(S'_c\) be a closed minimum edge geodetic set of \(G'\) and \(T_c^{\text{\,-} s',{\text{\,-} t'}} = S \cup (S'_c \setminus \{t',s'\})\). Now every minimum edge geodetic set for \(G \leftrightarrow G'\) has at least \(|S|+|S'|-2 = \text{mgs}(G) + \text{cmgs}(G') -2\) vertices, since the pair \(s,t\) cannot cover any vertices of \(G'\). Since the shortest path of G’ is always greater than 1, the \(\text{megs}\) is always defined.

        Vertex set \(T_c^{\text{\,-} s',{\text{\,-} t'}}\) is an edge geodetic set of \(G \leftrightarrow G'\) with \(\text{megs}(G)+\text{cmegs}(G')-2\) vertices because every edge \(e \in E(G \leftrightarrow G')\) is on a shortest path

        1. from a vertex of \(S\) to a vertex of \(S\), if \(e \in E(G)\) or

        2. from a vertex of \((S'_c \setminus \{s',t'\}) \cup \{s\}\) to a vertex of \(S'_c \setminus \{s',t'\}\) or from a vertex of \(S'_c \setminus \{s',t'\}\) to a vertex of \((S'_c \setminus \{s',t'\}) \cup \{t\}\), if \(e \in E(G')\).

        Vertex set \(T_c^{\text{\,-} s',{\text{\,-} t'}}\) is a minimum edge geodetic set of \(G \leftrightarrow G'\) because \(R = T_c^{\text{\,-} s',{\text{\,-} t'}} \cap V(G)\) is an edge geodetic set of \(G\), \(R'_c = (T_c^{\text{\,-} s',{\text{\,-} t'}} \cap V(G')) \cup \{s',t'\}\) is a closed edge geodetic set of \(G'\) and \(|T_c^{\text{\,-} s',{\text{\,-} t'}}| = |R| + |R'_c| - 2\).

      3. If \(\text{sp}(G) > \text{sp}(G')\) then exchange \(G\) and \(G'\) and consider the case where \(\text{sp}(G) < \text{sp}(G')\).

    1. Let \(S_c\) be a minimum closed edge geodetic set of \(G\), \(S'_c\) be a minimum closed edge geodetic set of \(G'\) and \(T_{cc}^{\text{\,-} s',t'} = S_c \cup (S'_c \setminus \{s',t'\})\).

      Vertex set \(T_{cc}^{\text{\,-} s',t'}\) is a closed edge geodetic set of \(G \leftrightarrow G'\) because every edge \(e \in E(G \leftrightarrow G')\) is on a shortest path

      1. from a vertex of \(S_c\) to a vertex of \(S_c \setminus \{t\}\) or from a vertex of \(S_c \setminus \{s\}\) to a vertex of \(S_c\) , if \(e \in E(G)\), or

      2. from a vertex of \((S'_c \setminus \{s',t'\}) \cup \{s\}\) to a vertex of \(S'_c \setminus \{s',t'\}\) or from a vertex of \(S'_c \setminus \{s',t'\}\) to a vertex of \((S' \setminus \{s',t'\}) \cup \{t\}\), if \(e \in E(G')\).

      Vertex set \(T_{cc}^{\text{\,-} s',t'}\) is a minimum closed edge geodetic set of \(G \leftrightarrow G'\) because \(R_c = T_{cc}^{\text{\,-} s',t'} \cap V(G)\) is a closed edge geodetic set of \(G\), \(R'_c = (T_{cc}^{\text{\,-} s',t'} \cap V(G')) \cup \{s',t'\}\) is a closed edge geodetic set of \(G'\) and \(|T_{cc}^{\text{\,-} s',t'}| = |R_c| + |R'_c| - 2\).

 ◻

a

Figure 13: Four series-parallel digraphs \(G_1,\ldots,G_4\) defined as follows.
\(\begin{array}{llll} G_1 = I_{(s,t)} \updownarrow I_{(s,t)}, & G_2 = I_{(s,t)} \leftrightarrow G_1, & G_3 = G_1 \updownarrow G_2, & G_4 = G_1 \leftrightarrow G_3 \\ \end{array}\).

We illustrate the calculation rules from theorem 6 using the example graphs of figure 13. \[\begin{array}{l|l|l|l} G & \text{sp}(G) & \text{megs}(G) & \text{cmegs}(G) \\ \hline I_{(s,t)} & 1.(a) & 1.(b) & 1.(c) \\ & 1 & 2 & \text{undefined} \\ \hline G_1 = I_{(s,t)} \updownarrow I_{(s,t)} & 2.(a) & 2.(b) & 2.(c), \text{ otherwise} \\ & 1+1 = 2 & 2+2-2 = 2 & 2+2-1 = 3 \\ \hline G_2 = I_{(s,t)} \leftrightarrow G_1 & 3.(a) & 3.(b), \text{sp}(I_{(s,t)}) < \text{sp}(G_1) & 3.(c), \text{cmegs}(I_{(s,t)}) = \text{\rm undefined} \\ & \min\{1,2\} = 1 & 2+3-2 = 3 & \text{undefined} \\ \hline G_3 = G_1 \updownarrow G_2 & 2.(a) & 2.(b) & 2.(c), \text{ otherwise} \\ & 2 + 1 = 3 & 2+3-2 = 3 & 2+3-1 = 4 \\ \hline G_4 = G_1 \leftrightarrow G_3 & 3.(a) & 3.(b), \text{sp}(G_1) < \text{sp}(G_3) & 3.(c), \text{ otherwise} \\ & \min\{2,3\} = 2 & 2+4-2 = 4 & 3+4-2 = 5 \\ \end{array}\]

This approach can easily be extended to compute an explicit minimum (edge) geodetic set, instead of simply determining its size by tracking the vertex sets during the computation. A detailed discussion of these aspects is omitted here and left to the interested reader.

The ideas used here do not appear to be transferable to undirected graphs. When performing the parallel composition of two undirected series-parallel graphs \(G_1\) and \(G_2\), shortest paths between the vertices of \(G_1\) and vertices of \(G_2\) must also be considered. This is not the case in the directed version, which simplifies the analysis.

5 Conclusion↩︎

We proved the NP-completeness of MGS, MSGS, and MMoGS for directed acyclic geodesic planar graphs. Furthermore, we proved the NP-completeness of MEGS, MSEGS, and MMoEGS for directed acyclic geodesic graphs. This complements the known NP-completeness results for computing geodesic sets.

In addition, we proved that minimum geodetic sets and minimum edge geodetic sets can be computed in linear time for directed series-parallel graphs.


  1. A ptolemaic graph is an undirected graph whose shortest path distances obey Ptolemy’s inequality. That is, for every four vertices \(u\), \(v\), \(w\), and \(x\), the inequality \(d(u,v)d(w,x) + d(u,x)d(v,w) \geq d(u,w)d(v,x)\) holds.↩︎