Professional Documents
Culture Documents
ISPDC03
ISPDC03
Millman’s theorem
Architecture of the algorithm
Our method uses the Millman’s theorem to compute au-
tomatically effective resistance. As shown above, we can 1: Build Millman’s matrix to compute R(h, k) (1).
compute, thanks to resistances, bounds on cover time, exact 2: Matrix completion with Vh = 1 and Vk = 0 (2).
values of cyclic cover time, exact values of commute time 3: Solve linear system (3).
and total hitting time for any arbitrary graphs. 4: Current exiting h (4).
An application of the laws of electricity can provide re- 5: Ohm’s law on global circuit U = R × I (5).
sults on processing times, since we can obtain effective re- In the sequel, we detail the main functions of the algo-
sistances. For example, on a ring, by the conductance prop- rithm.
erty, the effective resistance between two nodes i and j, is:
−l2 + l × n Millman’s matrix (1)
R(i, j) =
n
The aim of this part of the algorithm is to determine the
where l is the length of the shortest path between i and j
linear system of the Millman’s theorem applied on every
and thus the maximal effective resistance is:
( vertex.
n 1: for all i ∈ V \{h; k} do
4 if n is even
RM ax = n2 −1
if n is odd 2: for all j ∈ V do
4n
3: if i = j then
In this example, we consider the ring topology to com- 4: Mij ←− −#(N (i))
pute resistances. We can achieve such a result on any arbi- 5: end if
trary graphs modelling a distributed systems by using Mill- 6: if j ∈ N (i) then
man’s theorem. 7: Mij ←− 1
FromP Kirchhoff’s law applied on a given node j, we 8: else
have: k∈N (j) Ijk = 0 where Ijk is the current from j 9: Mij ←− 0
to k ∈ N (j). Ijk is positive if the current is entering node 10: end if
j and negative if the current is leaving node j. 11: end for
Ohm’s law gives : Ijk = (Vj − Vk )/r(j, k), so we have 12: end for
VA = 1
10 0 0 0 0 0 0 VB = 0
Figure 1. Example
01 0 0 0 0 0 0
56
VC =
101
1 1 -4 1 0 0 0 1
52
VD =
1 1 1 -4 1 0 0 0 101
Matrix Completion (2)
VE = 51
1 1 0 1 -3 0 0 0
101
1
1 1 0 0 0 -2 0 0 VF =
We complete the matrix to take into account the potentials
2
0 0 1 0 0 0 1 -2
86
VG =
applied to node h and k. We obtain M = (Mij )(i,j)∈V ×V
101
71
for all i ∈ V do VH =
1: 101
2: if i = h or i = k then Thus, the currents exiting A from each branch are
3: Mii ←− 1
4: else
i1 = VA − VF = 21
Mhi ←− 0
5: 50
i2 = VA − VE = 101
6: Mki ←− 0 49
i3 = VA − VD =
7: end if 101
15
VA − VG
8: end for
i4 = = 101
45
VA − VC
i5 = = 101
Then globally in A (step (4)),
Solve Linear system (3)
419
iglobal = i11 = i1 + i2 + i3 + i4 + i5 =
This operation consists in obtaining the potential on each 202
vertex by solving M × V = S where S is a vector with all and finally (step (5))
entries to 0 except for the hth line with entry to 1 and V is U 202
the vector of the potentials. R(A, B) = =
i 419
The following resistances matrix is obtained by applica-
tion of the algorithm for each pair of nodes
Current exiting h (4)
Knowing potentials on each node, we can compute the cur- 0 202 177 172 203 260 299 358
202 419 419 419 419 419 419 419
199 178 205 260 441 440
rent exiting h, by Ohm law: 419 0 419 419 419 419 419 419
current ←− 0 177 199 187 266 347 358 299
419 419 0 419 419 419 419 419
for all j ∈ Nh do 172 178 187 195 334 417 422
419 419 419 0 419 419 419 419
current ←− current + Vh − Vj // Resistor between 203 205 266 195
i and j is r(i, j) = 1Ω 419 419 419 419 0 363 464 485
260 260 347 334 363 419 419 419
529 558
end for
419 419 419 419 419 0 419 419
299 441 358 417 464 529
419 419 419 419 419 419 0 299
419
358 440 299 422 485 558 299
419 419 419 419 419 419 419 0
Applicate Ohm’s law on global circuit (5)
Once all resistances are known, processing times can be
easily deduced
To get global resistance, we apply Ohm’s law between i and
j with global circuit. • Hitting time’s matrix:
Return 1/current // R(i, j) = (Vi − Vj )/current with
Vi − Vj = 1 )
26 3010 2595 2538 3467 5220 6267 7132
5 419 419 419 419 419 419 419
2242 13 2497 2232 3109 4836 7729 7814
419 2 419 419 419 419 419 419
An example
2007 2677 13 2439 3992 6057 6740 6071
419 419 2 419 419 419 419 419
1934 2396 2423 13 3061 5880 7499 7662
419 419 419 2 419 419 419 419
Let G be the graph of the figure 1, and the electrical net-
1811 2221 2924 2009 26 5731 7584 7955
work associated with it:
419 419 419 419 3 419 419 419
1540 1924 2965 2804 3707 7417 7892
In order to compute R(A, B), we obtain the following
419 419 419 419 419 13 419 419
1507 3737 2568 3343 4480 6337 3985
419 13
Millman’s matrix (step (1) and (2)), and the solution (step 419 419 419 419 419 419
(3)) 2176 3626 1703 3310 4655 6616 3789
419 419 419 419 419 419 419 13
The average number of steps for the token being at 1 Proof Let compute the effective resistance between 0 and
to first hit 2 is about 7.2. 1. Assume that V0 = 0 and V1 = 1. Due to the symmetry
558
of the graph, ∀(i; j) ∈ {2; . . . ; n − 1}2 , Vi = Vj . Then no
• Bounds on cover time : 13 × 419 < C < (2 × 13 × current flows through the channel (i; j). Thus, the current
558
419 × (1 + log(8)) ingoing 0 is:
Then, the average time to cover the network is less than
n−1 n−1
107 steps. X X
Ii0 = r0i (V0 − Vi )
• Commute time’s matrix: i=1 i=1
n−1
X (4)
=− Vi since r0i = 1 and V0 = 0
i=1
52 5252 4602 4472 5278 6760 7774 9308
5 419 419 419 419 419 419 419 = −(n − 2)V2 − V1
5252 5174 4628 5330 6760 11466 11440
419 13 419 419 419 419 419 419
4602 5174
13 4862 6916 9022 9308 7774 The current outgoing 1 is:
419 419 419 419 419 419 419
4472 4628 4862 5070 8684 10842 10972
419 419 419 13 419 419 419 419
n−1
X n−1
X
5278 5330 6916 5070 52 9438 12064 12610 I1i + I10 = ri1 (Vi − V1 ) + r01 (V0 − V1 )
419 419 419 419 3 419 419 419
6760 6760 9022 8684 9438 13754 14508
i=2 i=1
419 419 419 419 419 26 419 419
n−1
7774 11466 9308 10842 12064 13754 7774
X
26 (5)
419 419 419 419 419 419 419 = Vi − (n − 1)V1
9308 11440 7774 10972 12610 14508 7774
419 419 419 419 419 419 419 26 i=2
since r1i = 1 and V0 = 0, V1 = 1
• Total hitting time: = (n − 2)V2 − (n − 1)V1
X X 2m Since current is injected only in 1 and removed only in 0,
T =m R(i, j) +
deg(i) currents in equations 4 and 5 are equal, and:
(i,j)∈V 2 ,i6=j i∈V
7864909 2(n − 2)V2 = (n − 2)V1
=
12570
Thus, since V1 = 1,
The mean time to hit an unknown vertex, starting from 1
V2 =
an unknown vertex is less than 10 (T /n2 ), and the 2
number of steps to visit all the vertices in a given but Then, the current outgoing 1 is n−2
− (n − 1) = − n2 . So,
2
unknown arrangement is about 78 (T /n). R01 = V0−−Vn
1
= n2
2
References