IsAcyclic - Maple Help

# Online Help

###### All Products    Maple    MapleSim

GraphTheory

 IsAcyclic
 test if graph is acyclic

 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)

 See Also