GraphDensity - Maple Help

Online Help

All Products    Maple    MapleSim


GraphTheory

  

GraphDensity

  

compute graph density

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

GraphDensity(G)

Parameters

G

-

graph

Description

• 

The GraphDensity(G) command returns the graph density of G.

• 

For an undirected graph with n vertices and m edges, the graph density is 2mnn1.

• 

For a directed graph with n vertices and m arcs, the graph density is mnn1.

• 

Note that self-loops are not included in the edge count for the purposes of computing graph density.

Examples

withGraphTheory:

K4CompleteGraph4

K4Graph 1: an undirected unweighted graph with 4 vertices and 6 edge(s)

(1)

GraphDensityK4

1

(2)

HDigraphTrail1,2,3,1,4,3,Trail4,2,1,3:

GraphDensityH

23

(3)

Compatibility

• 

The GraphTheory[GraphDensity] command was introduced in Maple 2021.

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.

See Also

NumberOfEdges