A Novel and Efficient Method for Computing the Resistance Distance

The resistance distance is an intrinsic metric on graphs that have been extensively studied by many physicists and mathematicians. The resistance distance between two vertices of a simple connected graph <inline-formula> <tex-math notation="LaTeX">$G$ </tex-math></inline-formula> is equal to the resistance between two equivalent points on an electrical network, constructed to correspond to <inline-formula> <tex-math notation="LaTeX">$G$ </tex-math></inline-formula>, with each edge being replaced by a unit resistor. Hypercube <inline-formula> <tex-math notation="LaTeX">$Q_{n}$ </tex-math></inline-formula> is one of the most efficient and versatile topological structures of the interconnection networks, which received much attention over the past few years. The folded <inline-formula> <tex-math notation="LaTeX">$n$ </tex-math></inline-formula>-cube graph is obtained from hypercube <inline-formula> <tex-math notation="LaTeX">$Q_{n}$ </tex-math></inline-formula> by merging vertices of the hypercube <inline-formula> <tex-math notation="LaTeX">$Q_{n}$ </tex-math></inline-formula> that are antipodal, i.e., lie at a distance <inline-formula> <tex-math notation="LaTeX">$n$ </tex-math></inline-formula>. Folded <inline-formula> <tex-math notation="LaTeX">$n$ </tex-math></inline-formula>-cube graphs have been studied in parallel computing as a potential network topology. The folded <inline-formula> <tex-math notation="LaTeX">$n$ </tex-math></inline-formula>-cube has the same number of vertices but half the diameter as compared to hypercubes which play an important role in analyzing the efficiency of interconnection networks. We intend is to minimize the diameter. In this study, we will compute the resistance distance between any two vertices of the folded <inline-formula> <tex-math notation="LaTeX">$n$ </tex-math></inline-formula>-cube by using the symmetry method and classic Kirchhoff’s equations. This method is beneficial for distance-transitive graphs. As an application, we will also give an example and compute the resistance distance in the Biggs-Smith graph, which shows the competency of the proposed method.

between two vertices u and v in a graph G. The length of the longest shortest-path in a graph G is called its diameter and it is denoted by D. The resistance diameter D r (G) of a graph G is defined by the maximum resistance distance between all pairs of vertices in G [39]. We need to minimize the diameter of a graph to improve the efficiency of interconnection networks. In this study, we employ symmetry method to compute the resistance distance. This idea was previously discussed by van Steenwijk [49], when he calculated the resistance of regular polyhedral resistive structures.
A graph can be viewed as an electrical network in which each edge is corresponding to a resistor of 1-ohm resistance r. If there is a potential difference p between any edge of vertices i and j then an electric current w will flow in the edge according to the ohm's law: In many practical problems, the electric current is made to compelled the network at a single point and leave it to others. The famous laws of Kirchhoff govern these currents. Kirchhoff's potential law states that the sum of potential differences round any cycle a 1 , a 2 , . . . , a k equal to zero: p a 1 a 2 + p a 2 a 3 + . . . + p a k−1 a k + p a k a 1 = 0.
Kirchhoff's current law states that for any vertex the total current entering the vertex is exactly equal to the total current leaving the same vertex. In this study, we utilize the symmetry structure and determine which vertices have the same potential. This problem is to model the network in such a way that when a current w is entered into one vertex while it is allowed to leave the network at the remaining n − 1 nodes in equal portions w/(n − 1) (see Figure 1). For more details, see the paper by van Steenwijk [49]. Now we have solved the current scheme on all sides and superimposed it to a similar network, where all currents are ignored and rotated, so that the current w now leaves the node of interest.
In the superposed system, the current nw/(n − 1) reaches one vertex and leaves another vertex, and zero current reaches or leaves each other's vertex. We will draw a layered graph by using breadth-first search technique for a network N and we choose a vertex s as a starting vertex through which the external current w is passed. We number these layers as their distance away from a starting vertex s. We then define a layer matrix l i,j (number of vertices in layer i connected to any vertex in layer j). Then we can obtain the potential difference by using ohm's from any starting vertex s to any desired vertex t as follows: (1) In the resolving system, the potential difference among similar vertices is It is easy to verify that So by equations 1, 2 and 3, the potential difference between s and t in the superimposed system is The equivalent resistor r between vertices s and t is found by superposition of the situation described above as follows:

