GraphTheory
SpanningTree
construct spanning tree
SpanningForest
construct spanning forest
Calling Sequence
Parameters
Description
Definitions
Examples
Compatibility
SpanningTree(G)
SpanningTree(G, r)
SpanningForest(G)
G
-
undirected graph
r
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.
The GraphTheory[SpanningForest] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
See Also
IsTree
MinimalSpanningTree
NumberOfSpanningTrees
TreeHeight
Download Help Document