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 |
The object isCyclic is a method function.