GraphTheory
Eccentricity
compute graph eccentricity
Calling Sequence
Parameters
Options
Description
Definition
Examples
Compatibility
Eccentricity(G, opts)
Eccentricity(G, v)
G
-
graph
v
(optional) vertex of G
opts
(optional) one or more options as specified below
The options argument can contain one or more of the options shown below.
output=Array, DataSeries, list, or Vector.
This option specifies an alternate container type for the return value. When output is one of Array, list, or Vector, a container of the named type containing the eccentricities for each vertex is returned. When output is DataSeries, the return value is a DataSeries object whose labels correspond to the graph vertices and whose values are the computed eccentricities for the associated vertices. The default container type is a list.
The output option cannot be used when a particular vertex v is specified.
The Eccentricity(G,v) command computes the eccentricity for the vertex v in the graph G.
The Eccentricity(G) command returns a list of the computed eccentricities for each vertex in the graph G, listed in the order in which the vertices appear in the list returned by Vertices(G).
The eccentricity of a vertex v in a graph G is a number which represents the maximum graph distance between v and any other vertex in the graph.
If G is disconnected, then the eccentricity for every vertex is infinity.
If G is a complete graph, then the eccentricity for every vertex is 1.
The maximum of the eccentricities in G is the diameter of G. The minimum of the eccentricities in G is the radius of G.
with⁡GraphTheory:
G≔Graph⁡6,1,3,1,6,2,4,2,6,3,6,4,5,4,6,5,6
G≔Graph 1: an undirected graph with 6 vertices and 8 edge(s)
DrawGraph⁡G
Compute the eccentricity for vertex 6.
Eccentricity⁡G,6
1
Produce a list of eccentricities for all vertices.
Eccentricity⁡G
2,2,2,2,2,1
Produce a DataSeries with labels corresponding to the named vertices.
H≔Graph⁡a,b,c,d,a,b,a,d,b,c,c,d
H≔Graph 2: an undirected graph with 4 vertices and 4 edge(s)
Eccentricity⁡H,output=DataSeries
a2b2c2d2
The GraphTheory[Eccentricity] command was introduced in Maple 2017.
For more information on Maple 2017 changes, see Updates in Maple 2017.
See Also
GraphTheory[Diameter]
GraphTheory[Distance]
GraphTheory[Radius]
Download Help Document