1 Introduction

A generator of a metric space is a set S of points in the space with the property that every point of the space is uniquely determined by its distances from the elements of S. Given a simple and connected graph G with vertex set V(G) and edge set E(G), we consider the metric \(d_G:V(G)\times V(G)\rightarrow \mathbb {N}\cup \{0\}\), where \(\mathbb {N}\) denotes the set of positive integers and \(d_G(x,y)\) denotes the length of a shortest path between u and v. The pair \((V(G),d_G)\) is readily seen to be a metric space. A vertex \(v\in V(G)\) is said to distinguish two vertices x and y if \(d_G(v,x)\ne d_G(v,y)\). A set \(S\subset V(G)\) is said to be a metric generator for G if any pair of vertices of G is distinguished by some element of S. If \(S=\{w_1,w_2, \ldots , w_k\}\) is an (ordered) set of vertices, then the metric vector of a vertex \(v \in V(G)\) relative to S is the vector \((d(v,w_1),d(v,w_2), \ldots , d(v,w_k))\). Thus, S is a metric generator if distinct vertices have distinct metric vectors relative to S. A minimum cardinality metric generator is called a metric basis and its cardinality, the metric dimension of G, is denoted by \(\dim (G)\). Motivated by the problem of uniquely determining the location of an intruder in a network, by means of a set of devices each of which can detect its distance to the intruder, the concepts of a metric generator and metric basis of a graph were introduced by Slater in [28] where metric generators were called locating sets. Harary and Melter independently introduced the same concept in [7], where metric generators were called resolving sets. Applications of the metric dimension to the navigation of robots in networks are discussed in [11] and applications to chemistry in [3, 8, 9].

Sebö and Tannier in [27] asked the following question for a given metric generator T of a graph H: whenever H is a subgraph of a graph G and the metric vectors of the vertices of H relative to T agree in both H and G, is H an isometric subgraph of G? Even though the metric vectors relative to a metric generator of a graph distinguish all pairs of vertices in the graph, they do not uniquely determine all distances in a graph as was first shown in [27]. It was observed in [27] that, if “metric generator” is replaced by a stronger notion, namely that of “strong metric generator” (defined below), then the above question can be answered in the affirmative.

For \(u,v\in V(G)\), the interval \(I_G [u, v]\) between u and v is defined as the collection of all vertices that belong to some shortest \(u-v\) path. A vertex w strongly resolves two vertices u and v if \(v\in I_G [u,w]\) or \(u\in I_G [v,w]\) i.e., \(d_G(u,w)=d_G(u,v)+d_G(v,w)\) or \(d_G(v,w)=d_G(v,u)+d_G(u,w)\). A set S of vertices in a connected graph G is a strong metric generator for G if every two vertices of G are strongly resolved by some vertex of S. The smallest cardinality of a strong metric generator for G is called its strong metric dimension and is denoted by \(\dim _s(G)\). We say that a strong metric generator for G of cardinality \(\dim _s(G)\) is a strong metric basis of G.

The problem of finding the strong metric dimension of a graph has been studied for several classes of graphs. For instance, this problem was studied for Cayley graphs [22], distance-hereditary graphs [20], Hamming graphs [15], Cartesian product graphs and direct product graphs [25], corona product graphs and join graphs [16], strong product graphs [17, 18] and convex polytopes [12] . Also, some Nordhaus–Gaddum type results for the strong metric dimension of a graph and its complement are known [29]. Besides the theoretical results related to the strong metric dimension, a mathematical programming model [12] and metaheuristic approaches [13, 21] for finding this parameter have been developed. For more information, the reader is invited to read the survey [14] and the references cited therein.

Let \({{\mathcal {G}}}=\{G_1,G_2,...,G_k\}\) be a family of (not necessarily edge-disjoint) connected graphs \(G_i=(V,E_i)\) with common vertex set V (the union of the edge sets of which is not necessarily the complete graph). Ramírez-Cruz, Oellermann and Rodríguez-Velázquez defined in [23, 24] a simultaneous metric generator for \({\mathcal {G}}\) as a set \(S\subset V\) such that S is simultaneously a metric generator for each \(G_i\). They introduce the concept of simultaneous metric basis of \({\mathcal {G}}\) as a minimum cardinality simultaneous metric generator for \({\mathcal {G}}\), and its cardinality the simultaneous metric dimension of \({\mathcal {G}}\), denoted by \({\text {Sd}}({\mathcal {G}})\) or explicitly by \({\text {Sd}}(G_1,G_2,...,G_k )\). Analogously, we define a simultaneous strong metric generator for \(\mathcal{G}\) to be a set \(S\subset V\) such that S is simultaneously a strong metric generator for each \(G_i\). We say that a minimum cardinality simultaneous strong metric generator for \(\mathcal{G}\) is a simultaneous strong metric basis of \(\mathcal{G}\), and its cardinality the simultaneous strong metric dimension of \(\mathcal{G}\), denoted by \({\text {Sd}}_s(\mathcal{G})\) or explicitly by \({\text {Sd}}_s(G_1,G_2,...,G_t)\).

In this paper, we study the problem of finding exact values or sharp bounds for the simultaneous strong metric dimension. The remainder of the article is organized as follows. In Sect. 2, we show that there are some families of graphs for which the simultaneous strong metric dimension can be obtained relatively easily. To this end, we describe the approach developed in [22] of transforming the problem of finding the strong metric dimension of a graph to a vertex cover problem. In Sect. 3, we obtain sharp bounds on the simultaneous strong metric dimension, some of which are generalizations of well known bounds on the strong metric dimension. In Sect. 4, we focus on the particular case of families composed by a graph and its complement, showing that the problem of finding a simultaneous strong metric generator for \(\{G,G^c\}\) can be transformed to the problem of finding a vertex cover of G which, at the same time, is a strong metric generator. Finally, in Sect. 5, we show that the problem of finding the simultaneous strong metric dimension of families of trees is \({\textit{NP}}\)-hard.

Throughout the paper, we will use the notation \(K_n, K_{r,s}, C_n\) and \(P_n\) for complete graphs, complete bipartite graphs, cycle graphs and path graphs of order n, respectively. For a vertex v of a graph \(G, N_G(v)\) will denote the set of neighbours or open neighbourhood of v in G. The closed neighbourhood, denoted by \(N_G[v]\), equals \(N_G(v) \cup \{v\}\). If there is no ambiguity, we will simple write N(v) or N[v]. Two vertices \(x,y\in V(G)\) are twins in G if \(N_G[x]=N_G[y]\) or \(N_G(x)=N_G(y)\). If \(N_G[x]=N_G[y]\), they are said to be true twins, whereas if \(N_G(x)=N_G(y)\) they are said to be false twins. The diameter of a graph G is denoted by D(G). We recall that a graph G is 2-antipodal if for each vertex \(x\in V(G)\) there exists exactly one vertex \(y\in V(G)\) such that \(d_G(x,y)=D(G)\). For instance, even cycles \(C_{2k}\) and the hypercubes \(Q_r\) are 2-antipodal graphs. Given a graph G and \(W\subset V(G)\), we define \(\langle W\rangle _G\) as the subgraph of G induced by W. In the remainder of the paper, definitions will be introduced whenever a concept is needed.

