Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS223 Advanced Data Structures and Algorithms

Similar presentations


Presentation on theme: "CS223 Advanced Data Structures and Algorithms"— Presentation transcript:

1 CS223 Advanced Data Structures and Algorithms
Graph Neil Tang 02/25/2010 CS223 Advanced Data Structures and Algorithms

2 CS223 Advanced Data Structures and Algorithms
Class Overview Basic concepts Applications Adjacency matrix Adjacency list CS223 Advanced Data Structures and Algorithms

3 CS223 Advanced Data Structures and Algorithms
Basic Concepts Graph (V, E) CS223 Advanced Data Structures and Algorithms

4 CS223 Advanced Data Structures and Algorithms
Basic Concepts Directed graph (digraph) Undirected graph Path: a sequence of vertices and edges (w1,w2, …,wn) Simple path: all vertices are distinct except the first and the last that could be the same. Cycle: a path (w1,w2, …,wn) with w1 = wn Directed Acyclic Graph (DAG) CS223 Advanced Data Structures and Algorithms

5 CS223 Advanced Data Structures and Algorithms
Basic Concepts Connected undirected graph Strongly/weakly connected digraph Complete graph CS223 Advanced Data Structures and Algorithms

6 CS223 Advanced Data Structures and Algorithms
Applications Airport system Transportation system Computer network Digital maps CS223 Advanced Data Structures and Algorithms

7 CS223 Advanced Data Structures and Algorithms
Adjacency Matrix VID Weighted graph? Space: (|V|2) CS223 Advanced Data Structures and Algorithms

8 CS223 Advanced Data Structures and Algorithms
Adjacency List Space: O(|V|+|E|) CS223 Advanced Data Structures and Algorithms


Download ppt "CS223 Advanced Data Structures and Algorithms"

Similar presentations


Ads by Google