compute graph density
The GraphDensity(G) command returns the graph density of G.
For an undirected graph with n vertices and m edges, the graph density is 2⁢mn⁢n−1.
For a directed graph with n vertices and m arcs, the graph density is mn⁢n−1.
Note that self-loops are not included in the edge count for the purposes of computing graph density.
K4≔Graph 1: an undirected unweighted graph with 4 vertices and 6 edge(s)
The GraphTheory[GraphDensity] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
Download Help Document
What kind of issue would you like to report? (Optional)