Distance-based vertex identification in graphs: the outer multiset dimension

Given a graph $G$ and a subset of vertices $S = \{w_1, \ldots, w_t\} \subseteq V(G)$, the multiset representation of a vertex $u\in V(G)$ with respect to $S$ is the multiset $m(u|S) = \{| d_G(u, w_1), \ldots, d_G(u, w_t) |\}$. A subset of vertices $S$ such that $m(u|S) = m(v|S) \iff u = v$ for every $u, v \in V(G) \setminus S$ is said to be a multiset resolving set, and the cardinality of the smallest such set is the outer multiset dimension. We study the general behaviour of the outer multiset dimension, and determine its exact value for several graph families. We also show that computing the outer multiset dimension of arbitrary graphs is NP-hard, and provide methods for efficiently handling particular cases.


Introduction
The characterisation of vertices in a graph by means of unique features, known as distinguishability or resolvability, has found applications in computer networks where nodes ought to be localised based on their properties rather than on identifiers [6], or to determine the social role of an actor in society in comparison to other peers with similar structural properties [7]. In fact, simple structural properties of vertices, such as their degree or the subgraphs induced by their neighbours, have been successfully used to re-identify (supposedly) anonymous users in social graphs [8,16,17].
This article focuses on vertex characterisations that are defined in relation to a subset of vertices of the graph. The earliest of such characterisations is known as metric representation, introduced independently by Slater [14] in 1975 and Harary and Melter [3] in 1976. Formally, given an ordered set of vertices S = {w 1 , . . . , w t } ⊆ V in a graph G = (V, E), the metric representation of a vertex u ∈ V with respect to S is the t-vector r(u|S) = (d G (u, w 1 ), . . . , d G (u, w t )), where the metric d G (u, v) is computed as the length of a shortest u − v path in G. An ordered subset S satisfying that every two distinct vertices u and v in the graph have different metric representation, i.e. r(u|S) = r(v|S), is said to be a resolving set. The minimum cardinality amongst the resolving sets in a graph G is known as the metric dimension of G, and denoted as dim(G). The metric dimension of graphs has been extensively studied in literature since the 70s. Issues that are relevant to the present day, such as privacy in online social networks, are still benefiting from such research effort [9,10,11,15].
The assumption that resolvability requires an order to exist (or be imposed) on a set S for obtaining metric representations remained unchallenged until 2017, when Simanjuntak, Vetrík, and Mulia introduced the notion of multiset representation [13] by looking at the multiset of distances rather than at the standard vector of distances. For a vertex u ∈ V and a vertex set S ⊆ V , the multiset representation of u with respect to S, denoted m(u|S), is defined by m(u|S) = {|d G (u, w 1 ), . . . , d G (u, w t )| }, where {|.| } denotes a multiset.
Using this definition, the notions of resolvability in terms of the metric representation were straightforwardly extended to consider resolvability in terms of the multiset representation [5,13]. Our main observation in this article is that these straightforward extensions are in fact an oversimplification of the problem of distinguishing vertices in a graph based on the multiset representation. We argue that this problem has two flavours, one of which has been neglected in literature.
Contributions. This article makes the following contributions.
• We generalise the metric dimension of graphs to accommodate different characterisations of their vertices, such as the metric and multiset representations (Section 2). We show that the metric dimension problem with respect to the multiset representation admits two interpretations: one that can be found in the literature [5,13] and is known as the multiset dimension, and another one that we call the outer multiset dimension. The latter is well-defined, whereas the multiset dimension [5,13] is undefined for an infinite number of graphs. We also show that the outer multiset dimension finds applications on measuring the re-identification risk of users in a social graph. To the best of our knowledge, the multiset dimension has no obvious practical application.
• We characterise several graph families for which the outer multiset dimension can be easily determined, or bounded by the metric dimension (Section 3).
• We prove that the problem of computing the outer multiset dimension in a graph is NP-Hard (Section 4).
• We provide a polynomial computational procedure to calculate the outer multiset dimension of full 2-ary trees (Section 5), and a parallelisable algorithm for the general case of full δ-ary trees.

A generalisation of the metric dimension
We consider a simple and connected graph G = (V, E) where V is a set of vertices and E a set of edges. The distance d G (v, u) between two vertices v and u in G is the number of edges in a shortest path connecting them. If there is no ambiguity, we will simply write d(v, u).
The metric dimension of graphs has traditionally been studied based on the so-called metric representation, which is the vector of distances from a vertex to an ordered subset of vertices of the graph. To accommodate other types of relations between vertices, we generalise the metric dimension by considering any equivalence relation ∼ ⊆ V × V over the set of vertices of the graph. That is, we consider a relation ∼ that is reflexive, symmetric, and transitive. We use [u] ∼ to denote the equivalence class of the vertex u ∈ V with respect to the relation ∼, while V / ∼ denotes the partition of V composed of the equivalence classes induced by ∼. While standard resolving sets distinguish all vertices in a graph, outer resolving sets only look at those vertices that are not in S, hence the name. We remark that there exist applications working under the assumption that S is given, implying that vertices in S do not need to be distinguishable. For example, in an active re-identification attack on a social graph [1,15], attackers first retrieve a set of attacker nodes by using a pattern recognition algorithm, then they re-identify other users in the network based on their metric representations with respect to the set of attacker nodes.
We use ∼ S to denote the relation on the set of vertices of a graph defined by u ∼ S v ⇐⇒ r(u|S) = r(v|S), where r(v|S) is the vector of distances from v to vertices in S, and ∼ =S to denote the relation u ∼ =S v ⇐⇒ m(u|S) = m(v|S), where m(v|S) is the multiset of distances from v to vertices in S. These two relations are interconnected in the following way. ii. Every outer resolving set of G with respect to ∼ =S is an outer resolving set of G with respect to ∼ S .
iii. Every outer resolving set of G with respect to ∼ S is a resolving set of G, and vice versa.
Proof. Let S ⊆ V (G) be a resolving set of G with respect to ∼ =S. Then, every pair of distinct vertices u, v ∈ V (G) satisfy m(u|S) = m(v|S). Thus, it trivially follows that the same property holds for every pair of distinct vertices u, v ∈ V (G) \ S. This completes the proof of (i).
The second property follows straightforwardly from the fact that m(u|S) = m(v|S) =⇒ r(u|S) = r(v|S), and (iii) is a well-known property of resolving sets based on the metric representation. Figure 1 depicts the relations between resolvability notions enunciated in Proposition 2.2 in the form of a hierarchy. In the figure, every arrow from resolvability notion A to resolvability notion B indicates that a set S which is resolving as defined by A is also resolving as defined by B. We use the following shorthand notation in Figure 1 and in the remainder of this article.
• resolving set to denote a resolving set with respect to ∼ S .
• multiset resolving set to denote a resolving set with respect to ∼ =S.
• outer resolving set to denote an outer resolving set with respect to ∼ S .
• outer multiset resolving set to denote an outer resolving set with respect to ∼ =S.  . The metric dimension (resp. outer metric dimension) of a simple connected graph G = (V, E) with respect to a structural relation ∼ is the minimum cardinality amongst a resolving (resp. outer resolving) set in G with respect to ∼. If no resolving (resp. outer resolving) set exists, we say that the metric dimension (resp. outer metric dimension) is undefined.
An example of a metric dimension definition that is undefined for some graphs is given by Simanjuntak et al. [13]. They use the multiset representation to distinguish vertices. It is easy to prove that a complete graph has no multiset resolving set, which leads to indefinition. Conversely, the outer metric dimension with respect to the multiset representation is always defined, given that for every graph G = (E, V ), V is an outer multiset resolving set.
Overall, we highlight the fact that, while the outer metric dimension and the standard metric dimension with respect to the metric representation are equivalent (see Figure 1), the use of the multiset representation renders the outer metric dimension different from the standard metric dimension. In fact, the outer multiset dimension is defined for any graph, whereas the multiset dimension is not. Furthermore, recent privacy attacks and countermeasures on social networks [1,12,15] rely on the notion of outer resolving set, rather than on the original notion of resolving set. The remainder of this article is thus dedicated to the study of the outer multiset dimension, that is, the outer metric dimension with respect to ∼ =S.

