Macaulay2 » Documentation
Packages » Graphs :: isCyclic
next | previous | forward | backward | up | index | toc

isCyclic -- determines whether a graph is cyclic

Synopsis

Description

A graph is cyclic if it is composed of vertices connected by a single chain of edges.

i1 : G = graph({{1,2},{2,3},{3,1}},EntryMode=>"edges");
i2 : isCyclic G

o2 = true
i3 : G = graph({{1,2},{2,3},{3,4}},EntryMode=>"edges");
i4 : isCyclic G

o4 = false

See also

Ways to use isCyclic :

For the programmer

The object isCyclic is a method function.