# Resistance Distance in large electrical networks

I am not tremendously familiar with electrical circuits (I have some memories, but too long ago) and now I have come accross a problem where I need to compute the resistance distance in a graph.

So, given a circuit of resistances (for instance a grid of resistances) I found the definition of the resistance distance in Wikipedia and here Confused on Calculating Resistance Distance Matrix But in BOTH cases, the resistances are all of 1 Ohm.

Is it possible to apply the same formula when the resistance values are different from one another? If not, what formula am I looking for?

Also, so I understand the overall concept: this would allow me to chose two points x and y in the circuit, and know what equivalent value of resitance I would need to wire directly between them to have an equivalent network, right?

In terms of scale, how well does computing this distances scale? Say I have 1million crossings/nodes. Is the matrix computation fast enough or do physicist have some trick to accelerate calculations?

• If you have an inhomogeneous network, in general you will have to use numerical methods to find the solution (Spice can do this for you for maybe up to thousands of resistors, for larger networks you will need a specialized code). It sounds more like you are asking how to scale a homogeneous network, though? Or are you looking for methods to do random networks? That's an entire mathematical discipline of its own, I believe. As far as computational complexity is concerned, you are iterating over a linear equation, so it should be $O(n^2)$ or, at most $O(n^2\ln n)$, I believe. Jun 2, 2016 at 23:18
• Thanks for the comment. Well, first I would like to know, for "small" size networks (maybe few hundred nodes, or up to a few thousand) how to compute the resistance between two nodes. In all my cases (small or big) the values of the resistances are random, always. Jun 3, 2016 at 0:06
• Naively I would write a Python script that generates a Spice netlist and then run LTSpice (linear.com/designtools/software/#LTspice) on that, just to get a feeling for the system. For large, and especially for infinite systems, you will have to resort to the literature about random networks. I am nearly certain that the theory for your problem is known, so there is prbably little need for trying to be creative... go look for "random resistor network" on the internet. I can already see that there is plenty of theory. Jun 3, 2016 at 0:10