II. RESISTANCE DISTANCE IN THE FOLDED N-CUBES
The graph of the n-hypercube is given by the graph Cartesian product [50] of complete graphs k 2 k 2 · · · k 2 n . A hypercube of order n is n-regular, bipartite, with diameter n, 2 n vertices and n2 n−1 edges. The folded n-cube graph is a graph obtained by merging vertices of the n-hypercube graph Q n that are antipodal, i.e., lie at a distance n (the graph diameter of (Q n )). The folded n-cube graph has a diameter D = n 2 , n + 1 regular, 2 n vertices and (n + 1)2 n−1 edges (see Figure 2). We use the symbol Q n for n-hypercube and F(Q n ) for the folded n-cube graph.
Theorem 1: The resistance distance between two vertices of the folded n-cube F(Q n ) equals where k is the distance between two vertices and 1 ≤ k ≤ n 2 , and w k , as shown at the bottom of the next page.
Proof: Suppose that the resistance of each edge of folded n-cube F(Q n ) is 1-ohm. We will use the symmetry method to compute the resistance distance between any two vertices VOLUME 9, 2021 of a folded n-cube F(Q n ). For that, we solve the sets of equations. These sets of equations are obtained by entering a current w through any vertex and taking a current w 2 n −1 out through the all other vertices in the network F(Q n ). Since the F(Q n ) is a distance transitive so we can choose any vertex s as a starting vertex through which the external current w is passed. This cleaves the network F(Q n ) into different layers of equipotential vertices according to their distances away from s, i.e., vertices in the k th layer are at a distance k away from s, where 1 ≤ k ≤ n 2 (see Figure 3). We select a vertex for each layer and make a Kirchhoff current equations to express the current reaching and exiting that vertex. Each vertex in the k th layer is adjacent to k vertices in layer k − 1 when 1 ≤ k ≤ n 2 and (n + 1 − k) vertices in the layer k + 1 when 0 ≤ k ≤ n 2 − 1. For odd n, each vertex at k = D layer is adjacent to n + 1 vertices in the layer k − 1. The number of vertices in the k th layer is For odd n, the number of vertices at k = D layer is (n+1)! 2×k!(n+1−k)! . Now we set up a layer matrix l i,j . In Figure 3, the layer graph shows that starting vertex s (Layer 0) connected to n+1 vertices only in layer 1 and it is not connected to any other vertex in any other layer. So we can write the first row of matrix as follows: 0 n + 1 0 0 · · · 0 . Now we select any vertex in layer 1 which is connected to n vertices in layer 2 and one vertex in layer 0 gives us the 2 nd row,i.e., 1 0 n 0 · · · 0 .
Similarly, we create the layer matrix for all other vertices. For even n, we have and for odd n, we have From matrices 6 and 7, we have the following two sets of equations: where w i is the current of an edge between the layer i − 1 and the layer i.
Here there are n 2 + 1 equations and n 2 + 1 unknown variables in both sets of equations. Because there is a no connection between vertices that that are at a distance greater than one in different layers. The current among layers can be procured by the simple recursion relation: Hence, let w = 1, we can get (8), as shown at the bottom of the page.
So by using equations 8 and 5, we can find the resistance distance between any two vertices in the folded n-cubes F(Q n ),

Corollary 1: The resistance distance between two vertices of the folded n-cube F(Q n ) is maximum at k = D.
Proof: From Theorem 1, we have where 2 n −1 2 n−1 w k > 0. So the resistance distance between two vertices of the folded n-cube F(Q n ) is maximum at k = D.
Remark 1: Since the F(Qn) is a distance transitive graph, the F(Q n ) is a distance regular graph. Biggs [51] (or see also [52], [53]) presented a set of potentials, described in terms of the intersection arrays of distance-regular graphs, which allow one to compute the resistance between any two vertices. The resistance distance among any two vertices of F(Qn) can be computed by the method of [51]. In Theorem 1, the current distribution satisfying the recursive relation is considered and then the resistance distance between any two points is calculated according to Ohm's law.
Remark 2: It appears in Fig 5 that resistance diameter D r (F(Q n )) of the folded n-cube strictly decreases as n increases while the ordinary diameter of the folded n-cube in Fig 4 is strictly increased as n increases. In many communication aspects, the folded n-cubes has proven to be superior to the hypercubes. The diameter is halved, the average distance  is better, the communication link delay is shorter, and lower cost make this new structure very promising. The resistance diameter of folded n-cubes is also less than resistance diameter of hypercubes [39]. The reason is that we have more paths between pairs of vertices in folded n-cubes as compared to the hypercubes. Due to the reduction in the resistance diameter, it improves the efficiency of the folded n-cube in message transmission and parallel computing.

III. APPLICATIONS
In this section, as an application, we will compute the resistance distance of folded 4-cube and Biggs-Smith graph to show the efficacy of the suggested method.
Example 1: The graph for the folded 4-cube is shown in Figure 6 (a). We take the vertex 1 as a starting vertex and draw a layered graph for the folded 4-cube as depicted   in Figure 6 (b). The starting vertex 1 is adjacent to 5 vertices in layer 1, each vertex in layer 1 is adjacent to 4 vertices in layer 2 and 1 vertex in layer 0 and each vertex in layer 2 is adjacent to 2 vertices in layer 1. The layer matrix and vertex equations for the currents, as shown below: From the above equations, we have w 1 = 1 5 w and w 2 = where r 4,1 and r 4,2 are the resistance distances in the folded 4-cube at a distance 1 and 2, respectively. Example 2: The Biggs-Smith graph is a 3-regular graph on 102 vertices and 153 edges (see Figure 7). Since Biggs-Smith graph is a distance-transitive, so it does not matter which vertex we choose to draw a layer graph. We draw a layered graph by using a breadth-first search technique by choosing 102 as a starting vertex (see Figure 8). The vertex 102 is adjacent to 3 vertices in layer 1, each vertex in layer 1 is adjacent to 2 vertices in layer 2 and 1 vertex in layer 0 and so on. So we can write the layer matrix and vertex equations for the currents as follows: