Cite this as
Elahi K. Algorithms for Distance-based Topological Indices for Zero Divisor Graphs of Commutative Rings with Primes. Comput Math Appl. 2024; 2(1):018-022. Available from: 10.17352/cma.000007Copyright Licence
© 2024 Elahi K. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.Mathematical solutions are sometimes complex to solve mathematically. Algorithms can provide the solution to these problems. Our article introduced algorithms to compute distance-based topological indices for zero divisor graphs containing finite rings as Zp1p2 × Zq. and Zp2 × Zq, having primes p1, p2, and q. Algorithm results can be reused in standing physical structures, solving computer network problems, and designing mechanics.
Graphs have solved structural problems in the fields of chemistry and biology. They have practically provided the solution for real-time problems [1]. Due to their importance in pure sciences, a new field has been introduced called molecular graph theory. To understand the characteristics of a graph topological indices are used. They can be calculated based on different parameters. If a calculation is based on distances in the graphs, then they are called “Distance-based topological indices” [2,3]. Other known types are “Degree-based topological indices” [4,5].
Topological indexes where calculations are dependent on distances between graph vertices are called “distance-based topological indexes”[6-12]. This index was introduced by Harry Wiener in 1947 [3]. Since then, many other indices of this type have been introduced that have practical applications in different fields such as robotics, computer science, medicine, networks, and physics. Known examples of distance-based topological indices are the Weiner index, Schultz index, modified Schultz index, Hosoya polynomial, and Schultz polynomial [3,13-15,], there are still many difficulties, especially in areas such as zero divisor graphs, that are needed that these indices are further examined and adjusted.
Group and ring theory are linked with practical applications of algebra and number theory. They have been studied and explored for their practical use [16,17]. Group and ring theory consists of many things out of which an important part is finite commutative rings. Finite commutative rings are important in, the analysis of computer algorithms, data modelling, data analysis, the discipline of engineering, graph coding, wireless communications, combinatorics, and coding theory. An important finite commutative ring is a Zero divisor graph [16,18].
Algorithmic solutions are used to solve complex and mathematically insolvable problems. Now, a number of algorithms are available in almost all branches of science to deal with complex practical problems [11]. They are like road maps for accomplishing a given, well-defined task in an accurate and efficient way. Some famous algorithmic techniques are Brute Force, Greedy Algorithms, Divide-and-Conquer, Dynamic Programming, Genetic Algorithms, etc. In this paper, we will create an algorithm that will calculate distance-based topological indices for zero divisor graphs having commutative rings with three primes a, b, and c.
If G is a connected graph having vertex set V (G) and edge set E(G), respectively. The d (u, v) is the distance between vertex u and vertex v, which is the shortest path between vertices u and v. The distance-based topological indices have played an important role in understanding the distance characteristics of the graphs.
Hosoya Polynomial of G is given as [10];
They have provided practical solutions for distance-based problems like vertex-to-vertex distance, shortest routes, etc. The d(v) is the degree of vertex v. Wiener index introduced by Harry Wiener in 1947 [3] is given as:
Understanding the characteristics of a graph helps us in solving complex problems. We can find out their characteristics with the help of topological indices. A special type of topological index is the "Distanced-based topological index", have practical applications in robotics, physics, computer science, and other areas of science. If A is a commutative ring, and if P(A) is a set of all zero divisors in A. If u.v=0 , where u, v ∈ V (G(A)) = P(A) and (u, v) ∈ E(P(A)), then G(A) is a zero divisor graph [17,18]. Different authors have studied commutative rings, and zero-divisor graphs [16,19-24].
Schultz index is given as [15];
Modified Schultz index is given as [25];
We need a proper way to solve the problems. Algorithms provide us with the steps and a proper approach for finding solutions. Nowadays, mathematical problems have algorithmic solutions [26]. Algorithms provide numerical complex calculations. Once, a developed algorithm can be used further in the future for similar types of problems. Sometimes an algorithm used previously developed algorithms for the next step enhances problems. Algorithms convert inputs into the required solution or outputs. They are helpful in data processing, route findings, mathematical operations, and logical solutions in computer science [26].
This article focuses on developing a program to calculate distance-dependent topological indices by constructing zero divisor graphs with finite rings: Zp1p2 × Zq and Zp2 × Zq [22]. These algorithms require three prime numbers as input and compute the Wiener index, Hosoya polynomial, Schultz index, and modified Schultz index for zero divisor graphs. Algorithms must be designed carefully, to get accurate results and efficient solutions.
In a zero-divisor graph, there are two different cases of a commutative ring with three primes, denoted as a, b, c: Zp2 × Zq and Zp1p2 × Zq [27]. In the first case, [27], a and b represent the same primes, and in the second case, a, b, and c are different prime numbers. The algorithm is designed to intelligently handle both cases and calculate indices accordingly [27].
Input: Numbers d, e, and f.
Output: Generate Parameters for distance-based topological indices.
-------------------------------------------------
Function calculateParamters(d,e,f)
-------------------------------------------------
1: for v ← 0 to d × e
2: for u ← 0 to f
3: if (v/= 0 OR u /= 0)
4: if (d /= e)
5: if (v mod d /= 0 AND v mod e /= 0 AND v /= 0 AND u = 0)
6: V 4[di] ← AddPoint(v,u)
7: else if (v= 0 AND u /= 0)
8: V 1[ai] ← AddPoint(v,u)
9: else if (v mod d = 0)
10: if (u = 0)
11: V 2[bi] ← AddPoint(v,u)
12: else
13: V 5[ei] ← AddPoint(v,u)
14: else if (vmod e = 0)
15: if (u /= 0)
16: V 6[fvi] ← AddPoint(v, u)
17: else
18: V 3[ci] ← AddPoint(v,u)
19: else
20: if (v mod d /= 0 AND v /= 0 AND u = 0)
21: V 4[di] ← AddPoint(v,u)
22: else if (v = 0 AND u /= 0)
23: V 1[ai] ← AddPoint(v,u)
24: else if (v mod d = 0)
25: if (u = 0)
26: V 2[bi] ← AddPoint(v, u)
27: else
28: V 3[ci] ← AddPoint(v,ju)
29: if (d /= e)
30: SumDistance1 ← ai × bi + ai × ci + ai × di + bi × ci + bi × fi+ ci × ei 31: SumDistance2 ← ai × fi+ ai × ei + bi × di + bi × ei + ci × di + ci × fi 32: DistanceDegree2 ← ai × fi(a × b − 1 + b − 1) + ai × ei(a × b − 1 + a − 1)
33: +bi × di(a × c − 1 + c − 1) + bi × ei(a × c − 1 + a − 1)
34: +ci × di(b × c − 1 + c − 1) + ci × fi(b × c − 1 + c − 1)
35: DegreeProduct2 ← ai × fi((a × b − 1) × (b − 1)) + ai × ei((a × b − 1) × (a − 1))
36: +bi × di((a × c − 1) × (c − 1)) + bi × ei((a × c − 1) × (a − 1))
37: +ci × di((b × c − 1) × (c − 1)) + ci × fi((b × c − 1) × (c − 1))
38: SumDistance3 ← di × ei + di × fi+ ei × fi
39: DistanceDegree3 ← di × ei(c − 1 + a − 1) + di × fi(c − 1 + b − 1) + ei × fi(a − 1 + b − 1)
40: DegreeProduct3 ← di × ei((c − 1) × (a − 1)) + di × fi((c − 1) × (b − 1))
41: +ei × fi((a − 1) × (b − 1))
42: else
43: SumDistance1 ← ai × bi + ai × di + bi × ci
44: SumDistance2 ← ai × ci + bi × di
45: DistanceDegree2 ← ai × ci(a × a − 1 + a − 1) + bi × di(c − 1 + a × c − 2
46: DegreeProduct2 ← ai × ci((a × a − 1) × (a − 1)) + bi × di((c − 1) × (a × c − 2)
47: SumDistance3 ← ci × di
48: DistanceDegree3 ← ci × di(c − 1 + p − 1)
49: DistanceProduct3 ← ci × di((c − 1) × (p − 1))
50: return SumDistance1, SumDistance2, SumDistance3, DistanceDegree2,
51: DistanceDegree3,DegreeProduct2,DegreeProduct2
-------------------------------------------------
Input: Prime numbers x, y and z.
Output: Distance-based Topological indices.
Main Algorithm calculateIndices(z,y,z)
1: calculateParamters(x, y, z)
2: WinnerIndex ← SumDistance1 + SumDistance2 + SumDistance3
3: Hosoya ← xSumDistance1+SumDistance2+SumDistance3
4: Schultz ← SumDistance1 + 2 × DistanceDegree2 + 3 × DistanceDegree3
5: M odif iedSchultz ← SumDistance1 + 2 × DegreeProduct2 + 3 × DegreeProduct3
6: return WinnerIndex, Hosoya, Schultz, ModifiedSchultz
-------------------------------------------------
The computer-based experiments have been conducted in which a number of zero divisor graphs have been generated for different prime numbers p1, p2, and q (Table 1). Distance-based topological indices Weiner Index, Hosoya Polynomial, Schultz Index, and Modified Schultz Index are computed from the algorithm for the graphs and results have been verified mathematically. Figure 1 shows one of the outcomes of the algorithm. After generating different graphs, we can find general vertex sets and characteristics of zero divisor graph, as shown in Figure 2. Our algorithm further computed the mentioned distance-based topological indices, which have been verified mathematically.
The findings of the research are helpful for the fields of Mathematics and Computer Science. It computes distance-based topological indices for zero divisor graphs containing commutative rings Zp1p2×Zq and Zp2×Zq algorithmically. These results are quite significant due to the dynamic size of graphs, by using an algorithmic approach. Results give a comparison between different indices on a zero divisor graph as shown in Figure 3, also the results can be compared with other graph families. Secondly, the algorithm can be further modified to find the shortest path between vertices. The given algorithm is valid for any size of the graph as long as resources of computer supports, and its output can be used in under- standing physical structures (cylindrical fullerenes, hexagonal chains, silicone, polymers), solving problems in computer networks, and physical designs of mechanics.
Subscribe to our articles alerts and stay tuned.
PTZ: We're glad you're here. Please click "create a new query" if you are a new visitor to our website and need further information from us.
If you are already a member of our network and need to keep track of any developments regarding a question you have already submitted, click "take me to my Query."