#### Abstract

Given a finite commutative unital ring having some non-zero elements such that , the elements of that possess such property are called the zero divisors, denoted by . We can associate a graph to with the help of zero-divisor set , denoted by (called the zero-divisor graph), to study the algebraic properties of the ring . In this research work, we aim to produce some general bounds for the edge version of metric dimension regarding zero-divisor graphs of . To do so, we will discuss the zero-divisor graphs for the ring of integers modulo , some quotient polynomial rings, and the ring of Gaussian integers modulo . Then, we prove the general result for the bounds of edge metric dimension of zero-divisor graphs in terms of maximum degree and diameter of . In the end, we provide the commutative rings with the same metric dimension, edge metric dimension, and upper dimension.

#### 1. Introduction

The connection between two mainstream mathematics fields algebra and graph theory was first proposed by Beck . Initially, he introduced the concept of zero-divisor graph associated to a commutative ring , where he considered every element of a ring as the vertices of zero-divisor graph and those two distinct vertices and are connected for which . Observe that in this case, the 0 vertex is connected to every other vertex. In literature, this type of zero-divisor graph is denoted by . In this work of Beck, his main idea was to present the coloring of a commutative ring. This investigation of coloring of a commutative ring was further analyzed by Anderson and Naseer in . Also, they provided a counter example to Beck who conjectured that clique number and chromatic number of a ring are the same by showing that for a finite local ring , and .

The zero-divisor graphs by means of zero divisors of a unital commutative ring were studied by Anderson and Livingston in , and we will denote this type of zero-divisor graphs by . This definition of zero-divisor graph is slightly different from Beck’s definition of zero-divisor graph associated to a commutative ring. Observe that, in this case, the element 0 is not considered as the vertex of zero-divisor graph, and so is a subgraph of . Anderson and Livingston presented the interplay between the ring theoretic properties of and the graph theoretic properties of ; furthermore, this research provides some fundamental results related to zero-divisor graph .

This concept of zero-divisor graphs associated to a unital commutative ring was then extended by means of non-commutative rings by Redmond . He introduced various ways to define the zero-divisor graph associated to a non-commutative ring, which includes both directed and undirected graphs. This work was then continued by Redmond  by means of zero-divisor graph of a commutative ring to an ideal-based zero-divisor graph of a commutative ring, where he thought of generalizing this approach by replacing elements whose product is zero with elements whose product lies in some ideal of . An ideal-based zero-divisor graph with the vertex set , where two different vertices and are connected if and only if their product lies in the ideal , is denoted by . Since then, many authors have been working on this and defined the graphs such as unit graphs, zero-divisor graphs of equivalence classes, total graphs, ideal-based zero-divisor graphs, Jacobson graphs, and so on (see, for example, ). For graph theory, we refer the readers to [10, 11], and for basic definitions in ring theory, we refer the readers to [12, 13].

Redmond  discussed all the commutative rings with unity (up to isomorphism) which produces the zero-divisor graphs on vertices. Moreover, an algorithm is provided to determine all commutative rings (up to isomorphism) with unity. Redmond and Szabo in  discussed the zero-divisor graphs of commutative rings with different metrics and upper dimensions. Ali provided a survey on antiregular graphs in . The graph associated to a commutative ring is surprisingly the best demonstration of the properties of the zero-divisor set of a ring. This graph allows and helps us to figure out the algebraic properties of rings using graph theoretic approaches. The authors in  discussed some interesting properties of . We use the way adopted by Anderson and Livingston in , by considering the set of non-zero zero divisors as the vertex set for .

Throughout the paper, is assumed to be a finite unital commutative ring, unless otherwise stated. is the set of non-zero zero divisors as discussed above. A ring is called local if it has a unique maximal ideal. The annihilator of an element is defined as . An element is called nilpotent if for some positive integer . A ring is called reduced if it has no non-zero nilpotent elements. is the ring of integers modulo , is the ring of gaussian integers modulo with respect to the usual complex addition and multiplication, and stands for a finite field. The graph associated to the ring of Gaussian integers modulo was introduced by Osba et al. in , and the zero-divisor graph of the ring of gaussian integers is denoted by

Kelenc et al. introduced the concept of edge version of metric dimension in . Consider a graph having arbitrary vertices and and an edge ; the mapping defined by is the distance between and . Any two edges and of are distinguished by a vertex of only if . Any subset of vertex set of is called an edge resolving set for if every pair of edges of is distinguished by some vertex set of . The cardinality of the smallest edge resolving set of is called the edge metric dimension of and is denoted by . An edge resolving set of a connected graph uniquely codes all the edges of .

#### 2. Preliminaries

A graph consists of a vertex set and an edge set , and the number denotes the order of , whereas the number denotes the size of . An edge relates to a pair of distinct vertices, say and , written as . An alternating arrangement among vertices and edges is known as a walk. If we traverse a graph such that no vertex and edge is repeated, then it is known as a path. If the initial vertex and the terminal vertex in a path are the same, then it is known as a cycle. The distance between two distinct vertices and is the number of edges in the smallest path among them, and it is denoted by , and if there does not exist a path among them, we define to be infinite. If , then and are said to be neighboring vertices. The neighborhood set of a vertex is ; furthermore, denotes the set of closed neighborhood of . The number is the degree of the vertex which is denoted by or simply . If for every , for some fix , then the graph is said to be regular graph. The number represents the distance between vertex and an edge . The length of the longest path is the diameter of the graph which is denoted by . Mathematically, .

Any subset of vertices together with any subset of edges containing those vertices is a subgraph of a graph G; mathematically, we write . The number of edges in the smallest cycle subgraph in a graph is called the girth of graph, denoted by . The maximal complete subgraph of a graph is called a clique which is denoted by and is called the clique number. If there is an edge among every pair of vertices in a graph, then it is said to be complete graph which is denoted by , where is the number of vertices. If the vertices of a graph can be partitioned into two disjoint sets, say and such that each vertex of is adjacent to each vertex in , then the graph is said to be complete bipartite graph, and it is usually denoted by or simply when and . A cut vertex is a vertex that when removed from a connected graph creates two or more components of the graph.

Kelenc et al. in  discussed the edge metric dimension of the path graph, complete graph, and complete bipartite graph. Since both the metric dimension and the edge metric dimension are closely related, it is feasible to find out graphs for which the metric dimension and the edge metric dimension are the same, as well as for some other graphs for which or . In fact, Kelenc et al. were interested in exploring the comparison between the values of and .

The edge metric dimension of the path graph , cycle graph , and the complete graph is given in the following results.

Theorem 1 (see , Remark 1]). For any integer , , , and . Moreover, if and only if .

Next, it is shown that for a complete bipartite graph different from , the edge metric dimension is .

Theorem 2 (see , Remark 2]). For any complete bipartite graph such that and , .

#### 3. Edge Metric Dimension of Graphs Associated with Rings

For a graph of single vertex, the edge metric dimension is assumed to be zero and for an empty graph, the edge metric dimension is undefined. So, we begin our discussion with the following observation.

Theorem 3. Let be a finite commutative ring with unity. Then,(i) is finite iff is finite.(ii) is undefined iff is an integral domain.

Proof. (i)Suppose that is finite; then, there exists a minimal edge metric basis for , say . By (, Theorem 2.3) . So, for every and . Hence, , which implies that is finite, and hence is finite. Conversely, given that is finite, then is finite, since is contained in . So, is finite.(ii)As we know that edge metric dimension of is undefined whenever is an integral domain and vice versa, the assertion follows.The following result gives the edge metric dimension of the zero-divisor graphs of a ring whenever is isomorphic to for some .

Proposition 1. Let be a finite commutative ring with unity. Then, if and only if is isomorphic to one of the following rings: , , , , , , or .

