Open In App

Applications of Minimum Spanning Tree

Last Updated : 12 Oct, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

A Minimum Spanning Tree (MST) is a subset of the edges of a connected, undirected graph that connects all the vertices together, without any cycles and with the minimum possible total edge weight. It is a way to connect all the vertices in a graph in a way that minimizes the total weight of the edges in the tree.

MST is a fundamental problem with diverse applications. 

Network design

  • telephone, electrical, hydraulic, TV cable, computer, road 

The standard application is to a problem like phone network design. You have a business with several offices; you want to lease phone lines to connect them up with each other, and the phone company charges different amounts of money to connect different pairs of cities. You want a set of lines that connects all your offices with a minimum total cost. It should be a spanning tree, since if a network isn’t a tree you can always remove some edges and save money. 

Approximation algorithms for NP-hard problems

A less obvious application is that the minimum spanning tree can be used to approximately solve the traveling salesman problem. A convenient formal way of defining this problem is to find the shortest path that visits each point at least once. 

Note that if you have a path visiting all points exactly once, it’s a special kind of tree. For instance in the example above, twelve of sixteen spanning trees are actually paths. If you have a path visiting some vertices more than once, you can always drop some edges to get a tree. So in general the MST weight is less than the TSP weight, because it’s a minimization over a strictly larger set. 

On the other hand, if you draw a path tracing around the minimum spanning tree, you trace each edge twice and visit all points, so the TSP weight is less than twice the MST weight. Therefore this tour is within a factor of two of optimal. 

Indirect applications

  • Max bottleneck paths 
  • LDPC codes for error correction 
  • Image registration with Renyi entropy 
  • Learning salient features for real-time face verification 
  • Reducing data storage in sequencing amino acids in a protein 
  • Model locality of particle interactions in turbulent fluid flows 
  • Autoconfig protocol for Ethernet bridging to avoid cycles in a network 

Cluster analysis 

k clustering problem can be viewed as finding an MST and deleting the k-1 most expensive edges.

Image segmentation: MSTs can be used in image segmentation to segment an image into different regions.

Bioinformatics: MSTs are used to construct phylogenetic trees in bioinformatics which represent the evolutionary relationship between different species.

Facility location: MSTs can be used to determine the optimal location of facilities, such as warehouses or power plants, in a network.

Geographic Information Systems(GIS): MSTs can be used in Geographic Information Systems (GIS) to create a map of a region with the minimum possible total distance between the locations.


Previous Article
Next Article

Similar Reads

Spanning Tree vs Minimum Spanning Tree
Spanning Tree (ST):A spanning tree of a graph is a subgraph that includes all the vertices of the original graph and is also a tree (a connected acyclic graph). The primary goal of a spanning tree is to connect all vertices with the minimum number of edges. Uses of Spanning Tree: STs are used in network design and routing algorithms to ensure conne
2 min read
Boruvka's algorithm for Minimum Spanning Tree
Following two algorithms are generally taught for Minimum Spanning Tree (MST) problem. Prim's algorithm Kruskal's algorithm There is a third algorithm called Boruvka's algorithm for MST which (like the above two) is also Greedy algorithm. The Boruvka's algorithm is the oldest minimum spanning tree algorithm was discovered by Boruvka in 1926, long b
1 min read
Minimum spanning tree cost of given Graphs
Given an undirected graph of V nodes (V > 2) named V1, V2, V3, ..., Vn. Two nodes Vi and Vj are connected to each other if and only if 0 < | i - j | ? 2. Each edge between any vertex pair (Vi, Vj) is assigned a weight i + j. The task is to find the cost of the minimum spanning tree of such graph with V nodes. Examples: Input: V = 4 Output: 13
4 min read
Find the minimum spanning tree with alternating colored edges
Given a graph with N nodes and M edges where each edge has a color (either black or green) and a cost associated with it. Find the minimum spanning tree of the graph such that every path in the tree is made up of alternating colored edges. Examples: Input: N = 3, M = 4 Output: 6 Input: N = 4, M = 6 Output: 4 Approach: The first observation we make
8 min read
Minimum Spanning Tree using Priority Queue and Array List
Given a bi-directed weighted (positive) graph without self-loops, the task is to generate the minimum spanning tree of the graph.Examples: Input: N = 9, E = 14, edges = {{0, 1, 4}, {0, 7, 8}, {1, 2, 8}, {1, 7, 11}, {2, 3, 7}, {2, 8, 2}, {2, 5, 4}, {3, 4, 9}, {3, 5, 14}, {4, 5, 10}, {5, 6, 2}, {6, 7, 1}, {6, 8, 6}, {7, 8, 7}} Output: ((A, B), Cost)
5 min read
Second Best Minimum Spanning Tree
Prerequisites - Graph, Spanning tree, Disjoint Set (Union - Find). A minimum spanning tree (MST) T, for a given graph G, spans over all vertices of a given graph and has minimum weight sum of all edges, out of all the possible spanning trees. Second best MST, T’, is a spanning tree with the second minimum weight sum of all edges, out of all spannin
15+ min read
Difference between Minimum Spanning Tree and Shortest Path
Spanning tree: A spanning tree (T) of an undirected graph(G) is a subgraph which is a tree that includes all the vertices of a graph (G) and the minimum number of edges required to connect the graph (G). And it is a known maximal set of edges with no cycles. Properties: If a graph(G) is not connected then it does not contain a spanning tree (i.e. i
4 min read
Properties of Minimum Spanning Tree (MST)
For a connected and undirected graph, a spanning tree of that graph is a subgraph that is a tree and connects all the vertices together. A single graph can have multiple spanning trees. A Spanning Tree is a tree which have V vertices and V-1 edges. All nodes in a spanning tree are reachable from each other. A Minimum Spanning Tree(MST) or minimum w
4 min read
Check if an edge is a part of any Minimum Spanning Tree
Given a connected undirected weighted graph in the form of a 2D array where each row is of the type [start node, end node, weight] describing an edge, and also two integers (A, B). Return if the edge formed between (A, B) is a part of any of the Minimum Spanning Tree (MST) of the graph. Minimum Spanning Tree (MST): This is a special subgraph of the
13 min read
Minimum Bottleneck Spanning Tree(MBST)
The minimum bottleneck spanning tree in an undirected graph is a tree whose most expensive edge is as minimum as possible. In this article, we will understand more about how to identify a minimum bottleneck spanning tree and understand that every minimum spanning tree is a minimum bottleneck spanning tree. A minimum spanning tree is completely diff
4 min read
Article Tags :
Practice Tags :