Lecture 13: Minimum Spanning Tree and Greedy Algorithm

Previous Lecture : In the previous lecture we decided that if the height of a tree $latex =k$ and $latex n$ is the number of nodes then a relation between them can be made as $latex n \geq 2^k$ An example to justify $latex n \geq 2^k$ and show that there also exists graphs which … Continue reading Lecture 13: Minimum Spanning Tree and Greedy Algorithm

Lecture 12: “Disjoint Sets” Data Structure

Disjoint Sets A family F={S1, S2, …, Sn}, where Si ∩ Sj = ∅ ∀ i, j Example 1: A1={1, 2, 3}, A4={4, 5}, A6={6}, A7={7}, A8={8, 9, 10}, A12={11, 12} are all disjoint sets. Basic Functions for Disjoint Sets For a disjoint set data structure, we need two basic functions: Find (x): Which set … Continue reading Lecture 12: “Disjoint Sets” Data Structure

Lecture 10: Graph Traverse Theory

note: every strongly connected graph is connected but no every connected graph is strongly connected for example: This graph is connected but not strongly connected because the path does not lead back to A. This graph is strongly connected because this graph is cyclic. Depth First Search Algorithm: Change color of every node to white … Continue reading Lecture 10: Graph Traverse Theory