Proof. Suppose that ; then, by Theorem 1, paths are the only graphs whose edge metric dimension is 1, so . Since is not more than 3 whenever is a path graph by (, Lemma 2.6), is either or .. If , then such that . The rings which satisfy this property are , , and .. If , then , such that and . The rings which satisfy this property are , , , and .Conversely, the zero-divisor graphs of above given rings are either or . Also, the zero-divisor relation is not transitive for these rings. Hence, by Theorem 1, .

Proposition 2. Let be a finite commutative ring with unity and . Then, is isomorphic to one of these rings:(a).(b), ,,.

Proof. Given that is a commutative ring with unity and is a cycle graph, then by (, Theorem 2.4) the length of the cycle graph cannot exceed 4. We have shown the zero-divisor graphs of the above given rings in Figure 1.

Corollary 1. Let be a finite commutative ring with unity. Then, if is isomorphic to one of the following rings: , , , , .

Theorem 4. Let be a finite commutative ring with unity such that each is nilpotent.(1)If and , then .(2)If and , then .

Proof. (1)Given that and , then for all , and so by (, Theorem 2.8), is complete graph. Hence, -1 by Theorem 1.(2)Given that and , then there exist some such that which implies that there exists such that . Hence, is an edge metric generator for any vertex adjacent to ; therefore, .By (, Proposition 1), if is a commutative ring with unity, the cut vertex of is in the center of . By (, Lemma 4), it is shown that if is a finite commutative ring with unity, then has a cut vertex of degree 1 if and only if either there is some such that or is isomorphic to or . The next theorem provides the edge metric dimension of when has a cut vertex but not degree 1 vertex.

Theorem 5. Let be a finite commutative ring with unity such that . If has a cut vertex but no degree 1 vertex, then .

Proof. Let be a commutative ring with unity; if has a cut vertex but no degree one vertex, then by (, Theorem 3), is isomorphic to one of the following rings:The zero-divisor graph associated with first four rings is given in Figure 2(a), and for remaining three rings, the zero-divisor graph is given in Figure 2(b).
The minimum edge metric generator for graphs in Figures 2(a) and 2(b) is given, respectively, by and . Hence, in both cases, .
We next determine the edge metric dimension of , when has exactly one vertex which is adjacent to every other vertex.

Theorem 6. Let be a finite commutative ring with unity and for some finite field . Then, and . Moreover, if is a local ring such that has no cycles, then .

Proof. First, we suppose that is a non-local ring and . The set of zero divisors of is then such that for all . Observe that the vertex is the central vertex and is adjacent to all other vertices and so . Hence, by (Theorem 2), .
On the other hand, if is a local ring and has no cycles, then by (, Theorem 2.1), is isomorphic to either or , and hence .

Theorem 7. Let be a finite commutative ring with unity and , and both and are finite fields with , . Then, -.

Proof. Given that is a finite commutative ring, then each vertex of the form (, 0) of the zero-divisor graph is adjacent to each (0, ) and vice versa. So, the vertex set of can be partitioned into two disjoint sets, say and . Hence, and which implies by Theorem 2 that  =  + -.
We know that we can break down any positive integer into set of prime numbers, resulting in the original number after multiplying. We are interested in finding the edge metric dimension of when and where and are distinct primes. In both cases, the zero-divisor graph is the complete bipartite graph. The zero divisors of when can be partitioned into two disjoint sets by taking all the multiples of in one set and the multiples of in the other set.

Corollary 2. Let be a finite commutative ring with unity and , where and , are distinct primes (). Then, .

Proposition 3. Let be a graph associated to a finite commutative ring . Then, if is an annihilator ideal.

Proof. Given that is a graph associated to a commutative ring and is an annihilator ideal, then by definition for any , we have for all , which implies that is a complete graph. Hence, by Theorem 1, .

Proposition 4. If is a finite local ring with maximal ideal and , then .

