0% found this document useful (0 votes)
7 views3 pages

26a. Data Structure & Algorithms - Spanning Tree

A spanning tree is a subset of a connected graph that contains no cycles and connects all vertices with n-1 edges. Spanning trees have various applications, including network planning and routing, and can be constructed from complete graphs. The minimum spanning tree (MST) is a specific type of spanning tree that minimizes the total edge weight, and can be found using algorithms such as Kruskal's and Prim's.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

26a. Data Structure & Algorithms - Spanning Tree

A spanning tree is a subset of a connected graph that contains no cycles and connects all vertices with n-1 edges. Spanning trees have various applications, including network planning and routing, and can be constructed from complete graphs. The minimum spanning tree (MST) is a specific type of spanning tree that minimizes the total edge weight, and can be found using algorithms such as Kruskal's and Prim's.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Data Structure &

Algorithms - Spanning
Tree
General Properties of Spanning Tree
We now understand that one graph can have more than one spanning tree.
Following are a few properties of the spanning tree connected to graph G −
A connected graph G can have more than one spanning tree.
All possible spanning trees of graph G, have the same number of edges and
vertices.
The spanning tree does not have any cycle (loops).
Removing one edge from the spanning tree will make the graph disconnected, i.e.
the spanning tree is minimally connected.
Adding one edge to the spanning tree will create a circuit or loop, i.e. the spanning
tree is maximally acyclic.

Mathematical Properties of Spanning Tree


Spanning tree has n-1 edges, where n is the number of nodes (vertices).
From a complete graph, by removing maximum e - n + 1 edges, we can construct a
spanning tree.
A complete graph can have maximum nn-2 number of spanning trees.
Thus, we can conclude that spanning trees are a subset of connected Graph G and
disconnected graphs do not have spanning tree.
Application of Spanning Tree
Spanning tree is basically used to find a minimum path to connect all nodes in a
graph. Common application of spanning trees are −
 Civil Network Planning
 Computer Network Routing Protocol
 Cluster Analysis
Let us understand this through a small example. Consider, city network as a huge
graph and now plans to deploy telephone lines in such a way that in minimum lines
we can connect to all city nodes. This is where the spanning tree comes into picture.
Minimum Spanning Tree (MST)
In a weighted graph, a minimum spanning tree is a spanning tree that has minimum
weight than all other spanning trees of the same graph. In real-world situations, this
weight can be measured as distance, congestion, traffic load or any arbitrary value
denoted to the edges.
Minimum Spanning-Tree Algorithm
We shall learn about two most important spanning tree algorithms here −
 Kruskal's Algorithm
 Prim's Algorithm
Both are greedy algorithms.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy