A graph is a forest if it is a disjoint collection of trees. A graph is a tree if any two vertices are connected by a unique path of edges. A spanning forest is a forest that spans all the vectors of G using edges of G.
i1 : G = cycleGraph 5; |
i2 : spanningForest G o2 = Graph{0 => {1, 4}} 1 => {0, 2} 2 => {1, 3} 3 => {2} 4 => {0} o2 : Graph |
The object spanningForest is a method function.