Proof. Given that is a finite local ring, and , where is the Jacobian radical of which is the intersection of maximal ideals of . Thus, is a nilpotent ideal and is not a field which implies that . So, since , and therefore, is a complete graph. Hence, by Theorem 1, .

Proposition 5. Let be a reduced and , be two prime ideals such that . Then, - 2 .

Proof. First, we aim to prove that . Suppose that , so there exists a non-zero such that . So, , which is a contradiction because as given. Also, , and hence  = . Now, we claim that is a complete bipartite graph with partite sets and  = . Let with  = 0. Then, , and therefore, either or , a contradiction. Thus, is a bipartite graph. Now, to show that is a complete bipartite graph, we take and . So, and ; since both and are ideals, then which implies that and so is a complete bipartite graph. Then, . Hence, by Theorem 2,  +  − .

Theorem 8. Let be a finite commutative ring with unity and or , where is a prime. Then, .

Proof. Suppose that ; then, the elements of are of the form {: , }, and so the set of zero divisors of is  = {: } such that  = 0 for each . Hence, .
Now, if , then its set of non-zero zero divisors is  = {: } such that  = 0 for each . Observe that , and so by Theorem 1, .
Let us now determine the edge metric dimension of the zero-divisor graph of the ring of Gaussian integers . As stated above, the set of Gaussian integers is of the form {: and } and the set of Gaussian integers modulo is of the form  = {: }. A Gaussian prime is the prime element in and the Gaussian primes can be described as(1) and are Gaussian primes.(2)If is a prime integer with 1 and for some integers and , then and are Gaussian primes.(3)If is a prime integer with 3 , then is a Gaussian prime.Furthermore, if is a Gaussian prime, then its complex conjugate and its associates , , and are also Gaussian primes. If , then is undefined; since is a field, is an empty graph.

Theorem 9. Letbe a finite commutative ring with unity and. Then,(1)For , .(2)For , .(3)For with , .

Proof. (1)It was shown in Theorem 15  that is a complete graph, and by Theorem 1, .(2)Given that are primes such that , for , then is a complete bipartite graph, since as a direct product of two fields. Also, for a complete bipartite graph , the clique number , and hence by Theorem 2, .(3)If with , then is a complete bipartite graph with partite sets and , since . Also, for a complete bipartite graph , then girth , and hence by Theorem 2, .

Remark 1. We know that 2 is not a Gaussian prime, since ; however, , so is isomorphic to the local ring having unique maximal ideal . Thus, we have , which implies that is a graph with one vertex and no edges. Hence, .
Now, we prove the bounds for edge metric dimension of zero-divisor graph associated to rings. Moreover, the following result gives a relation between the maximum degree, edge metric dimension of , and the diameter.

Theorem 10. Let be a finite commutative ring with unity and let be its zero-divisor graph such that . Then,where is the maximum degree and is the diameter of .

Proof. First, we prove that . Let be the minimum edge resolving set for . Let with and be the set of all edges incident to . For each , let . Then, is or . Therefore, the size is at most . Since for , , and the assertion follows.
Now, to show that , suppose that for , : , i.e., is the diameter of and let be - path of length , where , , …, . Suppose , and since and for , it follows that is an edge metric generator for of cardinality . Hence, .
When are the metric dimension, edge metric dimension, and upper dimension the same?
In the previous section, bounds for edge metric dimension of zero-divisor graphs were given. In this section, we provide the commutative rings for which the zero-divisor graph has same metric dimension , edge metric dimension , and upper dimension (see Table 1).

#### 4. Conclusion

In this paper, we discussed the bounds for the edge metric dimension of graphs associated to commutative rings for some rings such as ring of integers modulo , polynomial rings, and the ring of Gaussian integers modulo . Finally, we provide the general bound for edge metric dimension of zero-divisor graphs in terms of maximum degree of and its diameter .

#### Data Availability

The data used to support the findings of this study are included within the article.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.