test if graph is a tree
an undirected graph
An undirected graph G on n vertices is a tree if it is connected and has exactly n−1 edges.
The IsTree command returns true if the input graph is a tree, and false otherwise.
T≔Graph 1: an undirected unweighted graph with 3 vertices and 2 edge(s)
C≔Graph 2: an undirected unweighted graph with 3 vertices and 3 edge(s)
Download Help Document
What kind of issue would you like to report? (Optional)