test if graph is a forest
The IsForest command returns true if the input graph is a forest or false otherwise. A forest is a graph whose connected components are all trees.
F ≔ Graph⁡1,2,3,4,5,6,1,2,2,3,5,6
F≔Graph 1: an undirected graph with 6 vertices and 3 edge(s)
C ≔ ConnectedComponents⁡F
Download Help Document
What kind of issue would you like to report? (Optional)