Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data...
-
Upload
sharlene-lloyd -
Category
Documents
-
view
216 -
download
0
description
Transcript of Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data...
![Page 1: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/1.jpg)
Graphs
Chapter 28
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
Data Structures and Abstractions with Java, 4e Frank Carrano
![Page 2: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/2.jpg)
Road Maps
FIGURE 28-1 A portion of a road map
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 3: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/3.jpg)
Graphs• A road map is a graph• Definition of a graph:
A collection of distinct vertices and distinct edges
• In the map of Figure 28-1 The circles are vertices or nodes The lines are called edges
• A subgraph is a portion of a graph that is itself a graph
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 4: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/4.jpg)
Graphs
FIGURE 28-2 A directed graph representing a portion of a city’s street map
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 5: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/5.jpg)
Paths
• A path between two vertices in a graph is a sequence of edges
• A path in a directed graph must consider the direction of the edges Called a directed path
• The length of a path is the number of edges that it comprises.
• A cycle is a path that begins and ends at the same vertex
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 6: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/6.jpg)
Weights• Weighted graph, has values on its edges
Values are called either weights or costs
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
FIGURE 28-3 A weighted graph
![Page 7: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/7.jpg)
Connected Graphs
• A graph that has a path between every pair of distinct vertices is connected
• A complete graph has an edge between every pair of distinct vertices.
• Undirected graphs can be Connected Complete or Disconnected
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 8: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/8.jpg)
Connected Graphs
FIGURE 28-4 Undirected graphs
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 9: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/9.jpg)
Adjacent Vertices
FIGURE 28-5 Vertex A is adjacent to vertex B, but B is not adjacent to A
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
• Vertices are adjacent in an undirected graph if they are joined by an edge
![Page 10: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/10.jpg)
Airline Routes
FIGURE 28-6 Airline routes
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 11: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/11.jpg)
Mazes
FIGURE 28-7 (a) A maze; (b) its representation as a graph
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 12: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/12.jpg)
Course Prerequisites
FIGURE 28-8 The prerequisite structure for a selection of courses as a directed graph without cycles
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 13: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/13.jpg)
Traversals
FIGURE 28-9 The visitation order of two traversals: (a) depth first; (b) breadth first
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 14: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/14.jpg)
Breadth-First Traversal
Algorithm that performs a breadth-first traversal of a nonempty graph beginning at a given vertex
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 15: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/15.jpg)
Breadth-First Traversal
Algorithm that performs a breadth-first traversal of a nonempty graph beginning at a given vertex
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 16: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/16.jpg)
Breadth-First Traversal
FIGURE 28-10 A trace of a breadth-first traversal beginning at vertex A of a directed graph
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 17: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/17.jpg)
Depth-First Traversal
Algorithm that performs a depth-first traversal of a nonempty graph, beginning at a given vertex:
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 18: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/18.jpg)
Depth-First Traversal
Algorithm that performs a depth-first traversal of a nonempty graph, beginning at a given vertex:
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 19: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/19.jpg)
Depth-First Traversal
FIGURE 28-11 A trace of a depth-first traversal beginning at vertex A of a directed graph
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 20: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/20.jpg)
Depth-First Traversal
FIGURE 28-11 A trace of a depth-first traversal beginning at vertex A of a directed graph
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 21: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/21.jpg)
Topological Order
FIGURE 28-12 Three topological orders for thegraph in Figure 28-8
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 22: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/22.jpg)
Topological Order
FIGURE 28-13 An impossible prerequisite structure for three courses, as a directed graph with a cycle
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
• In a topological order of the vertices in a directed graph without cycles, vertex a precedes vertex b whenever a directed edge exists from a to b.
![Page 23: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/23.jpg)
Topological Order
An algorithm that describes a topological sort
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 24: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/24.jpg)
Topological Order
FIGURE 28-14 Finding a topological order for the graph in Figure 28-8
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 25: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/25.jpg)
Topological Order
FIGURE 28-14 Finding a topological order for the graph in Figure 28-8
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 26: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/26.jpg)
Topological Order
FIGURE 28-14 Finding a topological order for the graph in Figure 28-8
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 27: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/27.jpg)
Topological Order
FIGURE 28-14 Finding a topological order for the graph in Figure 28-8
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 28: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/28.jpg)
Topological Order
FIGURE 28-14 Finding a topological order for the graph in Figure 28-8
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 29: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/29.jpg)
Shortest Path in an Unweighted Graph
FIGURE 28-15 (a) An unweighted graph and (b) the possible paths from vertex A to vertex H
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 30: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/30.jpg)
Shortest Path in an Unweighted Graph
FIGURE 28-16 (a) The graph in Figure 28-15a after the shortest-path algorithm has traversed from vertex A
to vertex H; (b) the data in a vertex
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 31: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/31.jpg)
Shortest Path in an Unweighted Graph
Algorithm to find shortest path
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 32: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/32.jpg)
Shortest Path in an Unweighted Graph
Algorithm to find shortest path
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 33: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/33.jpg)
Shortest Path in an Unweighted Graph
Algorithm to find shortest path
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 34: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/34.jpg)
Shortest Path in an Unweighted Graph
FIGURE 28-17 A trace of the traversal in the algorithm to find the shortest path from vertex A to vertex H in an unweighted graph
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 35: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/35.jpg)
The Shortest Path in a Weighted Graph
FIGURE 28-18 (a) A weighted graph and (b) the possible paths from vertex A to vertex H, with their weights
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 36: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/36.jpg)
The Shortest Path in a Weighted Graph
FIGURE 28-19 A trace of the traversal in the algorithm to find the cheapest path from vertex A to vertex H in a weighted graph
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 37: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/37.jpg)
The Shortest Path in a Weighted Graph
FIGURE 28-19 A trace of the traversal in the algorithm to find the cheapest path from vertex A to vertex H in a weighted graph
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 38: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/38.jpg)
The Shortest Path in a Weighted Graph
FIGURE 28-20 The graph in Figure 28-18a after finding the cheapest path from vertex A to vertex H
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 39: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/39.jpg)
The Shortest Path in a Weighted Graph
Pseudocode for shortest path (weighted)
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 40: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/40.jpg)
The Shortest Path in a Weighted Graph
Pseudocode for shortest path (weighted)
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 41: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/41.jpg)
The Shortest Path in a Weighted Graph
Pseudocode for shortest path (weighted)
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 42: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/42.jpg)
Java Interfaces for the ADT Graph
LISTING 28-1 An interface of basic graph operations
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 43: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/43.jpg)
Java Interfaces for the ADT Graph
LISTING 28-1 An interface of basic graph operations
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 44: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/44.jpg)
Java Interfaces for the ADT Graph
LISTING 28-1 An interface of basic graph operations
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 45: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/45.jpg)
Java Interfaces for the ADT Graph
FIGURE 28-21 A portion of the flight map in Figure 28-6
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 46: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/46.jpg)
Java Interfaces for the ADT Graph
LISTING 28-2 An interface of operations on an existing graph
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 47: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/47.jpg)
Java Interfaces for the ADT Graph
LISTING 28-2 An interface of operations on an existing graph
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 48: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/48.jpg)
Java Interfaces for the ADT Graph
LISTING 28-2 An interface of operations on an existing graph
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 49: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/49.jpg)
Java Interfaces for the ADT Graph
LISTING 28-3 An interface for the ADT graph
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
![Page 50: Graphs Chapter 28 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.](https://reader035.fdocuments.net/reader035/viewer/2022062600/5a4d1b7c7f8b9ab0599b976e/html5/thumbnails/50.jpg)
End
Chapter 28
© 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.