GraphTheory
GraphDensity
compute graph density
Calling Sequence
Parameters
Description
Examples
Compatibility
GraphDensity(G)
G
-
graph
The GraphDensity(G) command returns the graph density of G.
For an undirected graph with n vertices and m edges, the graph density is .
For a directed graph with n vertices and m arcs, the graph density is .
Note that self-loops are not included in the edge count for the purposes of computing graph density.
The GraphTheory[GraphDensity] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
See Also
NumberOfEdges
Download Help Document