construct spanning tree
construct spanning forest
vertex of the graph
SpanningTree(G) returns a spanning tree of a connected graph G.
SpanningTree(G, r) returns a spanning tree of the connected component of G which contains vertex r.
SpanningForest(G) returns a spanning forest of the graph G.
By default, edge weights on G are ignored. To compute a minimal-weight spanning tree for a weighted graph, use MinimalSpanningTree.
A spanning tree for a graph G is a subgraph of G which contains all the vertices of G and is a tree.
A spanning forest for a graph G is a subgraph of G which contains all the vertices of G and is a forest.
P≔Graph 1: an undirected unweighted graph with 10 vertices and 15 edge(s)
T1≔Graph 2: an undirected unweighted graph with 10 vertices and 9 edge(s)
G≔Graph 3: an undirected unweighted graph with 6 vertices and 6 edge(s)
Graph 4: an undirected unweighted graph with 6 vertices and 2 edge(s)
Graph 5: an undirected unweighted graph with 6 vertices and 4 edge(s)
The GraphTheory[SpanningForest] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
Download Help Document
What kind of issue would you like to report? (Optional)