Basic results on the outer multiset dimension
In this section we characterise several graph families for which the outer multiset dimension can be easily determined, or bounded by the metric dimension otherwise. We start by providing notation that we use throughout the paper.
Notation. Let G = (V, E) be a graph of order n = |V (G)|. We will say that G is non-trivial if n ≥ 2. K n , N n , P n and C n stand for the complete, empty, path and cycle graphs, respectively, of order n. Moreover, we will use the notation The degree of a vertex v of G will be denoted by δ G (v). If there is no ambiguity, we will drop the subscripts and In general, u, v are called twins if they are either true twins or false twins. Moreover, a vertex u is called a twin if there exists v = u such that u and v are twins. Note that the property of being twins induces an equivalence relation on the vertex set of any graph. Finally, we will use the notation dim ms (G) for the outer multiset dimension of a graph G, and dim(G) for the standard metric dimension.
Remark 3.1. For every non-trivial graph G of order n, the following facts hold: Proof. The fact that dim ms (G) ≥ 1 follows directly from the definition of outer multiset dimension, whereas dim ms (G) ≤ n − 1 follows trivially from the fact that every vertex and thus it has a unique multiset representation w.r.t. V (G) \ {v}, which is thus a multiset resolving set. The fact that Once established the global bounds of the outer multiset dimension, we now focus on the extreme cases of these inequalities.

