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.