Abstract
Let be a connected graph. An ordered set is a resolving set for G if every vertex of G is uniquely determined by its vector of distances to the vertices in W. The metric dimension of G is the minimum cardinality of a resolving set. In this paper, we characterize the graphs of metric dimension by constructing a special distance matrix, called metric matrix. The metric matrix makes it so a class of graph and its twin graph are bijective and the class of graph is obtained from its twin graph, so it provides a basis for the extension of graphs with respect to metric dimension. Further, the metric matrix gives a new idea of the characterization of extremal graphs based on metric dimension.
MSC:
05C12; 05C35; 05C75
1. Introduction
Let be a simple connected graph in this paper. The distance between two vertices , denoted by , is the length of a shortest path between u and v in G. The diameter of G is denoted by and . Let be an ordered set of G, the representation of with respect to W is the vector . We say that W is a resolving set of G if for every pair of distinct vertices . A resolving set of minimum cardinality is called a metric basis of G. The metric dimension of a graph G, denoted by dim, is the cardinality of a metric basis. For , we say that the set resolves S if for every pair of distinct vertices . Moreover, for distinct vertices , if , then we say that w resolves u and v.
The concepts of resolving set of a graph was first introduced by Slater [1] in 1975 and independently by Harary and Melter [2] in 1976. The metric dimension of a graph has been widely studied and a large number of related concepts have been extended (see [3,4,5,6,7,8,9,10,11]). As a parameter of a graph, it has been applied to lots of practical problems, such as robot navigation [12], connected joins in graphs and combinatorial optimization [13], and pharmaceutical chemistry [14].
There have been lots of results about the metric dimension of graphs. Some researchers focus on characterizations of metric dimension of graph families. For instance, the metric dimension of trees, cycles and wheels was considered in [14,15], respectively. Moreover, the metric dimension of some constructions of graphs was given. For example, the metric dimension of cartesian products of graphs and corona product of graphs was obtained in [16,17], respectively, the effect of vertex or edge deletion on the metric dimension of graphs was considered in [18] and the metric dimensions of symmetric graphs obtained by rooted product were given in [19].
In addition, some graphs with a fixed value of metric dimension have been characterized. Let G be a graph on n-vertex. In [14], the following conclusions were given: G has metric dimension 1 if and only if , where denotes a path on n vertices; G has metric dimension if and only if , where denotes a complete graph on n vertices; and all graphs G of metric dimension were characterized (see Lemma 8). In [20,21], all the graphs of metric dimension and are characterized, respectively, where d is the diameter of G. Some other results on metric dimension of a graph are considered in [22,23,24,25].
It is interesting to extend a low-order graph to a high-order graph based on the given rulers. In this paper, we give a novel and effective method on the extension of graphs with respect to metric dimension and characterize the graphs with metric dimension via the method. Hernando et al. [21] gave an idea of using the twin graph (Definition 1) to characterize the graphs with dimension , that is, to determine all the twin graphs of these graphs and extend them to corresponding graphs. We define the metric matrix of a graph (Definition 2) to determine and extend the twin graphs, which is different from that used by Jannesari and Omoomi [20] and Hernando et al. [21]. Since the metric matrix makes that a class of graph and its twin graph are bijective, the method makes the proof concise and readable. In addition, it has certain applicability to some other problems of metric dimension. For instance, it can be used to consider the graphs with dimension and even for . More importantly, it can be used as an effective basis for the extension of graphs with respect to metric dimension.
The remainder of this paper is organized as follows. In Section 2, we give some preliminaries, including definitions, symbols and results used in this paper. In Section 3, we characterize all extremal graphs of dim and diameter 2 by constructing a special distance matrix and discussing the structure of graphs.
2. Preliminaries
Let and denote the order and the subgraph induced by a subset of a graph G, respectively. We say that S is an independent set of G if every pair of vertices in S are nonadjacent in G, and S is a clique of G if every pair of vertices in S are adjacent in G. The neighborhood of is denoted by and . Let . We use deg, to denote the degree of v and the minimum degree of G, respectively, where deg. A pair of vertices are twins in G if or . We say that a subset of vertices is a twin set of G if its vertices are pairwise twins in G, and a maximal twin set is a twin class. Clearly, if is a twin set of a graph G, then it is an independent set or a clique of G. The circumference of a graph G, denoted by , is the length of a longest circle of G.
Definition 1.
The twin graph of a graph G, denoted by , is the subgraph induced by , that is, , where for and are the all distinct twin classes of G.
Definition 2.
For a graph G, let and let be the twin class of G with for , the metric matrix of G is denoted by and
where and .
Let denote in the following sections. Since is an independent set or a clique of G, we have . The metric matrix determines different classes of graphs with the same twin graph.
The graph is obtained from and by adding the edges from every vertex of to every vertex of , which is represented as in Figure 1 in this paper. The union of and is the graph whose vertex set and edge set are and , respectively. The graph is obtained from G by deleting the vertex v. The graph is obtained from G by deleting the edge e. Let be the complement of and let denote a star with vertices.
Figure 1.
.
Unless explicitly noted during the rest of this paper, let be the twin classes of G with , and if , then assume that and .
Lemma 1
([20]). For a graph G, we have .
Lemma 2.
For a graph G, if and are twins in , then at least one of and have cardinality at least 2. Moreover, if , then when and when .
Proof.
Since and are twins in , we have for every . Moreover, by the definition of , we obtain that and are not twins in G, so there is and or such that . Thus, at least one of and have cardinality at least 2. Assume that , that is, . If , then , so , that is, . Otherwise, , then , that is, . □
Corollary 1.
For a graph G, if is a twin set in , then we have that if , then all but one of the sets , ,…, have cardinality at least 2 and induce an empty graph, and if , then all but one of the sets , ,…, have cardinality at least 2 and induce an complete graph.
Lemma 3
([21]). Let W be a metric basis of G and let be a nonempty subset. If S is a twin set of G, then at most one of the vertices in S is not in W and the set resolves the set for each .
Let and D be the twin graph and the metric matrix of G, respectively. Let , , and U be an arbitrary subset of . The matrix is obtained from D by deleting the corresponding rows of all vertices in U and the corresponding columns of all vertices in . We can get that for each , where is the row vectors corresponding to v in . Moreover, each subset of corresponds to a matrix . Let be the set constituting of all matrix . We have the following result.
Lemma 4.
For a graph G, dim if and only if for each the matrix has at most r different row vectors, and there exists a subset such that has exactly r different row vectors.
Proof.
Suppose that W and are a metric basis and a twin class of G, respectively. By Lemma 3, at most one of the vertices in is not in W. Let be a set obtained from W by replacing with v for each vertex , where . Then is a metric basis of G, and we get that and . Moreover, we have that resolves by Lemma 3.
Necessity. Since dim, there are exactly r vertices in not in . Thus the set resolves at most r vertices in for each subset U, which implies that each has at most r different row vectors. Let , then resolves exactly r vertices in . Thus, has exactly r different row vectors.
Sufficiency. Since each has at most r different row vectors, resolves at most r vertices in for each subset , then resolves at most r vertices in . Thus, dim. In addition, since there exists with exactly r different row vectors, resolves at least r vertices in , so dim. Thus, dim. □
Corollary 2.
For a graph G, we have .
Let be the matrix consisting of the , ,⋯, columns of the metric matrix D of G. Let be the number of different row vectors without zero element in .
Corollary 3.
If , then dim.
Lemma 5.
Let G be a graph of dim. If the set T is a twin class of with , then if , and if .
Proof.
Suppose that . Then or . By Corollary 1, assume that for , then we have that , when , and , when for . Let , then resolves the set . Thus, we have . Since by Corollary 2, if , then . If , then there exists . Since , there is such that for all . If , then resolves the set . Otherwise, resolves the set . Therefore, . □
Corollary 4.
For a graph G, if or , then dim.
Lemma 6
([14]). Let G be a graph of order and diameter d, then .
Lemma 7
([14]). Let G be graph of order . Then dim if and only if .
Lemma 8
([14]). Let G be graph of order . Then dim if and only if , , or .
Lemma 9.
Let G be a graph with dim and a metric basis W. Then there exists a set and such that it resolves .
Proof.
Suppose that . Then there is a vertex such that . If for , then resolves . Let , then we are done. Otherwise, assume that , then there is such that . Thus, resolves . Let , then we are done. □
3. Extremal Graphs G of dim
By Lemma 6, if dim, then . Moreover, if , then dim. Thus, dim only if . Since all the graphs of dim were characterized in [21], we only need to consider the graphs of .
In the following, unless noted otherwise, let D, W be the metric matrix and a resolving set of G, respectively. Let and .
Lemma 10.
Let G be a graph of and . Then dim if and only if or or .
Proof.
Suppose that , there are two cases to be considered as follows.
Case 1. . Since and are twins in and , by Lemma 2, we may assume that , then
Since there are at most three different row vectors in D, by Lemma 4, dim if and only if there are exactly three different row vectors in some , which implies that , , or , . Therefore, or .
Case 2. . Since any two vertices in are twins in , by Corollary 1, we may assume that , then
Since there are at most three different row vectors in D and , by Lemma 4, dim if and only if , which implies that . □
Lemma 11.
Let G be a graph of and . Then dim if and only if G is one of the graphs in Figure 2, where a small circle denotes (similarly in the following figures).
Figure 2.
All graphs of , and dim.
Proof.
Let . There are the following cases to be considered depending on the circumference of .
Case 1. is acyclic. In such a case, . There is no graph G with dim by Corollary 4.
Case 2. . Let , we may assume that . Since and are twins in and , by Lemma 2, we may assume that , then
By Corollary 3, we obtain that and ; if not, or , which contradicts dim. If , then and ; otherwise, or . By Lemma 4, dim when , , ; or , , . Thus dim if and only if , , , , or , , , , which implies that G is the graph g.1 or g.2 in Figure 2.
Case 3. . Let is a longest circle of .
Case 3.1. . Since the pairs of vertices and are twins in , respectively, we may suppose that by Lemma 2, then
By Corollary 3, we have that ; if not, or = 4. Since dim when by Lemma 4, dim if and only if and , which implies that G is the graph g.3 in Figure 2.
Case 3.2. . Since the pairs of vertices and are twins in , respectively, we may assume that , by Lemma 2, then
By Corollary 3, and ; if not, or . Since dim when , by Lemma 4, dim if and only of , , and , which implies that G is the graph g.4 in Figure 2.
Case 3.3. . There is no graph G with dim by Corollary 4. □
Lemma 12.
Let G be a graph of and . Then dim if and only if G is or one of graphs in Figure 3.
Figure 3.
All graphs of , and dim.
Proof.
Let . There are the following cases to be considered depending on the circumference of .
Case 1. is acyclic. In such a case, . There is no graph G with dim by Corollary 4.
Case 2. . Let be a longest circle of , then is isomorphic to the graph (a) or (b) in Figure 4. Since the pairs of vertices and are twins in , respectively, we may assume that and , then, for graph (a), resolves , and for graph (b), resolves , a contradiction.
Figure 4.
Graphs of , and . For a, and are nonadjacent; for b, and are adjacent.
Case 3. . Let be a longest circle of . Then is nonadjacent to two adjacent vertices of ; otherwise, .
Case 3.1. The vertex is exactly adjacent to one vertex of . Then is isomorphic to the graph (a) or (b) in Figure 5.
Figure 5.
Vertex is exactly adjacent to one vertex of . For a, and are nonadjacent; for b, and are adjacent.
For Figure 5a, since and are twins in , we may assume that , then
By Corollary 3, we have that , and . Otherwise, if , then ; if , then ; and if or , then , which is a contradiction. Since dim when , and by Lemma 4, dim if and only if G is the graph g.1 in Figure 3.
For Figure 5b, since is a twin set of , by Lemma 5, dim. Thus, there is no G with dim.
Case 3.2. The vertex is exactly adjacent to two vertices of . Then if and only if is isomorphic to the graph (a) or (b) in Figure 6. Since is a twin set of , dim by Lemma 5.
Figure 6.
Vertex is exactly adjacent to two vertices of . For a, and are nonadjacent; for b, and are adjacent.
Case 4. . Let be a longest circle in . Since , we consider the five subcases as follows.
Case 4.1. . We obtain that , then
By Corollary 3, . Otherwise, if , then ; and if , then . By the symmetry of , . Since dim, dim if and only if .
Case 4.2. . We obtain that if and only if is isomorphic to Figure 7, then
Figure 7.
Graph G of , and .
By Corollary 3, we have that and . Otherwise, if or , then ; if , then ; if , then . By the symmetry of , we get that and . Since dim when and by Lemma 4, dim if and only if G is the graph g.2 in Figure 3.
Case 4.3. . We obtain that if and only if is isomorphic to the graph (a) or (b) in Figure 8.
Figure 8.
Graphs of , and . For a, there are two edges without common vertices in ; for b, there are two edges with a common vertex in .
For Figure 8a, since the pairs of vertices and are twins in , respectively, we may assume that and , then resolves , which is a contradiction.
For Figure 8b, since
by Corollary 3, . Otherwise, if or , then or . By the symmetry of , we get that .
If , then or 1. Assume , then , if not, . In this case, by Lemma 4. Now we assume that . By the symmetry of , we may assume that ; if not, it is the same as . By Lemma 4, we have that .
If , then for . Otherwise, if , then ; if , then ; if , then ; and if , then .
Thus, we have that dim when , , , , , or , , which implies that dim if and only if G is one of the graphs g.3, g.4 and g.5 in Figure 3.
Case 4.4. . We obtain that if and only if is isomorphic to the graph (a) or (b) in Figure 9.
Figure 9.
Graphs of , and . For a, and are adjacent; for b, and are adjacent.
For Figure 9a, since the pairs of vertices and are twins in , respectively, we may assume that , then resolves , which contradicts dim.
For Figure 9b, the pairs of vertices and are twins in , respectively, we may assume that , then
By Corollary 3, we obtain that and . Otherwise, if , then , by the symmetry of , ; and if , then . By Lemma 4, we get that dim when , , , which implies that G is the graph g.6 in Figure 3.
Case 4.5. . We obtain that is isomorphic to or . By Lemma 5 and Corollary 4, there is no graph G with dim. □
Lemma 13.
Let G be a graph with and dim. If , then .
Proof.
Since , there are no twins in G. Let . We consider the both cases and .
Case 1. . By Lemma 9, we may assume that resolves . Since dim, .
Case 1.1. . We may assume that and . Since there are no twins in G, there exists such that . Then ; if not, resolves or . Similarly, . Thus resolves , which contradicts dim.
Case 1.2. . We may assume that . Since there are no twins in G, there exists such that x resolves two vertices in . Assume that , then ; if not, resolves , which is a contradiction. Thus resolves both and , it becomes case 1.1.
Case 2. . We first prove that . Assume for a contradiction that deg. We may assume that . Since , . Since and are not twins, we may assume that . Similarly, assume that , , and . In such a case, , otherwise and are twins. Thus, is a resolving set of G, then dim, which is a contradiction.
Now we construct G. Let be a shortest path of length 2 of G. Since and are not twins, we may assume that and . There are two subcases to be considered as follows.
Case 2.1. . Since and are not twins, we may assume that and . There are four subcases to be considered by the adjacency relationship between and , as fallows.
Case 2.1.1. , . We obtain that the metric matrix of is
The distance from to and is denoted by . For dim, by Corollary 3, any one of , , , , and does not hold. Hence there is at least one of and adjacent to . If , then , and , which implies that and are twins. If , then , . If then and are twins; and if , then and are twins. Therefore, there is no graph G with dim.
Case 2.1.2. , . Since and are not twins, . We may assume that , . Since , deg, and we get that . Then is a resolving set of G. Thus dim, which is a contradiction.
Case 2.1.3. . The metric matrix of is
By Corollary 3, we obtain that any one of , , and does not holds. Hence there is at least one of and adjacent to . Assume that , which implies that . For , if , then , which implies that and are twins, therefore . For and , if , , then and are twins; if , then and are twins; if , , then is a resolving set of G, and if , then . Thus, there is no graph G with dim.
Case 2.1.4. . Since , . Then is a resolving set of G, which contradicts dim.
Case 2.2. . Since , we may assume that . There are three subcases to be considered as follows.
Case 2.2.1. , or , . Then the graph is isomorphic to that of case 2.1.1.
Case 2.2.2. . Then the graph is isomorphic to that of case 2.1.3.
Case 2.2.3. . Since there are no twins in G and , must be adjacent to two adjacent vertices. Assume that , then is a resolving set of G, which contradicts dim.
Thus, there is no graph G with dim and we are done. □
Lemma 14.
Let G be a graph with and dim, then .
Proof.
Suppose instead that G is a graph with , dim and . Now we prove that dim. Since dim, dim by Lemma 1. If dim, then by Lemma 7, we have . By Corollary 4, we get that dim, which is a contradiction. If dim, then or or by Lemma 8. Since , , which contradicts dim by Lemma 5. Thus, dim.
For , by Lemma 13, there exist twins in . Assume that , are twins in and , then resolves and by Lemma 2. Moreover, by Lemma 5, the size of every twin set of is no more than 2. Thus, for each and , , and v are not twins. Let be a metric basis of and . By Lemma 8, there exists such that resolves . Since and are twins in , there is at most one of and in . Similarly, there is at most one of and in .
Then we prove that one of and is in and the other is in . Assume that , then . If , then . We may assume that , then resolves , which is a contradiction. Otherwise, we may assume that , then resolves and . Without loss of generality suppose that for . Since the pairs , and , are not twins in , then resolves , the argument is similar to that of the case 1.1 of Lemma 13, which is a contradiction. Thus, there is one of and in . We may assume that , then ; otherwise, resolves , which is a contradiction.
Thus, we have that at most two pairs of vertices are twins in and dim. Moreover, for , if and are twins in , it easy to see that they are twins in . Thus, there is at most one pair of vertices that are twins in . By Lemma 8, or or . Since , . Thus, , there are at most two pairs of vertices are twins in , which is a contradiction. Therefore, the assumption does not hold and we are done. □
Theorem 1.
Proof.
It holds by Lemmas 10, 11, 12 and 14. □
Remark 1.
This method can help us to address the extension problem of a given graph with respect to metric dimension. It is theoretically realized the characterization of extremal graphs with dim for any . In addition, we also find that the problem will become more and more difficult with the increase of r based on the proof of the case .
4. Conclusions
In this paper, by constructing the metric matrix of G, we make a necessary and sufficient condition of dim and characterize the graphs of dim = via this condition. Moreover, we give a new idea for the extension of graphs based on metric dimension.
Author Contributions
J.W. designed the problem and wrote the paper. L.M. and Y.L. validate the results.
Funding
This research was funded by National Natural Science Foundation of China grant number 11771443 and Shandong Province Natural Science Foundation grant number ZR2017QF011.
Acknowledgments
The authors would like to thank the referees for careful reading of the manuscript and for valuable comments and thoughtful suggestions.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Slater, P.J. Leaves of trees. Congr. Numer. 1975, 14, 549–559. [Google Scholar]
- Harary, F.; Melter, R.A. On the metric dimension of a graph. Ars Combin. 1976, 2, 191–195. [Google Scholar]
- Liu, J.B.; Kashif, A.; Rashid, T.; Javaid, M. Fractional metric dimension of generalized jahangir graph. Mathematics 2019, 7, 100. [Google Scholar] [CrossRef]
- Barrágan-Ramírez, G.A.; Rodríguez-Velázquez, J.A. The local metric dimension of strong product graphs. Graphs Combin. 2016, 32, 1263–1278. [Google Scholar] [CrossRef]
- DasGupta, B.; Mobasheri, N. On optimal approximability results for computing the strong metric dimension. Discrete Appl. Math. 2017, 221, 18–24. [Google Scholar] [CrossRef]
- Estrada-Moreno, A.; Yero, I.G.; Rodríguez-Velázquez, J.A. The k-metric dimension of the lexicographic product of graphs. Discrete Math. 2016, 339, 1924–1934. [Google Scholar] [CrossRef]
- Liu, J.B.; Zahid, Z.; Nasir, R.; Nazeer, W. Edge version of metric dimension and doubly resolving sets of the necklace graph. Mathematics 2018, 6, 243. [Google Scholar] [CrossRef]
- Kelenc, A.; Kuziak, D.; Taranenko, A.; Yero, I.G. Mixed metric dimension of graphs. Appl. Math. Comput. 2017, 314, 429–438. [Google Scholar]
- Ma, X.; Feng, M.; Wang, K. The strong metric dimension of the power graph of a finite group. Discrete Appl. Math. 2018, 239, 159–164. [Google Scholar] [CrossRef]
- Ramírez-Cruz, Y.; Estrada-Moreno, A.; Rodríguez-Velázquez, J.A. The simultaneous metric dimension of families composed by lexicographic product graphs. Graphs Combin. 2016, 32, 2093–2120. [Google Scholar] [CrossRef]
- Raza, H.; Hayat, S.; Imran, M.; Pan, X. Fault-tolerant resolvability and extremal structures of graphs. Mathematics 2019, 7, 78. [Google Scholar] [CrossRef]
- Khuller, S.; Raghavachari, B.; Rosenfeld, A. Landmarks in graphs. Discrete Appl. Math. 1996, 70, 217–229. [Google Scholar] [CrossRef]
- Sebő, A.; Tannier, E. On metric generators of graphs. Math. Oper. Res. 2004, 29, 383–393. [Google Scholar] [CrossRef]
- Chartrand, G.; Eroh, L.; Johnson, M.A.; Oellermannn, O.R. Resolvability in graphs and the metric dimension of a graph. Discrete Appl. Math. 2000, 105, 99–113. [Google Scholar] [CrossRef]
- Shanmukha, B.; Sooryanarayana, B.; Harinath, K.S. Metric dimension of wheels. Far East J. Appl. Math. 2002, 8, 217–229. [Google Scholar]
- Cáceres, J.; Hernando, C.; Mora, M.; Pelayo, I.M.; Puertas, M.L.; Seara, C.; Wood, D.R. On the metric dimension of cartesian products of graphs. SIAM J. Discrete Math. 2007, 21, 423–441. [Google Scholar] [CrossRef]
- Yero, I.G.; Kuziak, D.; Rodríguez-Velázquez, J.A. On the metric dimension of corona product graphs. Comput. Math. Appl. 2011, 61, 2793–2798. [Google Scholar] [CrossRef]
- Eroh, L.; Feit, P.; Kang, C.X.; Yi, E. The effect of vertex or edge deletion on the metric dimension of graphs. J. Combin. 2015, 6, 433–444. [Google Scholar] [CrossRef]
- Imran, S.; Siddiqui, M.K.; Imran, M.; Hussain, M. On metric dimensions of symmetric graphs obtained by rooted product. Mathematics 2018, 6, 191. [Google Scholar] [CrossRef]
- Jannesari, M.; Omoomi, B. Characterization of n-vertex graphs with metric dimension n-3. Math. Bohem. 2014, 139, 1–23. [Google Scholar]
- Hernando, C.; Mora, M.; Pelayo, I.M.; Seara, C.; Wood, D.R. Extremal graph theory for metric dimension and diameter. Electron. J. Combin. 2010, 17, 30. [Google Scholar] [CrossRef]
- Chartrand, G.; Poisson, C.; Zhang, P. Resolvability and the upper dimension of graphs. Comput. Math. Appl. 2000, 39, 19–28. [Google Scholar] [CrossRef]
- Garijo, D.; González, A.; Márquez, A. On the metric dimension, the upper dimension and the resolving number of graphs. Discrete Appl. Math. 2013, 161, 1440–1447. [Google Scholar] [CrossRef]
- Imran, M.; Bokhary, S.A.H.; Ahmad, A.; Semaničová-Feňovčiková, A. On classes of regular graphs with constant metric dimension. Acta Math. Sci. 2013, 33, 187–206. [Google Scholar] [CrossRef]
- Laihonen, T. The metric dimension for resolving several objects. Inf. Process. Lett. 2016, 116, 694–700. [Google Scholar] [CrossRef]
© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).