Remark 3.2. A graph G satisfies dim ms (G) = 1 if and only if it is a path graph.
Proof. Let G be a path graph. It is clear that the set {v}, where v is an extreme vertex of G, is a multiset resolving set of G, so dim ms (G) ≤ 1. By item (ii) of Remark 3.1, dim ms (G) ≥ dim(G) ≥ 1, so the equality holds. On the other hand, if G is not a path graph, then item (ii) of Remark 3.1 also leads to dim ms (G) ≥ dim(G) ≥ 2, as the standard metric dimension of a graph is known to be 1 if and only if it is a path graph [2].
According to Remark 3.2, the cases where dim ms (G) = dim(G) = 1 coincide. However, this is not the case for the upper bound of Remark 3.1 (i). Indeed, while it is easy to see that, for any positive integer n, the complete graph K n satisfies dim ms (K n ) = dim(K n ) = n − 1, we have the fact that this is the sole family of graphs for which dim(K n ) = n − 1, whereas there exist graphs G such that dim ms (G) = n − 1 > dim(G), as exemplified by the next results.
Example 3.3. The cycle graphs C 4 and C 5 satisfy dim ms (C 4 ) = 3 > 2 = dim(C 4 ) and dim ms ( , as they are false twins in G. Consequently, S is not a multiset resolving set of G. We now treat the case where u ↔ v, for which we differentiate the following subcases: {|1| }, and so S is not a multiset resolving set of G. , as x and u (x and v) are false twins in G. Thus, S is not a multiset resolving set of G.
. . , k −2}, which entails that S is not a multiset resolving set of G.
Summing up the cases above, we have that no set S ⊆ V (G) such that |S| ≤ n − 2 is a multiset resolving set of G, and so dim ms (G) ≥ n − 1. The equality follows from item (i) of Remark 3.1. The proof is thus completed. Example 3.3 shows two cases where the outer multiset dimension of a cycle graph is strictly larger than its standard metric dimension. With the exception of C 3 , which satisfies dim ms (C 3 ) = dim(C 3 ) = 2, the strict inequality holds for every other cycle graph, as shown by the following result.
Remark 3.5. Every cycle graph C n of order n ≥ 6 satisfies dim ms (C n ) = 3.
Proof. Consider an arbitrary pair of vertices u, v ∈ V (C n ) and a pair of vertices x, y ∈ V (C n ) \ {u, v} such that ux . . . yv is a path of C n (note that for n ≥ 6 at least one such pair x, y exists). We have that m( where the subscripts are taken modulo n. We differentiate the following cases for a pair of vertices x, y ∈ V (C n ) \ S: as y is at distance 1 from at most one element in S.

x and y satisfy
In this case, assuming without loss of gener- In a manner analogous to that of the previous case, we assume without loss of generality that Finally, summing up the cases above, we have that S is a multiset resolving set of G, and so dim ms (G) ≤ |S| = 3. This completes the proof.
Next, we characterise a large number of cases where the outer multiset dimension is strictly greater than the standard metric dimension. To that end, we first introduce some necessary notation. We represent by n r C rep the number of r-combinations, with repetition, from n elements. Likewise, we represent by n r P rep the number of r-permutations, with repetition, from n elements. Recall that n r C rep = r+n−1 r = r+n−1 n−1 , whereas n r P rep = n r . Finally, we recall the quantity f (n, d), defined in [2] as the smallest positive integer k such that k + d k ≥ n. In an analogous manner, we define f ′ (n, d) as the smallest positive integer k ′ such that k ′ + r+d−1 With the previous definitions in mind, we introduce our next result. Theorem 3.6. For every graph G = (V, E) of order n and diameter d such that dim(G) < f ′ (n, d), Proof. Let G = (V, E) be a graph of order n and diameter d. It was proven in [2] that every such graph satisfies In general, if |S| = r, the set of all possible different metric representations for elements of V \ S with respect to S is that of all permutations, with repetition, of r elements from {1, 2, . . . , d}. Applying an analogous reasoning, we have that the set of all possible different multiset metric representations for elements of V \ S with respect to S is that of all combinations, with repetition, of r elements from {1, 2, . . . , d}. Thus, any multiset metric generator S of G must satisfy n An example of the previous result is the wheel graph W 1,5 ∼ = v + C 5 , which has diameter 2 (see Figure 2). As discussed in [2,4], dim(W 1,5 ) = 2 = f (6, 2) < f ′ (6, 2) = 3 < 4 = dim ms (W 1,5 ).
To conclude this section, we give a general result on the relation between outer multiset resolving sets and twin vertices, a particular case of which will be useful in further sections of this paper.
Proof. The result follows from the fact that, for every twin equivalence class, at most one element can be left out of any outer multiset resolving set.

Complexity of the outer multiset dimension problem
In the previous section, we showed that algorithms able to compute the metric dimension can be used to determined or bound the outer multiset dimension. The trouble is, however, that calculating the metric dimension is NP-Hard [6]. We prove in this section that computing the outer multiset dimension of a simple connected graph is NP-hard as well.
The proof is, in some way, inspired by the NP-hardness proof of the metric dimension problem given in [6]. To begin with, we formally state the decision problem associated to the computation of the outer multiset dimension: Outer Proof. The problem is clearly in NP. We give the NP-completeness proof by a reduction from 3-SAT. Consider an arbitrary input to 3-SAT, that is, a formula F with n variables and m clauses. Let x 1 , x 2 , . . . , x n be the variables, and let C 1 , C 2 , . . . , C m be the clauses of F . We next construct a connected graph G based on this formula F . To this end, we use the following gadgets.
For each variable x i we construct a gadget as follows (see Fig. 3).
• Nodes T i , F i are the "true" and "false" ends of the gadget. The gadget is attached to the rest of the graph only through these nodes.
• Nodes a 1 i , a 2 i , b 1 i , b 2 i "represent" the value of the variable x i , that is, a 1 i and a 2 i will be used to represent that variable x i is true, and b 1 i and b 2 i that it is false. • Nodes d 1 i and d 2 i will help to differentiate between nodes in different gadgets. • Q i is a set of end-nodes of cardinality q i adjacent to d 1 i . Notice that all these nodes are indistinguishable from d 2 i . Moreover, the cardinalities of these sets Q i are pairwise distinct, which is necessary for our purposes in the proof. We further on state the explicit values of their cardinalities.
For each clause C j we construct a gadget as follows (see Figure 4). • Nodes c 1 j and c 3 j will be helpful in determining the truth value of C j .
• Nodes c 2 j and c 4 j will help to differentiate between nodes in different gadgets.
• P j is a set of end-nodes of cardinality p j adjacent to c 2 j . Notice that all these nodes are indistinguishable from c 4 j . As in the case of the sets Q i from the variable gadgets, the cardinalities of these sets P j are also pairwise distinct. As mentioned before, we require some conditions on the cardinalities of the sets P i and Q i from the variables and clauses gadgets, respectively. The values of their cardinalities (which we require in our proof) are as follows. For every i ∈ {1, . . . , n} we make q i = 2 · i · n, and for every j ∈ {1, . . . , m} we make p j = 2 · j · n + 2n 2 . In concordance, we notice that the set of numbers p i and q j are pairwise distinct. Also, we clearly see that q i + p j is polynomial in n + m.
The gadgets representing the variables and the gadgets representing the clauses are connected in the following way in order to construct our graph G.
• Nodes c 1 j , for every j, are adjacent to nodes T i , F i for all i.
• If a variable x i does not appear in a clause C j , then the nodes T i , F i are adjacent to c 3 j .
• If a variable x i appears as a positive literal in a clause C j , then the node F i is adjacent to c 3 j .
• If a variable x i appears as a negative literal in a clause C j , then the node T i is adjacent to c 3 j .
We first remark that the constructed graph G is connected, and that its order is polynomial in the number of variables and clauses of the original 3-SAT instance. We will prove now that the formula F is satisfiable if and only if the multiset dimension of G is exactly M = n i=1 q i + m j=1 p j + n. First, let us look at some properties that must be fulfilled by a multiset resolving set S of minimum cardinality in G. First, as the nodes in Q i ∪ {d 2 i }, for every i ∈ {1, . . . , n}, are indistinguishable among them, and at least |Q i | of them must be in S, we can assume without lost of generality that Q i ⊂ S. By using a similar reasoning, also P j ⊂ S for every j ∈ {1, . . . , m}. Moreover, for every i ∈ {1, . . . , n}, at least one of the nodes a 1 i , a 2 i , b 1 i , b 2 i must be in S, otherwise some pairs of them would have the same multiset representation, which is not possible. Thus, the cardinality of S is at least M . Clearly, if M = |S|, then we have already fully described a set of nodes that could represent S. Lemma 4.2. Consider a set S * containing exactly M nodes given as follows. All nodes in Q i for i ∈ {1, . . . , n}, all nodes in P j for j ∈ {1, . . . , m}, and exactly one node from each set . . , n} are in S * . Then, all pairs of nodes have different multiset representations with respect to S * , except possibly c 1 j and c 3 j (for some j ∈ {1, . . . , m}).
Proof. To prove the lemma, we will explicitly compute the multiset representation of each node. For easier representation, we use a vector (x 1 , . . . , x n ) to denote the multiset over positive integers such that 1 has multiplicity x 1 , 2 has multiplicity x 2 , and so on.
, (0, 1, q i , · · · ), (0, 0, q i + 1, · · · )}. An analogous result remains if the assumption that b 2 i ∈ S * is dropped, based on the following observations. First, one and only one of the nodes is in S * , and the distances from the other three to this one are exactly 1, 2, 3 in some order. Second, each of these nodes have q i nodes at distance 3.
j : the number of nodes at distance two depends on which node belongs to S * from each variable gadget. We distinguish three possible cases for the distance between c 3 j and the node from S * belonging to the gadget corresponding to a variable x i .
-If x i appears in C j as a positive literal, and a 1 i ∈ S * or a 2 i ∈ S * , then such distance is 3.
-If x i appears in C j as a negative literal, and b 1 i ∈ S * or b 2 i ∈ S * , then such distance is 3. -If none of the above situations occurs, then such distance is 2.
Therefore, the multiset representation of c 3 j is related to the set (0, p j + w j , q i + n − w j , p l − p j ), where w j is the number of nodes from gadgets representing some x i matching the third case above.
Notice that, as the difference between any p j and any q i is at least 2n, all pairs of nodes have also a different multiset representation, except possibly (c 1 j , c 3 j ) that depend on the selected nodes from each variable gadget. We next particularise some of these situations.
Remaining cases trivially follow, and are left to the reader, and so the proof of the lemma is complete.
We will now show a way to transform the set S * into values for the variables x i that will lead to a satisfiable assignment for F . If S * ∩ {a 1 i , a 2 i } = ∅ for some variable x i , then we set the variable x i = true (with respect to S * ). Otherwise we set x i = false. Hence, the clause C j is true or false in the natural way, according to the values previously given to its variables. Proof. Notice that the distance between c 3 j and the node in S * from the gadget corresponding to x i is 3 if and only if the clause C j is true (see Lemma 4.2). Thus, w j = 0 (as defined in Lemma 4.2) when the clause C j is false, and only in this case m(c 3 j |S * ) = m(c 1 j |S * ).
By using the lemmas above, we conclude the NP-completeness reduction, through the following two lemmas. Proof. Recall that dim ms (G) ≥ M . It remains to prove that if F is satisfiable then dim ms (G) ≤ M . Let us construct a set S in the following way. If x i is true, then a 1 i ∈ S. Otherwise (x i is false), b 1 i ∈ S. Also, we add to S all nodes in the sets P j and Q i . Hence, according to Lemmas 4.2 and 4.3, S is a multiset resolving set, and its cardinality is exactly M . Proof. Let S be a set of nodes of cardinality equal to the multiset dimension of G. Hence, as explained before, without lost of generality all nodes in the sets P j , Q i , and exactly one node of a 1 i , a 2 i , b 1 i , b 2 i , must belong to S, and no other node is in S. If a 1 i ∈ S or a 2 i ∈ S, then let x i be true. Otherwise, let x i be false. Since S is a multiset resolving set, according to Lemmas 4.2 and 4.3, all clauses C j of F must be true, unless the nodes c 1 j and c 3 j would have the same multiset representation, which is not possible. If all clauses of F are true, then F is satisfiable, as claimed.
The last two lemmas together complete the reduction from 3-SAT to the problem of deciding whether the outer multiset dimension of a graph G is equal to a given positive integer. The latter problem can in turn be trivially reduced to DIMMS. This completes the proof.

Particular cases involving trees
Given that, in general, computing the outer multiset dimension of a graph is NP-hard, it remains an open question for which families of graphs the outer multiset dimension can be efficiently computed. The goal of this section is to provide a computational procedure and a closed formula to compute the outer multiset dimension of full δ-ary trees. A full δ-ary tree is a rooted tree whose root has degree δ, all its leaves are at the same distance from the root, and its descendants are either leaves or vertices of degree δ + 1. We expect the results obtained in this section to pave the way for the study of the outer multiset dimension of general trees.
Notation. Given a multiset M and an element x, we denote the multiplicity of x in M as M [x]. We use ǫ G (x) to denote the eccentricity of the vertex x in a graph G, which is defined as the largest distance between x and any other vertex in the graph. We will simply write ǫ(x) if the considered graph is clear from the context. Given a tree T rooted in w, we use T x to denote the subtree induced by x and all descendants of x, i.e. those vertices having a shortest path to w that contains x. Finally, an outer multiset basis is said to be an outer multiset resolving set of minimum cardinality.
We start by enunciating a simple lemma that characterises multiset resolving sets in full δ-ary trees. Take two vertices x, y ∈ V (T ) \ S such that d(x, w) < d(y, w). Because T is a full δ-ary tree, we obtain that d(x, w) < d(y, w) ⇐⇒ ǫ T (x) < ǫ T (y). Also, there must exist two leaf vertices y 1 , y 2 in T which are siblings and satisfy d(y 1 , y) = d(y 2 , y) = ǫ T (y). Considering that y 1 and y 2 are false twins, we obtain that y 1 , y 2 ∈ S =⇒ m(y 1 |S) = m(y 2 |S). Therefore, given that d(y 1 , w) = d(y 2 , w), it follows that y 1 ∈ S or y 2 ∈ S. We assume, without loss of generality, that y 1 ∈ S. On the one hand, we have that d(y 1 , y) ∈ m(y|S). On the other hand, because d(y 1 , y) = ǫ T (y) > ǫ T (x), we obtain that d(y 1 , y) / ∈ m(x|S), implying that m(x|S) = m(y|S).
Based on the result above, we provide conditions under which an outer multiset basis can be constructed in a recursive manner. Recall that an outer multiset basis is an outer multiset resolving set of minimum cardinality.
Lemma 5.2. Given a natural number ℓ > 1, let T 1 , . . . , T δ be δ full δ-ary trees of depth ℓ with pairwise disjoint vertex sets. Let w 1 , . . . , w δ be the roots of T 1 , . . . , T δ , respectively, and let T be the full δ-ary tree rooted in w defined by the set of vertices V (T ) = V (T 1 ) ∪ · · · ∪ V (T δ ) ∪ {w} and edges E(T ) = E(T 1 ) ∪ · · · ∪ E(T δ ) ∪ {(w, w 1 ), . . . , (w, w δ )}. Let S 1 , . . . , S δ be outer multiset bases of T 1 , . . . , T δ , respectively. Then Proof. Consider two vertices x and y in T such that d T (x, w) = d T (y, w). We will prove that m T (x|S) = m T (y|S), which gives that S is an outer multiset resolving set via application of Lemma 5.1. Our proof is split in two cases, depending on whether x and y are within the same sub-branch or not.
First, assume that x ∈ V (T i ) and y ∈ V (T j ) for some i = j ∈ {1, . . . , δ}. For every leaf vertex z in T , but not in

By considering the fact that m Tj
For the second case assume that x ∈ V (T i ) and y ∈ V (T i ) for some i ∈ {1, . . . , δ}. This implies that m T (x|S i ) = m T (y|S i ), because S i is a multiset resolving set in T i . Moreover, for every vertex z ∈ V (T ) \ V (T i ) it holds that d T (x, z) = d T (y, z), which gives the expected result: m T (x|S) = m T (y|S).
Up to here we have proved that S is an outer multiset resolving set. To prove that S is a basis, we only need to show that for any outer multiset resolving set S ′ in T , it is satisfied that the sets S ′ ∩ V (T 1 ), . . . , S ′ ∩ V (T δ ) are outer multiset resolving sets in T 1 , . . . , T δ , respectively. Given that S 1 , . . . , S δ are outer multiset bases, this would mean that S is an outer multiset resolving set of minimum cardinality.
We proceed by contrapositive. Let S ′ 1 = S ′ ∩ V (T 1 ), . . . , S ′ δ = S ′ ∩ V (T 2 ). Assume that S ′ i is not an outer multiset resolving set in T i for some i ∈ {1, . . . , δ}. Then, there must exist vertices x and y such that m Ti (x|S ′ i ) = m Ti (y|S ′ i ). As in a previous reasoning, since x and y are both within T i , it follows that ∀ z∈V (T )\V (Ti) d T (x, z) = d T (y, z). Hence, m T (x|S ′ ) = m T (y|S ′ ), which is a contradiction. Lemma 5.2 provides a sufficient condition for obtaining an outer multiset basis of a full δ-ary tree T by joining bases of the first level branches of T . This is useful for the development of a computational procedure that finds the outer multiset dimension of an arbitrary full δ-ary tree. Despite this fact, here we are interested in finding a closed formula for the outer multiset dimension of full δ-ary trees. The next result will prove itself a key element towards such a goal. Theorem 5.3. Let T δ ℓ be a full δ-ary tree of depth ℓ. Let n be the smallest positive integer such that there exist δ + 1 outer multiset bases S 1 , . . . , S δ+1 in T δ n satisfying that , where w is the root of T δ n . Then, for every ℓ ≥ n, the outer multiset dimension of T δ ℓ is given by δ ℓ−n × dim ms (T δ n ).
Proof. We proceed by induction.
Clearly, these two conditions hold for ℓ = n (base case). The remainder of this proof will be dedicated to finding δ + 1 outer multiset bases R 1 , . . . , R δ+1 of T δ ℓ+1 that satisfy condition (1). The second condition will follow straightforwardly from the size of the bases R 1 , . . . , R δ+1 .
We end this section by addressing the problem of finding the smallest n such that T δ n contains δ +1 outer multiset bases S 1 , . . . , S δ+1 satisfying the premises of Theorem 5.3. We do so by developing a computer program 1 that calculates such number via exhaustive search. The pseudocode for this computer program can be found in Algorithm 5. It reduces the search space by bounding the size of an outer multiset basis with the help of Lemma 5.2 (see Step 13 of Algorithm 5). That said, we cannot guarantee termination of Algorithm 5, essentially for two reasons. First, the computational complexity of each iteration of the algorithm is exponential on the size of T δ n while, at the same time, the size of T δ n exponentially increases with n. Second, there is no theoretical guarantees that such an n can be found for every δ.
Despite the exponential computational complexity of Algorithm 5, it terminates for δ = 2. In this case, the smallest n satisfying the premises of Theorem 5.3 is n = 4. The three outer multiset bases S 1 , S 2 and S 3 of T 2 4 are illustrated in Table 1 below 2 . We refer the interested reader to Appendix 6 for a visual representation of the bases shown in Table 1. The main corollary of this result is the following.
Corollary 5.4. The outer multiset dimension of a full 2-ary tree T 2 ℓ of depth ℓ is: Proof. The first four cases are calculated by an exhaustive search using a computer program that can be found at https://github.com/rolandotr/graph. The last case follows from Theorem 5.3.
It is worth remarking that Algorithm 5 can be paralellised and hence benefit from a computer cluster. Running the algorithm in a high performance computing facility is thus part of future work, which may lead to termination of Algorithm 5 for values of δ higher than 2.
Algorithm 1 Given a natural number δ, finds the smallest n such that the full δ-ary tree of depth n satisfies the premises of Theorem 5.3.
1: Let n = 0 and T δ n a full δ-tree of depth n rooted in w 2: min = 1 ⊲ Lower bound on the cardinality of a basis in T δ for i = min to max do ⊲ Each of these iterations can be ran in parallel 6: Let B be an empty set 7: for all S ⊆ V (T δ n ) s.t. |S| = i do 8: if S is a resolving set then 9: if ∀ S ′ ∈B m T δ n (w|S ′ )[ǫ T δ n (w)] = m T δ n (w|S)[ǫ T δ n (w)] then if B = ∅ then 12: break ⊲ The outer multiset dimension of T δ n has been found 13: min = dim ms (T δ n ) × δ ⊲ See Lemma 5.2 14: max = min + δ − 1 ⊲ This is the trivial upper bound 15: n = n + 1 16: until |B| ≥ δ + 1 17: return n

Conclusions
In this paper we have addressed the problem of uniquely characterising vertices in a graph by means of their multiset metric representations. We have generalised the traditional notion of resolvability in such a way that the new formulation allows for different structural characterisations of vertices, including as particular cases the ones previously proposed in the literature. We have pointed out a fundamental limitation affecting previously proposed resolvability parameters based on the multiset representation, and have introduced a new notion of resolvability, the outer multiset dimension, which effectively addresses this limitation. Additionally, we have conducted a study of the new parameter, where we have analysed its general behaviour, determined its exact value for several graph families, and proven the NP-hardness of its computation, while providing an algorithm that efficiently handles some particular cases.