Magma

MAGMA Computational Algebra System

Magma
 •  How to get it
 •  Download
 •  Online Demo
 
Resources
 •  Online Help
 •  Discovering Mathematics with Magma
 •  Citations
 •  How to cite Magma
 •  Links
 •  Contact us
 
[Next][Prev] [Right] [Left] [Up] [Index] [Root]

Spanning Trees of a Graph or Digraph

SpanningTree(G) : GrphUnd -> Grph, GrphVertSet, GrphEdgeSet
Given a connected (undirected) graph G, construct a spanning tree for G rooted at an arbitrary vertex of G. The spanning tree is returned as a subgraph of G. The support and vertex/edge decorations are not retained in the resulting (structural) subgraph.
SpanningForest(G) : Grph -> Grph, GrphVertSet, GrphEdgeSet
Given a graph G, construct a spanning forest for G. The forest is returned as a subgraph of G. The support and vertex/edge decorations are not retained in the resulting (structural) subgraph.
BreadthFirstSearchTree(u) : GrphVert -> Grph, GrphVertSet, GrphEdgeSet
BFSTree(u) : GrphVert -> Grph
Given a vertex u belonging to the graph G, return a breadth-first search for G rooted at the vertex u. The tree is returned as a subgraph of G. The support and vertex/edge decorations are not retained in the resulting (structural) subgraph. Note that G may be disconnected.
DepthFirstSearchTree(u) : GrphVert -> Grph, GrphVertSet, GrphEdgeSet, SeqEnum
DFSTree(u) : GrphVert -> Grph, GrphVertSet, GrphEdgeSet, SeqEnum
Given a vertex u belonging to the graph G, return a depth-first search tree T for G rooted at the vertex u. The tree T is returned as a subgraph of G. The support and vertex/edge decorations are not retained in the resulting (structural) subgraph. Note that G may be disconnected.

The fourth return argument returns, for each vertex u of G, the tree order of u, that is, the order in which the vertex u has been visited while performing the depth-first search. If T does not span G then the vertices of G not in T are given tree order from Order(T) + 1 to Order(G).

 [Next][Prev] [Right] [Left] [Up] [Index] [Root]
                       

Version: V2.16 of Mon Nov 16 15:04:45 EST 2009

Valid HTML 4.01! Valid CSS!