Expect problems and eat them for breakfast.
--Your friends at LectureNotes

Note for Data Structure and Algorithms - DSA By abhijith anirudhan

  • Data Structure and Algorithms - DSA
  • Note
  • Computer Science Engineering
  • 4 Offline Downloads
  • Uploaded 1 year ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

Graph Algorithms Ananth Grama, Anshul Gupta, George Karypis, and Vipin Kumar To accompany the text “Introduction to Parallel Computing”, Addison Wesley, 2003.

Text from page-2

Topic Overview • Definitions and Representation • Minimum Spanning Tree: Prim’s Algorithm • Single-Source Shortest Paths: Dijkstra’s Algorithm • All-Pairs Shortest Paths • Transitive Closure • Connected Components • Algorithms for Sparse Graphs

Text from page-3

Definitions and Representation • An undirected graph G is a pair (V, E), where V is a finite set of points called vertices and E is a finite set of edges. • An edge e ∈ E is an unordered pair (u, v), where u, v ∈ V . • In a directed graph, the edge e is an ordered pair (u, v). An edge (u, v) is incident from vertex u and is incident to vertex v. • A path from a vertex v to a vertex u is a sequence hv0, v1, v2, . . . , vk i of vertices where v0 = v, vk = u, and (vi, vi+1) ∈ E for i = 0, 1, . . . , k − 1. • The length of a path is defined as the number of edges in the path.

Text from page-4

Definitions and Representation 5 2 e 3 4 6 6 5 4 3 f 2 1 (a) 1 (b) (a) An undirected graph and (b) a directed graph.

Lecture Notes