This preview shows pages 1–10. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Outline 1 Graph Algorithms 2 Graph Representations 3 Breath First Search (BFS) 4 Depth First Search (DFS) 5 Topological Sort 6 Strong Connectivity 7 DFS for Undirected Graphs 8 Biconnectivity Problem c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 1 / 64 Graph Algorithms Many problems in CS can be modeled as graph problems . c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 2 / 64 Graph Algorithms Many problems in CS can be modeled as graph problems . Algorithms for solving graph problems are fundamental to the eld of algorithm design. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 2 / 64 Graph Algorithms Many problems in CS can be modeled as graph problems . Algorithms for solving graph problems are fundamental to the eld of algorithm design. Denition A graph G = ( V , E ) consists of a vertex set V and an edge set E .  V  = n and  E  = m . c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 2 / 64 Graph Algorithms Many problems in CS can be modeled as graph problems . Algorithms for solving graph problems are fundamental to the eld of algorithm design. Denition A graph G = ( V , E ) consists of a vertex set V and an edge set E .  V  = n and  E  = m . Each edge e = ( x , y ) E is an unordered pair of vertices. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 2 / 64 Graph Algorithms Many problems in CS can be modeled as graph problems . Algorithms for solving graph problems are fundamental to the eld of algorithm design. Denition A graph G = ( V , E ) consists of a vertex set V and an edge set E .  V  = n and  E  = m . Each edge e = ( x , y ) E is an unordered pair of vertices. If ( u , v ) E , we say v is a neighbor of u . c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 2 / 64 Graph Algorithms Many problems in CS can be modeled as graph problems . Algorithms for solving graph problems are fundamental to the eld of algorithm design. Denition A graph G = ( V , E ) consists of a vertex set V and an edge set E .  V  = n and  E  = m . Each edge e = ( x , y ) E is an unordered pair of vertices. If ( u , v ) E , we say v is a neighbor of u . The degree deg ( u ) of a vertex u is the number of edges incident to u . c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 2 / 64 Graph Algorithms Fact X v V deg ( v ) = 2 m This is because, for each e = ( u , v ) , e is counted twice in the sum, once for deg ( v ) and once for deg ( u ) . c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 3 / 64 Directed Graphs Denition If the two end vertices of e are ordered, the edge is directed , and we write e = x y ....
View Full
Document
 Fall '11
 XINHE
 Algorithms, Sort

Click to edit the document details