GraphTheory
ResistanceDistance
resistance distance between two vertices
Calling Sequence
Parameters
Options
Description
Definition
Examples
Compatibility
ResistanceDistance(G, s, t, opts)
ResistanceDistance(G, s, opts)
ResistanceDistance(G, opts)
G
-
graph
s, t
vertices of the graph
opts
(optional) one or more options; see below
datatype = one of double, float[4], float[8], rational
Specifies the datatype of the generated Array. The default is rational.
ResistanceDistance(G,s,t) returns the resistance distance from s to t in the graph G.
ResistanceDistance(G,s) returns a row vector of resistance distances from s to other vertices in G.
ResistanceDistance(G) returns a matrix of resistance distances between vertices of G. If G is undirected this matrix will be symmetric.
The resistance distance between two vertices of connected graph G is equal to the resistance between two points on an electrical network with the same structure as G, with each edge being replaced with a resistance of one ohm.
with⁡GraphTheory:
with⁡SpecialGraphs:
C≔CubeGraph⁡
C≔Graph 1: an undirected graph with 8 vertices and 12 edges
ResistanceDistance⁡C,1,3
712
ResistanceDistance⁡C
071271234712343456712034712347125634712340712345671234347127120563434712712343456071271234347125634712034712345671234712340712563434712347127120
ResistanceDistance⁡C,datatype=float8
0.0.5833333333333330.5833333333333330.7500000000000000.5833333333333330.7500000000000000.7500000000000000.8333333333333330.5833333333333330.0.7500000000000000.5833333333333330.7500000000000000.5833333333333330.8333333333333330.7500000000000000.5833333333333330.7500000000000000.0.5833333333333330.7500000000000000.8333333333333330.5833333333333330.7500000000000000.7500000000000000.5833333333333330.5833333333333330.0.8333333333333330.7500000000000000.7500000000000000.5833333333333330.5833333333333330.7500000000000000.7500000000000000.8333333333333330.0.5833333333333330.5833333333333330.7500000000000000.7500000000000000.5833333333333330.8333333333333330.7500000000000000.5833333333333330.0.7500000000000000.5833333333333330.7500000000000000.8333333333333330.5833333333333330.7500000000000000.5833333333333330.7500000000000000.0.5833333333333330.8333333333333330.7500000000000000.7500000000000000.5833333333333330.7500000000000000.5833333333333330.5833333333333330.
The GraphTheory[ResistanceDistance] command was introduced in Maple 2025.
For more information on Maple 2025 changes, see Updates in Maple 2025.
See Also
BellmanFordAlgorithm
Diameter
DijkstrasAlgorithm
Distance
ShortestPath
Download Help Document