4
$\begingroup$

Is there an implementation of the resistance distance matrix (or just resistance matrix) for graphs available in Mathematica?

$\endgroup$
10
$\begingroup$

Based on the definition from the Wikipedia article, this should give you the resistance distance matrix of the graph g:

With[{Γ = PseudoInverse[KirchhoffMatrix[g]]},
 Outer[Plus, Diagonal[Γ], Diagonal[Γ]] - Γ - Transpose[Γ]
]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.