Trees in Graph Theory
Dr. Avipsita Chatterjee
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
1
1/31/2025
Introduction to Trees
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
2
1/31/2025
Definition and Terminology
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
3
1/31/2025
Definition and Terminology
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
4
1/31/2025
Definition and Terminology
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
5
1/31/2025
Definition and Terminology
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
6
1/31/2025
Properties of Trees
Theorem: A Tree with n vertices has n − 1 edges.
Proof (Induction):
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
7
1/31/2025
Exercise:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
8
1/31/2025
Types of Trees
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
9
1/31/2025
Rooted Trees - Definition and Properties
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
10
1/31/2025
Rooted Trees - Definition and Properties
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
11
1/31/2025
Binary Trees
Definition: A binary tree is a rooted tree where each node has at most two children.
Types of Binary Trees:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
12
1/31/2025
Binary Trees
Exercise:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
13
1/31/2025
Spanning Trees - Definition and Basic Properties
Definition: A spanning tree of a graph G = (V , E ) is a subgraph that:
Basic Properties:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
14
1/31/2025
Spanning Trees - Definition and Basic Properties
Example: A Graph and Its Spanning Tree
Original Graph A Spanning Tree
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
15
1/31/2025
Properties and Theorems on Spanning Trees
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
16
1/31/2025
Properties and Theorems on Spanning Trees
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
17
1/31/2025
Spanning Trees in Weighted Graphs
Definition: A Minimum Spanning Tree (MST) of a weighted graph is a spanning tree that has the minimum possible total edge weight.
Applications:
Algorithms for Finding MST:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
18
1/31/2025
Spanning Trees in Weighted Graphs
Exercise:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
19
1/31/2025
Proof of Kruskal’s Algorithm
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
20
1/31/2025
Proof of Kruskal’s Algorithm
Exercise:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
21
1/31/2025
Complexity Analysis of Kruskal’s Algorithm
Time Complexity Breakdown:
Overall Time Complexity:
since α(V ) (inverse Ackermann function) grows very slowly. Comparison with Prim’s Algorithm:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
22
1/31/2025
Complexity Analysis of Kruskal’s Algorithm
Exercise:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
23
1/31/2025
Prim’s Algorithm - Definition and Steps
Definition: Prim’s algorithm is a greedy algorithm that grows the Minimum Spanning Tree (MST) from a single starting vertex, adding the smallest edge that expands the tree.
Algorithm Steps:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
24
1/31/2025
Prim’s Algorithm - Definition and Steps
Graph with Weights MST Using Prim’s Algorithm
Exercise:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
25
1/31/2025
Proof of Prim’s Algorithm
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
26
1/31/2025
Prim’s Algorithm
Exercise:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
27
1/31/2025
Complexity Analysis of Prim’s Algorithm
Time Complexity Breakdown:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
28
1/31/2025
Complexity Analysis of Prim’s Algorithm
Exercise:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
29
1/31/2025
Comparison of MST Algorithms in Literature
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
30
1/31/2025
Comparison of MST Algorithms in Literature
Key Observations:
Exercise:
Dr. Avipsita Chatterjee, I.E.M., Salt Lake
31
1/31/2025