vertices

CHAPTER 15
Graph Theory
© 2010 Pearson Prentice Hall. All rights reserved.
§15.1, Graphs, Paths, and
Circuits
© 2010 Pearson Prentice Hall. All rights reserved.
2
Learning Targets
I will understand relationships in a graph.
I will model relationships using graphs.
I will understand and use the vocabulary of graph theory.
© 2010 Pearson Prentice Hall. All rights reserved.
3
Graphs
A graph consists of a finite set of points, called vertices, (singular is vertex),
and line segments or curves, called edges, that start and end at vertices. An
edge that starts and ends at the same vertex is called a loop.
© 2010 Pearson Prentice Hall. All rights reserved.
4
Example 1: Understanding Relationships in Graphs
Explain why the figures below show equivalent graphs.
Solution: In both figures, the vertices are A, B, C, and D. Both
graphs have an edge that connects vertex A to vertex B, an
edge that connects vertex B to vertex C, and an edge that
connects vertex C to vertex D. Because the two graphs have
the same number of vertices connected to each other in the
same way, they are equivalent.
© 2010 Pearson Prentice Hall. All rights reserved.
5
Example 2: Modeling Königsberg with a Graph
We can represent, or model, different situations using graphs.
Example: In the early 1700’s, the city of Königsberg,
Germany, was located on both banks and two islands of the
Pregel River. The figure below shows that the town’s sections
were connected by seven bridges.
Draw a graph that models the layout of Königsberg.
Use vertices to represent the land masses and edges to
represent the bridges.
© 2010 Pearson Prentice Hall. All rights reserved.
6
Example 1: Modeling Konigsberg with a Graph
Solution: The only thing that matters is the relationship
between land masses and bridges.
We label each of
the four land
masses with an
uppercase letter.
We draw two edges
We use points to
connecting vertex A
represent the land
to right bank R, one
masses. This figure
shows vertices A, B, L, edge from A to B, and
two edges from A to
and R.
left bank L.
© 2010 Pearson Prentice Hall. All rights reserved.
7
Example 3: Modeling Bordering Relationships for the
New England States
The map of New England states are given below. Draw
a graph that models which New England states share a
common border. Use vertices to represent the states and
edges to represent common borders.
© 2010 Pearson Prentice Hall. All rights reserved.
8
Example 3: Modeling Bordering Relationships for the
New England States
Solution:
a) Notice the states are labeled with their abbreviations.
b) We use the abbreviations to label each vertex and use points
to represent these vertices.
c) Whenever two states share a common border, we connect the
respective vertices with an edge.
© 2010 Pearson Prentice Hall. All rights reserved.
9
Circuits & Paths
Vocabulary of Graph Theory
• The degree of a vertex is the number of edges at that vertex.
• A vertex with an even number of edges attached to it is an
even vertex.
• A vertex with an odd number of edges attached to it is an odd
vertex.
• Two vertices in a graph are said
to be adjacent vertices if there
is at least one edge connecting
them.
© 2010 Pearson Prentice Hall. All rights reserved.
10
Example 6: Identifying Adjacent Vertices
List the pairs of adjacent vertices for the given graph .
Solution: A systematic way to
approach this problem is to
first list all the pairs of adjacent
vertices involving vertex A, then
all those involving vertex B but not A,
and so on. The adjacent vertices are A and B, A and C,
A and D, A and E, B and C, and E and E because there
is at least one edge connecting them.
© 2010 Pearson Prentice Hall. All rights reserved.
11
Circuits & Paths
Vocabulary of Graph Theory
• A path in a graph is a sequence of adjacent vertices
and the edges connecting them.
Notice the path along this graph is represented by
sequential arrows.
© 2010 Pearson Prentice Hall. All rights reserved.
12
Circuits & Paths
Vocabulary of Graph Theory
• A circuit is a path that begins and ends at the same
vertex.
© 2010 Pearson Prentice Hall. All rights reserved.
13
Circuits & Paths
Vocabulary of Graph Theory
• A graph is connected if for any two of its vertices
there is at least one path connecting them.
• A graph that is not connected is called disconnected.
• A disconnected graph is made of pieces that are
connected by themselves called components of the
graph.
© 2010 Pearson Prentice Hall. All rights reserved.
14
Homework
Pg 827 – 828, #2 – 52 (e)
© 2010 Pearson Prentice Hall. All rights reserved.