Bapat Simple PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

A Simple Method for Computing Resistance Distance

Ravindra B. Bapat, Ivan Gutman a,b , and Wenjun Xiao b


Indian Statistical Institute, New Delhi, 110016, India
a Faculty of Science, University of Kragujevac, P. O. Box 60, 34000 Kragujevac,
Serbia and Montenegro,
b Xiamen University, P. O. Box 1003, Xiamen 361005, P. R. China, and Department of
Computer Science, South China University of Technology, Guangzhou 510641, P. R. China
Reprint requests to Prof. I. G.; Fax: +381 34 335040; E-mail: [email protected]

Z. Naturforsch. 58a, 494 – 498 (2003); received August 2, 2003

The resistance distance ri j between two vertices vi and v j of a (connected, molecular) graph G
is equal to the effective resistance between the respective two points of an electrical network, con-
structed so as to correspond to G, such that the resistance of any edge is unity. We show how ri j can
be computed from the Laplacian matrix L of the graph G: Let L(i) and L(i, j) be obtained from L
by deleting its i-th row and column, and by deleting its i-th and j-th rows and columns, respectively.
Then ri j = det L(i, j)/ det L(i).

Key words: Resistance Distance; Laplacian Matrix; Kirchhoff Index; Molecular Graph.

1. Introduction a structure-descriptor that eventually was named [13]


the “Kirchhoff index”.
When the structure of a molecule is represented by Resistance distances are computed by methods of
a metric topological space [1 – 5], then the distance be- the theory of resistive electrical networks (based on
tween two vertices vi and v j , denoted by d i j , is defined Ohm’s and Kirchhoff’s laws); for details see [24]. The
as the length (= number of edges) of a shortest path standard method to compute r i j is via the Moore-
that connects vi and v j in the corresponding molecu- Penrose generalized inverse L † of the Laplacian matrix
lar graph G. The vertex-distance concept found numer- L of the underlying graph G:
ous chemical applications; for details see the recent re-
views [6 – 8] and elsewhere [9 – 11]. In order to exam- ri j = (L† )ii + (L† ) j j − (L† )i j − (L† ) ji . (2)
ine other possible metrics in (molecular) graphs, Klein
Equation (2) is stated already in [12] and [14], but was,
and Randić [12] conceived the resistance distance be-
for sure, known much earlier.
tween the vertices of a graph G, denoted by r i j , de-
In this work we communicate a novel, remarkably
fined to be equal to the effective electrical resistance
simple expression for r i j , stated in Theorem 1. In order
between the nodes i and j of a network N correspond-
to be able to formulate our main result, we first specify
ing to G, with unit resistors taken over any edge of N.
our notation and terminology and remind the readers to
For acyclic graphs r i j = di j , and therefore the resis-
some basic facts from Laplacian graph spectral theory.
tance distances are primarily of interest in the case of
cycle-containing (molecular) graphs. 2. On Laplacian Spectral Theory
Resistance-distances and molecular structure-de-
scriptors based on them were much studied in the Let G be a graph and let its vertices be labeled by
chemical literature [12 – 23] and recently attracted the v1 , v2 , . . . , vn . The Laplacian matrix of G, denoted by
attention also of mathematicians [24, 25]. In analogy to L = L(G), is a square matrix of order n whose (i, j)-
the classical Wiener index [7 – 11], one introduced [12] entry is defined by
the sum of resistance distances of all pairs of vertices Li j = −1, if i = j and the vertices v i and v j are adjacent,
of a molecular graph,
Li j = 0, if i = j and the vertices v i and v j are not
adjacent,
K f = ∑ ri j , (1)
i< j Li j = di , if i = j,

0932–0784 / 03 / 0900–0494 $ 06.00 


c 2003 Verlag der Zeitschrift für Naturforschung, Tübingen · http://znaturforsch.com
R. B. Bapat et al. · A Simple Method for Computing Resistance Distance 495

where di is the degree (= number of first neighbors) of the above defined submatrices of the Laplacian matrix
the vertex vi . of the graph G. Then
n n
Because ∑ Li j = ∑ Li j = 0 for any graph G, det L(i, j)
i=1 j=1 ri j = . (6)
detL(G) = 0, i. e., L(G) is singular. det L(i)
The submatrix obtained from the Laplacian matrix L
In view of (3), formula (6) can be written also as
by deleting its i-th row and the i-th column will be de-
noted by L(i). The submatrix obtained from the Lapla- det L(i, j)
cian matrix L by deleting its i-th and j-th rows and the ri j = .
t(G)
i-th and j-th columns will be denoted by L(i, j), assum-
ing that i = j. This remarkably simple expression for the resistance
According to the famous matrix-tree theorem (see distance was discovered by one of the present authors
for instance [26 – 29]) for any graph G and for any i = [25]. Here we demonstrate its validity in a manner dif-
1, 2, . . . , n, ferent from that in [25].
In order to prove Theorem 1 we need some prepara-
det L(i) = t(G), (3) tions.
where t(G) is the number of spanning trees of G. To each vertex v i of the graph G associate a variable
The eigenvalues of the Laplacian matrix are referred xi and consider the auxiliary function
to as the Laplacian eigenvalues and form the Lapla-
f (x1 , x2 , . . . , xn ) = ∑(xk − x)2
cian spectrum of the respective graph. The Laplacian k,
spectral theory is a well elaborated part of algebraic
graph theory and its details can be found in numerous with the summation going over all pairs of adjacent
reviews, for instance in [27, 30, 31]. Concerning chem- vertices vk , v . Then for i = j,
ical applications of Laplacian spectra see [32, 33].  
1 
We label the Laplacian eigenvalues of the graph G ri j = sup  xi = 1, x j = 0, 0 ≤ xk ≤ 1,
by µi , i = 1, 2, . . . , n, so that f (x1 , x2 , . . . , xn ) 

µ1 ≥ µ2 ≥ · · · ≥ µn .
k = 1, 2, . . . , n . (7)
Then, µn is always equal to zero, whereas µ n−1 differs
from zero if and only if the underlying graph G is con- Formula (7) is a result known in the theory of elec-
nected. (We are interested in molecular graphs, which trical networks (cf. Corollary 5 on p. 301 in Chapt. 9
necessarily are connected. Therefore in what follows it of the book [24]). Its immediate consequences are the
will be understood that µ n−1 = 0.) following equations which hold for k = i, j:
Of the many known relations between the structure
∂f
of a graph and its Laplacian spectrum [26 – 28, 30 – 33] = 2 ∑ (xk − x) = 0, (8)
we mention here only two: ∂xk ∈Γ (k)

n−1 where Γ (k) denotes the set of first neighbors of the


∏ µi = nt(G) (4) vertex vk .
i=1
Because the vertices of the graph G are labeled in
and an arbitrary manner, without loss of generality we may
n−1 restrict our considerations to the special case i = n − 1
1
Kf =n ∑ µi . (5) and j = n. Then, however, the mathematical formalism
i=1 of our analysis will become significantly simpler.
For the sake of simplicity, denote the submatrix
L(n − 1, n) by Ln−2 and write the Laplacian matrix of
3. A Determinantal Formula for r ij G as
 
Theorem 1. Let G be a connected graph on n ver- Ln−2 B
tices, n ≥ 3, and 1 ≤ i = j ≤ n. Let L(i) and L(i, j) be L(G) = .
C D
496 R. B. Bapat et al. · A Simple Method for Computing Resistance Distance

Then (8) can be written as Proof of Theorem 1. As already explained, it is suf-


ficient to demonstrate the validity of Theorem 1 for
Ln−2 xt = bt , (9) i = n − 1 and j = n.
By (12) and (13) we have under the extreme value
where x = (x1 , x2 , . . . , xn−2 ) and b = (b1 , b2 , . . . , bn−2 ). condition
Because xn−1 = 1 and xn = 0, if the vertices v n−1 and
vk are adjacent then b k = 1, whereas otherwise b k = 0, f (x1 , x2 , . . . , xn ) = dn−1 − ∑ ∑ tk . (14)
k = 1, 2, . . . , n − 2. k∈Γ (n−1) ∈Γ (n−1)
Let A = ||ai j || be the adjacency matrix of the graph
G. Then, in view of x n−1 = 1, xn = 0, in addition to (9) Let Ln−2 (k, ) be the submatrix obtained by removing
we have from Ln−1 the k-th row and the -th column. Then,
n−2 det Ln−2 (k, )
xB (xn−1 , xn )t = (xn−1 , xn )C xt = − ∑ an−1,i xi (10) tk = (−1)k+ .
i=1
detLn−2

and Thus by (14)

(xn−1 , xn ) D (xn−1 , xn )t = dn−1 . (11) f (x1 , x2 , . . . , xn ) (15)

By combining (9) – (11) we obtain detLn−2 (k, )


= dn−1 − ∑ ∑ (−1)k+
det Ln−2
.
k∈Γ (n−1) ∈Γ (n−1)
f (x1 , x2 , . . . , xn )
By expanding detL(n) with respect to its last column
= (x, xn−1 , xn )L(G) (x, xn−1 , xn )t we get
= x Ln−2 xt + (xn−1 , xn )C xt det L(n) = dn−1 det Ln−2
+ x B (xn−1 , xn ) + (xn−1 , xn ) D (xn−1 , xn )
t t
− ∑ (−1)k+n−1 detL(n)(k, n − 1),
n−2 k∈Γ (n−1)
= x bt − 2 ∑ an−1,i xi + dn−1.
i=1 where the submatrix L(n)(k, n − 1) is obtained by re-
Because moving the k-th row and the (n − 1)-th column of L(n).
Further, expanding det L(n)(k, n − 1) with respect its
n−2 last row,
x bt = ∑ an−1,i xi = ∑ xk ,
i=1 k∈Γ (n−1) det L(n)(k, n−1) = ∑ (−1)+n−1 detLn−2 (k, ).
∈Γ (n−1)
we finally arrive at the relation
This yields
f (x1 , x2 , . . . , xn ) = dn−1 − ∑ xk , (12)
k∈Γ (n−1) dn−1 det Ln−2 − ∑ ∑ (−1)k+ det Ln−2 (k, )
k∈Γ (n−1) ∈Γ (n−1)
which holds under the extreme value condition x n−1
= 1, xn = 0. = detL(n),
The matrix L(G) is positive semidefinite. If the
graph G is connected, then the matrix L n−2 is pos- which substituted back into (15) becomes
itive definite. Thus its inverse (L n−2 )−1 exists. Let
the (i, j)-entry of (L n−2 )−1 be denoted by t i j . Then, f (x1 , x2 , . . . , xn ) =
det L(n)
. (16)
xt = (Ln−2 )−1 bt , implying detLn−2

xk = ∑ tk . (13) Theorem 1 follows when (16) is substituted back into


(7). 
∈Γ (n−1)
R. B. Bapat et al. · A Simple Method for Computing Resistance Distance 497

4. Applications Since ri j is a distance function [25], we obtain by


Theorem 1:
The most obvious and probably the most useful ap-
plication of formula (6) is in a simple procedure for Corollary 1.2. If i, j, k are distinct to each other,
computing resistance distances. If µ 1 , µ2 , . . . , µn−1
 and then detL(i, k) ≤ det L(i, j) + det L( j, k).
  
µ1 , µ2 , . . . , µn−2 are the eigenvalues of the submatrices If i, j are distinct, then by the well-known Hada-
L(i) and L(i, j), respectively, then mard-Fisher inequality
n−1 detL(i) ≤ di det L(i, j) .
det L(i) = ∏ µr , (17)
r=1 Thus from Theorem 1 immediately follows
n−2 Corollary 1.3.
det L(i, j) = ∏ µr , (18)  
1 1
r=1
ri j ≥ max , .
and ri j is readily obtained. As far as algorithm com- di d j
plexity is concerned, the usage of (17) and (18) is not
the most efficient way to compute resistance distances. In the below Theorem 2 we deduce a better lower,
However, the method is extremely simple for writing a and also an upper bound for the resistance distance.
computer program (provided, of course, that a software From (9) we get
for matrix diagonalization is available). n−2

Corollary 1.1. For any connected n-vertex graph,


b(Ln−2 )−1 bt = b xt = ∑ b k xk = ∑ xk .
k=1 k∈Γ (n−1)
n ≥ 2, the Kirchhoff index (1), is expressed in terms of
Laplacian eigenvalues as (5). Then by (12),
Proof. Suppose that the Laplacian characteristic f (x1 , x2 , . . . , xn ) = dn−1 − b(Ln−2 )−1 bt . (19)
polynomial of G, defined as ψ (G, λ ) = det(λ I n −
L(G)), where In is the unit matrix of order n, is writ- Evidently, if the vertices v n and vn−1 are adjacent then
ten as dn−1 = b bt + 1, otherwise dn−1 = b bt .
Let In−2 be the unit matrix of order n − 2. Then by
n
(19) we obtain
ψ (G, λ ) = ∑ (−1)k ck λ n−k .
k=0 f (x1 , x2 , . . . , xn ) = b[In−2 − (Ln−2 )−1 ] bt (20)
Then all the coefficients c k are non-negative integers if the vertices vn and vn−1 are not adjacent. Otherwise
and, inparticular [24, 26]

dn−1 −1
cn = 0, f (x1 , x2 , . . . , xn ) = b In−2 − (Ln−2 ) bt .
dn−1 − 1
cn−1 = nt(G), c. f. (4), (21)
  
n−1 n−1 n−1 As before, the eigenvalues of the matrix L(i, j) are
1 1
cn−2 = ∏ µj ∑ µi
= nt(G) ∑ µi
. denoted by
j=1 i=1 i=1
µ1 ≥ µ2 ≥ · · · ≥ µn−2

> 0.
The Kirchhoff index is defined via (1). Then by Theo-
rem 1, Then, of course, 1/ µ i , i = 1, 2, . . . , n − 2, are the
eigenvalues of (L n−2 )−1 . Then from (20) and (21) and
n−1
det L(i, j) cn−2 1 by taking into account (7) follows:
K f = ∑ ri j = ∑ = =n ∑ µi . 
i< j i< j t(G) t(G) i=1 Theorem 2. Let i = j. If the vertices vi and v j are
not adjacent, then
Formula (5) was reported earlier (for details and fur-    
ther references see [7, 33]), but was deduced by a com- 1 1 1
di 1 −  ≤ ≤ di 1 − 
pletely different way of reasoning. µn−2 ri j µ1
498 R. B. Bapat et al. · A Simple Method for Computing Resistance Distance

and with the upper bound for r i j applicable only if


  − 1) + 1 > 0, i. e., µ  > 1 − 1/d .
di (µn−2
µ1 µn−2 n−2 i
≤ ri j ≤
di (µ1 − 1) 
di (µn−2 − 1)
Acknowledgements
with the upper bound for r i j applicable only if
 − 1) > 0, i. e., µ  > 1.
di (µn−2 This research was supported by the Natural Science
n−2
Otherwise Foundation of China and Fujian Province, and by the
    Ministry of Sciences, Technologies and Development
1 1 1 1 1
di 1 −  +  ≤ ≤ di 1 −  +  of Serbia, within the Project no. 1389.
µn−2 µn−2 ri j µ1 µ1
and

µ1 µn−2
≤ r ≤
di (µ1 − 1) + 1  − 1) + 1
i j
di (µn−2

[1] R. E. Merrifield and H. E. Simmons, Theor. Chim. Acta [17] I. Lukovits, S. Nikolić, and N. Trinajstić, Int. J. Quan-
55, 55 (1980). tum Chem. 71, 217 (1999).
[2] R. E. Merrifield and H. E. Simmons, Topological Meth- [18] D. J. Klein and O. Ivanciuc, J. Math. Chem. 30, 271
ods in Chemistry, Wiley, New York 1989. (2001).
[3] I. Gutman and O. E. Polansky, Mathematical Concepts [19] J. L. Palacios, Int. J. Quantum Chem. 81, 29 (2001).
in Organic Chemistry, Springer-Verlag, Berlin 1986, [20] D. J. Klein, Croat. Chem. Acta 75, 633 (2002).
pp. 12 – 16. [21] D. Babić, D. J. Klein, I. Lukovits, S. Nikolić, and
[4] O. E. Polansky, Z. Naturforsch. 41a, 560 (1986). N. Trinajstić, Int. J. Quantum Chem. 90, 161 (2002).
[5] M. Zander, Z. Naturforsch. 45a, 1041 (1990). [22] W. J. Xiao and I. Gutman, MATCH Commun. Math.
[6] B. Lučić, I. Lukovits, S. Nikolić, and N. Trinajstić, J. Comput. Chem. 49, 67 (2003).
Chem. Inf. Comput. Sci. 41, 527 (2001). [23] W. J. Xiao and I. Gutman, Theor. Chim. Acta, in press.
[7] A. A. Dobrynin, R. Entringer, and I. Gutman, Acta [24] B. Bollobás, Modern Graph Theory, Springer-Verlag,
Appl. Math. 66, 211 (2001). New York 1998, Chapter 9.
[8] A. A. Dobrynin, I. Gutman, S. Klavžar, and P. Žigert, [25] R. B. Bapat, Math. Student 68, 87 (1999).
Acta Appl. Math. 72, 247 (2002). [26] D. M. Cvetković, M. Doob, and H. Sachs, Spectra of
[9] D. H. Rouvray and W. Tatong, Z. Naturforsch. 41a, Graphs-Theory and Application, Academic Press, New
1238 (1986). York 1980.
[10] I. Gutman and T. Körtvélyesi, Z. Naturforsch. 50a, 669 [27] R. B. Bapat, Math. Student 65, 214 (1996).
(1995). [28] R. B. Bapat and D. M. Kulkarni, in: D. V. Huynh, S. K.
[11] I. Gutman and I. G. Zenkevich, Z. Naturforsch. 57a, Jain, and S. R. Lopez-Permouth (Eds.), Algebra and
824 (2002). Its Applications, Amer. Math. Soc., Providence 2000,
[12] D. J. Klein and M. Randić, J. Math. Chem. 12, 81 pp. 45 – 66.
(1993). [29] I. Gutman and R. B. Mallion, Z. Naturforsch. 48a, 1026
[13] D. Bonchev, A. T. Balaban, X. Liu, and D. J. Klein, Int. (1993).
J. Quantum Chem. 50, 1 (1994). [30] R. Grone, R. Merris, and V. S. Sunder, SIAM J. Matrix
[14] H. Y. Zhu, D. J. Klein, and I. Lukovits, J. Chem. Inf. Anal. Appl. 11, 218 (1990).
Comput. Sci. 36, 420 (1996). [31] R. Merris, Lin. Algebra Appl. 197, 143 (1994).
[15] I. Gutman and B. Mohar, J. Chem. Inf. Comput. Sci. [32] R. Merris and I. Gutman, Z. Naturforsch. 55a, 973
36, 982 (1996). (2000).
[16] D. J. Klein, MATCH Commun. Math. Comput. Chem. [33] I. Gutman, D. Vidović, and B. Furtula, Indian J. Chem.
35, 7 (1997). 42A, 1272 (2003).

You might also like