2 Main Tools and Examples

It was shown in [3] that \(\dim (G)=1\) if and only if G is a path. It now readily follows that \(\dim _s(G)=1\) if and only if G is a path. Since any strong metric basis of a path is composed by a leaf, we can state the following remark.

Remark 1

Let \(\mathcal {G}\) be a family of connected graphs defined on a common vertex set. Then \({\text {Sd}}_{s}(\mathcal {G})=1\) if and only if \(\mathcal {G}\) is a collection of paths that share a common leaf.

At the other extreme, we see that \(\dim _s(G)=n-1\) if and only if G is the complete graph of order n. For a family of graphs, we have the following remark.

Remark 2

Let \(\mathcal {G}\) be a family of connected graphs defined on a common vertex set. If \(K_{n}\in \mathcal {G}\), then

$$\begin{aligned} {\text {Sd}}_{s}(\mathcal {G})=n-1. \end{aligned}$$

We now describe the approach developed in [22] of transforming the problem of finding the strong metric dimension of a graph to the vertex cover problem. A vertex u of G is maximally distant from v if for every vertex \(w\in N_G(u), d_G(v,w)\le d_G(u,v)\). The collection of all vertices of G that are maximally distant from some vertex of the graph is called the boundary of the graph, see [1, 2], and is denoted by \(\partial (G)\).Footnote 1 If u is maximally distant from v and v is maximally distant from u, then we say that u and v are mutually maximally distant. Let \(S=\{u\in V(G):\) there exists \(v\in V(G)\) such that uv are mutually maximally distant\(\}\). It is readily seen that \(S\subseteq \partial (G)\). If u is maximally distant from v, and v is not maximally distant from u, then v has a neighbour \(v_1\), such that \(d_G(v_1, u) > d_G(v,u)\), i.e., \(d_G(v_1, u) =d_G(v,u)+1\). It is easily seen that u is maximally distant from \(v_1\). If \(v_1\) is not maximally distant from u, then \(v_1\) has a neighbour \(v_2\), such that \(d_G(v_2, u) >d_G(v_1,u)\). Continuing in this manner, we construct a sequence of vertices \(v_1,v_2, \ldots \) such that \(d_G(v_{i+1}, u) > d_G(v_i, u)\) for every i. Since G is finite, this sequence terminates with some \(v_k\). Thus, for all neighbours x of \(v_k\), we have \(d_G(v_k,u) \ge d_G(x,u)\), and so \(v_k\) is maximally distant from u, and u is maximally distant from \(v_k\). Hence, every boundary vertex belongs to S. Certainly \(\partial (G)=S\).

For some basic graph classes, such as complete graphs \(K_n\), complete bipartite graphs \(K_{r,s}\), cycles \(C_n\) and hypercube graphs \(Q_k\), the boundary is simply the whole vertex set. It is not difficult to see that this property also holds for all 2-antipodal graphs and for all distance-regular graphs. Notice that the boundary of a tree consists of its leaves. A vertex of a graph is a simplicial vertex if the subgraph induced by its neighbours is a complete graph. Given a graph G, we denote by \(\sigma (G)\) the set of simplicial vertices of G. It is readily seen that \(\sigma (G)\subseteq \partial (G)\).

We use the notion of “strong resolving graph” based on a concept introduced in [22]. The strong resolving graph of G, denoted by \(G_{SR}\), has vertex set \(V(G_{SR}) =V(G)\) where two vertices uv are adjacent in \(G_{SR}\) if and only if u and v are mutually maximally distant in G.

A set S of vertices of G is a vertex cover of G if every edge of G is incident with at least one vertex of S. The vertex cover number of G, denoted by \(\beta (G)\), is the smallest cardinality of a vertex cover of G. We refer to a \(\beta (G)\)-set in a graph G as a vertex cover of cardinality \(\beta (G)\). Oellermann and Peters-Fransen [22] showed that the problem of finding the strong metric dimension of a connected graph G can be transformed to the problem of finding the vertex cover number of \(G_{SR}\).

Theorem 3

[22] For any connected graph \(G, \dim _s(G) = \beta (G_{SR}).\)

There are some families of graphs for which the strong resolving graphs can be obtained relatively easily. We state some of these here since we need to refer to these in other sections of the paper.

Observation 4

  1. (a)

    If \(\partial (G)=\sigma (G)\), then \(G_{SR}\cong K_{\partial (G)}\). In particular, \((K_n)_{SR}\cong K_n\) and for any tree T with l(T) leaves, \((T)_{SR}\cong K_{l(T)}\).

  2. (b)

    For any 2-antipodal graph G of order \(n, G_{SR}\cong \bigcup _{i=1}^{\frac{n}{2}} K_2\). Even cycles are 2-antipodal. Thus, \((C_{2k})_{SR}\cong \bigcup _{i=1}^{k} K_2\).

  3. (c)

    For odd cycles, \((C_{2k+1})_{SR}\cong C_{2k+1}\).

From this observation, it is easy to construct several families of graphs \(\mathcal{G}\) satisfying \({\text {Sd}}_s(\mathcal{G})=\dim _s(G)\), for some \(G\in \mathcal{G}\). We introduce the following remarks as straightforward examples.

Remark 5

Let \(\mathcal{G}\) be a family of trees defined on a common vertex set and let \(G\in \mathcal{G}\). If \(\sigma (G)\supseteq \sigma (G')\), for all \(G'\in \mathcal{G} \), then \({\text {Sd}}_s(\mathcal{G})=\dim _s(G)\).

Remark 6

Let \(\mathcal{G}\) be a family of 2-antipodal graphs defined on a common vertex set V. If there exits a partition \(\{V_1,V_2\}\) of V such that for every \(u\in V_1\) and every \(G\in \mathcal{G}\), the only vertex diametral to v in G belongs to \(V_2\), then \({\text {Sd}}_s(\mathcal{G})=\dim _s(G)=\frac{|V|}{2}\), for all \(G\in \mathcal{G}\).

For a graph G of order n and a graph H, the corona product of G and H, denoted as \(G \odot H\), is the graph obtained from G and H by taking one copy of G and n copies of H, and joining every vertex \(v_i\) of G to every vertex of the i-th copy of H. The next result is a direct consequence of the fact that no vertex of G is mutually maximally distant with any vertex of \(G \odot H\).

Remark 7

Let \(\mathcal{G}=\{G_1,G_2,\ldots ,G_k\}\) be a family composed by connected non-trivial graphs, defined on a common vertex set, and let H be a non-trivial graph. Then, for any \(i \in \{1,\ldots ,k\}\),

$$\begin{aligned} {\text {Sd}}_s(G_1 \odot H, G_2 \odot H, \ldots , G_k \odot H)=\dim _s(G_i \odot H).\end{aligned}$$

The result above allows to extend results obtained in [16] for \(\dim _s(G \odot H)\) to families composed by corona product graphs.

Although it is relatively easy to construct some families of graphs having a given simultaneous strong metric dimension, the problem of computing this parameter is \({\textit{NP}}\)-hard, even when restricted to families of trees, as we shall show in Sect. 5.

3 Basic Bounds

Since every strong metric generator is also a metric generator, for any family \(\mathcal{G}\) of connected graphs defined on a common vertex set V,

$$\begin{aligned} 1\le {\text {Sd}}(\mathcal{G})\le {\text {Sd}}_s(\mathcal{G})\le |V|-1. \end{aligned}$$

The case \({{\text {Sd}}}_s(\mathcal{G})=1\) was previously discussed in Remark 1. For the case \({{\text {Sd}}}_s(\mathcal{G})=|V|-1\), consider, for instance, a family \(\mathcal {G}\) composed by \(r+1\) star graphs of the form \(K_{1,r}\), defined on a common vertex set V, all of them having different centres. In this case, only one vertex can be excluded from any simultaneous strong metric basis of \(\mathcal{G}\), so that \({\text {Sd}}_s(\mathcal{G})=|V|-1\). The following result characterizes the graph families for which \({{\text {Sd}}}_s(\mathcal{G})=|V|-1\).

Theorem 8

Let \(\mathcal {G}\) be a family of connected graphs defined on a common vertex set V. Then \({\text {Sd}}_{s}(\mathcal {G})=\left| V\right| -1\) if and only if for every pair \(u,v\in V,\) there exists a graph \(G_{uv}\in \mathcal {G}\) such that u and v are mutually maximally distant in \(G_{uv}.\)

Proof

If \({\text {Sd}}_{s}(\mathcal {G})=\left| V\right| -1,\) then for every \(v\in V,\) the set \(V-\left\{ v\right\} \) is a simultaneous strong metric basis of \(\mathcal {G}\) and, as a consequence, for every \(u\in V-\left\{ v\right\} \) there exists a graph \(G_{uv}\in \mathcal {G}\) such that the set \(V-\left\{ u,v\right\} \) is not a strong metric generator for \( G_{uv}\). This means that the set \(V-\left\{ u,v\right\} \) is not a vertex cover of \( \left( G_{uv}\right) _{SR}\) and then u and v must be adjacent in \((G_{uv})_{SR}\) or, equivalently, they are mutually maximally distant in \(G_{uv}.\)

Conversely, if for every \(u,v\in V\) there exists a graph \(G_{uv}\in \mathcal { G}\) such that u and v are mutually maximally distant in \(G_{uv},\) then for any strong simultaneous metric basis B of \(\mathcal {G}\) either \(u\in B\) or \(v\in B.\) Hence, all but one element of V must belong to B. Therefore, \( \left| B\right| \ge \left| V\right| -1\) and we can conclude that \({\text {Sd}}_{s}(\mathcal {G})=\left| V\right| -1.\) \(\square \)

Given a family \(\mathcal {G=}\left\{ G_{1},G_{2},\ldots ,G_{k}\right\} \) of connected graphs defined on a common vertex set V, we define \(\partial (\mathcal{G})=\displaystyle {\bigcup _{G \in \mathcal{G}}}\partial (G)\). The following general considerations are true.

Observation 9

For any family, \(\mathcal {G=}\left\{ G_{1},G_{2},\ldots ,G_{k}\right\} \) of connected graphs defined on a common vertex set V and any subfamily \(\mathcal {H}\subset \mathcal {G}\).

$$\begin{aligned} {\text {Sd}}_{s}(\mathcal {H})\le {\text {Sd}}_{s}(\mathcal {G)}\le \min \left\{ \left| \partial (\mathcal{G})\right| -1, \sum _{i=1}^{k}\dim _{s}(G_{i})\right\} . \end{aligned}$$

In particular,

$$\begin{aligned} \max _{i\in \left\{ 1,\ldots ,k\right\} }\left\{ \dim _{s}(G_{i})\right\} \le {\text {Sd}}_{s}(\mathcal {G)}. \end{aligned}$$

The above inequalities are sharp. For instance, consider a family \(\mathcal {H}_1\) of graphs defined on a vertex set V, where some particular vertex \(u\in V\) belongs to a simultaneous strong metric basis B. Consider also a family of paths \(\mathcal {H}_2\), defined on V, sharing all of them this particular vertex u as one of their leaves. Then B is a simultaneous strong metric basis of the family \(\mathcal {H}_1 \cup \mathcal {H}_2\), so that \({\text {Sd}}_s(\mathcal {H}_1 \cup \mathcal {H}_2) ={\text {Sd}}_s(\mathcal {H}_1)\). On the other hand, a family of trees as the one described in Remark 5, where the set of leaves of one tree contains the sets of leaves of every other tree in the family, satisfies \({\text {Sd}}_s(\mathcal{G})=|\partial (\mathcal{G})|-1\). Finally, consider the family \(\mathcal{G}=\{G_1,G_2\}\) shown in Fig. 1. It is easy to see that \({\text {Sd}}_s(\mathcal{G})=\dim _s(G_1)+\dim _s(G_2)=|\partial (\mathcal{G})| - 2 < |\partial (\mathcal{G})| - 1\).

Fig. 1
figure 1

The family \(\mathcal{G}=\{G_1,G_2\}\) satisfies \({\text {Sd}}_s(\mathcal{G})=\dim _s(G_1)+\dim _s(G_2)=6\)

Next, we recall an upper bound for \(\dim _s(G)\) obtained in [16]. We say that \(X \subseteq V(G)\) is a twin-free clique in G if X is a clique containing no true twins. The twin-free clique number of G, denoted by \( \varpi (G)\), is the maximum cardinality among all twin-free cliques in G.

Theorem 10

[16] For any connected graph G of order \(n \ge 2\),

$$\begin{aligned}\dim _s(G) \le n - \varpi (G). \end{aligned}$$

Moreover, if \(D(G) = 2\), then the equality holds.

Our next result is an extension of Theorem 10 to the case of the simultaneous strong metric dimension. We define a simultaneous twin-free clique of a family \(\mathcal{G}\) of graphs as a set which is a twin-free clique in every \(G\in \mathcal{G}\). The simultaneous twin-free clique number of \(\mathcal{G}\), denoted by \({\text {S}}\varpi (\mathcal{G})\), is the maximum cardinality among all simultaneous twin-free cliques of \(\mathcal{G}\).

Theorem 11

Let \(\mathcal{G}\) be a family of connected graphs of order \(n\ge 2\) defined on a common vertex set. Then

$$\begin{aligned} {\text {Sd}}_s(\mathcal{G})\le n-{\text {S}}\varpi (\mathcal{G}). \end{aligned}$$

Moreover, if every graph belonging to \(\mathcal{G}\) has diameter two, then

$$\begin{aligned} {\text {Sd}}_s(\mathcal{G}) = n-{\text {S}}\varpi (\mathcal{G}). \end{aligned}$$

Proof

Let W be a simultaneous twin-free clique in \(\mathcal{G}\) of maximum cardinality and let \(G=(V,E)\) be a graph belonging to \(\mathcal{G}\). We will show that \(V - W\) is a strong metric generator for G. Since W is a twin-free clique, for any two distinct vertices \(u,v\in W\) there exists \(s\in V - W\) such that either \(s\in N_G(u)\) and \(s\notin N_G(v)\) or \(s\in N_G(v)\) and \(s\notin N_G(u)\). Without loss of generality, we consider \(s\in N_G(u)\) and \(s\notin N_G(v)\). Thus, \(u\in I_G[v,s]\) and, as a consequence, s strongly resolves u and v. Therefore, \({\text {Sd}}_s(\mathcal{G})\le |V-W| = n - {\text {S}}\varpi (\mathcal{G})\).

Now, suppose that every graph \(G=(V,E)\) belonging to \(\mathcal{G}\) has diameter two. Let \(X\subset V\) be a simultaneous strong metric basis of \(\mathcal{G}\) and let \(u,v\in V, u\ne v\). If \(d_G(u,v)=2\) or \(N_G[u]=N_G[v]\), for some \(G\in \mathcal{G}\), then u and v are mutually maximally distant vertices of G, so \(u\in X\) or \(v\in X\). Hence, for any two distinct vertices \(x,y\in V-X\) and any \(G\in \mathcal{G}\), we have \(d_G(x,y)=1\) and \(N_G[x]\ne N_G[y]\). As a consequence, \(V-X\) is a simultaneous twin-free clique of \(\mathcal{G}\) and so \(n-{\text {Sd}}_s(\mathcal{G})=|V-X|\le {\text {S}}\varpi (\mathcal{G})\). Therefore, \({\text {Sd}}_s(\mathcal{G})\ge n-{\text {S}}\varpi (\mathcal{G})\) and the result follows. \(\square \)

Corollary 12

Let \(\mathcal{G}\) be a family of graphs of diameter two and order \(n\ge 2\) defined on a common vertex set. If \(\mathcal{G}\) contains a triangle-free graph, then

$$\begin{aligned} n-2\le {\text {Sd}}_s(\mathcal{G})\le n-1.\end{aligned}$$

Finally, we recall the following upper bound on \(\dim _s(G)\), obtained in [29].

Theorem 13

[29] For any connected graph G of order n,

$$\begin{aligned}\dim _s(G)\le n-D(G).\end{aligned}$$

Given a graph family \(\mathcal{G}\) defined on a common vertex set V, we define the parameter \(\rho (\mathcal{G})=|W|-1\), where \(W \subseteq V\) is a maximum cardinality set such that for every \(G\in \mathcal{G}\) the subgraph \(\langle W \rangle _{G}\) induced by W in G is a path and there exists \(w\in W\) which is a common leaf of all these paths.

Theorem 14

Let \(\mathcal{G}\) be a family of graphs defined on a common vertex set V. Then,

$$\begin{aligned} {\text {Sd}}_s(\mathcal{G}) \le |V|-\rho (\mathcal{G}). \end{aligned}$$

Proof

Let \(W=\{v_0,v_1, \ldots , v_{\rho (\mathcal{G})}\}\subseteq V\) be a set for which \(\rho (\mathcal{G})\) is obtained. Assume, without loss of generality, that \(v_0\) is a common leaf of \(\langle W \rangle _G\), for every \(G \in \mathcal{G}\), and let \(W'=W-\{v_0\}\). Since no pair of vertices \(u,v \in W'\) are mutually maximally distant in any \(G \in \mathcal{G}\), the set \(S=V-W'\) is a simultaneous strong metric generator for \(\mathcal{G}\). Thus, \({\text {Sd}}_s(\mathcal{G}) \le |S|=|V|-\rho (\mathcal{G})\). \(\square \)

The inequality above is sharp. A family of graphs \(\mathcal{G}\) composed by paths having a common leaf is a trivial example where the inequality is reached. In this case, \(\rho (\mathcal{G})=|V|-1\), so that \({\text {Sd}}_s(\mathcal{G})=1=|V|-\rho (\mathcal{G})\). This is not the only circumstance where this occurs. For instance, consider a graph family \(\mathcal{G}\) constructed as follows. Consider a star graph \(K_{1,r}\) of centre u and a complete graph \(K_{r+1}\) defined on a common vertex set \(V'\). Let \(V''\) be a set such that \(V'\cap V''=\emptyset \) and let \(\{G_1',G_2',\ldots ,G_k'\}\) be a family composed by paths defined on \(V''\), having a common leaf, say v, and let \(\mathcal{G}=\{G_1,H_1,G_2,H_2,\ldots ,G_k,H_k\}\) be a graph family such that every \(G_i\) is constructed from \(G_i'\) and \(K_{1,r}\) by identifying u and v, and every \(H_i\) is constructed from \(G_i'\) and \(K_{r+1}\) by identifying u and v. For every \(w \in V'-\{u\}\), the set \(W=V'' \cup \{w\}\) is a maximum cardinality set such that, for every graph in \( \mathcal{G}\), the subgraph induced by W is a path and there exists \(w\in W\) which is a common leaf of all these paths, so that \(\rho (\mathcal{G})=|V''|\). Furthermore, the set \(V'-\{u\}\) is a simultaneous strong metric basis of \(\mathcal{G}\) and, as a result, \({\text {Sd}}_s(\mathcal{G})=r=|V|-\rho (\mathcal{G})\).

In general, the bound shown in Theorem 14 can be efficiently computed, as \(\rho (\mathcal{G})\) can be easily computed in \(O(|\mathcal{G}||V|^3\)) time using the original Dijkstra’s algorithm, which may be accelerated by using special data structures, e.g. Fibonacci heaps [5].

4 The Simultaneous Strong Metric Dimension of \(\{G,G^c\}\)

We first consider the following direct consequence of Theorem 8.

Corollary 15

Let G be a graph of order n. Then the following assertions are equivalent.

  • \({\text {Sd}}_s(G,G^c)=n-1\).

  • \(D(G)=D(G^c)=2\).

Proof

Let \(x,y\in V(G)\). If \(D(G)=D(G^c)=2\), then either x and y are diametral in G or they are diametral in \(G^c\). Hence, by Theorem 8, we obtain \({\text {Sd}}_s(G,G^c)=n-1\).

Now, assume that \(D(G)\ge 3\). If xuvy is a shortest path from x to y in G, then x and v are not mutually maximally distant in G and, since they are adjacent in \(G^c\) and they are not twins, they are not mutually maximally distant in \(G^c\). Thus, by Theorem 8, we deduce that \({\text {Sd}}_s(G,G^c)\le n-2\). \(\square \)

The Petersen graph is an example of graphs where \({\text {Sd}}_s(G,G^c)=n-1\) and the graphs shown in Figure 2 are examples of graphs where \({\text {Sd}}_s(G,G^c)=n-2\).

Fig. 2
figure 2

\(X_1=\{a,c,d\}\) is a strong resolving cover for G and \(X_2=\{a,c,b\}\) is a strong resolving cover for \(G^c\). Both \(X_1\) and \(X_2\) are simultaneous strong metric bases of \(\{G,G^c\}\)

From Theorem 10 and Corollary 15, we derive the next result.

Theorem 16

For any graph, G of order n and \(D(G)=2\) such that \(G^c\) is connected,

$$\begin{aligned} {\text {Sd}}_s(G,G^c)\ge n- \varpi (G). \end{aligned}$$

Moreover, if \(D(G^c)\ge 3\) and \(\varpi (G)=2\), then

$$\begin{aligned} {\text {Sd}}_s(G,G^c)=n-2. \end{aligned}$$

Given a graph \(G=(V,E)\), we say that a set \(S\subset V\) is a strong resolving cover for G if S is a vertex cover and a strong metric generator for G.

Theorem 17

If G is a connected graph such that \(G^c\) is connected, then any strong resolving cover of G is a simultaneous strong metric generator for \(\{G,G^c\}\).

Proof

Let W be a strong resolving cover of G. We shall show that W is a strong metric generator for \(G^c\). We differentiate two cases for any pair xy of mutually maximally distant vertices in \(G^c\).

Case 1 x and y are adjacent in \(G^c\). In this case, x and y are false twins in G (true twins in \(G^c\)) and so they are mutually maximally distant in G. Since W is a strong metric generator for G, we conclude that \(x\in W\) or \(y\in W\).

Case 2 x and y are not adjacent in \(G^c\). In this case, x and y are adjacent in G and, since W is a vertex cover of G, we have that \(x\in W\) or \(y\in W\).

According to the two cases above, W is a vertex cover of \((G^c)_{SR}\) and, as a consequence, W is a strong metric generator for \(G^c\). Therefore, W is a simultaneous strong metric generator for \(\{G,G^c\}\). \(\square \)

The strong resolving cover number, denoted by \(\beta _s(G)\), is the minimum cardinality among all the strong resolving covers for G. Obviously, for any connected graph of order n,

$$\begin{aligned} n-1\ge \beta _s(G)\ge \max \{\dim _s(G),\beta (G)\}. \end{aligned}$$
(1)

Corollary 18

For any connected graph G such that \(G^c\) is connected,

$$\begin{aligned} {\text {Sd}}_s(G,G^c)\le \min \{\beta _s(G),\beta _s(G^c)\}.\end{aligned}$$

Figure 2 shows a graph G and its complement \(G^c\). In this case, \({\text {Sd}}_s(G,G^c)=\beta _s(G)=\beta _s(G^c)=3>2= \dim _s(G)=\dim _s(G^c)=\beta (G)=\beta (G^c)\). The graph G shown in Fig. 3 satisfies that \(\dim _s(G^c)=2<3=\beta _s(G^c)={\text {Sd}}_s(G,G^c)=\dim _s(G)<4=\beta _s(G)\). In this case, \(\{2,4\}\) is a strong metric basis of \(G^c, \{2,3,4\}\) is a \(\beta _s(G^c)\)-set which is a simultaneous strong metric basis of \(\{G, G^c\}\) and, at the same time, it is a strong metric basis of G, while \(\{2,4,5,6\}\) is a \(\beta _s(G)\)-set.

Fig. 3
figure 3

The \(\beta _s(G^c)\)-set \(\{2,3,4\}\) is a simultaneous strong metric basis of \(\{G,G^c\}\)

Theorem 19

Let G be a connected graph such that \(D(G^c)=2\) and let \(S\subset V(G)\). Then the following assertions are equivalent:

  1. (a)

    S is a simultaneous strong metric generator for \(\{G,G^c\}\).

  2. (b)

    S is a strong resolving cover for G.

Proof

Let \(G=(V,E)\). Since \(D(G^c)=2\), two vertices \(x,y\in V\) are mutually maximally distant in \(G^c\) if and only if \(d_{G^c}(x,y)=2\) or \(N_{G^c}[x]=N_{G^c}[y]\). Hence, \((G^c)_{SR}=(V,E\cup E')\), where \(E'=\{\{x,y\}:\; N_G(x)=N_G(y) \}.\)

Let S be a simultaneous strong metric generator for \(\{G,G^c\}\). Since S is a strong metric generator for \(G^c\), we deduce that S is a vertex cover of \((G^c)_{SR}=(V,E\cup E')\), and as a consequence, for any edge \(\{x,y\}\in E\), we have that \(x\in S\) or \(y\in S\). Hence, S is a strong metric generator for G and a vertex cover of G. By Theorem 17, we conclude the proof. \(\square \)

From Theorem 19, we deduce the following result.

Corollary 20

For any connected graph G such that \(D(G^c)=2\),

$$\begin{aligned} {\text {Sd}}_s(G,G^c)=\beta _s(G). \end{aligned}$$

In order to present the next result, we need to introduce some new notation and terminology. Given a graph G such that \(V(G)\ne \partial (G)\), we define the interior subgraph of G as the subgraph \(\mathring{G}\) induced by \(V(G)-\partial (G)\). The parameter \(\mathring{\beta }(G)\) is defined as follows.

$$\begin{aligned} \mathring{\beta }(G)=\left\{ \begin{array}{ll} 0&{}\quad \text {if } V(G)= \partial (G)\\ &{}\\ \beta ( \mathring{G} )&{}\quad \text {otherwise.} \end{array} \right. \end{aligned}$$

Corollary 21

For any connected graph G such that \(D(G^c)=2\),

$$\begin{aligned} {\text {Sd}}_s(G,G^c)\ge \max \{\dim _s(G)+\mathring{\beta }(G),\beta (G)\}. \end{aligned}$$

Proof

By Theorem 19 and Eq. (1), we have that \({\text {Sd}}_s(G,G^c)\ge \beta (G)\). It only remains to prove that \({\text {Sd}}_s(G,G^c)\ge \dim _s(G)+\mathring{\beta }(G)\). If \(V(G)= \partial (G)\), then \(\mathring{\beta }(G)=0\), and by Theorem 19 and Eq. (1) , we have \({\text {Sd}}_s(G,G^c)\ge \dim _s(G)=\dim _s(G)+\mathring{\beta }(G)\). Assume that \(V(G)\ne \partial (G)\). Let B be a simultaneous strong metric basis of \(\{G,G^c\}\), and let \(B_1=B\cap \partial (G)\) and \(B_2=B-B_1\). Clearly, \(|B_1|\ge \dim _s(G)\). Moreover, since no vertex of \(B_1\) covers edges of \(\mathring{G}\), by Theorem 19 , we conclude that \(B_2\) is a vertex cover of \(\mathring{G}\), so that \(|B_2|\ge \beta (\mathring{G})\). Therefore, \({\text {Sd}}_s(G,G^c)=|B|=|B_1|+|B_2|\ge \dim _s(G)+\mathring{\beta }(G)\). \(\square \)

To illustrate this result, we take the graph G shown in Fig. 4. In this case \({\text {Sd}}_s(G,G^c)=\beta (G)=5>4=\dim _s(G)+\mathring{\beta }(G)\). In contrast, the equality \({\text {Sd}}_s(G,G^c)=\dim _s(G)+\mathring{\beta }(G)\) is satisfied for any graph constructed as follows. Let \(r,s\ge 2\) and \(t\ge 3\) be three integers and let G be the graph constructed from \(K_r,K_s\) and \(P_t\) by identifying one vertex of \(K_r\) with one leaf of \(P_t\) and one vertex of \(K_s\) with the other leaf of \(P_t\). In this case \({\text {Sd}}_s(G,G^c)=r+s+\lfloor \frac{t}{2}\rfloor -1, \dim _s(G)=r+s-1, \beta (G)=r+s+\lfloor \frac{t}{2}\rfloor -2\) and \(\mathring{\beta }(G)=\beta (\mathring{G})=\lfloor \frac{t}{2}\rfloor .\) Hence, \({\text {Sd}}_s(G,G^c)=\dim _s(G)+\mathring{\beta }(G)>\beta (G)\).

Fig. 4
figure 4

The sets \(\{1,5,6,7\}\) and \(\{5,6,7,11\}\) are the only strong metric bases of G, while \(\{1,5,6,7,11\}\) is the only \(\beta (G)\)-set which is a strong metric generator of G

Corollary 22

Let G be a connected graph such that \(D(G^c)=2\). Then the following assertions hold:

  • \({\text {Sd}}_s(G,G^c)=\dim _s(G)\) if and only if there exists a strong metric basis of G which is a vertex cover of G.

  • \({\text {Sd}}_s(G,G^c)=\beta (G)\) if and only if there exists a \(\beta (G)\)-set which is a strong metric generator of G.

Fig. 5
figure 5

The graph G satisfies that \({\text {Sd}}_s(G,G^c)=\dim _s(G)=4>3=\beta (G)\)

To illustrate the result above, we take the graphs shown in Figs. 4 and 5. In both cases \(D(G^c)=2\). Now, in the case of Fig. 4, the sets \(\{1,5,6,7\}\) and \(\{5,6,7,11\}\) are the only strong metric bases of G. At the same time, the set \(\{1,5,6,7,11\}\) is the only \(\beta (G)\)-set which is a strong metric generator of G, and so it is the only \(\beta _s(G)\)-set. Therefore, \({\text {Sd}}_s(G,G^c)=\beta _s(G)=\beta (G)=5>4=\dim _s(G)\). In the case of Fig. 5, \({\text {Sd}}_s(G,G^c)=\beta _s(G)=\dim _s(G)=4>3=\beta (G)\), as \(\{2,4,6,7\}\) is a strong metric basis of G which is a vertex cover of G and \(\{2,4,6\}\) is a \(\beta (G)\)-set.

The hypercube \(Q_r, r\ge 3\), of order \(2^r\) is a 2-antipodal graph and so \(\dim _s(Q_r)=2^{r-1}\). Also, \(Q_r\) is a bipartite graph and, for r odd, any colour class form a strong metric basis which is a vertex cover of minimum cardinality. Since \(D(Q_r^c)=2\), we conclude that for any odd integer \(r\ge 3\),

$$\begin{aligned} {\text {Sd}}_s(Q_r,Q_r^c)=\dim _s(Q_r)=\beta (Q_r)=2^{r-1}. \end{aligned}$$
(2)

This is an example where \({\text {Sd}}_s(G,G^c)=\dim _s(G)=\beta (G)\) and it is a particular case of the next result.

Proposition 23

For any bipartite 2-antipodal graph G of odd diameter and order \(n>2\),

$$\begin{aligned}{\text {Sd}}_s(G,G^c)=\frac{n}{2}.\end{aligned}$$

Proof

Let \(G=(V_1\cup V_2,E)\). Since the subgraph of \(G^c\) induced by \(V_i, i\in \{1,2\}\), is complete and G is not a complete bipartite graph, we conclude that \(G^c\) is connected. Furthermore, since G is 2-antipodal of odd diameter, each vertex \(x\in V_1\) is adjacent to a vertex \(x'\in V_2\) in \(G^c\) and, as a result, \(D(G^c)=2\).

On the other hand, \(V_1\) is a vertex cover of G and since G is a 2-antipodal graph and D(G) is odd, for any \(x\in V_1\) there exists exactly one vertex \(x'\in V_2\) which is antipodal to x, which implies that \(V_1\) is a strong metric basis of G. Therefore, by Corollary 22, we conclude the proof. \(\square \)

An even-order cycle \(C_{2k}\) has odd diameter if k is odd, and thus \({\text {Sd}}_s(C_{2k},(C_{2k})^c)=k\) if k is odd. Note that for k even, \({\text {Sd}}_s(C_{2k},(C_{2k})^c)=k+1\).

If G is a bipartite 2-antipodal graph, then the Cartesian product graph \(G\Box K_2\) is bipartite and 2-antipodal. Moreover, \(D(G\Box K_2)=D(G)+1\). Therefore, Proposition 23 immediately leads to the following result:

Corollary 24

For any bipartite 2-antipodal graph G of even diameter and order n,

$$\begin{aligned}{\text {Sd}}_s(G\Box K_2,(G\Box K_2)^c)=n.\end{aligned}$$

Theorem 25

Let G be a connected graph. Then \(G_{SR}=G^c\) if and only if \(D(G)=2\) and G is a true twin-free graph.

Proof

(Necessity) Assume that \(G_{SR}=G^c=(V,E)\), and let \(u,v\in V\) be two mutually maximally distant vertices in G.

First consider that u and v are diametral vertices in G. Since u and v are mutually maximally distant in G and \(G_{SR}=G^c\), we obtain that u and v are adjacent in \(G^c\) and, as a result, \(D(G)=d_{G}(u,v)\ge 2\). Now, suppose that \(d_{G}(u,v)>2\). Then there exists \(w\in N_{G}(v)-N_{G}(u)\) such that \(d_{G}(u,w)=D(G)-1\ge 2\). Hence, w and u are not mutually maximally distant in G and \(w\in N_G(u)\), which contradicts the fact that \(G_{SR}=G^c\). Therefore, \(D(G)=2\).

Now assume that u and v are true twins in G. We have that u and v are false twins in \(G^c\) and, as a result, they are not adjacent in \(G^c\) and they are mutually maximally distant in G, which contradicts the fact that \(G_{SR}=G^c\). Therefore, G is a true twin-free graph.

(Sufficiency) If \(G=(V,E)\) is a true twin-free graph and \(D(G)=2\), then two vertices uv are mutually maximally distant in G if and only if \(d_{G}(u,v)=2\). Therefore, \(G_{SR}=G^c\). \(\square \)

Odd-order cycles are an example of the previous result, as \([(C_{2k+1})^c]_{SR}=C_{2k+1}\). Moreover, it is not difficult to show that a simultaneous strong metric basis of \(\{C_{2k+1}, (C_{2k+1})^c\}\) is the minimum union of a strong metric basis and a minimum vertex cover of \(C_{2k+1}\), so

$$\begin{aligned} {\text {Sd}}_s(C_{2k+1}, (C_{2k+1})^c)=k+\left\lfloor \frac{k}{2}\right\rfloor +1. \end{aligned}$$

Corollary 26

Let G be a true twin-free graph such that \(D(G)=2\). Then the following assertions hold:

  • \({\text {Sd}}_s(G,G^c)=\dim _s(G)\) if and only if there exists a \(\beta (G^c)\)-set which is a strong metric generator for \(G^c\).

  • \({\text {Sd}}_s(G,G^c)=\dim _s(G)=\dim _s(G^c)\) if and only if there exists a \(\beta (G^c)\)-set which is a strong metric basis of \(G^c\).

The complement of the graph shown in Fig. 4 has diameter two and \(\{1,5,6,7,11\}\) is a \(\beta (G)\)-set which is a strong metric generator for G, so that \({\text {Sd}}_s(G,G^c)=\dim _s(G)\).

Given a graph G, it is well known that \(D(G)\ge 4\) leads to \(D(G^c)=2\). Hence, \(D(G )\ne 2\) and \(D(G^c)\ne 2\) if and only if \(D(G )=D(G^c)= 3.\) In particular, for the case of trees, we have that \(D(T )=3\) if and only if \(D(T^c )=3.\)

Proposition 27

Let T be a tree of order n. If \(D(T)=3\), then

$$\begin{aligned}{\text {Sd}}_s(T,T^c)=n-2.\end{aligned}$$

Proof

Notice that T has \(l(T)=n-2\) leaves. Let u and v be the two interior vertices of T. We have that \(D(T^c)=3\) and \(d_{T^c}(u,v)=3\). Any simultaneous strong metric basis of \(\{T,T^c\}\) must contain all leaves of T, except one, and one of u and v, so \({\text {Sd}}_s(T,T^c)\ge l(T)-1+1=n-2\). Moreover, by Corollary 15, we have that \({\text {Sd}}_s(T,T^c)\le n-2\) and so the equality holds. \(\square \)

Proposition 28

Let T be a tree of order n such that \(D(T) \ge 4\), let l(T) be the number of leaves of T, let u be a leaf of T, and let \(T'_u\) be the tree obtained from T by removing all leaves, except u. Then,

$$\begin{aligned} \beta (\mathring{T})+l(T)-1 \le {\text {Sd}}_s(T,T^c) \le \beta (T'_u)+l(T)-1.\end{aligned}$$

Proof

Note that \(\dim _s(T)=l(T)-1\) and \(\mathring{\beta }(T)=\beta (\mathring{T})\). Thus, by Corollary 21, \({\text {Sd}}_s(T,T^c)\ge \max \{l(T)-1+\beta (\mathring{T}),\beta (T)\}\), and as a consequence, \({\text {Sd}}_s(T,T^c)\ge \beta (\mathring{T})+l(T)-1\).

To prove the upper bound, let X be a \(\beta (T'_u)\)-set and let \(Y\subset V(T)\) be the set composed by all leaves of T, except u. Notice that \(X\cup Y\) is a strong resolving cover of T and \(X\cap Y=\emptyset \). Now, since \(D(T^c)=2\), by Corollary 19, we conclude that \({\text {Sd}}_s(T,T^c)=\beta _s(T)\le |X|+|Y|=\beta (T'_u)+l(T)-1\). \(\square \)

A particular case of the previous result is that of caterpillar trees T such that \(T'_u \cong P_{n-l(T)+1}\) for every leaf u of T. In this case, we have that \({\text {Sd}}_s(T,T^c)=l(T)+\left\lceil \frac{n-l(T)}{2}\right\rceil -1\). Moreover, if \(D(T)=4\), then \(\mathring{T}\) is a star graph. On the other hand, if \(D(T)=5\), then \(\mathring{T}\) is composed by exactly two interior vertices and \(l(\mathring{T})=n-l(T)-2\) leaves. With these facts in mind, the following two results are straightforward consequences of Proposition 28:

Corollary 29

Let T be a tree of order n such that \(D(T)=4\). If the central vertex of \(\mathring{T}\) is a support vertex of T, then

$$\begin{aligned}{\text {Sd}}_s(T,T^c)=l(T).\end{aligned}$$

Otherwise,

$$\begin{aligned}{\text {Sd}}_s(T,T^c)=l(T)+1.\end{aligned}$$

Corollary 30

Let T be a tree of order n such that \(D(T)=5\). If an interior vertex of \(\mathring{T}\) is a support vertex of T, then

$$\begin{aligned}{\text {Sd}}_s(T,T^c)=l(T)+1.\end{aligned}$$

Otherwise,

$$\begin{aligned}{\text {Sd}}_s(T,T^c)=l(T)+2.\end{aligned}$$

In general, the bounds shown in Proposition 28 can be efficiently computed, as \(\beta (T)\) can be computed in \(O(n^{1.5})\) time for any tree T [26].

5 Computability of the Simultaneous Strong Metric Dimension

It was shown in [22] that the problem of finding the strong metric dimension of a graph, when stated as a decision problem, is \({\textit{NP}}\)-complete. This problem is formally stated as a decision problem as follows:

Strong Metric Dimension (SDIM)

  • INSTANCE: A graph \(G=(V,E)\) and an integer \(p, 1 \le p \le |V(G)|-1\).

  • QUESTION: Is \(\dim _s(G) \le p\)?

In an analogous manner, we define the decision problem associated to finding the simultaneous strong metric dimension of a graph family.

Simultaneous Strong Metric Dimension (SSD)

  • INSTANCE: A graph family \({\mathcal {G}}=\{G_1,G_2, \ldots , G_k\}\) defined on a common vertex set V and an integer \(p, 1 \le p \le |V|-1\).

  • QUESTION: Is \({\text {Sd}}_s({\mathcal {G}}) \le p\)?

It is straightforward to see that SSD is \({\textit{NP}}\)-complete in the general case, as determining whether a vertex set \(S \subset V, |S| \le p\), is a simultaneous strong metric generator for a graph family \(\mathcal{G}\) can be done in polynomial time, and for any graph \(G=(V,E)\) and any integer \(1 \le p \le |V(G)|-1\), the corresponding instance of SDIM can be transformed into an instance of SSD in polynomial time by making \(\mathcal{G}=\{G\}\).

Here we will discuss how the requirement of simultaneity makes computing the simultaneous strong metric dimension difficult, even for families composed by graphs the individual strong metric dimension of which is easily computable. In particular, we will analyse the case of families composed by trees. As we have previously pointed out, the strong metric dimension of any tree T equals the number of leaves minus one, and every set composed by all but one of its leaves is a strong metric basis [27]. Thus, for any tree T, a postorder traversal allows to compute \(\dim _s(T)\) in polynomial time. However, the problem of finding the simultaneous strong metric dimension of a family of trees is \({\textit{NP}}\)-hard, as we will show. To this end, we will use a reduction of a subcase of the Hitting Set Problem (HSP), which was shown to be \({\textit{NP}}\)-complete by Karp [10]. HSP is defined as follows:

Hitting Set Problem (HSP)

  • INSTANCE: A collection \(\mathcal{C}=\{C_1,C_2,\ldots ,C_k\}\) of non-empty subsets of a finite set S and a positive integer \(p\le |S|\).

  • QUESTION: Is there a subset \(S' \subseteq S\) with \(|S'|\le p\) such that \(S'\) contains at least one element from each subset in \(\mathcal{C}\)?

Theorem 31

The SSD Problem is \({\textit{NP}}\)-complete for families of trees.

Proof

As we discussed previously, determining whether a vertex set \(S \subset V, |S| \le p\), is a simultaneous strong metric generator for a graph family \(\mathcal{G}\) can be done in polynomial time, so SSD is in \({\textit{NP}}\).

It is known that HSP is \({\textit{NP}}\)-complete even if \(|C_i|\le 2\) for every \(C_i \in \mathcal{C}\) [6]. We will refer to this subcase of HSP as HSP2, and will show a polynomial time transformation of HSP2 into SSD. Let \(S=\{v_1,v_2,\ldots ,v_n\}\) be a finite set and let \(\mathcal{C}=\{C_1,C_2,\ldots ,C_k\}\), where every \(C_i \in \mathcal{C}\) satisfies \(1 \le |C_i| \le 2\) and \(C_i \subseteq S\). Let p be a positive integer such that \(p\le |S|\), and let \(S'=\{w_1,w_2,\ldots ,w_n\}\) such that \(S \cap S'=\emptyset \). We construct the family \(\mathcal{T}=\{T_1,T_2,\ldots ,T_k\}\) composed by trees on the common vertex set \(V=S \cup S' \cup \{u\}, u \notin S \cup S'\), as follows. For every \(r \in \{1,\ldots ,k\}\), if \(C_r=\{v_{i_r}\}\), let \(P_r\) be a path on the vertices of \((S-\{v_{i_r}\}) \cup (S'-\{w_{i_r}\})\), and let \(T_r\) be the tree obtained from \(P_r\) by joining by an edge the vertex u to one end of \(P_r\), and joining the other end of \(P_r\) to the vertices \(v_{i_r}\) and \(w_{i_r}\). On the other hand, if \(C_r=\{v_{i_r},v_{j_r}\}, P_r\) is a path on the vertices of \((S-\{v_{i_r},v_{j_r}\}) \cup S'\), and \(T_r\) is the tree obtained from \(P_r\) by joining by an edge the vertex u to one end of \(P_r\), and the other end of \(P_r\) to the vertices \(v_{i_r}\) and \(v_{j_r}\). Figure 6 shows an example of this construction.

In order to prove the validity of this transformation, we claim that there exists a subset \(S''\subseteq S\) of cardinality \(|S''| \le p\) that contains at least one element from each \(C_i \in \mathcal{C}\) if and only if \({\text {Sd}}_s(\mathcal{T}) \le p+1\).

Fig. 6
figure 6

The family \(\mathcal{T}=\{T_1,T_2,T_3\}\) is constructed for transforming an instance of HSP2, where \(S=\{v_1,v_2,v_3,v_4\}\) and \(\mathcal{C} =\{\{v_1,v_2\},\{v_3\},\{v_2,v_4\}\}\), into an instance of SSD

To prove this claim, we first assume that there exists a set \(S'' \subseteq S\) which contains at least one element from each \(C_i \in \mathcal{C}\) and satisfies \(|S''| \le p\). The set of leaves of any tree \(T_i \in \mathcal{T}\) will be denoted by \(\Omega (T_i)\). Since the set \(S'' \cup \{u\}\) satisfies \(|(S'' \cup \{u\}) \cap \Omega (T_i) |\ge |\Omega (T_i)|-1\) for every \(T_i \in \mathcal{T}\), it is a simultaneous strong metric generator for \(\mathcal{T}\). Thus, \({\text {Sd}}_s(\mathcal{T}) \le p+1\).

Now, assume that \({\text {Sd}}_s(\mathcal{T}) \le p+1\) and let W be a simultaneous strong metric generator for \(\mathcal{T}\) such that \(|W|=p+1\). Since u is a common leaf of all trees in \(\mathcal{T}\), we can assume that \(u \in W\), i.e., if \(u \notin W\), then for any \(T_i \in \mathcal{T}\) and any leaf \(x \in W \cap \Omega (T_i)\), the set \((W-\{x\})\cup \{u\}\) is also a simultaneous strong metric generator for \(\mathcal{T}\), and so we can change W by \((W-\{x\})\cup \{u\}\). Moreover, for every set \(C_r \in \mathcal{C}\) such that \(W \cap C_r=\emptyset \), we have that \(C_r=\{v_{i_r}\}\) and \(w_{i_r} \in W\). Hence, the set

$$\begin{aligned} W'=\displaystyle \bigcup _{W \cap C_r=\emptyset }\left( (W-\{w_{i_r}\})\cup \{v_{i_r}\}\right) \end{aligned}$$

is also a simultaneous strong metric generator for \(\mathcal{T}\) of cardinality \(|W'|=p+1\) which satisfies that \(u \in W'\) and \((W'-\{u\}) \cap C_i \ne \emptyset \) for every \(C_i \in \mathcal{C}\). Thus, the set \(S''=W'-\{u\}\) satisfies \(|S''|\le p\) and contains at least one element from each \(C_i \in \mathcal{C}\).

To conclude our proof, it is simple to verify that the transformation of HSP2 into SSD described above can be done in polynomial time. \(\square \)

6 Concluding Remarks

In this paper, we obtained sharp upper and lower bounds on the simultaneous strong metric dimension of graph families, as well as exact values for some specific cases. We conducted a detailed analysis of families of the form \(\{G,G^c\}\) composed by a graph and its complement. For the cases where one of the graphs has diameter two, we obtained exact values or sharp bounds for \({\text {Sd}}_s(G,G^c)\) in terms of some parameters of G and/or \(G^c\). Moreover, we show that the case where G is a tree and \(D(G)=D(G^c)=3\) is easy to solve. In general, it is difficult to determine the exact value of the simultaneous strong metric dimension of a graph family, as the problem is \({\textit{NP}}\)-hard even for families of trees, individual strong metric dimensions of which are easily computable. It would be interesting to study the simultaneous strong metric dimension of some specific families of graphs, for instance, those composed by graphs obtained as the result of some operation on graphs, e.g. product graphs, in the line of the results presented in [19] for the standard strong metric dimension.