Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


finds a spanning tree of the graph g.

finds a spanning tree of the connected component of g that includes the vertex v.

uses rules vw to specify the graph g.

Details and OptionsDetails and Options

  • FindSpanningTree is also known as minimum spanning tree and spanning forest.
  • A spanning tree of a connected graph g is a subgraph of g that is a tree and connects all vertices of g.
  • For weighted graphs, FindSpanningTree gives a spanning tree with minimum sum of edge weights.
  • For disconnected graphs, FindSpanningTree gives a subgraph that consists of a spanning tree for each of its connected components.
  • FindSpanningTree takes the same options as Graph.
  • Possible settings for Method include "Prim", "Kruskal", and "MinimumCostAborescence". The default setting of Automatic switches among these methods depending on the graph given.
  • FindSpanningTree works with undirected graphs, directed graphs, weighted graphs, and multigraphs.
Introduced in 2014
| Updated in 2015