Resolvability in Graphs and The Metric Dimension of A Graph
Resolvability in Graphs and The Metric Dimension of A Graph
Resolvability in Graphs and The Metric Dimension of A Graph
View metadata, citation and similar papers at core.ac.uk brought to you by CORE
provided by Elsevier - Publisher Connector
Resolvability in graphs and the metric dimension of a
graph
Gary Chartranda , Linda Eroha , Mark A. Johnsonb ,
Ortrud R. Oellermannc;∗;1
a Western
Michigan University, Kalamazoo, MI, 49008, USA
b Pharmacia
& Upjohn, Kalamazoo, MI, USA
c Department of Mathematics and Statistics, University of Winnipeg, 515 Portage Avenue, Winnipeg,
Abstract
For an ordered subset W = {w1 ; w2 ; : : : ; wk } of vertices in a connected graph G and a vertex
v of G, the metric representation of v with respect to W is the k-vector r(v | W ) = (d(v; w1 ),
d(v; w2 ); : : : ; d(v; wk )). The set W is a resolving set for G if r(u | W ) = r(v | W ) implies that
u = v for all pairs u; v of vertices of G. The metric dimension dim(G) of G is the minimum
cardinality of a resolving set for G. Bounds on dim(G) are presented in terms of the order
and the diameter of G. All connected graphs of order n having dimension 1; n − 2, or n − 1
are determined. A new proof for the dimension of a tree is also presented. From this result
sharp bounds on the metric dimension of unicyclic graphs are established. It is shown that
dim(H )6dim(H × K2 )6dim(H ) + 1 for every connected graph H . Moreover, it is shown
that for every positive real number , there exists a connected graph G and a connected induced
subgraph H of G such that dim(G)=dim(H ) ¡ . ? 2000 Elsevier Science B.V. All rights
reserved.
1. Introduction
0166-218X/00/$ - see front matter ? 2000 Elsevier Science B.V. All rights reserved.
PII: S 0 1 6 6 - 2 1 8 X ( 0 0 ) 0 0 1 9 8 - 0
100 G. Chartrand et al. / Discrete Applied Mathematics 105 (2000) 99–113
The ideas discussed in Section 1 suggest some mathematical concepts, which we now
describe. We denote the standard distance between two vertices u and v in a connected
graph G by d(u; v). By an ordered set of vertices, we mean a set W = {w1 ; w2 ; : : : ; wk }
on which the ordering (w1 ; w2 ; : : : ; wk ) has been imposed. For an ordered subset W =
{w1 ; w2 ; : : : ; wk } of V (G), we refer to the k-vector (ordered k-tuple)
r(v | W ) = (d(v; w1 ); d(v; w2 ); : : : ; d(v; wk ))
as the (metric) representation of v with respect to W. The set W is called a resolving
set for G if r(u | W ) = r(v | W ) implies that u = v for all u, v ∈ V (G). Hence if W
is a resolving set of cardinality k for a graph G of order n, then the set {r(v | W ) | v
∈ V (G)} consists of n distinct k-vectors. A resolving set of minimum cardinality for
a graph G is called a minimum resolving set.
For example, consider the graph G of Fig. 1. The set W1 = {v1 ; v3 } is not a resolving
set for G since r(v2 | W1 ) = (1; 1) = r(v4 | W1 ). On the other hand, W2 = {v1 ; v2 ; v3 } is a
G. Chartrand et al. / Discrete Applied Mathematics 105 (2000) 99–113 101
Fig. 1.
resolving set for G since the representations for the vertices of G with respect to W2
are
r(v1 | W2 ) = (0; 1; 1); r(v2 | W2 ) = (1; 0; 1); r(v3 | W2 ) = (1; 1; 0):
r(v4 | W2 ) = (1; 2; 1); r(v5 | W2 ) = (2; 1; 1);
However, W2 is not a minimum resolving set since W3 = {v1 ; v2 } is also a resolving
set. Since no single vertex constitutes a resolving set for G, it follows that W3 is a
minimum resolving set.
We now return to our discussion of the classication problem in chemistry. A fun-
damental problem in the study of chemical structures is to determine ways to represent
a set of chemical compounds such that distinct compounds have distinct representa-
tions. One way to accomplish this is rst to associate a graph with each compound
(which can be done quite naturally) and dene an integer-valued metric on the set of
corresponding graphs such that the distance between some pairs of graphs is 1. Next
a metagraph G is constructed whose vertices are these graphs, where two vertices are
adjacent in G if and only if the distance between their corresponding graphs is 1. Then
the representations of the vertices of G are computed with respect to some minimum
resolving set of G, thereby providing representations of the compounds as well.
The idea of resolving sets and minimum resolving sets has appeared in the literature
previously. In [4] and later in [5], Slater introduced the concept of a resolving set for
a connected graph G under the term locating set. He referred to a minimum resolving
set as a reference set for G. He called the cardinality of a minimum resolving set
(reference set) the location number of G. Slater described the usefulness of these
ideas when working with sonar and loran stations. Independently, Harary and Melter
[2] discovered these concepts as well but used the term metric dimension, rather than
location number. We adopt the terminology of Harary and Melter. Consequently, the
metric dimension or, more simply, the dimension dim(G) of a connected graph G
is the cardinality of a minimum resolving set. Because of the suggestiveness of this
terminology to linear algebra, we also refer to a minimum resolving set as a basis
for G. Hence, the vertices of G have distinct representations with respect to the basis
vertices. For the graph G of Fig. 1, dim(G) = 2 and {v1 ; v2 } is a basis for G. It was
noted in [1, p. 204] that determining the metric dimension of a graph is an NP-complete
problem.
We next describe the problem of nding the metric dimension and a basis for a
graph in terms of an integer programming problem. Let G be a connected graph of
102 G. Chartrand et al. / Discrete Applied Mathematics 105 (2000) 99–113
order n with V (G) = {v1 ; v2 ; : : : ; vn } and let D = [dij ] be the distance matrix of G, that
is, dij = d(vi ; vj ) for 16i; j6n. For xi ∈ {0; 1} for 16i6n, dene the function F by
F(x1 ; x2 ; : : : ; x n ) = x1 + x2 + · · · + x n :
Minimizing F subject to the n2 constraints
|di1 –dj1 |x1 + |di2 –dj2 |x2 + · · · + |din –djn |x n ¿ 0 for 16i ¡ j6n
is equivalent to nding a basis in the sense that if x10 ; x20 ; : : : ; xn0 is a set of values for
which F attains its minimum, then W = {vi | xi0 = 1} is a basis for G, and, conversely,
if W = {vi1 ; vi2 ; : : : ; vin } is a basis for G and if we dene
0 1 if s = ij for some j (16j6k)
xs =
0 otherwise
then F(x10 ; x20 ; : : : ; xn0 ) is a minimum subject to the given constraints.
Notice, for each connected graph G and each ordered set W = {w1 ; w2 ; : : : ; wk } of
vertices of G, that the ith coordinate of r(wi | W ) is 0 and that the ith coordinate of
all other vertex representations is positive. Thus, certainly r(u | W ) = r(v | W ) implies
that u = v for u ∈ W . Therefore, when testing whether an ordered subset W of V (G)
is a resolving set for G, we need only be concerned with the vertices of V (G) − W .
Consequently, V (G) and V (G) − {v} are resolving sets for every nontrivial connected
graph G and every vertex v of G. As a result, if G is a connected graph of order n¿2,
then 16dim(G)6n − 1. On the other hand, if we know the diameter of G, then we
can obtain an improved upper bound in general for dim(G), as well as a lower bound.
For positive integers d and n, we dene f(n; d) to be the least positive integer k for
which k + dk ¿n.
Proof. First, we establish the upper bound. Let u and v be vertices of G for which
d(u; v) = d, and let u = v0 ; v1 ; : : : ; vd = v be a u–v path of length d. Let W = V (G)
− {v1 ; v2 ; : : : ; vd }. Since d(u; vi ) = i for 16i6d and u ∈ W , it follows that W is a
resolving set of cardinality n − d for G. Thus, dim(G)6n − d.
Next, we consider the lower bound. Let B be a basis for G of dimension k. Since
each representation of a vertex of V (G) − B is a k-vector, every coordinate of which is
a positive integer not exceeding d, and all n − k representations are distinct, it follows
that dk ¿n − k. Hence, f(n; d)6k = dim(G).
The inequality given in the upper bound of Theorem 1 can be strict. For example,
the tree T1 of Fig. 2 has order n = 8 and diameter d = 4, but B1 = {v1 ; v8 } is a basis
for T1 and so dim(T1 ) = 2 and n − d = 4. On the other hand, the tree T2 of Fig. 2
shows that the upper bound in Theorem 1 can be sharp since T2 also has order n = 8
and diameter d = 4, while B2 = {w1 ; w6 ; w7 ; w8 } is a basis and so dim(T2 ) = 4.
G. Chartrand et al. / Discrete Applied Mathematics 105 (2000) 99–113 103
Fig. 2.
Fig. 3.
The lower bound in Theorem 1 can be attained for graphs of diameter 2 or 3. For
example, the graph G1 of Fig. 3 has order 6, diameter 2, and dimension f(6; 2) = 2.
Also, the graph G2 of Fig. 3 has order 11, diameter 3, and dimension f(11; 3) = 2.
The vertices of both graphs in Fig. 3 are lableled with their representations.
On the other hand, if d = dim(G)¿4 and dim(G)¿2, then the lower bound given
in Theorem 1 cannot be sharp. To see this, suppose, to the contrary, that there ex-
ists a graph G of order n, diameter d, and dim(G) = k such that k + dk = n. Let
W be a basis for G. Then all k-tuples of positive integers not exceeding d must ap-
pear as a representation of some vertex of G with respect to W . However, since the
k-vector (1; 1; : : :) appears, it follows that d(w1 ; w2 )62. For some vertex v of G; r(v | W )
= (1; 4; : : :). Thus, d(v; w1 ) = 1, but
d(v; w2 ) = 4 ¿ 1 + 2¿d(v; w1 ) + d(w1 ; w2 );
which is impossible; so no such graph exists.
If G = Pn , then by Theorem 1, dim(G) = 1 and either end-vertex of G constitutes a
basis. Indeed, as we next show, paths are the only graphs of dimension 1.
Proof. We have already noted that if G=Pn , then dim(G)=1. For the converse, assume
that G is a connected graph with dim(G) = 1 and basis W = {w}. For each vertex v of
G; r(v | W ) = d(v; w) is a nonnegative integer less than n. Since the representations of
the vertices of G with respect to W are distinct, there exists a vertex u of G such that
d(u; w) = n − 1. Consequently, the diameter of G is n − 1, which implies that G = Pn .
104 G. Chartrand et al. / Discrete Applied Mathematics 105 (2000) 99–113
On the other hand, consider G=Kn ; n¿2, and let W be a basis for G. If u 6∈ W , then
every coordinate of r(u | W ) is 1. Therefore, every resolving set for G must contain
all but one vertex of G, so dim(Kn ) = n − 1. By Theorem 1, if G is a connected graph
that is not complete, then dim(G)6n − 2. Hence, we have the following result.
Proof. Each of the graphs mentioned in the statement of the theorem has dimension
n−2. To see this, note that if the vertices of a graph are partitioned as V1 ∪V2 ∪· · ·∪Vp
where either Vi is independent and its vertices have identical open neighborhoods or
Vi induces a clique and its vertices have identical closed neighborhoods, then the
dimension is at least ( | V1 | − 1) + ( | V2 | − 1) + · · · + ( | Vp | − 1).
For the converse, assume that G is a connected graph of order n¿4 such that
dim(G) = n − 2. By Theorems 1 and 3, it follows that G has diameter 2. If G is
bipartite, then since the diameter of G is 2, G = Ks; t for some integers s; t¿1. Hence,
we may assume that G is not bipartite. Therefore, G contains an odd cycle. Let Cr
be a smallest odd cycle in G. We claim that r = 3. Certainly, Cr is an induced cycle
of G. If G contains an induced k-cycle v1 ; v2 ; : : : ; vk ; v1 , where k¿5, then W = V (G)
− {v2 ; v3 ; v4 } is a resolving set of cardinality n − 3, for if we let w1 = v1 and w2 = v5 ,
then r(v2 | W ) = (1; s; : : :); r(v3 | W ) = (2; 2; : : :), and r(v4 | W ) = (t; 1; : : :) where s; t¿2.
Hence, dim(G)6n − 3, which is a contradiction. Thus G has no induced cycle of
length k ¿ 5 and so r = 3 and G contains a triangle.
Let Y be the vertex set of a maximum clique of G. Since G contains a triangle,
| Y | ¿3. Let U = V (G) − Y . Since G is not complete, | U | ¿1. If | U | = 1, then
G = Ks + (K1 ∪ Kt ) for some integers s and t. Now, s¿1 since G is connected and
t¿1 since G is not complete. From these observations, we may assume that | U | ¿2.
First, we show that U is an independent set of vertices. Suppose, to the contrary,
that U is not independent. Then U contains two adjacent vertices u and w. Because
of the dening property of Y , there exist v ∈ Y such that uv 6∈ E(G) and v0 ∈ Y such
that wv0 6∈ E(G), where v and v0 are not necessarily distinct. We consider two cases.
G. Chartrand et al. / Discrete Applied Mathematics 105 (2000) 99–113 105
Fig. 4.
Fig. 5.
Case 1: There exists a vertex v ∈ Y such that uv; wv 6∈ E(G). We now consider
two subcases.
Subcase 1.1: There exists a vertex x ∈ Y that is adjacent to exactly one of u and
w, say u. Since | Y | ¿3, there exists a vertex y ∈ Y that is distinct from v and x.
Thus G contains the subgraph shown in Fig. 4, where dotted lines indicate that the
given edge is not present.
Let W = V (G) − {u; w; y}. Letting w1 = v and w2 = x, we have
r(u | W ) = (2; 1; : : :);
Fig. 6.
Fig. 7.
Fig. 8.
The following lemma which holds for general graphs will be used in the proofs of
the next two theorems.
Proof. Let W be any resolving set and let v be an exterior major vertex of G. Let
k = ter(v) and let u1 ; u2 ; : : : ; uk denote the terminal vertices of v. Thus the branch of G
at v containing ui (16i6k) is a v–ui path Qi . We claim that W contains at least one
vertex from each of the paths Qi –v (16i6k) with at most one exception. Suppose, to
the contrary, that two of these paths contain no vertex of W , say Q1 –v and Q2 –v. Let
u10 and u20 be the vertices adjacent to v on Q1 and Q2 , respectively. Since neither Q1 –v
nor Q2 –v contains a vertex of W , it follows that r(u10 | W ) = r(u20 | W ); contradicting
the fact that W is a resolving set. Thus, as claimed, W contains at least one vertex
from each of the paths Qi –v (16i6k) with at most one exception. Consequently,
dim(G)¿(G) − ex(G).
Case 2: Suppose, for every exterior major vertex w of T and every terminal vertex
x of w, that u does not lie on the w–x path of T. Then there are at least two branches
at u, say B and B0 , each of which contains some exterior major vertex of terminal
degree at least 2. Therefore, each of B and B0 contains a vertex of W . Let z and
z 0 be vertices of W in B and B0 , respectively. Let v be a vertex of T distinct from
u. If v belongs to B, then the v–z 0 path of T contains u; so d(u; z 0 ) ¡ d(v; z 0 ) and
r(u | W ) 6= r(v | W ). If v does not belong to B, then the v–z path of T contains u.
Hence d(u; z) ¡ d(v; z) and so r(u | W ) 6= r(v | W ):
Hence W is a resolving set of T and dim(T )6|W | = (T ) − ex(T ):
By Lemma 1, dim(T + e)¿(T + e) − ex(T + e). From this it follows that dim(T + e)
¿dim(T ) − 2:
It remains to show then that dim(T + e)6dim(T ) + 1: Let W be a set of vertices
of T + e that contains for each exterior major vertex v of T + e, all terminal vertices v
with one exception. Let C denote the unique cycle of T + e. We consider four cases.
Case 1: C contains at least three major vertices, each of which has a branch
containing a vertex of W. In this case W is a resolving set for T +e and so dim(T +e)
6|W |6dim(T ):
Case 2: C contains exactly two major vertices v and w, each of which has a branch
containing a vertex of W. Let u be a vertex of C distinct from v and w. In this case,
W ∪ {u} is a resolving set for T + e; so dim(T + e)6|W | + 16dim(T ) + 1.
Case 3: C contains exactly one major vertex v that has a branch containing a
vertex of W. Let H be the branch of T + e that contains C. Except possibly for v,
every vertex of H has degree at least 3 in T + e. Since at least one vertex of H
has terminal degree in T one greater than its terminal degree in T + e; it follows that
(T ) − ex(T ) = |W | + 1: Let W 0 denote the set obtained by adding to W two vertices
of C that are distinct from v. Then W 0 is a resolving set for T + e and
In this section we show, for each connected graph H , that the dimension of the
cartesian product H × K2 is either dim(H ) or dim(H ) + 1; where the cartesian product
of two graphs G and H is dened as the graph with vertex set V (G) × V (H ) and edge
set {(u; v)(x; y) | u = x and vy ∈ E(H ) or v = y and ux ∈ E(G)}.
Proof. First, we establish the upper bound. Let G = H × K2 where H1 and H2 are
the two copies of H in G. Let W be a basis for H and let W1 = {w1 ; w2 ; : : : ; wk } and
W2 = {u1 ; u2 ; : : : ; uk } be the bases of H1 and H2 , respectively, corresponding to W . We
claim that U = W1 ∪ {u1 } is a resolving set for G.
Let x and y be vertices of G such that r(x | U ) = r(y | U ). We show that x = y. This
is certainly the case if x or y belongs to U . Thus we may assume that x; y 6∈ U . We
consider three cases.
Case 1: Both x and y belong to H1 . Then dG (x; wi ) = dH1 (x; wi ) and dG (y; wi )
= dH1 (y; wi ) for i = 1; 2; : : : ; k. Suppose that x 6= y. Since W is a resolving set
G. Chartrand et al. / Discrete Applied Mathematics 105 (2000) 99–113 111
for H1 , it follows that dH1 (x; wi ) 6= dH1 (y; wi ) for some i (16i6k): Hence, dG (x; wi ) 6=
dG (y; wi ); which contradicts the fact that r(x | U ) = r(y | U ). Therefore, x = y.
Case 2: Either x ∈ V (H1 ) and y ∈ V (H2 ); or x ∈ V (H2 ) and y ∈ V (H1 ), say
the former. In this case, dG (x; u1 ) = dG (x; w1 ) + 1 and dG (y; u1 ) = dG (y; w1 ) − 1.
Thus, either dG (x; u1 ) 6= dG (y; u1 ) or dG (x; w1 ) 6= dG (y; w1 ), contradicting the fact that
r(x | U ) = r(y | U ): Thus x = y:
Case 3: Both x and y belong to H2 . First, suppose that at least one of x and y
belongs to W , say x ∈ W: Then x = ui for some i (16i6k); so dG (x; wi ) = 1: Since
r(x | U )=r(y | U ); it follows that dG (y; wi )=1. However, the only vertex in H2 adjacent
to wi is ui ; so y = ui = x:
For x; y 6∈ U , let x0 and y0 be the vertices in H1 corresponding to x and y, respec-
tively. As in Case 1, if x0 6= y0 , then dG (x0 ; wi ) 6= dG (y0 ; wi ) for some i (16i6k).
Now, dG (x; wi )=dG (x0 ; wi )+1 and dG (y; wi )=dG (y0 ; wi )+1; so dG (x0 ; wi )=dG (y0 ; wi ),
which implies that x0 = y0 and, consequently, that x = y.
Now, we establish the lower bound stated in the theorem. Again, let G = H × K2 ,
where H1 and H2 are the two copies of H in G. Let Vi be the vertex set of Hi for
i=1; 2: Thus V (G)=V1 ∪V2 . Let W be a basis for G, with W1 =W ∩V1 and W2 =W ∩V2 .
Let U1 ⊆ V (H1 ) be the union of W1 and the set W20 consisting of those vertices of V1
corresponding to W2 . Thus,
|U1 | = |W1 ∪ W20 |6|W1 | + |W20 | = |W |:
We claim that U1 is a resolving set for H1 .
Let u and v be distinct vertices of H1 . We show that r(u | U1 ) 6= r(v | U1 ). If either
u or v belongs to W1 , then this is certainly the case. Otherwise, there exists a vertex
w ∈ W such that dG (u; w) 6= dG (v; w). If w ∈ V1 , then dH1 (u; w) = dG (u; w) 6=
dG (v; w) = dH1 (v; w). If w ∈ V2 , then let w0 be the vertex of U1 corresponding to w. So
dH1 (u; w0 )=dG (u; w)−1 6= dG (v; w)−1=dH1 (v; w0 ). In either case, r(u | U1 ) 6= r(v | U1 ):
Fig. 9.
the 2n+1 edges xvi and x0 vi0 for 16i62n . Next we add two sets W = {w1 ; w2 ; : : : ; wn }
and W 0 ={w10 ; w20 ; : : : ; wn0 } of vertices, together with the edges wi x and wi0 x0 for 16i6n.
Finally we add edges between W and {v1 ; v2 ; : : : ; v2n } so that each of the 2n possible
n-tuples of 1’s and 2’s appears exactly once as r(vi | W ) for 16i62n . Similarly, edges
are added between W 0 and {v10 ; v20 ; : : : ; v20 n } so that the representations r(vi0 | W 0 ) are
distinct for 16i62n . Denote the resulting graph by G. The graph G for n = 3 is
shown in Fig. 9.
We claim that W ∪ W 0 is a resolving set for G. By construction, r(vi | W ∪ W 0 )
= r(vj | W ∪ W 0 ) implies that i = j, and r(vi0 | W ∪ W 0 ) = r(vj0 | W ∪ W 0 ) implies that
i = j. Observe that
r(x | W ∪ W 0 ) = (1; 1; : : : ; 1; 4; 4; : : : ; 4);
r(vi | W ∪ W 0 ) = (−; −; : : : ; −; 3; 3; : : : ; 3); 16i62n ;
r(v0 | W ∪ W 0 ) = (2; 2; : : : ; 2; 2; 2; : : : ; 2);
r(vi0 | W ∪ W 0 ) = (3; 3; : : : ; 3; −; −; : : : ; −); 16i62n ;
r(x0 | W ∪ W 0 ) = (4; 4; : : : ; 4; 1; 1; : : : ; 1):
References
[1] M.R. Garey, D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness,
Freeman, New York, 1979.
[2] F. Harary, R.A. Melter, On the metric dimension of a graph, Ars Combin. 2 (1976) 191–195.
[3] C. Poisson, P. Zhang, The dimension of unicyclic graphs, J. Combin. Math. Combin. Comput., accepted.
[4] P.J. Slater, Leaves of trees, Congr. Numer. 14 (1975) 549–559.
[5] P.J. Slater, Dominating and reference sets in a graph, J. Math. Phys. Sci. 22 (1988) 445–455.