Graph - Graphs 4/1/2003 8:42 AM Outline and Reading Graphs...

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

View Full Document Right Arrow Icon
Graphs 1 Graphs ORD DFW SFO LAX 80 2 1 7 4 3 1843 1233 Graphs 2 Outline and Reading Graphs (§12.1) ± Definition ± Applications ± Terminology ± Properties ± ADT Data structures for graphs (§12.2) ± Edge list structure ± Adjacency list structure ± Adjacency matrix structure 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 9 1120 2555 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., route network Undirected graph ± all the edges are undirected ± e.g., flight network ORD PVD flight AA 1206 ORD PVD 849 miles Graphs 5 John David Paul brown.edu cox.net cs.brown.edu att.net qwest.net math.brown.edu
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Graph - Graphs 4/1/2003 8:42 AM Outline and Reading Graphs...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online