{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Graph-handouts-2

# Graph-handouts-2 - Graphs 1:45 AM Graphs 43 17 802 SFO 337...

This preview shows pages 1–4. Sign up to view the full content.

Graphs 3/13/2006 1:45 AM 1 Graphs 1 Graphs ORD DFW SFO LAX 8 0 2 1743 1843 1233 337 Graphs 2 Outline and Reading Graphs (§6.1) Definition Applications Terminology Properties ADT Data structures for graphs (§6.2) Edge list structure Adjacency list structure Adjacency matrix structure

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

View Full Document
Graphs 3/13/2006 1:45 AM 2 Graphs 3 Graph A graph is a pair ( V, E ) , where V is a set of nodes, called vertices E is a collection of pairs of vertices, called edges Vertices and edges are positions and store elements Example: A vertex represents an airport and stores the three-letter airport code An edge represents a flight route between two airports and stores the mileage of the route ORD PVD MIA DFW SFO LAX LGA HNL 849 8 0 2 1387 1743 1843 1099 1120 1233 337 2555 142 Graphs 4 Edge Types Directed edge ordered pair of vertices ( u , v ) first vertex u is the origin second vertex v is the destination e.g., a flight Undirected edge unordered pair of vertices ( u , v ) e.g., a flight route Directed graph all the edges are directed e.g., flight network Undirected graph all the edges are undirected e.g., route network ORD PVD flight AA 1206 ORD PVD 849 miles
Graphs 3/13/2006 1:45 AM 3 Graphs 5 John David Paul brown.edu cox.net cs.brown.edu

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.

{[ snackBarMessage ]}