Abstract
The zero-divisor graph of a commutative ring R, denoted by Γ(R), is a graph whose two distinct vertices x and y are joined by an edge if and only if xy = 0 or yx = 0. The main problem of the study of graphs defined on algebraic structure is to recognize finite rings through the properties of various graphs defined on it. The main objective of this article is to study the Wiener index of zero-divisor graph and compressed zero-divisor graph of the ring of integer modulo p s q t for all distinct primes p, q and . We study the structure of these graphs by dividing the vertex set. Furthermore, a formula for the Wiener index of zero-divisor graph of Γ(R), and a formula for the Wiener index of associated compressed zero-divisor graph Γ E (R) are derived for .
Keywords: wiener index, zero-divisor graphs, compressed zero-divisor graph, residue class rings, equivalence classification
Introduction
The study of graphs defined on algebraic structures has been an active topic of research in the last few decades. The main question in the area is to recognize finite rings through the properties of various graphs defined on it. The notion of the zero-divisor graph of a commutative ring was introduced by I. Beck in (Beck, 1988), where he considered the set of zero divisors including zero and introduced the concepts such as diameter, grith and clique number of a zero divisor graph. Then later on in (Anderson and Livingston, 1999), Anderson and Livingston changed the vertex set of the zero-divisor graph, they considered only the vertices of the non-zero zero-divisors. For more details, one may see the survey (Singh and Bhat, 2020) and the references therein for the vast literature on the study of zero-divisor graphs.
The Wiener index is one of the important graph indices, and has a variety of applications in pharmaceutical science and in the structure of nanotubes. For results and applications of Wiener index, see (Devillers and Balaban, 1999; Dobrynin et al., 2001; Dehmer and Emmert-Streib, 2014; Dobrynin and Iranmanesh, 2020). There are some works of the Wiener index were done for the ring of integers modulo n. Let us review some of the work done on the topological indices of the zero-divisor graphs. Let p, q be distinct prime numbers. Ahmadi et al. (Ahmadi and Nezhad, 2011) in 2011 has provided an algorithm to determining the Wiener index of for n = p 2, pq. In 2018, Mohammad et al. (Mohammad and Authman, 2018) has extended the result by determining the Wiener index of a zero-divisor graph of for n = p m and p m q, where and m ≥ 2 using the Hosoya polynomial. Pirzada et al. (Pirzada et al., 2020) in 2020 determined the Wiener index of a zero-divisor graph and a compressed zero-divisor of for . In (Asir and Rabikka, 2021), recently a constructed method to calculate the Wiener index of zero-divisor graph of for any positive integer n is determined. The authors of (Asir and Rabikka, 2021) calculated the complete formula through restrict n as product of distinct primes and the remaining cases. In 2022, Selvakumar et al. (Selvakumar et al., 2022) visualized the zero-divisor graph Γ(R) as a generalized composition of suitable choices of graphs and derived a formula for the Wiener index of the graph .
In this paper, we are interested in the parameter Wiener index of graphs for the rings of integers modulo p s q t . Although the formulas in the general case for the rings of have been obtained in literatures (Asir and Rabikka, 2021) and (Selvakumar et al., 2022), compared with their results, our formula is more direct and convenient for calculation the Wiener index . We also get the formula for compressed zero-divisor graph.
Preliminaries
Throughout this paper we assume that R denotes a commutative ring with identity, Z(R) be its set of zero-divisors, the (nonempty) set of nonzero zero-divisors and unit elements denoted by Z(R)* and U(R). We use to note the ring of integers.
Definition 1
Let G be a graph and let u and v be two vertices of G . The distance between u and v , denoted by d G (u, v), is defined to be the length of the shortest path between u and v . The Wiener index of the graph G , denoted by W(G), is defined to be the sum of all distanced between any two vertices of G .
Let d G (v) denote the sum of distances of the vertex v from all the vertices of G, then the Wiener index can be redefined as
Let R be an arbitrary finite commutative ring with unity. We define an equivalence relation ∼ on Z(R)* as follows. For x, y ∈ Z(R)*, define x ∼ y if and only if ann(x) = ann(y) where ann(x) = {r ∈ R|rx = 0}. We call these classes the equiv-annihilator classes of the zero-divisor graph Γ(R).
We write d (x, y) to denote the distance between x and y in Z(R)*, and write x ∼ y to denote x and y are adjacent, otherwise x ≁ y. Let U, V be subsets of the vertex of Γ(R), the U ↔ V shall denote that each vertex of U is adjacent to every vertex of V, and U ↮ V denotes that no vertex of U is adjacent to every vertex of V.
The so-called compressed zero-divisor graph of a ring was first defined by the Spiroff et al. in (Spiroff and Wickham, 2011).
Definition 2
For a commutative ring R with 1 ≠ 0, a compressed zero-divisor graph of a ring R is the undirected graph Γ E (R) with vertex set Z(R E ) − [0] = R E − {[0], [1]} defined by R E = {[x]|x ∈ R}, where [x] = {y ∈ R|ann(x) = ann(y)} and two distinct vertices [x] and [y] are adjacent if and only if [x][y] = [0] = [xy], that is, if and only if xy = 0.
In what follows, we use the graph-theoretic notions from (Douglas, 2001).
Main results
In this section, we first give a structure of using the method of equivalence classification.
Let p, q be distinct prime numbers and , the vertex set of be divided into disjoint subsets V 00, …, V ij , …, V st , where
| (1) |
We noted that V st =∅ and . For the convenience of presentation, we always assumes that V 00 and V st are empty sets in the following, unless otherwise specified. Therefore
Example 1
Consider the ring . The vertex set of is
It is not difficult to see that V ij be the equiv-annihilator classes of , where 0 ≤ i ≤ s and 0 ≤ j ≤ t. If i < s and j < t, for any x, y ∈ V ij . Let z ∈ ann(x), then z = k′p s−i q t−j . So yz = (kp i q j ) (k′p s−i q t−j ) = kk′p s q t , that is, z ∈ ann(y). If i < s and j = t, for any x, y ∈ V ij . Let z ∈ ann(x), then z = k′p s−i . So yz = (kp i q t ) (k′p s−i ) = kk′p s q t , that is, z ∈ ann(y). If i = s and j < t, for any x, y ∈ V ij . Let z ∈ ann(x), then z = k′q t−j . So yz = (kp s q j ) (k′q t−j ) = kk′p s q t , that is, z ∈ ann(y). Thus ann(x) = ann(y) for any x, y ∈ V ij .
Next, we prove some elementary properties of the vertex subsets V ij .
Lemma 1
For distinct prime numbers p, q , let n = p s q t for some and V ij be the equiv-annihilator classes of where 0 ≤ i ≤ s and 0 ≤ j ≤ t . Then
(1)
(2) V ij ↔ V i′j′ if and only if i + i′ ≥ s and j + j′ ≥ t .
Proof
(1) we consider the following cases.
Case 1: i ≠ s and j ≠ t.
Let S ij be the set of all the elements that can be divisible by p i q j in . By the inclusion-exclusion principle,
Note that |S ij | = |{kp i q j |0 ≤ k < p s−i q t−j }| = p s−i q t−j . Since
And
Then
Case 2: i = s.
Since
Then
Case 3: j = t.
Since
Then
(2) Let x = k ij p i q j ∈ V ij , y = k i′j′ p i ′q j ′ ∈ V i′j′. If i + i′ ≥ s and j + j′ ≥ t, then
So x is adjacent to y.
Conversely, suppose V ij ↔ V i′j′. If i + i′ < s or j + j′ < t. We have xy = k ij k i′j′ p i+i ′q j+j ′ can’t be a multiple of n, a contradiction.
The following result characterized the distance between the equiv-annihilator classes.
Proposition 1
For distinct prime numbers p, q , let for some . Then d(x, y) = 1, 2 or 3.
Proof. Let
V 01, V 10, ⋯ , V s,t−1, V s−1,t be the equiv-annihilator classes of , where V ij defined by (1). For and , where 0 ≤ i 1, i 2 ≤ s and 0 ≤ j 1, j 2 ≤ t.
If i 1 + i 2 ≥ s and j 1 + j 2 ≥ s, then x ∼ y and d (x, y) = 1 by lemma 1. So we only need to consider the cases of i 1 + i 2 < s or j 1 + j 2 < s in the following, that is, x ≁ y. Without loss of generality,we may assume that i 1 + i 2 < s. Consider the following cases.
Case 1: 0 < i 1, i 2 < s.
Let i = s − min{i 1, i 2}, j = t. We have i 1 + i ≥ s and j 1 + j ≥ t, also i + i 2 ≥ s and j + j 2 ≥ t. Then . Hence, d (x, y) = 2.
Case 2: i 1 = 0 and i 2 = 0.
Let i = s, j = t − min{j 1, j 2}. We have i 1 + i ≥ s and j 1 + j ≥ t, also i + i 2 ≥ s and j + j 2 ≥ t. Then . Hence, d (x, y) = 2.
Case 3: i 1 = 0 and i 2 ≠ 0. Consider the following subcases.
Subcase3.1: If j 2 = 0. Let i 3 = s, i 4 = s − i 2, j 3 = t − j 1, and j 4 = t. We have
And
Thus .
Since
Then and . Therefore, d (x, y) = 3.
Subcase3.2: If j 2 ≠ 0. Let i = s and j = t − min{j 1, j 2}. We have
And
Thus . Therefore, d (x, y) = 2.
Case 4: i 1 ≠ 0 and i 2 = 0. A similar argument as in Case 3 shows that d (x, y) = 2 or 3.
We have already shown that in any case, d (x, y) = 1, 2 or 3.
Now, we can calculate the Wiener index of .
Theorem 1
For distinct prime numbers p, q , and some . The Wiener index
where
Proof. Let
n = p s q t , we have V 01, V 10, …, V s−1,t , V s,t−1 is the partition of ,where V ij defined by (1). For any two different elements x, y in V ij . By the proof of Proposition 1, there are the following cases.
Case 1: or .
In this case, we have d (x, y) = 2. Then
Case 2: and .
In this case, d (x, y) = 1. Then
Let x and y be the elements in the two different equiv-annihilator classes, V ij and V i′j′, respectively. Consider the following cases.
Case 3: i + i′ ≥ s and j + j′ ≥ t.
By Lemma 1, d (x, y) = 1. Then
Case 4: 0 < i + i′ < s or 0 < j + j′ < t.
Subcase 4.1: i = 0 and j′ = 0.
In this case, we have d (x, y) = 3. Hence
Subcase 4.2: i′ = 0 and j = 0.
In this case, d (x, y) = 3. Hence
Subcase 4.3: If i, j′ are not both equal to 0, and i′, j are not both equal to 0.
In this case, d (x, y) = 2. Hence
In conclusion, the Weiner index is
Therefore the result holds, by Lemma 1.
The following Table gives the exact value of for n = 2 s 3 t , where 1 ≤ s ≤ 3 and 1 ≤ t ≤ 3.
The compressed zero-divisor graph of can be obtained by treating the set V ij , 0 ≤ i ≤ s, 0 ≤ j ≤ t, as a single vertex. To illustrate, let’s give an example in the following.
Example 2
Consider the ring , the vertex set of is divided into 10 sets V 01 , V 02 , V 03 , V 10 , V 11 , V 12 , V 13 , V 20 , V 21 , V 22 . Then the associated compressed zero-divisor graph is shown in Figure 1.
Before proving the next result we need the following lemma.
FIGURE 1.

the compressed zero-divisor graph .
Lemma 2
For distinct prime numbers p, q , let n = p s q t for some and be the compressed zero-divisor graph of . Then
(1) V(G) = {V ij |0 ≤ i ≤ s, 0 ≤ j ≤ t} .
(2)
Proof
(1) Note that
where be the units set of .
Let , such that ann(x) = ann(y). Assume that (i, j) ≠ (i′, j′). Without loss of generality, we may let i < i′. There are the following cases.
Case 1: i < i′ < s.
Since z = up s−i ′q t ∈ ann(y). But xz = u 1 up s−i ′+i q t+j is not divisible by n, a contradiction. therefore, (i, j) = (i′, j′) and [x] = [y] = V ij .
Case 2: i < s < i′.
Since z = up s−i−1 q t ∈ ann(y). But xz = u 1 up s−1 q t+j is not divisible by n, a contradiction. therefore, (i, j) = (i′, j′) and [x] = [y] = V ij .
Case 3: s < i < i′.
In this case, we have j < t and j′ < t. If j ≠ j′, then z = uq min{t−j,t−j ′} ∈ ann(x) or z = uq min{t−j,t−j ′} ∈ ann(y) but not both. A contradiction. therefore, j = j′ and [x] = [y] = V sj .
Then the result is holds.
(2) Let denote the sum of distances of the vertex V ij from the vertices of G with a distance of k, where k = 1, 2 or 3 by Proposition 1. Then
There are the following cases.
Case 1: i = 0 and 0 < j < t.
By Lemma 1 there are V ij ↔ V i′j′ if and only if i + i′ ≥ s and j + j′ ≥ t. So in this case because i′ = s and j′ = t − 1, …, t − j. By the proof of Proposition 1, d (V ij , V i′j′) = 3 if and only if i′ = 1, 2, …, s and j′ = 0. So . therefore
Hence, d G (V ij ) = 2 (s + 1) (t + 1) + s − j − 6.
Case 2: i = 0 and j = t.
As case 1, because i′ = s and j′ = t − 1, t − 2, …, 0. Since d (V ij , V i′j′) = 3 if and only if i′ = 1, 2, …, s − 1 and j′ = 0. Then . Therefore
Hence, d G (V ij ) = 2 (s + 1) (t + 1) + s − t − 7.
Case 3: 0 < i < s and j = 0.
A similar argument as in Case 1 shows that, d G (V ij ) = 2 (s + 1) (t + 1) + t − i − 6.
Case 4: i = s and j = 0.
A similar argument as in Case 2 shows that, d G (V ij ) = 2 (s + 1) (t + 1) + t − s − 7.
Case 5: and j ≠ 0, or and i ≠ 0.
Since d (V ij , V i′j′) = 1 if and only if i′ = s, s − 1, …, s − i and j′ = t, t − 1, …, t − j except V st . So . In this case, . Therefore
Hence, d G (V ij ) = 2 (s + 1) (t + 1) − (i + 1) (j + 1) − 5.
Case 6: and .
Since d (V ij , V i′j′) = 1 if and only if i′ = s, s − 1, …, s − i and j′ = t, t − 1, …, t − j except V st , V ij . So . In this case, . Therefore
Hence, d G (V ij ) = 2 (s + 1) (t + 1) − (i + 1) (j + 1) − 4.
This completes the proof of the lemma.
Remark 1
From the above lemma, it can be easily seen that the cardinalities of the vertex set of G , that is, |V(G)| = (s + 1) (t + 1) − 2. So as shown in Example 1.
The following theorem gives the Wiener index of .
Theorem 2
For distinct prime numbers p, q , and some . The Wiener index of the compressed zero-divisor graph is
Proof. Let
n = p s q t , and . we have V 01, V 10, …, V s−1,t , V s,t−1 are all the vertices of G by Lemma 2, where V ij defined by (1). Then
Example 3
Consider the ring . The Wiener index of the compressed zero-divisor graph is
By Theorem 2.
Conclusion
In this paper, we have described the structure of the graph for all distinct primes p, q and by partition of the vertex set. Consider the partition of the vertex set into the subsets V 01, V 10, …, V ij , ⋯ , V s−1,t , V s,t−1 as seen (1). Then V ij ↔ V i′j′ if and only if i + i′ ≥ s and j + j′ ≥ t. Based on this structure, we proved that the distance of two vertices of are contained in the set {1, 2, 3}, and derived an explicit formula for Wiener index of the graph in Theorem 1 using the basic counting principles.
In addition, we run the formula obtained through MATLAB software and get the data in Table 1. Then, we studied the structure of the compressed zero-factor graph of by treating the set V ij as a single vertex of the compressed zero-divisor graph . We showed that the degree of vertex V ij generally includes six cases, with the number of the vertices of the graph be (s + 1) (t + 1) − 2. Finally we derive the corresponding formula for Wiener index in Theorem 2. Of course, we can also implement it in software if needed.
TABLE 1.
The Wiener index of for n = 2 s 3 t .
| 2 × 3 | 22 × 3 | 23 × 3 | 2 × 32 | 22 × 32 | 23 × 32 | 2 × 33 | 22 × 33 | 23 × 33 | |
|---|---|---|---|---|---|---|---|---|---|
| 4 | 38 | 210 | 109 | 504 | 2294 | 1267 | 5152 | 22136 |
Data availability statement
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.
Author contributions
RL conceived of the presented idea, and WY developed the theory and performed the computations, verified the analytical methods. RL investigated and supervised the findings of this work. All authors discussed the results and contributed to the final manuscript.
Funding
The authors are very grateful to the referee for careful reading of the manuscript and helpful suggestions. This work was supported by the National Science Foundation of China (11961021 and 11561019), Guangxi Natural Science Foundation (2020GXNSFAA159084), Hechi University Research Fund for Advanced Talents (2019GCC005) and Hechi University Research Fund (2018XJQN007).
Conflict of interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
References
- Ahmadi M. R., Nezhad R. J. (2011). Energy and Wiener index of zero-divisor graphs. Iran. J. Math. Chem. 2 (1), 45–51. 10.22052/ijmc.2011.5166 [DOI] [Google Scholar]
- Anderson D. F., Livingston P. S. (1999). The zero-divisor graph of a commutative ring. J. Algebra 217 (2), 434–447. 10.1006/jabr.1998.7840 [DOI] [Google Scholar]
- Asir T., Rabikka V. (2021). The Wiener index of the zero-divisor graph of Zn . Discrete. Appl. Math. 319, 461–471. 10.1016/j.dam.2021.02.035, [DOI] [Google Scholar]
- Beck I. (1988). Coloring of commutative rings. J. Algebra. 116, 116 208–226. 10.1016/0021-8693(88)90202-5 [DOI] [Google Scholar]
- M Dehmer, F Emmert-Streib. (Editors) (2014). Quantitative graph theory: Mathematical foundations and applications (Florida, United States: CRC Press; ). [Google Scholar]
- Devillers J., Balaban A. T. (Editors) (1999). Topological indices and related descriptors in QSAR and QSPR (Amsterdam: Gordon and Breach Science Publishers; ). [Google Scholar]
- Dobrynin A., Entringer R., Gutman I. (2001). Wiener index of trees: Theory and applications. Acta Appl. Math. 66 (3), 211–249. 10.1023/a:1010767517079 [DOI] [Google Scholar]
- Dobrynin A., Iranmanesh A. (2020). Wiener index of edge thorny graphs of catacondensed benzenoids. Mathematics 8 (4), 467. 10.3390/math8040467 [DOI] [Google Scholar]
- Douglas B. (2001). West, introduction to graph theory. 2nd Ed. Singapore: Pearson Education. [Google Scholar]
- Mohammad H. Q., Authman M. N. (2018). Hosoya polynomial and wiener index of zero-divisor graph of Z_n. AL-Rafidain J. Comput. Sci. Math. 12 (1), 47–59. 10.33899/csmj.2018.163570 $\mathbb{Z}_{n}$ [DOI] [Google Scholar]
- Pirzada S., Aijaz M., Imran Bhat M. (2020). On the divisor graphs of the Rings Zn. Afr. Mat. 31, 31 727–737. 10.1007/s13370-019-00755-3 [DOI] [Google Scholar]
- Selvakumar K., Gangaeswari P., Arunkumar G. (2022). The Wiener index of the zero-divisor graph of a finite commutative ring with unity. Discrete. Appl. Math., 311, 72–84. 10.1016/j.dam.2022.01.012 [DOI] [Google Scholar]
- Singh Pradeep, Bhat Vijay Kumar. (2020). Zero-divisor graphs of finite commutative rings: A survey. Surv. Math. Appl., 15 371–397. [Google Scholar]
- Spiroff S., Wickham C. (2011). A zero-divisor graph determined by equivalence classes of zero-divisors. Commun. Algebra 39 (7), 2338–2348. 10.1080/00927872.2010.488675 [DOI] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.
