ResistanceDistance - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


GraphTheory

  

ResistanceDistance

  

resistance distance between two vertices

 

Calling Sequence

Parameters

Options

Description

Definition

Examples

Compatibility

Calling Sequence

ResistanceDistance(G, s, t, opts)

ResistanceDistance(G, s, opts)

ResistanceDistance(G, opts)

Parameters

G

-

graph

s, t

-

vertices of the graph

opts

-

(optional) one or more options; see below

Options

• 

datatype = one of double, float[4], float[8], rational

  

Specifies the datatype of the generated Array. The default is rational.

Description

• 

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.

Definition

• 

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.

Examples

withGraphTheory:

withSpecialGraphs:

CCubeGraph

CGraph 1: an undirected graph with 8 vertices and 12 edges

(1)

ResistanceDistanceC,1,3

712

(2)

ResistanceDistanceC

071271234712343456712034712347125634712340712345671234347127120563434712712343456071271234347125634712034712345671234712340712563434712347127120

(3)

ResistanceDistanceC,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.

(4)

Compatibility

• 

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