Presentation is loading. Please wait.

Presentation is loading. Please wait.

DiGraph Definitions Adjacency Matrix Adjacency List

Similar presentations


Presentation on theme: "DiGraph Definitions Adjacency Matrix Adjacency List"— Presentation transcript:

1 DiGraph Definitions Adjacency Matrix Adjacency List
Directed Graphs DiGraph Definitions Adjacency Matrix Adjacency List 4/15/2019 CS 303 – Directed Graphs Lecture 19

2 Directed Graphs (DiGraph)
G = (V, E) V = {v} vertices/nodes/points E = {e} (directed) edges/arcs/lines Labels Arcs/vertices may have an associated label Arc ordered pair of Vertices - (v,w) – vw From v To w w Adjacent To v v w tail head 4/15/2019 CS 303 – Directed Graphs Lecture 19

3 Graph Definitions Path v1, v2, ..., vn v1  v2, v2  v3, ... vn-1  vn
From v1 Passes through v2, ..., vn-1 Ends at vn Length = n-1 (count the arcs, not the vertices) Simple Path all vi (except perhaps v1 and vn) are DISTINCT Cycle (v1, ..., vn) – Length >= 1 1 2 3 4 3243 = cycle 4/15/2019 CS 303 – Directed Graphs Lecture 19

4 Graph Operations T/F  (i  j) in E? (i.e., MEMBER((i,j),E))
{v}  Adjacent(i) Quicky Implementation – any implementation of SET 4/15/2019 CS 303 – Directed Graphs Lecture 19

5 Adjacency Matrix Representation
4/15/2019 CS 303 – Directed Graphs Lecture 19


Download ppt "DiGraph Definitions Adjacency Matrix Adjacency List"

Similar presentations


Ads by Google