GraphTheory - Maple Programming Help

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

GraphTheory

 IsAcyclic

 Calling Sequence IsAcyclic(G)

Parameters

 G - directed graph

Description

 • IsAcyclic returns true if the input has no directed cycle and false otherwise.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $\mathrm{IsAcyclic}\left(\mathrm{Digraph}\left(\mathrm{Trail}\left(1,2,3,4,5\right)\right)\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{IsAcyclic}\left(\mathrm{Digraph}\left(\mathrm{Trail}\left(1,2,3,4,5,2\right)\right)\right)$
 ${\mathrm{false}}$ (2)