Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
networks[spantree] - finds a minimum weight spanning tree
Calling Sequence
spantree(G)
spantree(G, s)
spantree(G, s, w)
Parameters
G
-
graph or network
s
starting or root vertex for the tree
w
name for returning the sum of the edge weights in the tree
Description
Important: The networks package has been deprecated.Use the superseding command GraphTheory[MinimalSpanningTree] instead.
This routine constructs a spanning tree for the graph G. The result is returned as a new graph derived from G and consisting of that spanning tree.
The chosen tree has edges which minimize the total edge weight of the tree.
The routine uses Prim's algorithm, which fails if G is not strongly connected.
The routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[spantree](...).
Examples
Important:The networks package has been deprecated.Use the superseding command GraphTheory[MinimalSpanningTree] instead.
See Also
GraphTheory, GraphTheory[MinimalSpanningTree], networks(deprecated)[shortpathtree], with
Download Help Document