isCyclic -- determines whether a graph is cyclic

Synopsis

• Usage:
c = isCyclic G
• Inputs:
• G, an instance of the type Graph
• Outputs:
• c, , whether a graph is cyclic

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