Reverse Delete algorithm is closely related to Kruskal’s algorithm. In Kruskal’s algorithm what we do is : Sort edges by increasing order of their weights. After sorting, we one by one pick edges in increasing order. We include current picked edge if by including this in spanning tree not form any cycle until there are… Read More »
If a graph is a complete graph with n vertices, then total number of spanning trees is n(n-2) where n is the number of nodes in the graph. In complete graph, the task is equal to counting different labeled trees with n nodes for which have Cayley’s formula. What if graph is not complete? Follow… Read More »
Given 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 many different spanning trees. A minimum product spanning tree for a weighted, connected and undirected graph is a spanning tree with weight product less than… Read More »
Given an undirected, connected and weighted graph, find Minimum Spanning Tree (MST) of the graph using Kruskal’s algorithm. Input : Graph as an array of edges Output : Edges of MST are 6 – 7 2 – 8 5 – 6 0 – 1 2 – 5 2 – 3 0 – 7 3 -… Read More »
Given an undirected, connected and weighted graph, find Minimum Spanning Tree (MST) of the graph using Prim’s algorithm. Input : Adjacency List representation of above graph Output : Edges in MST 0 – 1 1 – 2 2 – 3 3 – 4 2 – 5 5 – 6 6 – 7 2 – 8… Read More »
What is Steiner Tree? Given a graph and a subset of vertices in the graph, a steiner tree spans though the given subset.
We have discussed following topics on Minimum Spanning Tree. Applications of Minimum Spanning Tree Problem Kruskal’s Minimum Spanning Tree Algorithm
We introduced Travelling Salesman Problem and discussed Naive and Dynamic Programming Solutions for the problem in the previous post,. Both of the solutions are infeasible.
We recommend to read following two posts as a prerequisite of this post.
What is Minimum Spanning Tree? Given a connected and undirected graph, a spanning tree of that graph is a subgraph that is a tree and connects all the vertices together.
Following two algorithms are generally taught for Minimum Spanning Tree (MST) problem.