# Finding effective resistance between 2 nodes in an electric circuit network with resistors.

#### 13rajendra

Joined Feb 5, 2024
11
Hello everyone, I am new to this forum.
I have a very simple problem that I am not able to solve.

I have a very simple electrical network. There are 10000 nodes. Each node is connected to few other nodes with resistors. On average one node is connected to about 20 other nodes or so.

I have this network represented as a 10000*10000 matrix where rows and columns are basically those 10000 nodes. Each element in the matrix is the resistance values between two nodes. Diagonal elements are zero which means the resistance between a node to itself is zero. Most of the non diagonal elements are infinite which means these nodes pairs are not connected with each other, thus infinite resistance.

All I want is to find the effective resistance between each pair of node. Basically I want a 10000*10000 matrix where each element is the effective resistance between 2 nodes.

I would be glad if anyone knows how to do it or can tell me where should I seek help to solve this.

Thank you so much.

#### Tonyr1084

Joined Sep 24, 2015
7,886
Welcome to AAC.

To be honest, I haven't a clue as to what you're trying to understand. A drawing would be of great help.

If a grid of 10,000 rows by 10,000 columns is what you're trying to understand, break it down into smaller pieces. 10 by 10 should be far more useful than 10,000 by 10,000.

If you have paint brush on your computer you can do that then attach the drawing to your post. Or draw it on a piece of paper then take a photograph of it. Then upload the picture. In this business a drawing (or schematic) is worth far more than just a thousand words.

#### 13rajendra

Joined Feb 5, 2024
11
Thanks for your welcome @Tonyr1084 . I have attached an example of a simple circuit with 4 nodes in figure 1. I have their resistance represented in a matrix in figure 2. all I want is a matrix with the effective resistance for all pair of nodes as represented in figure 3.

#### Attachments

• 451.5 KB Views: 17

#### WBahn

Joined Mar 31, 2012
30,034
First, you need to be consistent in your representation.

Your schematic shows no connection between nodes B and C, but your matrix shows that there is a resistance of 0 Ω between nodes B and C.

Is this Homework of some kind?

#### 13rajendra

Joined Feb 5, 2024
11
Hi @WBahn . Thanks a lot for your response. I am so sorry for being inconsistent . This is my first time here. I have attached the correct representation with this message. You were right that there is no connection between B and C, thus the resistance is infinite as you can see in the corrected representation.
Also, no this is not homework.
This 4 node circuit is a simplified version. I am actually wanting to do the same thing for a huge electrical network with 10000 nodes instead of 4 as depicted here.

#### Attachments

• 1.1 MB Views: 6

#### WBahn

Joined Mar 31, 2012
30,034
One way to do it -- there may be much better ways -- would be to apply a voltage between Node A and Node B and then solve the network for the resulting source current. The resistance between the two nodes is then just the voltage divided by the current. You could do the same thing with a current source and find the voltage, which has the advantage of making the resistance numerically equal to the voltage if the current is 1 A.

