GraphTheory - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Discrete Mathematics : Graph Theory : GraphTheory Package : GraphTheory/Girth

GraphTheory

 Girth

 Calling Sequence Girth(G)

Parameters

 G - undirected unweighted graph

Description

 • Girth returns the length of the shortest cycle in a simple graph.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $\mathrm{with}\left(\mathrm{SpecialGraphs}\right):$
 > $G≔\mathrm{HypercubeGraph}\left(3\right)$
 ${G}{≔}{\mathrm{Graph 1: an undirected unweighted graph with 8 vertices and 12 edge\left(s\right)}}$ (1)
 > $\mathrm{Girth}\left(G\right)$
 ${4}$ (2)
 > $P≔\mathrm{PetersenGraph}\left(\right)$
 ${P}{≔}{\mathrm{Graph 2: an undirected unweighted graph with 10 vertices and 15 edge\left(s\right)}}$ (3)
 > $\mathrm{Girth}\left(P\right)$
 ${5}$ (4)

 See Also