GraphTheory
DistancePolynomial
compute distance polynomial
Calling Sequence
Parameters
Description
Definition
Examples
Compatibility
DistancePolynomial(G, x)
G
-
undirected connected graph
x
variable or value
DistancePolynomial returns the distance polynomial for the connected graph G in the variable x.
For an undirected connected graph G, the distance polynomial of G is defined to be the characteristic polynomial of the graph distance matrix.
with⁡GraphTheory:
P≔Graph⁡1,2,2,3,3,4
P≔Graph 1: an undirected graph with 4 vertices and 3 edge(s)
DistancePolynomial⁡P,x
x4−20⁢x2−32⁢x−12
C≔CycleGraph⁡5
C≔Graph 2: an undirected graph with 5 vertices and 5 edge(s)
DistancePolynomial⁡C,x
x5−25⁢x3−60⁢x2−35⁢x−6
The GraphTheory[DistancePolynomial] command was introduced in Maple 2018.
For more information on Maple 2018 changes, see Updates in Maple 2018.
See Also
AllPairsDistance
Distance
Download Help Document