Kruskal’s Theorem

Drishti Rai
5 min readApr 10, 2022

A spanning tree is a subgroup of Graph G that covers every corner also with minimum possible interconnections. As either a result, there really are no cycles in a spanning tree, and it really is impossible to separate them. This principle indicates that any interconnected, as well as unguided Graph G, has at least one spanning tree. A spanning tree is missing from an unconnected graph since it can’t be spanned to many of its corners.

Spanning Tree Basic Characteristics

We now know that a graph can contain many spanning trees. A few features of the spanning tree related to graph G are listed below.

In some kind of a connected graph G, there could be several spanning trees.

· With all feasible spanning trees with graph G, the total number of edges and vertices would be the same.

· As in spanning trees, there’s also no cycle (loops).

· A system of the loop is formed whenever an edge is given towards the spanning tree, suggesting that perhaps the spanning tree has optimally acyclic.

Theoretical Properties of Spanning Trees

· A spanning tree’s branches measure n-1, while n is the total number of elements (vertices).

· By eliminating the greatest e — n + 1 edges from either a directed graph, one can form a spanning tree.

· The greatest number of spanning trees in a full graph.

As a result, we can deduce that spanning trees are a subset of linked Graph G, and hence disconnected graphs lack spanning trees.

The Use of Spanning Trees

The spanning tree is used to discover the shortest path between all nodes in a graph. The use of spanning trees is common in a variety of situations.

1. Civil Network Design

2. Routing Protocol for Computer Networks

Consider the city network as a large graph, and the current objective is to deploy telephone lines in such a way that we can link to all city nodes with the bare minimum of lines. The spanning-tree enters the scene at this point.

Minimum Spanning Tree (MST)

In something like a graph database, this shortest path tree would be the one with the objective to minimize all the other spanning trees. Such burden can always be determined via remoteness, overcrowding, network utilization, and every other arbitrary number assigned towards the boundaries in real-world environments. Minimum Spanning-Tree Algorithm

Here, we’ll look at two of the most popular spanning tree algorithms.

· Prism’s Algorithm

· Kruskal’s Algorithm

The Disjoint Set Union data structure in Kruskal’s method is used by many cable network operators to discover the quickest way to install cables across a city or set of cities.

What is Kruskal’s Algorithm

This same spanning-tree seems to be the total of something like the strengths of all of the other branches in some kind of a graph. This lowest-priced spanning tree is the minimal spanning tree (MST). But here is a sample of something like a minimum spanning tree. Kruskal’s Algorithm and Prim’s Minimum Distance Tree Algorithm were the two most popular algorithms for discovering minimal spanning trees. Kruskal’s technique uses a greedy strategy to find a minimum spanning tree. Kruskal’s algorithm treats each node as a separate tree, connecting them only if they have the lowest cost relative to all other possibilities.

That the very first procedure with Kruskal’s technique is just to categorize each sample’s vertices based on respective strengths.

From the lowest balanced border to that same highest weighted edge, start adding elements to the least spanning tree. Or, to put it another way,

1. Remove all loops and parallel edges in step one.

2. Organize all of the edges in increasing cost order.

3. Add the edges with the least amount of weight.

An in-depth look at Kruskal’s algorithm.

You want to see all the significant world heritage sites in Venice, but you only have a limited amount of time.

Let’s look at how Kruskal’s technique is applied in a real-world scenario using the map above.

So, in the above map, we have a 2.4-kilometer-long parallel edge that runs from Madonna dell ‘Orto (D) to St. Mark Basilica (J) (2400mts).

The adjacent road will be removed, but the 1.8km (1800m) length will be retained for representation.

Step 2: Each group is treated as a tree by Kruskal’s technique, which uses disjoint sets to determine how many of the vertices are connected to other trees.

Step 3 — Begin with the edges that have the least amount of weight and cost. As a result, B and C are connected first due to their low edge cost of one.

This yields the following graph, which is the problem’s least spanning tree.

Thank You………………………

--

--