Download presentation
Presentation is loading. Please wait.
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.