# note07 - Outline 1 Graph Algorithms 2 Graph Representations...

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 Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the 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. Deﬁnition 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. Deﬁnition 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. Deﬁnition 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. Deﬁnition 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 Deﬁnition If the two end vertices of e are ordered, the edge is directed , and we write e = x → y ....
View Full Document

## This note was uploaded on 02/27/2012 for the course CSE 431/531 taught by Professor Xinhe during the Fall '11 term at SUNY Buffalo.

### Page1 / 196

note07 - Outline 1 Graph Algorithms 2 Graph Representations...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online