GraphTheory - Maple Programming Help

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

GraphTheory

 FundamentalCycle

 Calling Sequence FundamentalCycle(G)

Parameters

 G - unicyclic graph

Description

 • FundamentalCycle takes as input a graph G with a unique cycle and outputs the unique cycle as a graph.  If G has more than one cycle an error is returned.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $G≔\mathrm{Graph}\left(\mathrm{Trail}\left(1,2,3,4,5,2,6\right)\right)$
 ${G}{≔}{\mathrm{Graph 1: an undirected unweighted graph with 6 vertices and 6 edge\left(s\right)}}$ (1)
 > $C≔\mathrm{FundamentalCycle}\left(G\right)$
 ${C}{≔}{\mathrm{Graph 2: an undirected unweighted graph with 4 vertices and 4 edge\left(s\right)}}$ (2)
 > $\mathrm{Edges}\left(C\right)$
 $\left\{\left\{{2}{,}{3}\right\}{,}\left\{{2}{,}{5}\right\}{,}\left\{{3}{,}{4}\right\}{,}\left\{{4}{,}{5}\right\}\right\}$ (3)
 > $\mathrm{DeleteEdge}\left(G,\left\{2,3\right\}\right)$
 ${\mathrm{Graph 1: an undirected unweighted graph with 6 vertices and 5 edge\left(s\right)}}$ (4)
 > $\mathrm{IsTree}\left(G\right)$
 ${\mathrm{true}}$ (5)