You would then have to walk through each pair of nodes (but take advantage of the symmetry so that once you have Node A to Node B, you know that you also have Node B to Node A.

Just brainstorming here, but you might be able to assign random voltages to all of the nodes and solve for all of the currents and perhaps do that a couple of times and then somehow combined the results to tease out the results you are looking for. Again, just a thought -- it may not work at all.

#### 13rajendra

Joined Feb 5, 2024
11
I think your answer makes sense of applying voltage and measuring resulting current. However, this might take a lot of time, when I have 10000 nodes with me.
I was actually wondering if there is some easy and fast way to do the same thing but for a huge network comprising of 10000s of nodes and resistors.I was looking for some mathematical or computational tool to do this.
Do you have any idea on this?

#### MisterBill2

Joined Jan 23, 2018
18,442
This problem would be a good candidate for a simulator to handle. Really, it would be. Extend the network up to the number of nodes the user's version can support. Then start the simulation to determine the current into the point of interest. Can't do resistance directly on some simulators.

#### 13rajendra

Joined Feb 5, 2024
11
This problem would be a good candidate for a simulator to handle.
Hi @MisterBill2 . Would you mind elaborating your response. How does the simulator work? Could you give some example of simulator? Thank you in advance

#### MisterBill2

Joined Jan 23, 2018
18,442
I do not use simulators and so I am not in a position to describe how they work. BUT I am aware that simulators can rapidly go thru many iterations of conditions to reach a stable solution. And also I am aware that in simulators such as those used by folks visiting this forum, components seldom fail due to excess current or voltage. I am not aware of a simulator being able to calculate effective resistances, which is why I suggested using the determination of current thru a NODE (resistor) as a means of determining the computed resistance value.

#### Tonyr1084

Joined Sep 24, 2015
7,886
Between A & C there are two paths. Directly between A & C is 2Ω AND by way of A-B-B-D-D-C (second figure) is three resistors that equal a series resistance of 8Ω. Using Ohm's law you calculate the apparent parallel resistance (third figure below) to calculate the total A-C Ω. I've given you one. You can do the rest.

#### Tonyr1084

Joined Sep 24, 2015
7,886
OH, A-D is not infinity. A-D is basically two series parallel resistors. A-B-D = 5Ω and A-C-D also equals 5Ω. The total apparent resistance between A & D is - well, it looks like you know how to figure that out. As for a formula for doing 10,000 nodes? I don't know of one. Nor can I imagine a practical reason for doing this for 10,000 points. A 100 by 100 grid doesn't seem practical. What useful information do you hope to glean from such a large matrix?

#### 13rajendra

Joined Feb 5, 2024
11
Thanks a lot @Tonyr1084 for your kind efforts. However, I was just giving a small prototype with 4 node circuit. In reality I have a huge electrical network with 10000s of nodes and resistors. Thus, I was hoping some computational or mathematical ways to find out effective resistance between each pair of nodes.

#### Tonyr1084

Joined Sep 24, 2015
7,886
Only thing I can think of as an approach would be a spread sheet. But I haven't a clue how to construct it.

#### MisterBill2

Joined Jan 23, 2018
18,442
Between A & C there are two paths. Directly between A & C is 2Ω AND by way of A-B-B-D-D-C (second figure) is three resistors that equal a series resistance of 8Ω. Using Ohm's law you calculate the apparent parallel resistance (third figure below) to calculate the total A-C Ω. I've given you one. You can do the rest.
View attachment 314611
The TS extends the mesh: "There are 10000 nodes. Each node is connected to few other nodes with resistors."
My perception is that this is either school-work or possibly somebody wanting to start a terribly boring thread.
Reasonably it should be possible to generate an equation solved with a a series equation/formula. But it is over 50 years since I had that class, and never used it once in a engineering career. Probably the solution will be similar to calculating the resistance between two electrodes in salt water. I never had to do that, either.

#### WBahn

Joined Mar 31, 2012
30,034
Thanks a lot @Tonyr1084 for your kind efforts. However, I was just giving a small prototype with 4 node circuit. In reality I have a huge electrical network with 10000s of nodes and resistors. Thus, I was hoping some computational or mathematical ways to find out effective resistance between each pair of nodes.
I don't think you are going to find a simple algorithm to manipulate the matrix to produce the results you want because you have a different problem for every pair of points you want to find the resistance between. I think you are probably going to have to solve it for each pair of connected points in iteration. But I don't think that will end up taking that long on today's machines for a 100 x 100 grid.

#### MisterBill2

Joined Jan 23, 2018
18,442
Now I am really wondering what sort of actual application involves such a network. "Sheet Resistance" is an interesting topic but it was only briefly covered in third semester physics. Not sure it was even on the final exam, back in 1968, I think. And I am not sure why it was even mentioned in the Electricity and Magnetism physics segment.
The electrical circuits classes were more useful, but only the EE group had to take them.

#### 13rajendra

Joined Feb 5, 2024
11
Thanks all for your valuable feedbacks. I guess I will have to use some kind of simulation software (i dont know which one yet) that would make a giant network of resistors with 10000 nodes. Then, I would apply voltage across any 2 nodes and find current and thus find effective resistance.

I am however trying to figure out how can I make this process automated so that I could find effective resistance between every 2 nodes possible without doing manually.

#### MisterBill2

Joined Jan 23, 2018
18,442
And I am wondering what sort of real world application this would apply to.

#### WBahn

Joined Mar 31, 2012
30,034
Thanks all for your valuable feedbacks. I guess I will have to use some kind of simulation software (i dont know which one yet) that would make a giant network of resistors with 10000 nodes. Then, I would apply voltage across any 2 nodes and find current and thus find effective resistance.

I am however trying to figure out how can I make this process automated so that I could find effective resistance between every 2 nodes possible without doing manually.
You don't need to use a simulator -- write your own. This is a easy simulation to do.

You have a matrix of resistances between nodes. Create two other matrices of the same size, one for voltage at that node and one for net current into the node.

Pick the two nodes you want to find the current between and force one of them to be 0 V and the other to be 1 V. Set all of the other nodes to 0.5 V.

Now go through node by node and determine the net current entering the node from all of the other nodes.

Now go through this array and if the net current into a node is positive, that means that the voltage of that node is too low, so increase it by some small amount (an amount that is proportional to the net current). Similarly, if the net current is negative, the node voltage is too high, so decrease it by some small amount.

Keep iterating through this process until all of the net currents into all of the nodes (except the two that you've clamped) are zero (or less in magnitude than some threshold). At this point, the current into one of your clamped nodes should equal the negative of the current at your other clamped node and this current is the current in your 1 V source, from which you can compute the effective resistance between those two nodes.