I want to compute the resistance function r(p,q) between any two vertices of a fairly complicated graph. This resistance function is the one in [Admissible pairing on a curve by Shouwu Zhang](https://eudml.org/doc/144099), section 3 page 179. 


The graph is too complicated and merely applying series and parallel reductions I am getting nowhere. Can one direct me to a good reference for circuit reductions on metrized graphs?



Circuit Reduction on Dual Graph of an Algebraic curve
In general, you shouldn't expect to be able to compute the effective resistance of an electrical circuit using *only* series and parallel reductions; the class of graphs (called [series-parallel graphs](https://en.wikipedia.org/wiki/Series-parallel_graph)) for which this can be done is quite special. There are other transformations for computing resistances such as [star-triangle / delta-Y transformations](https://en.wikipedia.org/wiki/Y-%CE%94_transform) but similar comments hold.


However, resistance computations for metrized graphs are really not so bad. They always boil down to solving a linear system of equations involving the Laplacian matrix of a weighted graph which models the metrized graph. [This expository paper of Baker and Faber](https://arxiv.org/abs/math/0407428) seems to be a good reference; see Theorem 4 for the relation between the Laplacian operator of a metrized graph and the Laplacian matrix of a weighted graph model.


Since the two points you care about are vertices of the metrized graph, you can proceed as follows. First, write down the Laplacian matrix for a weighted graph model of your metrized graph with the same vertex set $V$ (see Definition 7 of Baker and Faber). This is a symmetric $|V|\times|V|$ matrix $Q$. Let $\delta\_j$ be the $|V|$-dimensional vector whose components are all zero except for the $j$th component, which is 1. Then it is possible to find a vector $v$ such that:


$$Qv=\delta\_p-\delta\_q.$$


(Note that $Q$ is not invertible, so $v$ is only defined up to addition of scalar multiples of the vector $(1,1,1,\dots,1)$).


The effective resistance you want is $r(p,q)=v\_p-v\_q$; note that this difference is well-defined even if $v$ is not.


You can derive this formally from the properties of $r(p,q)$ (see e.g. section 6 of Baker and Faber), but I wrote it down using the following physical intuition: suppose one unit of current is injected at $p$ ($+\delta\_p$) and removed at $q$ ($-\delta\_q$), then the effective resistance is equal to the potential difference between $p$ and $q$.


One way to compute $r(p,q)$ without worrying about the kernel of $Q$ is to delete any row and column of $Q$ to get a matrix $\tilde Q$ (now with full rank $|V|-1$) and delete the corresponding rows of $\delta\_p,\delta\_q$ to get vectors $\tilde\delta\_p,\tilde\delta\_q$. Then there is a unique solution to


$$\tilde Q\tilde v=\tilde\delta\_p-\tilde\delta\_q,$$


(throw this into your favorite computer algebra / numerical linear algebra program) and $\tilde v\_p-\tilde v\_q$ is the effective resistance you want.


