SpanningForest - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


GraphTheory

  

SpanningTree

  

construct spanning tree

  

SpanningForest

  

construct spanning forest

 

Calling Sequence

Parameters

Description

Definitions

Examples

Compatibility

Calling Sequence

SpanningTree(G)

SpanningTree(G, r)

SpanningForest(G)

Parameters

G

-

undirected graph

r

-

vertex of the graph

Description

• 

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.

Definitions

• 

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.

Examples

(1)

(2)

(3)

(4)

(5)

(6)

(7)

(8)

(9)

Compatibility

• 

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