There have been several updates for the GraphTheory package in Maple 2016, including an update to the DrawGraph command such that the display for vertices uses round rather than rectangular background shapes. Maple 2016 also introduces nine new commands:
Example: Clustering Coefficients
In analyzing a connected graph, particularly one arising naturally from empirical data, it is often worthwhile to know the degree to which nodes cluster together. Clustering coefficients aim to measure both the local clustering within a graph and the overall clustering across the graph.
G ≔ Graph6,1,3,1,6,2,6,2,4,3,6,4,6,4,5,5,6;
Graph 1: an undirected unweighted graph with 6 vertices and 8 edge(s)
The LocalClusteringCoefficient command computes a number between 0 and 1 measuring how close the neighborhood of a particular vertex is to being a clique. You can compute the coefficient for a specified vertex:
Alternatively you can compute the list of all coefficients for the graph in vertex order:
The GlobalClusteringCoefficient command computes a measure of how close G is to being a complete graph.
An alternate definition of the global clustering coefficient is the mean of all local clustering coefficients.
Clustering coefficients can be also be computed for larger graphs.
Here we illustrate that invoking RandomGraph with probability p generates a graph with mean clustering coefficient approaching p.
H ≔ RandomGraph⁡500,0.2
Graph 2: an undirected unweighted graph with 500 vertices and 24897 edge(s)
Download Help Document
What kind of issue would you like to report? (Optional)