Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary Spanning tree

Rating
-
Sold
-
Pages
5
Uploaded on
26-12-2024
Written in
2024/2025

A spanning tree is a sub-graph of an undirected connected graph, which includes all the vertices of the graph with a minimum possible number of edges. If a vertex is missed, then it is not a spanning tree.

Institution
Course

Content preview

Spanning tree
Aspanning tree isasub-graph of an undirected connected graph, which includes
all the vertices of the graph with a minimum possible number of edges. If a vertex
is missed, then it is not a spanning tree.

The edges may or may not have weights assigned to them.

The total number of spanning trees with n Vertices that can be created from a
complete graph is equal to n),

If we have n = 4, the maximum number of possible spanning trees is equal to 4: =
16. Thus, 16 spanning trees can be formed from a complete graph with 4 vertices.

Minimum Spanning Tree
A mininmum spanning tree is a spanning tree in which the sum of the weight of the
edges is as minimum as possible.




9


15
11 10



7

Kruskal's Minimum Spanning Tree (MST) Algorithm
A minimum spanning tree (MST) or minimum weight spanning tree for a weighted, connected,
undirected graph is a spanning tree with a weight less than or equal to the weight of every other
spanning tree.

Introduction to Kruskal's Algorithm:

Here we willdiscuss Kruskal's algorithm to find the MST of a given weighted graph.

, In Kruskal's algorithm, sort all edges of the given graph in increasing order. Then it keeps on adding
new edges and nodes in the MST if the newly added edge does not form a cycle. It picks the minimum
weighted edge at first and the maximum weighted edge at last. Thus we can say that it makes a locally
optimal choice in cach step in order to find the optimal solution.
How to find MST using Kruskal's algorithm?

Below are the steps for finding MST using Kruskal's algorithm:

1. Sort all the edges in non-decreasing order of their weight.
2. Pick the smallost odgo. Chock if it forms a cyelo with the spanning troo formod so far. If
the cycle is not formed, include this edge. Else, discard it.

3. Repeat step#2 until there are (V-1) edges in the spanning tree.
Illustration:
Below is the illustration of the above approach:
Input Graph:
7


4 9
2
4
11 8 14

6
10

6
1 2

The graph contains 9 vertices and 14 edges. So, the minimum spanning tree formed will be having
(9- 1) = 8 edges.
After sorting:
Weight Source Destination


7 6


2 8 2


2 6 5


4 1


4 2 5


6 8 6


7 2 3

Written for

Institution
Course

Document information

Uploaded on
December 26, 2024
Number of pages
5
Written in
2024/2025
Type
SUMMARY

Subjects

$8.89
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
devapathma0607

Get to know the seller

Seller avatar
devapathma0607 Nil
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
4
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions