arXiv:2108.07942v2 [math.CO] 13 Sep 2021 graph, nBree,Clfri,drn h umro 2019. of summer the during California, Berkeley, in o 404,wieteatoswr nrsdnea h Mathe the at residence in were authors the while 1440140, No. 0,btas ncmiaoilmti hoy[,3]adseta gra spectral and 36] [4, theory chem 29]. and combinatorial 13, theory circuit 10, in in application also only known but not Res role first 30], [22]. prominent structure its a chemical played and of has Re theory graphs analysis the properties. circuit in structural electrical occurred its in structure quantifies origin that its measure has a is graph a hsmtra sbsduo okspotdb h ainlSc National the by supported work upon based is material This e od n phrases. and words Key h eitnedsac ocsoal eerdt steeffective the as to referred (occasionally distance resistance The e pcfi xmlso h s frssac itneare: distance resistance of use the of examples specific few A 2020 LOIHI EHIUSFRFNIGRESISTANCE FINDING FOR TECHNIQUES ALGORITHMIC • • • • ahmtc ujc Classification. Subject Mathematics ntepeec fniydt.Ti so atclritrs ntedes the in interest particular of is [6]. This arrays var sensor several data. of of noisy operation estimation of and the is presence field the es this and in in control walks. problem distributed one random of particular, field of the In theory in the used is in Kemen resistance constant for Effective important bounds an lower and [26], upper stant sharp gives distance aver Resistance continuous-time th and grap chains given minimizing Markov a networks. of to on problem weights applications edge has the allocating problem considered by wh distance [21] graph resistance Saberi given total a and sparsify Boyd, rapidly Ghosh, to properties. algorithm spectral betwee an maintaining develop distance resistance to used graphs have of [29] Srivastava and Spielman eas rsn oeoe usin n conjectures. and questions open exampl some illustrative present an also provide We we approxima discussed and method techniques each exact both for discuss and we analysis, paper this network In systems, t quantif control graph from distributed ranging spectral tures, applications and theo has theory circuit in resistance combinatorial only in not also role prominent but a played resistance) effective has as distance known (also distance resistance of Abstract. ITNE NSRCUE GRAPHS STRUCTURED ON DISTANCES nti ae egv uvyo ehd sdt aclt val calculate to used methods of survey a give we paper this In ffcierssac,rssac itne –re triang 2–tree, distance, resistance resistance, effective .J VN N .E FRANCIS E. A. AND EVANS J. E. 1. Introduction 41,05C90. 94C15, 1 aia cecsRsac Institute Research Sciences matical ngah.Resistance graphs. in igbooia struc- biological ying ec onainudrGrant under Foundation ience oe rdsystems. grid power ftetechnique. the of e yadchemistry, and ry etcnqe and techniques te er.Moreover heory. sac itnein distance istance itnedistance sistance lrgi,ladder grid, ular eitne of resistance) hter [2, theory ph sr 1,22, [18, istry ues timation. ograph to nodes n ’ con- y’s .This h. iables aging ign ile e 2 E.J.EVANSANDA.E.FRANCIS

Both the Wiener index and the Balaban index can be determined from the • resistance distances in the graph [1]. The Wiener index is a topological index of a molecule; the Balaban index J(G) is defined by m 1 J(G)= , m n +2 w(u) w(v) − edgesX∈G · where n = V and m = E and w(u) denotesp the sum of distances from u to all the other| | vertices of| G| . Resistance distance has been used extensively in topological analysis of • different chemical compounds and structures. A very short list of sample papers include [11, 22, 24, 27, 35, 37, 38]. The goal of this paper is to survey common methods of determining the resistance distance in graphs and to provide examples of these methods (for additional reading see in [33] and [36]). The structure of the paper is as follows. In Section 2 we give a formal definition of resistance distance, and describe circuit transformations that can be applied to electric circuits that are useful in determining resistance distance between vertices of a graph. In Section 3 we introduce mathematical techniques used to determine resistance distances in graphs, that do not require the use of circuits. For each of the techniques which give an exact answer, we provide a representative example. We conclude this section by briefly reviewing numerical techniques that give reasonable estimates for resistance distance and are useful in the case of very large graphs. We conclude with a collection of open conjectures and questions.

2. Resistance Distance and Circuit Transformations With it’s origin in circuit theory, it is not surprising that the formal definition of resistance distance is stated in the language of this discipline. Definition 2.1. Given a graph G we assume that the graph G represents an elec- trical circuit with resistances on each edge. The resistance on a weighted edge is the reciprocal of its edge weight. Given any two nodes i and j assume that one unit of current flows into node i and one unit of current flows out of node j. The potential difference v v between nodes i and j needed to maintain this current is i − j the resistance distance between i and j. By Ohm’s law, the resistance, rG(i, j) is v v r (i, j)= i − j = v v . G 1 i − j We note that unless otherwise stated we will assume that each edge has weight one (corresponding to a resistance of one Ohm). 2.1. Electric Circuit Transformations. One method for determining the effec- tive resistance in a graph is to turn to the techniques of circuit analysis. These techniques include the well-known series and parallel rules and the ∆–Y and Y–∆ transformations.

Definition 2.2 (Series Transformation). Let N1, N2, and N3 be nodes in a graph where N2 is adjacent to only N1 and N3. Moreover, let RA equal the resistance between N1 and N2 and RB equal the resistance between node N2 and N3. Under a series transformation on the graph, N2 is deleted and the resistance between N1 and N3 is set equal to RC = RA + RB. ALGORITHMIC TECHNIQUES FOR FINDING RESISTANCE DISTANCE 3

N2 N2

R 2

R C A R N3 1 R R 3

RB

N1 N3 N1

Figure 1. ∆ and Y circuits with vertices labeled as in Definition 2.4.

Definition 2.3 (Parallel Transformation). Let N1 and N2 be nodes in a multi- edged graph where e1 and e2 are two edges between N1 and N2 with resistances RA and RB, respectively. Under a parallel transformation on the graph, the edges e1 and e2 are deleted and a new edge is added between N1 and N2 with edge resistance −1 R = 1 + 1 . C RA RB Next, we recall ∆–Y and Y–∆ transformations, which are mathematical tech- niques to convert between resistors in a triangle (∆) formation and an equivalent system of three resistors in a “Y” format as illustrated in Figure 1. We formalize these transformations below.

Definition 2.4 (∆–Y transformation). Let N1,N2,N3 be nodes and RA, RB and RC be given resistances as shown in Figure 1. The transformed circuit in the “Y” format as shown in Figure 1 has the following resistances:

RBRC R1 = RA + RB + RC RARC R2 = RA + RB + RC RARB R3 = RA + RB + RC

Definition 2.5 (Y–∆ transformation). Let N1,N2,N3 be nodes and R1, R2 and R3 be given resistances as shown in Figure 1. The transformed circuit in the “∆” format as shown in Figure 1 has the following resistances:

R1R2 + R2R3 + R1R3 RA = R1 R1R2 + R2R3 + R1R3 RB = R2 R1R2 + R2R3 + R1R3 RC = R3

Proposition 2.6. Series, parallel, ∆–Y, and Y–∆ transformations yield equivalent electric circuits. Proof. See [30] for a proof of this result.  In addition to the network transformations just described, the cut- theorem can also be used to calculate resistance distances. 4 E.J.EVANSANDA.E.FRANCIS

Theorem 2.7 (Cut Vertex). [9] Let G be a connected graph with weights w(i, j) for every edge of G and suppose v is a cut-vertex of G. Let C be a component of G v and let H be the induced subgraph on V (C) v . Then for each pair of vertices− i, j of H, ∪{ }

(1) rG(i, j)= rH (i, j).

Example 1. An interesting example of using equivalent network transformations and was provided by Cinkir [15]. He used some clever recurrence relations and knowledge of the existence of equivalent network transformations to find formulae for the effective resistance between any pair of nodes in a ladder graph Ln with 2n vertices, for arbitrary n shown in Figure 2 (A). Here, we reproduce some of his results using a strategy involving explicit network transformations. We do this to demonstrate how these transformations can be used on families of structured graphs. We begin by performing a series transformation on Ln (deleting node 2) to obtain the equivalent network, shown in the right panel of Figure 2, and consider the following algorithmic process. Algorithm 2.8. Let G be a graph of the form shown in (A) of Figure 3, where edge resistances are assumed to be equal to one unless labeled otherwise. (1) Perform a ∆-Y transformation on the (leftmost) triangle. (2) Perform series transformations to eliminate nodes 2i 1 and 2i. − The obtained graph with its non-unit edge resistances is shown in (B) of Figure 3. Note that this process exchanges a triangle for a new “tail” edge with resistance ti as in Figure 3. It is straightforward to check that

2ai−1 + bi−1 +1 ai−1 +2bi−1 +1 ai−1bi−1 (2) ai = , bi = , ti = ai−1 + bi−1 +1 ai−1 + bi−1 +1 ai−1 + bi−1 +1

Starting from the graph in (B) of Figure 2, we have initial values a0 = 1, 5 6 b0 = 2. After the first iteration of Algorithm 2.8, we have a1 = 4 , b1 = 4 , and 1 t1 = 2 . The edge resistances ai,bi,ti after the first 5 iterations of this algorithm are shown in Table 1. The numerator xi of the ai is sequence A061278 in OEIS [28], which satisfies the recurrence relation x =4x x +1, i i−1 − i−2 and which can be determined to be 1 x = (3 √3)(2 √3)i+1 +(3+ √3)(2 + √3)i+1 6 . i 12 − − − Note that the numerator of bi is simply xi + 1 and that the denominator at step i is equal to x x . i − i−1 After n 1 steps we have transformed Ln into the equivalent network in Figure 4 (A).− We perform one final ∆-Y transformation to obtain the network in Figure 4 (B). From this graph we can now use Theorem 2.7 and the symmetry of the original graph to determine that ALGORITHMIC TECHNIQUES FOR FINDING RESISTANCE DISTANCE 5

n a r(1, 2n 1) = r(2, 2n)= + n−1 − 2 an−1 + bn−1 +1 n b r(1, 2n)= r(2, 2n 1) = + n−1 − 2 an−1 + bn−1 +1 a + b r(1, 2) = r(2n 1, 2n)= n−1 n−1 − an−1 + bn−1 +1

Resistances between other pairs of vertices in Ln can be obtained in a similar fashion.

i ai bi ti 1 5/4 6/4 1/2 2 20/15 21/15 1/2 3 76/56 77/56 1/2 4 285/209 286/209 1/2 5 1065 / 780 1066/780 1/2

Table 1. The values of the resistances in the tails and triangle edges for the first five iterations of Algorithm 2.8 for the ladder graph.

1 3 2n − 1 3 5 2n − 1

1 2 2 4 2n 4 6 2n (A) (B)

Figure 2. Demonstration of a series transformation on a ladder graph. The graph in the left panel is the original ladder graph, and the graph in the right panel is the graph after performing a series transformation to remove node 2. We note that the edge (1, 4) in the right graph has resistance equal to the resistance of the sum of the resistances of edges (1, 2) and (2, 4) in the left graph.

Network transformation algorithms, such as the the one above, have been used to determine resistance distances for other structured families of graphs, and likely can be used on many more. We will define here one such family, and present some related open questions in Section 4. Definition 2.9. A K-tree is defined inductively as follows (1) The complete graph on K +1 vertices is a K-tree. (2) If G is a K-tree, the graph obtained by inserting a vertex adjacent to a clique of K vertices of G is a K-tree. For a 2-tree, an alternative and more compact definition is: G is a 2-tree on n vertices if G is chordal, has 2n 3 edges, and K is not a subgraph of G. − 4 6 E.J.EVANSANDA.E.FRANCIS

2i − 1 2i + 1 2i − 1 2i + 1 a V0 0 V0 V1

b0 2i 2i + 2 2i 2i + 2 (A) (B) 2i + 1 2i + 3 a V0 V1 1

t1 b1 2i + 2 2i + 4 (C)

Figure 3. Panel (A) shows the graph prior to a ∆–Y transfor- mation, Panel (B) shows the graph after the ∆–Y transformation, but prior to the series transformations, and Panel (C) shows the graph after the series transformation. We note that the graph in the last panel is in the correct configuration to repeat Algorithm 2.8. The values of the tails (ti) and edges (ai and bi) are given for the first 5 transformations in Table 1.

2n − 1 an−1 2n − 1 a − +b − +1 an−1 n 1 n 1 1 V1 Vi−2 Vi−1 1 V1 Vi−1 Vi

tn−1 tn bn−1 bn−1 an−1+bn−1+1 2n 2n (A) (B)

Figure 4. The final step of the series/∆–Y transformations in the ladder graph.

Definition 2.10. A linear K-tree (or K-path) is a K-tree in which exactly two vertices have degree K. A straight linear K-tree is a linear K-tree whose (a ) is banded with bandwidth equal to k, i.e., a =0 if i j > k. ij ij | − |

2 4 6 n − 3 n − 1

1 3 5 n − 4 n − 2 n

Figure 5. Sn, the straight linear 2-tree on n vertices

In [7], Barrett and the authors of this paper used network transformations to determine the resistance distance in a straight linear 2-tree with n vertices: ALGORITHMIC TECHNIQUES FOR FINDING RESISTANCE DISTANCE 7

Theorem 2.11. [7, Th. 20] Let Sn be the straight linear 2-tree on n vertices labeled as in Figure 5. Then for any two vertices u and v of Sn with u < v, v−u(F F F F )F (3) r (u, v)= i=1 i i+2u−2 − i−1 i+2u−3 2n−2i−2u+1 . Sn F P 2n−2 where Fp is the pth Fibonacci number. 3. Mathematical techniques for determining the resistance distance In this section we detail several different mathematical techniques for determin- ing the resistance distance between two vertices in a graph. These range from combinatorial techniques to purely computational techniques. We begin with tech- niques that are combinatorial in nature and those that rely on special structures or symmetries existing in the graph. We then cover more numerical techniques concluding with purely programmatic techniques that give an approximate value for resistance distances in a short amount of time and are most appropriate to use for very large, mostly unstructured graphs. For each of these techniques (except the approximate techniques) we provide an illustrative example. 3.1. Spanning Two Forests. Our first mathematical technique for determining resistance distance between nodes in a graph relies on the relationship between the number of spanning 2-forests separating two vertices u and v and the resistance distance. Before stating this relationship we formally define a spanning 2-forest separating vertices u and v in a graph G. Definition 3.1. Recall that a spanning tree T of a graph G is a subgraph of G that is a tree, such that V (T ) = V (G). A spanning 2-forest is a pair of disjoint trees (called components) which are subgraphs of G, such that V (T1) V (T2) = V (G). Given any two vertices u and v of G a spanning 2-forest separating∪ u and v is a spanning 2-forest F where u and v are in distinct tree components. The number of such forests is denoted by (u, v). FG The following theorem [2, Th. 4 and (5)] gives the relationship between the resistance distance between u and v and the number of spanning 2-forests separating u and v. Theorem 3.2. Given a graph G, the resistance distance between vertices u and v is given by G(u, v) det LG(u, v) rG(u, v)= F = , T (G) det LG(w) where w is any vertex of G.

Example 2. We now return to the example of the ladder graph Ln on 2n vertices, with vertices labeled as in Figure 2(A). We note that any spanning tree on Ln−1 can be expanded to a spanning tree of Ln by any of the following 2-edge sets (2n 3, 2n 1), (2n 2, 2n) , (2n 3, 2n 1), (2n 1, 2n) , (2n 2, 2n), (2n 1, 2n) . { − − − } { − − − } { − − } The only additional spanning trees of Ln are those which contain the edges (2n 3, 2n 1), (2n 1, 2n) and (2n 2, 2n). These trees, when restricted to the vertices− of −L are− exactly the spanning− 2-forests that separate vertices 2n 3 n−1 − and 2n 2. So, altogether there are 3T − + − (2n 3, 2n 2) spanning trees − Ln 1 FLn 1 − − of Ln. A similar argument demonstrates that the number of spanning 2-forests 8 E.J.EVANSANDA.E.FRANCIS

of Ln that separate vertices 2n 1 and 2n is 2T (Ln−1)+ Ln−1 (2n 3, 2n 2). Thus, − F − − T 3T + V 3 1 T n = n−1 n−1 = n−1 V 2T + V 2 1 V  n  n−1 n−1   n−1 where Tn = T (Ln), Vn = Ln (2n 1, 2n), and T1 = V1 = 1. We note that this F − T system has eigenvalues 2 √3 with corresponding eigenvectors 1 √3 1 . Since ± ± ∓ 1 2+ √3 1 2 √3 1   = + − − 1 2√3 √3 1 2√3 √3+1    −    we have T 2+ √3 1 2 √3 1 n = (2 + √3)n−1 + − (2 √3)n−1 − Vn 2√3 · √3 1 2√3 · − √3+1    −    Thus (2 + √3)n (2 √3)n T (Ln)= − 2√3 − 2√3 and (2 + √3)n (2 √3)n L (2n 1, 2n)= L (1, 2) = (√3 1)+ − (√3+1) F n − F n 2√3 − 2√3 Theorem 3.2 then yields (2 + √3)n(√3 1)+(2 √3)n(√3+1) rL (1, 2) = rL (2n 1, 2n)= − − n n − (2 + √3)n (2 √3)n − − In [3] Bapat used Theorem 3.2 to find formulae for resistances between any pair of nodes in a fan graph Fn on n + 1 vertices (the graph formed when each vertex in a path on n vertices is connected to a “hub” vertex n +1). In fact, rFn (i,n + 1) was calculated by evaluating determinants of submatrices of L(G), and the combinatorial method of counting separating 2-forests and spanning trees was used to find the resistances between any “non-central” nodes:

Proposition 3.3. [3] Let n 1 be a positive integer. Then for i, j =1,...n, ≥ F2(n−i)+1 + F2i−1 rFn (i,n +1)= and F2n F2(n−j)+1(F2j−1 F2i−1)+ F2i−1(F2(n−i)+1 F2(n−j)+1) rFn (i, j)= − − , F2n where Fi is the ith Fibonacci number. From Theorem 3.2 one can also determine resistance distance using the idea of 2-separations. Here we review this notion, as explained in [9].

Definition 3.4. A 2-separation of a graph G is a pair of subgraphs G1, G2 such that

V (G)= V (G1) V (G2), • V (G ) V (G )∪ =2, • | 1 ∩ 2 | E(G)= E(G1) E(G2), and • E(G ) E(G )=∪ . • 1 ∩ 2 ∅ The pair of vertices, V (G ) V (G ), is called a 2-separator of G. 1 ∩ 2 ALGORITHMIC TECHNIQUES FOR FINDING RESISTANCE DISTANCE 9

Definition 3.5. If G is a graph with a 2-separator i, j , and a corresponding 2-separation G , G , then the 2-switch on G determined{ by} i, j is the operation 1 2 { } that identifies the copy of i in G1 with the copy of j in G2 and the copy of j in G1 with the copy of i in G2 (see Figure 6).

j j j j i j

→ → → i i i i j i

Figure 6. 2-switch

Definition 3.6. If i, j are vertices of G, then G/ij is the graph obtained from G by identifying vertices i and j into a vertex we denote by ij. In the identification, any edge u,i or u, j with u = i, j is replaced by an edge u,ij . (So if i and j have a common{ } neighbor{ } v, then6 there is a double edge from{ v to} ij in the new graph.) Any edge u, v with neither u nor v equal to i or j remains. If i, j is an edge it disappears.{ } { } The following two theorems from from [9] are especially useful and were instru- mental in showing the results in [8]. Theorem 3.7. Let G be a graph with a 2-separator i, j and G′ the graph obtained by performing the 2-switch determined by i and j. Then{ } T (G)= T (G′).

Moreover, if u and v are both in G1, or if u and v are both in G2 and neither is equal to i or j, then

(u, v)= ′ (u, v) and FG FG rG(u, v)= rG′ (u, v).

If u and v are both in G2 and exactly one of them (say, u) is equal to i or j, we have

(4) (i, v)= ′ (j, v), (j, v)= ′ (i, v), FG FG FG FG rG(i, v)= rG′ (j, v), and rG(j, v)= rG′ (i, v). Theorem 3.8. Let G be a graph with a 2-separation, with i, j the two vertices separating the graph, and G1, G2 the two graphs of the separation. Let u V (G1) and v V (G ). Then ∈ ∈ 2 (u, v)= (u,ij)T (G )+ (v,ij)T (G ) FG FG1/ij 2 FG2/ij 1 + (u,i) (v, j)+ (u, j) (v,i) FG1 FG2 FG1 FG2 2 (u, i, j ) (v, i, j ), − FG1 { } FG2 { } where, H (a, b,c ) is the number of spanning 2-forests separating the vertex a from the pairF of vertices{ } b and c in graph H.

Example 3. Again, we return to the example of the ladder graph Ln on 2n vertices. We will compute (1, 2n) and (1, 2n 1) using Theorem 3.8, FLn FLn − 10 E.J.EVANSANDA.E.FRANCIS

using difference equations as in Example 2 (above). We set

Fn = Ln (1, 2n), ˜ F Fn = Ln (1, 2n 1) A = F (1, 2−n 1-2n). n FLn/2n−1-2n − Applying Theorem 3.8 to find Fn, F˜n, and An (with i = 2n 3, j = 2n 2 in each case) gives − −

Fn = An−1 +2Tn−1 + F˜n−1 +2Fn−1 F˜n = An−1 +2Tn−1 +2F˜n−1 + Fn−1 An = An−1 + Tn−1 + Fn−1 + F˜n−1

Note that F2 = 4, F˜2 = 3, A2 = 2, and T2 = 4. We have the following linear system: 21120 Fn−1 Fn 12120 F˜ F˜    n−1   n  11110 An−1 = An 00031 T  T     n−1   n  00021 V  V     n−1   n  This matrix has only 3 linearly independent   eigenvectors,  so we cannot use our previous methods to find general formulae for the sequences in question. We can, however, use to derive the first few terms,

F2 4 F3 21 F4 105 F5 495 F˜ 3 F˜ 20 F˜ 104 F˜ 494  2     3     4     5    A2 = 2 , A3 = 13 , A4 = 69 , A5 = 334 . T  4 T  15 T   56  T  209  2     3     4     5    V  3 V  11 V   41  V  153  2     3     4     5    And thus,               n r (1, 2) r (1, 2n 1) r (1, 2n) Ln Ln − Ln 2 3/4 3/4 1 3 11/15 20/15 21/15 4 41/56 104/56 105/56 5 153/209 494/209 495/209 In [8] Barrett and the authors used the method of spanning 2-forests and 2- switches to generalize the formulas for a straight linear 2-tree to linear 2-trees with any number of bends. The definition is as follows:

Definition 3.9. We define the graph Gn with V (Gn) = V (Sn) and E(Gn) = (E(Sn) k 1, k +2 ) ( k, k +2 ) to be the bent linear 2-tree with bend at vertex k. See Figure∪{ − 7. } \ { }

In essence, performing a bend operation at vertex k results in vertex k 1 having degree 5, vertex k having degree 3 and all other vertices having the same− degrees as before. The following result is the main result from [8]. Theorem 3.10. [8, Th. 3.1] Given a bent linear 2-tree with n vertices, and p = p1+p2+p3 single bends located at nodes k1, k2,...,kp and k1 < k2 < < kp−1 < kp the number of spanning 2-forests separating nodes u and v where k···

k

k − 2 k + 1

5 k + 3

3 k − 1 n − 2

k − 3 k + 2 1 n 4 n − 3 2 n − 1

Figure 7. A linear 2-tree with n vertices and single bend at vertex k. and k < v k is given by p1+p2 ≤ p1+p2+1 (5) (u, v)= (u, v) FG FSn p1+p2 j−1 kj −ki+j−i j+u+kj 2 Fk −3Fk +2 [( 1) Fk Fk −3]+2( 1) F − j j − p1+i p1+i − u−1 · j=p +1 i=p +1 X1 h X1 i F F + 2( 1)v−kj F 2 , n−kj +2 n−kj −1 − n−v and the resistance distance between nodes uh and v is given by i

(6) rG(u, v)= rSn (u, v)

p1+p2 j−1 F F +2 [( 1)kj −ki+j−iF F ]+2( 1)j+u+kj F 2 − kj −3 kj − ki ki−3 − u−1 · j=p +1 i=p +1 X1 h X1 i F F + 2( 1)v−kj F 2 /F . n−kj +2 n−kj −1 − n−v 2n−2 h i In [19] the method of spanning 2-forests and 2-switches was used to determine resistance distance in a generalized flower graph. Definition 3.11. Let G be a graph, x, y be two distinct vertices of G, and n 3. ≥ A generalized flower of G, written Fn(G, x, y), is the graph obtained by taking n vertex disjoint copies G1, G2,...Gn of the base graph, and associating xi−1, the marked vertex x in Gi−1, with yi for 1

Theorem 3.12 ([19]). Let G be a complete flower Fn(Km) and u and v be vertices in G. Let I be the set of associated vertices connecting each copy of Km, then 2d(n d) r (u, v)= − if both u, v I Fn(Km) mn ∈ 2d (2d 1)2 r (u, v)= − if one of u, v I F(Km) m − 2mn ∈ 2d (2d 1)2 r (u, v)= − if neither of u, v I F(Km) m − mn ∈ 12 E.J.EVANSANDA.E.FRANCIS

G G G

G G G

Figure 8. Two examples of flower graphs. On the left is a generic generalized flower graph with six copies of graph G. On the right is a complete flower graph, F5(K4) created on 5 copies of K4.

Where d is the number of flower petals separating u and v including the petals containing u, and v. The proof of this theorem, and others in the paper, including a more complicated result for the generalized flower graph, is shown by creating a 2-separation using vertices in I such that u and v are in the same component, which contains d petals. This component is then further 2-separated using each of the petals, and a version of Theorem 3.7 is used to obtain the result. For complete details see [19]. 3.2. Recursion Techniques. In 2013 Yang and Klein [36] provided a technique for determining the resistance distance in a new graph from the resistance distance in a known graph via the changing of an edge weight on a single edge (including changing the weight from zero to non-zero and vice versa). Their main result is as follows: Theorem 3.13. Let Ω and Ω′ be resistance distance functions for edge-weighted connected graphs G and G′ which are the same, except for the weights w and w′ on an edge e with end vertices i and j. Then for any p, q V (G)= V (G′), ∈ δ[Ω(p,i)+Ω(q, j) Ω(p, j) Ω(q,i)]2 Ω′(p, q)=Ω(p, q) − − , − 4[1 + δΩ(i, j)] where δ = w′ w. − This technique works especially well in the case that graph H can be built (or subtracted from) graph G in a limited number of edge weight changes. An example of this is the derivation of the formula for the fan graph Fn (defined in Subsection 3.1) from the wheel graph Wn. In this case the change from a fan graph to a wheel graph involves changing the weight of a single edge. For full details of this example, and several similar examples we refer the reader to [36]. An obvious advantage of this approach is that a universal formula holds for all pairs of vertices in the graph. When a large number of edge weights must be changed, or in other words a large number of edges must be added or subtracted, multiple resistance values must be tracked through each recursive step. We illustrate this need to track a large number of values by returning to the ladder graph in Example 1.

Example 4. We begin with a G with the vertices ordered as 1, 3, 5,..., 2n 1, 2n, 2n 2,..., 2. The resistance distance between two vertices in this path − − ALGORITHMIC TECHNIQUES FOR FINDING RESISTANCE DISTANCE 13

0 r12 r13 r14 r15 r16 ... r1n  r21 0 r23 r24 r25 r26 ... r2n   r31 r32 0 r34 r35 r36 ... r3n     r41 r42 r43 0 r45 r46 ... r4n     r r r r 0 r ... r   51 52 53 54 56 5n     ......   ......     rn−1,1 rn−1,2 rn−1,3 rn−1,4 rn−1,5 rn−1,6 ... rn−1,n       rn1 rn2 rn3 rn4 rn5 rn6 ... 0     

Figure 9. The values of rG that must be calculated in order to determine rL(1, 2n). The red values are needed in the first step, the blue values the second, and the green values the third step.

graph is given by p q /2 if p + q is even rG(p, q)= | − | . 2n (p + q)/2 if p + q is odd ( −⌊ ⌋ We first modify G by adding an edge of weight zero between vertices 1 and 2 which does not change the resistance distances in the graph (we note that this corresponds to adding an edge with infinite resistance). The graph cycle graph G′ is then created by changing the weight of the edge between vertices 1 and 2 to have unit weight. Hence 2 [rG(p, 1) + rG(q, 2) rG(p, 2) rG(q, 1)] rG′ (p, q)= rG(p, q) − − . − 4[1 + rG(1, 2)] We then proceed to build the ladder graph by first adding an edge of weight zero between vertices k and k + 1 and then using the recursion formula to determine the resistance distance on the graph with the weight of the new edge equal to one. This technique is illustrated in Figure 10. To illustrate the challenges associated with technique, suppose that we are interested only in the resistance distance between vertex 1 and vertex 2n in the final ladder, and we wish to use this technique to determine this resistance. When changing the weight of the edge (1, 2) from 0 to 1 to determine rG′ (1, 2n) in the new graph we need the values of rG(1, 2), rG(1, 2n), and rG(2, 2n). Once these have been determined and we create G′′ by adding an edge (3, 4) and changing the edge weight from 0 to 1 we need the values rG′ (1, 2n), rG′ (1, 3), rG′ (1, 4), rG′ (3, 2n), rG′ (4, 2n), and rG′ (1, 2n). These values must be determined from the original graph G. In fact to determine the resistance rL(1, 2n), where L denotes the graph one must calculate rG(1, j) where 2 j 2n, rG(j, 2n) where 2 j 2n 1, and r(j, j + 1) where j is odd and 3≤ j ≤ 2n 3, or in short 5n≤ 5≤ values.− By a similar argument, in the next graph≤ (i.e.,≤ the− cycle) − one must calculate rG′ (1, j) where 3 j 2n, rG(j, 2n) where 3 j 2n 1, and r(j, j + 1) where j is odd and 3 ≤j ≤2n 3, or in short 5n ≤7 values.≤ − In 2 ≤ ≤ − − total (5n +5n)/2 resistance values must be computed to compute rL(1, 2n). 14 E.J.EVANSANDA.E.FRANCIS

1 3 2n − 1 1 3 2n − 1

2 4 2n 2 4 2n (A) (B)

1 3 2k − 3 2k − 1 2k + 1 2n − 1

2 4 2k − 2 2k 2k + 2 2n (C)

Figure 10. An illustration of the recursive technique to determine resistance distances in the ladder graph. We begin with a path with 2n vertices labeled as in panel (A) and add one edge (with weight zero between nodes 1 and 2 as illustrated in panel (B). We then change the wight of added edge from weight zero to weight one and use Theorem 3.13 to determine the resulting resistance distances. We continue in this manner adding edges and then changing weights until n 1 edges are added. An intermediate step (after k edges are added)− is shown in panel (C).

3.3. Local Rules. Another technique used for the determination of resistance dis- tance is the use of local sum rules. These local rules were developed based off the work of Klein [24] who developed a set of resistance distance sum rules. These rules work well when the graph has symmetries or is distance regular, as the inherent symmetries in the graph must be used in order to efficiently solve the resulting system of equations. More precisely, the local sum rule is as follows: Theorem 3.14 ([14]). Let G be a connected graph with unit edge resistance. The relations (7) deg(u)r (u, v)+ r (u,z) r (v,z) = 2; u, v V, G G − G ∀ ∈ z∈XN(u) determine all rG(i, j). This result has been extended to graphs with arbitrary edge resistances [12].

Example 5. We return to the familiar example of the ladder graph, and consider the graph with 6 vertices, labeled as shown in Figure 11. Due to symmetries in ALGORITHMIC TECHNIQUES FOR FINDING RESISTANCE DISTANCE 15

F E D

A B C

Figure 11. A ladder graph with 6 vertices, labeled for Exam- ples 5 and 9.

this graph, we observe that there are 6 unique resistance distances: r(A, B)= r(B, C)= r(D, E)= r(E, F ) r(A, F )= r(C,D) r(A, C)= r(D, F ) r(A, D)= r(C, F ) r(A, E)= r(B,D)= r(B, F )= r(C, E) r(B, E). Applying Equation 7 we find 2r(A, B)+ r(A, B) r(B,B)+ r(A, F ) r(B, F )=2, − − which simplifies to 3r(A, B)+ r(A, F ) r(A, E)=2 − proceeding in a similar manner for r(A, C), r(A, D), r(A, E), r(A, F ) and r(B, E), yields the following linear equation 3 0 0 1 1 0 r(A, B) 2 0 2 10− 10 r(A, C) 2 1 1− 2 1 1 0 r(A, D) 2 − − = . 00 0 2 1 1 r(A, E) 2  −      1 0 0 1 3 0 r(A, F ) 2  −      2 0 0 2 0 4 r(B, E) 2  −      Solving we find r(A, B) =11/15, r(A, C) =20  /15, r(A, D) =21 /15, r(A, E)= 14/15, r(A, F ) = 11/15, and r(B, E)=9/15 as expected. We note that for this example, the number of unknowns is equal to the number of vertices, hence solving the system, and solving for the pseudoinverse of the combinatorial Lapla- cian is approximately equivalent. For the ladder with 2n nodes the number of “unique” resistances is (n2 n)/2. − For an arbitrary graph, with no easily discernible symmetries, the number of unique resistances is on the order of n2. As n increases this technique rapidly surpasses the use of the combinatorial Laplacian in complexity. This technique is useful in the case of highly symmetric graphs, such as regular polyhedra [14].

3.4. The combinatorial Laplacian. A different technique that works for graphs whose combinatorial Laplacian have specific, nice structures utilizes the general- ized inverse of this matrix. More specifically, given a graph G with combinatorial 16 E.J.EVANSANDA.E.FRANCIS

Laplacian L(G) the effective resistance between nodes i and j is given by r (i, j) = (e e )T X(e e ), G i − j i − j where X is any generalized inverse of L(G). Usually X is taken to be L†, the Moore-Penrose inverse of L(G), so we have (8) r (i, j) = (e e )T L†(e e ). G i − j i − j Instead of the Moore-Penrose inverse we can consider the generalized inverse (suggested by Bapat [3]) L(n n)−1 0 H = , |0 0   where L(n n) is the with the nth row and nth column removed. We observe| that for the cycle graph, the path graph, and the fan graph removing the last row and the column yields a . Fortunately, for graphs that are tridiagonal, a closed, recursive formula exists for the entries in the inverse matrix. In particular suppose we consider the symmetric tridiagonal matrix

a1 b1 b1 a2 b2  . .  T = b .. ..  2   . .   .. .. b   n−1  b a   n−1 n  then   |j−i| −1 ( 1) bi bj−1θi−1φj+1/θn if i = j Tij = − ··· 6 (θi−1φj+1/θn if i = j. Here θ satisfies the recurrence relation θ = a θ b2 θ for i =2, 3,...,n i i i i−1 − i−1 i−2 with θ = 1 and θ = a , whereas φ satisfies the relation φ = a φ b2φ 0 1 1 i i i i+1 − i i+2 for i = n 1,..., 1 with φn+1 = 1 and φn = an[16]. These equations allow us to immediately− write the following equation for the resistance distance between nodes i and j |j−i| θi−1φi+1 + θj−1φj+1 2( 1) bi bj−1θi−1φj+1 rij = − − ··· . θn The use of such a recursive formula, along with the equations for generalized Fi- bonacci numbers allowed Bapat and Gupta to give an explicit formula for the resistance distance between any two vertices in a wheel or fan graph [3]. Here the wheel graph Wn is defined as the graph on n + 1 vertices, formed by taking an n cycle and connecting each vertex 1,...,n in the cycle to a “hub”, vertex n + 1.

Proposition 3.15 ([3]). Let Wn be the wheel graph with unit edge resistances on n +1 vertices for n 3 with vertex ordering as described above. Then, for i, j =1,...,n ≥ F 2 F 2 F r (i,n +1)= 2n , and r (i, j)= 2n 2 4k + F , Wn F 2F Wn F 2F − F 2k 4n − 2n 4n − 2n  2k  where k is the distance between i and j in Cn, and Fk is the kth Fibonacci number. Example 6. We consider the slightly more complex case of the straight linear 2-tree and demonstrate how this technique can be used to find the resistance ALGORITHMIC TECHNIQUES FOR FINDING RESISTANCE DISTANCE 17 distance between node n 1 and node n. This corresponds to finding the deter- minant of two different matrices− and dividing one by the other. The numerator corresponds to the determinant of the (n 2) (n 2) matrix created by remov- ing the final two rows and columns from− the Laplacian.× − The denominator is the determinant of the (n 1) (n 1) matrix created by removing the final row and column from the determinant.− × − We note that the value of the denominator is the number of spanning trees of the straight linear 2–tree and is known to be F2n−2, so we omit this calculation. Thus we wish to find the determinant of Mn which in the (n 2) (n 2) pentadiagonal matrix with entries − × − 2 if i = j =1 3 if i = j =2 (Mn)ij =  4 if i = j and 3 i n 2  ≤ ≤ − 1 if i j =1 or i j =2. − | − | | − |  We will use Sweet’s formula [31] c a c d = a n−2 d b n−1 n−2 d (β a c )d n n − b n−1 − n−1 − b n−2− n−2 n−1− n−2 n−3  n−2   n−2  a c β β c + β β n−2 n−2 d + n−3 n−4 n−2 d , n−3 n−2 − b n−4 b n−5  n−2  n−2 here d is the determinant of M , d is the determinant of M (n 2 n 2), n n n−1 n − | − dn−2 is the determinant of Mn with the last two rows and columns removed. Moreover ai = (Mn)ii, bi = (Mn)i,i+1(Mn)i+1,i, βi = (Mn)i,i+2(Mn)i+2,i and ci = (Mn)i,i+1(Mn)i+1,i+2(Mn)i+2,i. If the sub and superdiagonals of the matrix in question are all equal to 1 as in our case Sweet’s formula simplifies to: − d = (a + 1)d (1 + a )(d + d )+(1+ a )d d . n n n−1 − n−1 n−2 n−3 n−2 n−4 − n−5 Lemma 3.16. The determinant of Mn is equal to F2n−3. We proceed by induction. For n = 5, 6, 7, 8, 9, straight forward numerical calculations show the determinants of M5, M6, M7, M8, and M9 to be 13, 34, 89, 233, and 610 respectively, thus showing the necessary base cases. We now assume that det(Mn) = F2n−3 and will show, using the simplified version of Sweet’s formula that det(Mn+1)= F2n−1. det(M ) = (4 + 1) det(M ) (4 + 1)(det(M ) + det(M )) n+1 n − n−1 n−2 + (4 + 1) det(M ) det(M ) n−3 − n−4 =5F 5(F + F )+5F F 2n−3 − 2n−5 2n−7 2n−9 − 2n−11 =5F 5(F + F )+2F + F 2n−3 − 2n−5 2n−7 2n−9 2n−7 =5F 5F 2F 2n−3 − 2n−5 − 2n−6 =5F 5F 2F 2n−3 − 2n−5 − 2n−6 =3F F 2n−3 − 2n−5 = F2n−1 18 E.J.EVANSANDA.E.FRANCIS

From this Lemma, and the knowledge that the number of spanning trees in a straight linear 2–tree with n vertices is equal to F2n−2, we can conclude that the r(n 1,n)= F /F which is consistent with the results in Theorem 2.11. − 2n−3 2n−2 Example 7. In the case of the straight linear 2–tree and the ladder graphs the resulting L(n n) is a non-singular pentadiagonal matrix. If the pentadiagonal matrix is Toeplitz| a recursive formula for the entries in the inverse matrix is known [34], but no such general formula exists for an arbitrary pentadiagonal matrix, only numerical methods that allow for fast computation [39]. If instead we consider the simpler problem of determining the resistance distance between the extremal vertices (i.e., r(1, 2n) in the case of the lad- der graph), the problem reduces to determining the entry H(1, 1) (because H(1, 2n)= H(2n, 1) = H(2n, 2n) = 0)). Thus only a single entry in the matrix needs to be determined, and that entry is just the determinant of L with the first row and column, and the last row and column removed, divided by the number of spanning trees (which is known). Unfortunately, even though a seven-term recursive formula exists to calculate the determinant of a pentadiagonal matrix [31], this formula requires all the entries on the sub and super diagonals to be non-zero, which is not the case for the ladder graph. This formula does offer an alternative way, however, of calculating the resistance distance r(1,n) in the straight linear 2–tree, similar to the prior example. 3.5. As a solution to an optimization problem. In addition to combinatorial and matrix based techniques, resistance distance can be framed as an optimiza- tion problem. This is unsurprising as electrical circuits can be modeled as springs and finding the resistance distance in essence is equivalent to finding the steady state solution of a spring network. The following theorem formalizes the resistance distance between two vertices as a problem of finding the minimum. Theorem 3.17. 1 2 = min (xi xj ) . r(u, v) x∈Rn − xu−xv=1 {ij}∈XE(G) Example 8. We consider the ladder graph with six vertices labeled as in Fig- ure 11, and consider the resistance distance between nodes A and F . Using Theorem 3.17, we know

1 2 = min (xi xj ) r(A, F ) x∈Rn − xA−xF =1 {ij}∈XE(G) = min(x x )2 + (x x )2 + (x x )2 + (x x )2 A − B A − F B − C B − E + (x x )2 + (x x )2 + (x x )2 C − D D − E E − F = min(x +1 x )2 +1+(x x )2 + (x x )2 F − B B − C B − E + (x x )2 + (x x )2 + (x x )2 C − D D − E E − F ALGORITHMIC TECHNIQUES FOR FINDING RESISTANCE DISTANCE 19

The minimum occurs when the gradient is equal to zero, or in other words when 3 1 0 1 1 x 1 − − − B 1 2 1 0 0 xC 0 −0 1− 2 1 0  x  =  0  . − − D  1 0 1 3 1 xE   0  − − −       1 0 0 1 2  x   1 − −   F  −  A moments consideration will reveal that this is not a linearly independent system of equations, thus there is no unique solution. However, algebra yields 7 6 5 4 xA = xF +1, xB = xF + 11 , xC = xF + 11 , xD = xF + 11 , and xE = xF + 11 . Thus, setting xF = 0 gives values for xA, xB , xC , xD and xE. Checking, r(A, F )=((1 7 )2 +1+( 7 6 )2 + ( 7 4 )2 + ( 6 5 )2 + ( 5 4 )2 + ( 4 )2)−1 − 11 11 − 11 11 − 11 11 − 11 11 − 11 11 15 −1 11 = ( 11 ) = 15 , as expected.

3.6. Simplices and distances. A less well-known method for determining resis- tance distances in a graph lies in the construction of certain simplices. Recall that a geometric simplex is a generalization of a triangle to a higher or lower dimension, and a simplex in dimension n is defined by n + 1 linearly independent points. We represent this in matrix form as S which is n (n + 1). To determine resistance distance we will be interested in hyperacute simplices× , that is to say those simplices whose dihedral angles are non-obtuse. As a first step to the relationship between resistance distance and simplicies we state the following result from Fiedler [20] Theorem 3.18. There is a bijection between (1) Laplacian matrices of n dimensions, (2) hyperacute simplices on n vertices. With the knowledge that such a bijection exists, it should not be surprising, given the relationship between the pseudoinverse of the combinatorial Laplacian and the resistance distance that a similar relationship exists between these simplices and the resistance distance. Before stating that relationship, we first give the necessary details involved in constructing this bijection. The Laplacian should be dependent on the relative locations of the vertices of the simplex, but should not be dependent on the location of the simplex in space, or rotations of the simplex. For this reason we introduce a centered simplex S˜ = S(I uuT /n), where u is a vector of ones, which is an identical simplex, except that− the centroid of the translated simplex is located at the origin. With this translation, the corresponding Laplacian is the Moore-Penrose pseudoinverse of the of the translated simplex, i.e., L = ((I uuT /n)ST S(I uuT /n))† = (S˜T S˜)† for any representative simplex − − n−1 T S. Given a Laplacian, with spectral decomposition L = k=1 µkzkzk , we can construct the corresponding simplex as an equivalence class of the simplex with vertices P

(9) (si)k = (zk)i 1/µk. With this bijection formally stated, recallp Equation 8 which relates the resistance distance to entries in L†. More specifically we observe r(i, j) = (e e )T L†(e e ) = (e e )T S˜T S˜(e e )= S˜(e e ) 2, i − j i − j i − j i − j || i − j ||2 20 E.J.EVANSANDA.E.FRANCIS or in other words the resistance distance between two points in a network is equal to the square of the (Euclidean) distance between the points in the centered Simplex. This result can be summarized in the following theorem known as, Fiedler’s iden- tity, which gives the relationship between between a simplex, and the associated resistance distance matrix Ω. Theorem 3.19. [17] For a weighted graph G with Laplacian matrix L and simplex S with resistance distance matrix Ω, the following identity holds −1 1 0 uT 4R2 2rT (10) = − − 2 u Ω 2r L   −  1 † where u is a vector of ones, r = 2 Lζ + u/n with ζ = diag(L ) determines the 1 circumcenter of S as Sr, and with R = 2 ζ(r + u/n) the circumradius of S. q Example 9. We consider the ladder graph with six vertices labeled as in Fig- ure 11. Upon calculating the spectral decomposition of the associated Laplacian and using Equation 9 we construct the 5-dimensional simplex with vertices lo- cated at

sA = 1/2 1/√12 1/6 1/√12 1/√60 − − − sB = 0 1/√12 1/6 1/√12 1/√15  − − − − sC = 1/2 1/√12 1/3 0 1/√60  − sD = 1/2 1/√12 1/6 1/√12 1/√60 − − sE = 0 1/√12 1/6 1/√12 1/√15  − − sF =  1/2 1/√12 1/3 0 1/√60 .  − − As a check we calculate  r(A, B)= s s 2 || A − B||2 = 1/20 0 2/√12 3/√60 2 || − ||2 =1/4+1/3+3/20 = 11/15,  as expected. 3.7. Numerical techniques for estimating the resistance distance. In some applications of resistance distance, the actual numerical value of the resistance dis- tance is less important than knowing the approximate magnitude of the resistance distance or the ordering of resistance distance between nodes. In this subsection we briefly review two numerical techniques for estimating resistance distance in a (typ- ically) very large graph. Although these techniques do not return exact answers, the answers they return are often sufficient for applications. 3.7.1. Numerically estimating the group inverse. In [25] the authors use spectral embedding to create estimates for resistance distance. More specifically, given the n−1 T spectral decomposition of the Laplacian matrix L = k=1 µkzkzk , the spectral † n−1 1 T decomposition of the Moore-Penrose pseudo inverse is given by L = zkz . P k=1 µk k Hence the resistance distance betweeen nodes i and j is given by P n−1 (z z )2 r(i, j)= ki − kj . λk Xk=1 ALGORITHMIC TECHNIQUES FOR FINDING RESISTANCE DISTANCE 21

kp1+p2 v = kp1+p2+1

v + 1

u

Figure 12. An example graph showing the dilemma we face trav- eling from v to v + 1, through a bend.

This suggests that a reasonable estimate of the resistance distance can be obtained by considering the t smallest eigenvalues and eigenvectors associated with them, in essence t (z z )2 r(i, j) ki − kj . ≈ λk Xk=1 Moreover, the t eigenvalues and eigenvectors are approximated using iterative meth- ods from numerical (e.g., Arnoldi method). Pachev and Webb found that using this technique to approximate resistance distance for the problem of link prediction gave comparable accuracy to exact techniques for large networks but in a fraction of the time required for exact techniques.

3.8. Random Projections. In [29] Spielman and Srivastava developed an algo- rithm for computing an approximate resistance distance in O(log n) time using random projections. Key to their technique is the knowledge that resistance dis- tance is a just the distance between vectors in higher dimensional space. They then using a random linear projection they project these vectors into a lower di- mensional space in a numerically efficient manner. They take advantage of the Johnson-Lindenstrauss, which states that with high probability these types of ran- dom projections preserve distances. Working in this lower dimensional space, they then use a previously developed solver (STSolve) to quickly compute the distances.

3.9. Additional techniques. In addition to the algorithms and techniques dis- cussed in this survey a wide variety of techniques have also been developed and studied to determine resistance distances. For completeness we include the follow- ing list: The commute time and escape probability of random walks [18]. • Eigenvalues and eigenvectors of the Laplacian matrix [23] and the normal- • ized Laplacian matrix [13]. Minors of the Laplacian matrix [5]. •

4. Conjectures and open questions We recall the Definition 2.9 of a K-path as a K-tree with exactly two vertices of degree K It seems natural to use the methods demonstrated in Section 2.1 to find resistances between nodes in linear K-trees for K 3, especially in the straight ≥ 22 E.J.EVANSANDA.E.FRANCIS case. However, it is much more complicated to find an algorithm to “eliminate a K ” using equivalent network transformations when n 3. n ≥

N1

N1 A F C

N5 B N4 N2 N4 N2

E D

N3 N4

Figure 13. The graph in the left panel is a star circuit with N =4 resistors (edges). The graph in the right panel is a mesh circuit with N = 6 resistors.

The first question that may arise is: do there exist transformations analogous to ∆–Y and Y–∆ transformations, for tetrahedra and stars? The answer is partially afirmative: the star-mesh transformation is defined as 1 1 = RuRv Ruv R X  where Ruv is the resistance on the new edge uv and Ru is the resistance between node u and the center node. This transformation replaces the N resistors (edges) of 1 the star with 2 N(N 1) resistors (edges) in a mesh, and for N > 3 the number of resistors increases. See− Figure 13. Although the star-mesh transformation always exists, because of the decrease in the number of resistors, the mesh–star transfor- mation is only guaranteed to exist for N 3 and it is only unique for N = 3. With the addition of certain conditions on the≤ resistances on the edges of the mesh, one can guarantee the existence and uniqueness of a mesh–star transformation. In particular, considering the specialized case of N = 4 shown in Figure 13 the re- quirement for such a transformation to exist is that AD = CE = BF. Given a 3-tree with unit edge resistances, the above condition holds for any tetrahedron in the network. However, after performing one mesh–star transformation, it no longer holds for subsequent transformations. Thus, the mesh–star and star–mesh transfor- mations do not produce a straightforward method for finding resistance distances in a K-path. An alternative idea is an algorithm that collapses the graph by taking a sequence of ∆–Y and Y–∆ transformations. We give an algorithm to do just this in the case of a straight linear 3-tree. Algorithm 4.1. Given a straight linear 3-tree G with n nodes labeled as suggested in Figure 14. We can perform equivalent network transformations in such a way as to reduce the number of tetrahedra separating the nodes of degree 3 in the following way: (1) Perform a ∆–Y transformation on the cycle involving nodes 1, 2, and 3. This creates a new node, labelled ⋆ in Figure 14. ALGORITHMIC TECHNIQUES FOR FINDING RESISTANCE DISTANCE 23

(2) Perform a Y–∆ transformation on the star with center at node 2. This eliminates node 2. (3) Perform a ∆–Y transformation on the cycle involving nodes 1, ⋆, and 4. This creates a new node, labelled in Figure 14. (4) Perform a Y–∆ transformation on∗ the star with center at node ⋆. This eliminates node ⋆. We now have one fewer tetrahedra separating node 1 from node n. Note that the node set is not stable under this algorithm, as we have eliminated node 2 and introduced a new node . ∗ Although Algorithm 4.1 can be used to find resistance distances between any pair of vertices on the straight linear 3-trees with n vertices for any n, we do not know of any general formulae for these resistances.

5 5 5 6 6 6 5 5 6 4 2 3 4 4 2 1 5 3 3 1 3 3 ⋆ 1 3 3 ⋆ 3 1 3 1 3

1 1 1 Initial 3-tree Step 1 Step 2 5 6 5

5 6 6 5 3 5 3 4 5 4 6 1 ⋆ 3 5 5 3 9 25 3 5 9 9 5 27 9

∗ 1 ∗ 1 9 9

1 1 Step 3 Step 4

Figure 14. Demonstration of a 4-step algorithm exchanging a tetrahedron for a cut vertex using equivalent network transforma- tions. Edges are assumed to have unit resistance unless labelled.

We next consider another family of graphs with considerable structure and sym- metry.

(n+1)(n+2) Definition 4.2. The triangular grid graph Tn with n rows and 2 vertices is defined recursively as follows: T = K , the complete graph on 3 vertices. • 1 3 24 E.J.EVANSANDA.E.FRANCIS

E(T ) is formed by adding to E(T ) the edges • n+1 n n(n + 1) (n + 1)(n + 2) + k, + k , 2 2  n(n + 1) (n + 1)(n + 2) + k, + k +1 , and 2 2  n(n + 1)  (n + 1)(n + 2) + k, + k , 2 2 for k =1,...,n +1.  

The graph T4 with 4 rows on 15 vertices is shown in Figure 15.

a

b

Figure 15. A triangular grid with 4 rows.

Note that this graph does not have bounded tree-width as the number of vertices goes to infinity. Again, it seems natural to attempt to use equivalent network transformations simply or collapse this graph, in order to determine resistance distances (or, equiv- alently, the number of spanning two forests). Here we present an algorithm along these lines:

Algorithm 4.3. Given a triangular grid graph Tn on n rows, we can perform equivalent network transformations in such a way as to reduce the number of rows separating the extremal nodes in the following way: (1) Perform a ∆-Y transformation on each ‘upright’ triangle, that is, each triangle with two vertices along the bottom edge and one vertex at the top. The transformed graph after this step is shown in Panel (A) of Figure 16. The resistance on dashed edges is equal to 1/3. (2) Perform series transformations on all exterior edges (except those incident to the three pendant vertices). The transformed graph after this step is shown in Panel (B) of Figure 16. The resistance on the dotted edges is 2/3. (3) Perform Y-∆ transformations on all interior “upright” ‘Y’s. The trans- formed graph after this step is shown in Panel (C) of Figure 16. The resistance on each solid edge is equal to one. Note that the transformed graph is simpler than the original, in that there are now fewer rows. However, the new graph is more complicated in the sense that the edge resistances are not the same for all edges. The algorithm does provide a ALGORITHMIC TECHNIQUES FOR FINDING RESISTANCE DISTANCE 25

(A) (B) (C)

Figure 16. Panel (A) shows the graph after Step 1 in Algorithm 4.3, Panel (B) after Step 2, and Panel (C) after Step 3. Dashed 1 2 edges have resistance 3 , dotted edges 3 and solid edges 1. method whereby one can recover resistance distances in triangular grid graphs of arbitrary size, but it does not suggest a general closed formulae for these resistances. This inspires the following open questions: Question 4.4. In what cases can an algorithm using equivalent network trans- formations (found in Section 2.1) together with Theorem 2.7 be used to produce resistance distance between some or all pairs of nodes in the original network? As mentioned above, it is possible compute the maximal effective resistance be- tween the extremal nodes in both straight linear 3-trees and triangular grid graphs for small n, but no closed formula is known in general in either case. However, empirical evidence has allowed us to make the following conjectures: Conjecture 4.5. Let G be the straight linear K-tree, k 1, with n vertices and H be the straight linear K-tree with n +1 vertices. Then ≥ 6 lim rH (1,n + 1) rG(1,n)= . n→∞ − k(k + 1)(2k + 1)

Conjecture 4.6. Let G be the block tower graph C4Pn (that is the Cartesian product of the 4–cycle and the path of length n) with 4n vertices and H be the block tower graph C4Pn+1 with 4n +4 vertices. Then 1 lim rH (1, 4n + 3) rG(1, 4n 1) = . n→∞ − − 4 2 Conjecture 4.7. Let G be the n n grid graph PnPn with n vertices and H be the (n + 1) (n + 1) grid graph P× P with (n + 1)2 vertices. Then × n+1 n+1 lim exp(rH (a,b)) exp(rG(a,b)) = C > 0. n→∞ − Moreover lim r (a,b)= . n→∞ n ∞ Conjecture 4.8. Let Tn be the triangular grid graph shown in Figure 15 with n rows and m = n2 cells. Moreover let a and b be distinct vertices with degree 2 and let rn(a,b) be the resistance distance between a and b in Tn. Then

lim exp(rn+1(a,b)) exp(rn(a,b)) = C > 0. n→∞ − Moreover lim r (a,b)= . n→∞ n ∞ 26 E.J.EVANSANDA.E.FRANCIS

It is relatively easy to give a lower bound on the resistance between nodes a and b in the triangular grid graph. Suppose each horizontal edge is shorted, that is to say we add a wire with zero resistance parallel to each horizontal edge in the triangular grid graph. Adding such an edge decreases the resistance between a and b . This has the effect of removing all the horizontal edges and merging all nodes along each row. The resulting circuit is a path starting at node a = 1 and ending at node b = n, where the number of paths between nodes i and j is 2i. Applying the parallel and series rule, the resulting resistance between nodes a and b is 1 1+ 1 + 1 + + 1 . 2 2 3 ··· n Thus we have a partial sum of harmonic series and it is easy to see as n goes to infinity the sum goes to infinity. (Thanks to H.Tracy Hall for this argument.) Recall from Theorems 2.7 and 3.7, that if G can be separated by one or two vertices, then the resistance distances and number of separating spanning 2-forests can be recovered from those in the two component graphs of the separation. It is natural then to ask if similar results can be stated for separations of larger size.

Question 4.9. Suppose that G is a graph with subgraphs G1 and G2 such that

V (G)= V (G1) V (G2), • V (G ) V (G )∪ = n for n 3, • | 1 ∩ 2 | ≥ E(G)= E(G1) E(G2), and • E(G ) E(G )=∪ . • 1 ∩ 2 ∅ What can be said about how resistance distances in G are related to resistance distances in G1 and G2? It is worth noting that the inspiration for Theorem 3.7 came from the study of 2-separators for determining the maximum co-rank of a graph [32]. To our knowledge, this question has not been answered for determining the maximum co- rank of a graph with 3-separators.

Acknowledgments We benefited from many very helpful conversations with colleagues at BYU, including Wayne Barrett, Tracy Hall, Mark Kempton, Ben Webb, and others. This paper is a direct result of research done at the Mathematical Sciences Research Institute as part of their Summer Research in Mathematics (SRiM) program.

References

[1] D. Babi´c, D. J. Klein, I. Lukovits, S. Nikoli´c, and N. Trinajsti´c. Resistance-distance matrix: A computational algorithm and its application. International Journal of Quantum Chemistry, 90(1):166–176, 2002. [2] R. B. Bapat. Resistance distance in graphs. Math. Student, 68(1-4):87–98, 1999. [3] R. B. Bapat and Somit Gupta. Resistance distance in wheels and fans. Indian. J. Pure App. Math., 41(1):1–13, Feb 2010. [4] R.B. Bapat. Graphs and Matrices. Universitext. Springer London, 2010. [5] R.B. Bapat and Sivaramakrishnan Sivasubramanian. Identities for minors of the laplacian, re- sistance and distance matrices. Linear Algebra and its Applications, 435(6):1479–1489, 2011. [6] Prabir Barooah and Joao P. Hespanha. Graph effective resistances and distributed control: Spectral properties and applications. In In Proc. of the 45th IEEE Conference on Decision and Control, pages 3479–3485, 2006. [7] Wayne Barrett, Emily. J. Evans, and Amanda E. Francis. Resistance distance in straight linear 2-trees. Discrete Appl. Math., 258:13–34, 2019. ALGORITHMIC TECHNIQUES FOR FINDING RESISTANCE DISTANCE 27

[8] Wayne Barrett, Emily J. Evans, and Amanda E. Francis. Resistance distance and spanning 2-forest matrices of linear 2-trees. Linear Algebra Appl., 606:41–67, 2020. [9] Wayne Barrett, Emily J. Evans, Amanda E. Francis, Mark Kempton, and John Sinkovic. Spanning 2-forests and resistance distance in 2-connected graphs. Discrete Applied Mathe- matics, 284:341 – 352, 2020. [10] B´ela Bollob´as. Modern , volume 184 of Graduate Texts in Mathematics. Springer- Verlag, New York, 1998. [11] Angeles Carmona, Andres M Encinas, and Margarida Mitjana. Effective resistances for ladder-like chains. International journal of quantum chemistry, 114(24):1670–1677, 2014. [12] Haiyan Chen. Random walks and the effective resistance sum rules. Discrete Applied Math- ematics, 158(15):1691–1700, 2010. [13] Haiyan Chen and Fuji Zhang. Resistance distance and the normalized Laplacian spectrum. Discrete Appl. Math., 155(5):654–661, 2007. [14] Haiyan Chen and Fuji Zhang. Resistance distance local rules. Journal of mathematical chem- istry, 44(2):405–417, 2008. [15] Zubeyir Cinkir. Effective resistances and Kirchhoff index of ladder graphs. J. Math. Chem., 54(4):955–966, 2016. [16] C.M. da Fonseca. On the eigenvalues of some tridiagonal matrices. Journal of Computational and Applied Mathematics, 200(1):283–286, 2007. [17] Karel Devriendt. Effective resistance is more than distance: Laplacians, simplices and the schur complement, 2020. [18] Peter G. Doyle and J. Laurie Snell. Random walks and electric networks, volume 22 of Carus Mathematical Monographs. Mathematical Association of America, Washington, DC, 1984. [19] Nolan Faught, Mark Kempton, and Adam Knudson. Resistance distance, Kirchhoff index, and Kemeny’s constant in flower graphs, 2020. [20] Miroslav Fiedler. Some characterizations of symmetric inverse M-matrices. In Proceedings of the Sixth Conference of the International Linear Algebra Society (Chemnitz, 1996), volume 275/276, pages 179–187, 1998. [21] Arpita Ghosh, Stephen Boyd, and Amin Saberi. Minimizing effective resistance of a graph. SIAM Rev., 50(1):37–66, 2008. [22] D. J. Klein and M. Randi´c. Resistance distance. J. Math. Chem., 12(1):81–95, Dec 1993. [23] DJ Klein. Graph geometry, graph metrics and Wiener. MATCH Commun. Math. Comput. Chem, 35(7), 1997. [24] Douglas J Klein. Resistance-distance sum rules. Croatica chemica acta, 75(2):633–649, 2002. [25] Benjamin Pachev and Benjamin Webb. Fast link prediction for large networks using spectral embedding. Journal of Complex Networks, 6(1):79–94, 07 2017. [26] Jose’ Luis Palacios. On the Kirchhoff index of regular graphs. International Journal of Quan- tum Chemistry, 110(7):1307–1309, 2010. [27] YJ Peng and SC Li. On the Kirchhoff index and the number of spanning trees of linear phenylenes. MATCH Commun. Math. Comput. Chem, 77(3):765–780, 2017. [28] Neil J. A. Sloane and The OEIS Foundation Inc. The on-line encyclopedia of integer se- quences, 2021. [29] Daniel A. Spielman and Nikhil Srivastava. Graph sparsification by effective resistances. SIAM J. Comput., 40(6):1913–1926, 2011. [30] William Stevenson. Elements of Power System Analysis. McGraw Hill, New York, 3 edition, 1975. [31] Roland A. Sweet. A recursive relation for the determinant of a pentadiagonal matrix. Com- mun. ACM, 12(6):330–332, June 1969. [32] Hein van der Holst. The maximum corank of graphs with a 2-separation. Linear Algebra and its Applications, 428(7):1587–1600, 2008. [33] Vaya Sapobi Samui Vos. Methods for determining the effective resistance. PhD thesis, Masters thesis, 20 December, 2016. [34] Chaojie Wang, Hongyi Li, and Di Zhao. An explicit formula for the inverse of a pentadiagonal . Journal of Computational and Applied Mathematics, 278:12–18, 2015. [35] Yan Wang and Wenwen Zhang. Kirchhoff index of linear pentagonal chains. International Journal of Quantum Chemistry, 110(9):1594–1604, 2010. [36] Yujun Yang and Douglas J. Klein. A recursion formula for resistance distances and its appli- cations. Discrete Appl. Math., 161(16-17):2702–2715, November 2013. 28 E.J.EVANSANDA.E.FRANCIS

[37] Yujun Yang and Douglas J Klein. Comparison theorems on resistance distances and Kirchhoff indices of s, t-isomers. Discrete Applied Mathematics, 175:87–93, 2014. [38] Yujun Yang and Heping Zhang. Kirchhoff index of linear hexagonal chains. International journal of quantum chemistry, 108(3):503–512, 2008. [39] Xi-Le Zhao and T. Huang. On the inverse of a general pentadiagonal matrix. Appl. Math. Comput., 202:639–646, 2008.

Department of Mathematics, Brigham Young University, Provo, Utah 84602, USA

Mathematical Reviews, American Mathematical Society, Ann Arbor, Michigan 48103, USA This figure "20_choose_7.png" is available in "png" format from:

http://arxiv.org/ps/2108.07942v2 This figure "20_choose_7_ordered.png" is available in "png" format from:

http://arxiv.org/ps/2108.07942v2 This figure "recursladder.png" is available in "png" format from:

http://arxiv.org/ps/2108.07942v2