Effective Resistance between an Arbitrary Pair of Nodes in a Graph

The Demonstration finds the effective resistance between arbitrary pairs of nodes in an electrical resistor circuit. Each edge in the circuit can be thought of as having one unit of resistance. The grid shows how the effective resistance between any two pairs of nodes (labeled) in the circuit fluctuates, depending on the number of resistances (or links) between the pair of nodes.

From the adjacency matrix (gmat in the code) of a graph with nodes, the matrix is constructed:

,

.

Denote the nodes between which the effective resistance is computed as and . The matrix is rearranged into a block structure: , where is a matrix carrying the resistance information for the nodes and , is a matrix, and is a matrix. By completion of squares, the effective resistance between nodes and is computed after integrating out the information of the other vertices to get the matrix . The inverse of an off-diagonal element in this matrix gives the effective resistance between a pair of nodes. You can think of the off-diagonal element as the cross term between nodes and , which is the inverse of the effective resistance after the other vertices are integrated out.

[3] F. Y. Wu, "Theory of Resistor Networks: The Two-Point Resistance," Journal of Physics A: Mathematical and General, 37(26), 2004, pp. 6653–6673. doi:10.1088/0305-4470/37/26/004.