{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full Document Right Arrow Icon
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
Background image of page 2
Graphs 3/13/2006 1:45 AM 3 Graphs 5 John David Paul brown.edu cox.net cs.brown.edu
Background image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}