Abstract
The local metric basis and local metric generator can play a significant role in deciding optimal locations for many facilities like hospitals, fire stations, medical labs, and grocery stores. The local metric basis generates codes in terms of distance for each node of the graph in such a way that no two adjacent nodes have the same code, which allows for the optimal allocation of resources. In the current manuscript, the local metric basis (LMB) for three families of graphs, , and , which are generalized Petersen graphs and commonly employed in interconnection networks, are determined. The manuscript also proposes an algorithm to compute the local metric basis and its application in the optimal placement of different facilities in a region.
MSC:
05C12; 05C90
1. Introduction and Preliminaries
The metric basis (MB) established by Slater [1] and Melter et al. [2] has a variety of applications in many fields like robotics [3], sensor networks [4], chemistry [5], optimization [6] and in identifying intruders in the networks [1]. The MB assigns codes to the nodes of a graph in terms of distances to give unique identification to each node of the graph, whereas LMB identifies only the adjacent nodes introduced by Okamoto et al. [7]. The research on MB started in 1975 is still ongoing. In the last few years, a number of articles have been published on MB. The relation between the MB of a bipartite graph and its projections are investigated in [8]. The MB of bicyclic graphs have been computed recently in [9]. The latest research on MB can be seen in [10,11,12].
The use of LMB can been seen in delivery services [13]. The LMB can optimize the facility location problems, where we can build facility sites like hospitals or fire stations at the nodes of LMB, giving the minimum number of nodes (facility locations). Yang et al. [14] characterized some graphs having constant LMB. Abrishami et al. [15] computed the LMB of graphs that have small clique numbers. The LMB of generalized wheel graphs was investigated in [16]. Further study on LMB is discussed in [13,17,18,19,20]. Besides these, researchers also developed other versions of metric dimension like mixed, simultaneous, and k-metric dimension [21,22,23].
The generalized Petersen graphs belong to the family of cubic graphs and have been extensively studied for MB [24,25,26,27]. The computation of LMB is NP hard [28] for general graphs but at the same time, it also provides room for computing it for different families of graphs using their structural symmetry and combinatorial techniques. The LMB of generalized Petersen graphs has not been discussed in the literature, which motivated us to compute LMB for its three families , and .
Consider a connected graph G with the node set and edge set . The distance between two nodes x and y is , which gives the length of the shortest path connecting these nodes. The distance of a node x from a set of nodes is . If is an ordered set of nodes, then is called the code or representation of the node v with respect to . The set is known as a resolving set, if the codes are distinct for each . The least cardinality of a resolving set is called the metric dimension (MD) of G symbolized as , and itself is called MB. If the codes are distinct for each pair of adjacent nodes, then is known as a local metric generator (LMG). The least cardinality of a LMG is called the local metric dimension (LMD) of G symbolized as , and itself is called LMB. The LMB is the set of minimum number of nodes, whereas LMD gives the number of nodes in LMB.
The following result by Okamoto et al. [7] gives some basic results on LMD.
Proposition 1
([7]). If G is a connected graph with n number of nodes, then
- (a)
- For , is a bipartite graph.
- (b)
- ⇔ , where is the complete graph.
The article is further divided into the following sections. In Section 2, an algorithm is proposed to compute LMB and LMD. The graphs , and are defined, and the exact values of LMD for these families are computed in Section 3, whereas the application of LMB in the facility location problem is given in Section 4 and the conclusion with an open problem is provided in Section 5.
2. Research Methodology
Though the computation of MB and LMB is NP hard, for a small sized problem, we can devise an algorithm that can exhaust all the possible resolving sets. Our research methodology is to compute the LMB of a smaller family of generalized Petersen graphs or any family by the following Algorithm 1 and then, by using pattern recognition and the graph theoretic properties of these graphs, computing the generalized expression for LMB of these families. The techniques used to compute LMB in this research work can be used to compute MB. The methodology used here is unique and gives the exact values of these parameters, whereas the existing approaches do not use algorithms. Our technique can be extended to compute other distance-based parameters of graphs. The following algorithm can be applied in any programming language to compute the LMB and LMD of a graph.
Let G be a connected graph having n number of nodes. The number of subsets of nodes is an exponential function, so as the value of n increases, Algorithm 1 may not give the answer in polynomial time, but for small sized problems, it will work. Figure 1 for Algorithm 1 given below will further clarify the computational procedure used to compute LMB and LMD.
Figure 1.
Flowchart for Algorithm 1.
| Algorithm 1 Algorithm for the computation of LMB and LMD. |
|
3. Local Metric Dimension of Generalized Petersen Graphs
Coxeter introduced the generalized notion of Petersen graphs in [29]. The node set and the edge set , where and subscripts are taken under modulo n. The nodes form the inner cycle, whereas nodes construct the outer cycle of these graphs.
3.1. LMD of
The current subsection computes the exact values of LMD of generalized Petersen graphs . Figure 2 below illustrates .
Figure 2.
.
In the forthcoming result, we compute the LMD of .
Theorem 1.
Consider generalized Petersen graphs with , then
Proof.
The proof is split into two parts.
- Case 1:
- When n is even with and then is a bipartite graph and Proposition 1 implies that that is a set consisting of a single node would be the LMB.
- Case 2:
- When n is odd with and .For , the set with codes given below is LMG..For , consider the subset of . The codes for all the nodes of with respect to Θ are illustrated in Table 1.Table 1. Codes of nodes for and .
The codes above clearly specify that Θ is LMG; therefore, . Hence, from Proposition 1, it can be inferred that , as is not a bipartite graph when n is odd. □
3.2. LMD of P(n, 2)
The current subsection computes the exact values of LMD of generalized Petersen graphs . Figure 3 below illustrates .
Figure 3.
.
In the forthcoming results, we compute the LMD of .
Theorem 2.
Consider generalized Petersen graphs with , then when for and .
Proof.
Suppose such that with for and , then the possible cases of proof are given as follows.
- Case 1:
- When both nodes of Θ are from , we may assume that one of the two nodes is and the other is , where .
- Case 1.1
- When , and , then for , and for , , which is a contradictory fact.
- Case 1.2
- When , and , then for , and for , , which is a contradictory fact.
- Case 1.3
- When . For , when and when .For and , , which is a contradictory fact for both subcases.
- Case 1.4
- When . For and , .For and , .
- Case 2:
- When both nodes of Θ are from . We may assume that one of the two nodes is and the other is , where .
- Case 2.1
- When . For and , .For and , .This is a contradictory fact in both subcases.
- Case 2.2
- When . For and , .For and , .For and , .This is a contradictory fact in the above subcases.
- Case 2.3
- When . For and , .For and , .This is a contradictory fact in both subcases.
- Case 2.4
- When . For and , .For and , .For and , .
- Case 3:
- When one of the nodes of Θ is from and other from . We may assume that one of the two nodes is and the other is , where .
- Case 3.1
- When . For and , we have:when , when ,For and , .This is a contradictory fact in the above subcases.
- Case 3.2
- When .For and , .For and , .This is a contradictory fact in the above subcases.
- Case 3.3
- When . For and we have:when , when , when .For and , .This is a contradictory fact in both subcases.
- Case 3.4
- When . For and , .For and , .For and , . For and , .
The above cases prove our assertion that when for and . □
Theorem 3.
Consider generalized Petersen graphs with , then
Proof.
- Case 1: When and , For , it is easy to check that the sets are the LMG.
For , consider the subset of . The codes for all the nodes of with respect to Θ are illustrated in Table 2.
Table 2.
Codes of nodes for and .
- Case 2: When and . Consider the subset of . For , it is easy to check that Θ is a LMG. For , the codes for all the nodes of with respect to Θ are illustrated in Table 3.Table 3. Codes of nodes for and .
- Case 3: When and . Consider the subset of . For , it is easy to check that Θ is a LMG. For , the codes for all the nodes of with respect to Θ are illustrated in Table 4.Table 4. Codes of nodes for and .
- Case 4: When and . For , it is easy to check that the sets are LMG.
For and , consider the subset of . For , it is easy to check that is a LMG. The codes for all the nodes of with respect to Θ for are illustrated in Table 5.
Table 5.
Codes of nodes for and .
The codes in the above cases clearly specify that Θ is LMG and, as is not a bipartite graph, both Proposition 1 and Theorem 2 prove our assertion. □
Example 1:
To illustrate how the codes of nodes can be generated, we consider an example of . Here, and . Now, the codes for all the nodes can be generated from Table 2. The codes for all the nodes of are given in Table 6.
Table 6.
Codes of nodes for .
We can easily check from these codes that each pair of adjacent nodes has distinct codes.
3.3. LMD of P(n, 3)
The current subsection computes the exact values of LMD of graphs. Figure 4 below illustrates .
Figure 4.
.
In the forthcoming result, we compute the LMD of graphs.
Theorem 4.
Consider generalized Petersen graphs with , then
Proof.
The proof is split into two parts.
- Case 1: When n is even, then is a bipartite graph and Proposition 1 implies that , which is a set consisting of a single node, would be the LMB.
- Case 2: When n is odd, then there are three subcases.
- Case 2a: When and . For , it can verified easily that the set is a LMG. For , it can also be verified easily that the set is a LMG.
For , consider the subset of . The codes for all the nodes of with respect to Θ are illustrated in Table 7.
Table 7.
Codes of nodes for and .
- Case 2b: When and . For , it can verified easily that the set is a LMG.
For , consider the subset of . The codes for all the nodes of with respect to Θ are illustrated in Table 8.
Table 8.
Codes of nodes for and .
- Case 2c: When and . For , it can verified easily that the set is a LMG.
For , consider the subset of . The codes for all the nodes of with respect to Θ are illustrated in Table 9.
Table 9.
Codes of nodes for and .
The codes above clearly specify that Θ is LMG; therefore, . Hence, from Proposition 1, it can be inferred that , as is not a bipartite graph when n is odd. □
4. Applications of Local Metric Basis
We extend this study by applying LMB in the optimal placement of facilities like hospitals, fire stations, and grocery stores in a locality. The objective is to access these facilities in optimal time, which can be converted into a graph theory problem if we assume different regions as nodes connected by edges where the length of each edge gives the average distance between two regions. For further explanation, we give an example.
Example 2.
Consider a locality in which different regions are in the form of a graph as shown in Figure 3. The LMB is the set which contains the smallest number of nodes such that each pair of adjacent nodes gets different codes. Here, we can construct facilities like grocery stores at nodes and . The codes are , . The codes of each node clearly identify the closest facility. The distinct codes of adjacent nodes help to use each facility optimally. The same codes for non-adjacent nodes indicate the alternate solutions and help to keep the code length shorter.
5. Conclusions
In this manuscript, we infer that the LMD of the generalized Petersen graphs , and is constant and does not depend on the number of nodes in these families. The applications of LMB can be realized in identifying the optimal location for different facilities in an area. The prior knowledge of LMB of certain graphs, which can be distributed systems, would help in improving these systems. The algorithm proposed in the manuscript can be used to compute other versions of LMB for different families of graphs with minor modifications.
Open Problem 1. Compute the LMD of generalized Petersen graphs for different values of n and k.
Author Contributions
Conceptualization, K.A.; Methodology, R.I.; Software, A.N.; Validation, A.N.; Formal analysis, K.A.; Data curation, K.A.; Writing—original draft, R.I. and A.N.; Writing—review & editing, R.I. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Deanship of Scientific Research at King Khalid University through large group Research Project under grant number (R.G.P.2/245/45).
Data Availability Statement
The manuscript includes all the data that were used to support this study.
Acknowledgments
The authors extend their appreciation to the Deanship of Research and Graduate Studies at King Khalid University for funding this work through Large Research Project under grant number (R.G.P. 2/245/45).
Conflicts of Interest
There are no conflict of interests among authors.
References
- Slater, P.J. Leaves of Trees. In Proceedings of the 6th Southeastern Conference Combinatorics, Graph Theory and Computing, Congressus Numerantium, Boca Raton, FL, USA, 17–20 February 1975; Volume 14, pp. 549–559. [Google Scholar]
- Harary, F.; Melter, R.A. On the metric dimension of a graph. Theory Comput. Syst. Ars Comb. 1976, 2, 191–195. [Google Scholar]
- Khuller, S.; Raghavachari, B.; Rosenfeld, A. Landmarks in graphs. Discret. Appl. Math. 1996, 70, 217–229. [Google Scholar] [CrossRef] [Scilit]
- Shao, Z.; Wu, P.; Zhu, E.; Chen, L. On metric dimension in some hex derived networks. Sensors 2019, 19, 94. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Chartrand, G.; Eroh, L.; Johnson, M.A.; Oellermann, O.R. Resolvability in graphs and the metric dimension of a graph. Discret. Appl. Math. 2000, 105, 99–113. [Google Scholar] [CrossRef] [Scilit]
- Sebö, A.; Tannier, E. On metric generators of graphs. Math. Oper. Res. 2004, 29, 383–393. [Google Scholar] [CrossRef] [Scilit]
- Okamoto, F.; Crosse, L.; Phinezy, B.; Zhang, P.; Kalamazoo. The local metric dimension of a graph. Math. Bohem. 2010, 135, 239–255. [Google Scholar] [CrossRef] [Scilit]
- Jothi, M.A.; Sankar, K. On the metric dimension of bipartite graphs. AKCE Int. J. Graphs Comb. 2023, 20, 287–290. [Google Scholar] [CrossRef] [Scilit]
- Khan, A.; Haidar, G.; Abbas, N.; Khan, M.U.I.; Niazi, A.U.K.; Khan, A.U.I. Metric dimensions of bicyclic graphs. Mathematics 2023, 11, 869. [Google Scholar] [CrossRef] [Scilit]
- Knor, M.; Skrekovski, R.; Vetrík, T. Metric dimension of circulant graphs with 5 consecutive generators. Mathematics 2024, 12, 1384. [Google Scholar] [CrossRef] [Scilit]
- Sharma, S.K.; Bhat, V.K. Metric dimensions of heptagonal circular ladder. Discret. Math. Algorithms Appl. 2020, 13, 2050095. [Google Scholar] [CrossRef] [Scilit]
- Zhang, C.; Haidar, G.; Khan, M.U.I.; Yousafzai, F.; Hila, K.; Khan, A.U.I. Constant time calculation of the metric dimension of the join of path graphs. Symmetry 2023, 15, 708. [Google Scholar] [CrossRef] [Scilit]
- Klavžar, S.; Tavakoli, M. Local metric dimension of graphs: Generalized hierarchical products and some applications. Appl. Math. Comput. 2020, 364, 124676. [Google Scholar]
- Yang, C.; Deng, X.A.; Liang, J.; Liu, Y. On the local metric dimension of graphs. J. Interconnect. Netw. 2024, 2350033. [Google Scholar] [CrossRef] [Scilit]
- Abrishami, G.; Henning, M.A.; Tavakoli, M. Local metric dimension for graphs with small clique numbers. Discret. Math. 2022, 345, 112763. [Google Scholar] [CrossRef] [Scilit]
- Lal, S.; Bhat, V.K. On the local metric dimension of generalized wheel graph. Asian-Eur. J. Math. 2023, 16, 2350194. [Google Scholar] [CrossRef] [Scilit]
- Barragán-Ramírez, G.A.; Estrada-Moreno, A.; Ramírez-curz, Y. The Local Metric dimension of the lexicographic product of graphs. Bull. Malays. Math. Sci. Soc. 2019, 42, 2481–2496. [Google Scholar] [CrossRef] [Scilit]
- Cahyabudi, A.N.; Kusmayadi, T.A. On the local metric dimension of a lollipop graph, a web graph and a friendship graph. J. Phys. Conf. Ser. 2017, 909, 012039. [Google Scholar] [CrossRef] [Scilit]
- Listiana, Y.; Susilowati, L.; Slamin, S.; Osaye, F.J. A central local metric dimension on acyclic and grid graph. Aims Math. 2023, 8, 21298–21311. [Google Scholar] [CrossRef] [Scilit]
- Pratama, J.A.B.Y.; Kusmayadi, T.A. On the local metric dimension of dipyramidal graph and king graph. AIP Conf. Proc. 2021, 2326, 020018. [Google Scholar]
- Kelenc, A.; Kuziak, D.; Taranenko, A.; Yero, I.G. Mixed metric dimension of graph. Appl. Math. Comput. 2017, 314, 429–438. [Google Scholar]
- Ramírez-Cruz, Y.; Oellermann, O.R.; Rodríguez-Velázquez, J.A. The simultaneous metric dimension of graph families. Discret. Appl. Math. 2016, 198, 241–250. [Google Scholar] [CrossRef] [Scilit]
- Yero, I.G.; Estrado-Moreno, A.; Rodríguez-Velázquez, J.A. Computing the k-metric dimension of graphs. Appl. Math. Comput. 2017, 300, 60–69. [Google Scholar] [CrossRef] [Scilit]
- Ahmad, S.; Chaudhry, M.A.; Javaid, I.; Salman, M. On the metric dimension of generalized Petersen graphs. Quaest. Math. 2013, 36, 421–435. [Google Scholar] [CrossRef] [Scilit]
- Imran, M.; Baig, A.Q.; Shafiq, M.K.; Tomescu, I. On metric dimension of generalized Petersen graphs P(n, 3). Ars Comb. 2014, 117, 113–130. [Google Scholar]
- Imran, M.; Siddiqui, M.K.; Naeem, R. On the metric dimension of generalized Petersen multigraphs. IEEE Access 2018, 6, 74328–74338. [Google Scholar] [CrossRef] [Scilit]
- Javaid, I.; Ahmad, S.; Azhar, M.N. On the metric dimension of generalized Petersen graphs. Ars Comb. 2012, 105, 171–182. [Google Scholar]
- Barragán-Ramírez, G.A.; Rodríguez-Velázquez, J.A. The local metric dimension of strong product graphs. Graphs Comb. 2016, 32, 1263–1278. [Google Scholar] [CrossRef] [Scilit]
- Coxeter, H.S.M. Self-dual configurations and regular graphs. Bull. Am. Math. Soc. 1950, 56, 413–455. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 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 (https://creativecommons.org/licenses/by/4.0/).



