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

isTree -- determines whether a graph is a tree

Description

A graph is a tree if any two vertices are connected by a unique path of edges.

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

o2 = true

See also

Ways to use isTree:

  • isTree(Graph)

For the programmer

The object isTree is a method function.


The source of this document is in Graphs.m2:4727:0.