Sie sind auf Seite 1von 84

INTRODUCTION TO

GRAPH THEORY
Lecture by:
Learning Objectives
1.Define basic graph theory
terms.
2.Represent relationships
with graphs.
3.Decide if two graphs are
equivalent.
4.Recognize features of
What is a graph?
What is a graph?
it consists of finite
set of points called
vertices

and line segments


or curves called
edges

Fig 14-1
Drawing a graph
Draw vertices as
block dots
Label vertices
i.e. A, B, C, D
Edges are labeled
from connected
vertices
i.e. AB, BC, CD, DA,
CA, and BD
Applications of graphs
Graphs can be used to model various
systems:
Cities on a map
Floor plans for houses
Border relationships
Relationships of countries and states
Relationships between family and friends
Representing Systems with Graphs
Representing Islands with a Graph

Represent the islands and bridges as a


graph

Fig 14-2
Representing Islands with a
Graph

Fig 14-3
Representing Islands with a Graph

MATH NOTE: physical location of the graph is not


important just the edges!
Representing Islands with a
Graph
TRY: draw a graph representing ferry
services between Ohio and some Lake
Erie islands as shown

Fig 14-4
Representing a Floor Plan

Represent the floor plan of house by a


graph.

Fig 14-5
Representing a Floor Plan

Fig 14-5
Representing a Floor Plan

Fig 14-5 Fig 14-6


Representing a Floor Plan
TRY: draw a graph to represent this two-
bedroom apartment in Oxford, Ohio.

Fig 14-7
Representing Border
Relationship
Draw a graph that shows the countries
that share a common border.

Fig 14-8
Representing Border
Relationship
Representing Border
Relationship

Fig 14-8 Fig 14-9


MATH NOTE: graph shows which borders but does not
indicate how countries are situated.
Representing Border
Relationship
TRY: draw a similar graph for the map of
Central America as shown.

Fig 14-
Graph Representing City
Streets
Draw a graph for the neighborhood with
street intersections as vertices and
streets as edges.

Fig 14-
Graph Representing City
Streets
Graph Representing City
Streets

Fig 14- Fig 14-


12
11 you can also represent streets as vertices
MATH NOTE:
and edges as intersections.
Graph Representing City
Streets
TRY: draw a similar graph for my
neighborhood as shown below.

Fig 14-
Graph Theory: Making Transportation
Easier

Public transportation is a popular


alternative for economic purposes
New York City 1870: first subway
system in America
With all the twist and turns, looking at
maps can be confusing
London 1930: a draftsman thought
of using graph theory to simplify
route maps
Thus, the original purpose of graph
theory.
Graph Theory: Making Transportation
Easier

RTA system in Cleveland


Each vertex represents a station
Edges represent lines that connects
each stations
Graph Terminology
Graph Terminology
Graphs are considered equivalent
when they have vertices connected
the same way.

Fig 14-
14
Graph Terminology
Why are the two graphs below
equivalent?

Fig 14-
14
Graph Terminology

Each graph contains vertices A, B, C, and D


In each graph, each vertex is connected to three vertices
Both (a) and (b) have the same vertices and connections
thus they are equivalent
Graph Terminology
TRY: Are the two graphs equivalent?
Explain.

Fig 14-
15
Graph Terminology

degree of a vertex:
number of edges that
intersect that vertex

even vertex: vertex


with an even numbered
degree
odd vertex : vertex with
an odd numbered degree

Fig 14-
16
Graph Terminology
adjacent vertices:
vertices that have at
least one edge
connecting them
In Fig 14-17, vertex A is
adjacent to vertices B
and E
Vertex E is not adjacent
to either B or D
since there is no edge
Fig 14-
connecting them
17
Graph Terminology

path: sequence of
adjacent vertices and
edges connecting them
paths doesnt have to
include all vertices and
edges
a vertex can be crossed
more than once but an
edge can only be crossed
once
Path B,C,E,F Fig 14-
17
Graph Terminology
circuit: a path that
begins and ends at the
same vertex

In Fig 14-17, vertex A is


adjacent to vertices B
and E
Circuit A, B, C, E, A

Fig 14-
18 every loop is a circuit; every circuit is a path but
MATH NOTE:
not every path is a circuit
Graph Terminology

connected graph:
for any two vertices,
there is at least one
path that connects
them
disconnected
graph: if otherwise

Fig 14-
18
Graph Terminology

bridge: an edge in a
connected graph in
which when removed,
the graph becomes
disconnected

Fig 14-
19
Recognizing Features of Graphs

Refer to Fig 14-21 and answer the questions below.

a) List the odd vertices


b) List the even
vertices.
c) What vertex has a
loop?
d) Are there any
bridges?
e) Identify at least one
circuit. Fig 14-
Recognizing Features of Graphs

SOLUTION

a) Vertices V, W, X and
Z. Vertices V, W and X
have degrees of 3
while Vertex Z has 1.
b) Vertices T,U, and Y.
Vertices T and U have
degrees of 4 while
Vertex Y has 2.
c) Vertex W has a loop.
Fig 14-
Recognizing Features of Graphs

SOLUTION

d) Edges WY and YZ.


Removing WY isolates
W while removing YZ
isolates Z making the
graph disconnected.
e) T, U, V, X, T.
Note that there are
several possible
circuits in a graph!
Fig 14-
Recognizing Features of Graphs

TRY: Refer to Fig 14-22 and answer the questions


below.
a) List the odd vertices.
b) List the even
vertices.
c) What vertex has a
loop?
d) What edge is a
bridge?
e) Identify a circuit. Fig 14-
22
Graph Coloring
Graph Coloring
graph coloring: a method of
coloring vertices so that any pair of
vertices joined by an edge have
different colors

chromatic number: smallest


number of colors needed for graph
coloring

MATH NOTE: what weve defined is vertex coloring graph


theorists also study edge coloring.
Graph Coloring in Scheduling

SITUATION
At a company, there are regular meetings for each of
the seven different groups. Some employees are
members of multiple groups: finance (F), strategic
planning (S), human resources (H), healthcare
and wellness (W), employee relations (E), union
negotiations (U), and board of managers (B). The
graph in Fig 14-23 shows the relationship amongst the
groups: an edge connecting two vertices means that
those groups have at least one common member. Find
the smallest number of meeting times that guarantee
no time conflicts for the members with different groups.
Graph Coloring in
Scheduling

Fig 14-
23
Graph Coloring in Scheduling

SOLUTION

We can start by coloring Vertex F blue.


Fig 14-
24
Graph Coloring in Scheduling

SOLUTION
Graph Coloring in
Scheduling
TRY: Color the graph below and find the
chromatic number.

Fig 14-
25
Applying Graph Coloring to
Maps
Find the number of different colors that would
be necessary so that no states with a common
border are the same color.

Fig 14-
Applying Graph Coloring to
Maps

Fig 14-
27
Applying Graph Coloring to
Maps

Fig 14-
27
That leaves us to a chromatic number of 4.

MATH NOTE: when coloring a complicated graph, it's a good idea to


start at the vertex that has the highest degree.
Four Color Theorem
Francis Guthrie
London 1852
conjectured that four colors would be sufficient to draw
ANY map
Augustus de Morgan: received the conjecture
and in which the map coloring problem became
famous
1976: year when a widely accepted proof appeared
But even today, some theorists dont trust the proof
since validating it needs tremendous amount of
computer time.
Additional Exercises
Exercise Set 14-1
Writing Exercises
1. Describe the difference between the meaning of the
word graph in this chapter and the meaning we used
earlier in the book.
2. What is the difference between a loop and a circuit?
3. What is the difference between a circuit and a path?
4. Draw two graphs that look physically different but are
equivalent, then explain why they're equivalent.
5. How can you tell if a graph is connected?
6. Think about a graph that represents the commercial
flight routes for all American cities. Do you think this
graph is connected? What does it mean if it's
disconnected?
Writing Exercises
7. What does it mean for two vertices in a
graph to be adjacent? What would it mean in
the context ofExercise 6?
8. Does every graph have a bridge? Explain.
9. What is a graph coloring?
10. What's the chromatic number of a graph?
11. If the chromatic number of a graph is five,
explain why you can find a coloring that uses
six colors, but not one that uses four.
12. How does graph coloring apply to maps?
Computational Exercises

Refer to this graph to answer Exercises


13-24.
Computational Exercises
13. List the vertices of the graph.
14. How many edges does the graph have?
15. Name three vertices that are adjacent
to vertexE.
16. List the even vertices.
17. List the odd vertices.
18. What edge is a bridge?
Computational Exercises
19. Find a path that contains vertexE.
20. Find a circuit that includes vertexD.
21. Identify a vertex that has a loop.
22. Which edges are not included in the
pathA,B,E,G,F?
23. Explain whyA,B,E,Dis a not a path.
24. Explain whyE,F,Gis not a circuit.
Computational Exercises
For Exercises 25-30, find the chromatic
numbers of the following graph.
26.
25.
Computational Exercises
For Exercises 25-30, find the chromatic
numbers of the following graph.
28.
27.
Computational Exercises
For Exercises 25-30, find the chromatic
numbers of the following graph.
30.
29.
Applications in Our World
For Exercises 31-34, represent the islands
using a graph. Use vertices for islands and
edges for bridges.
31. 32.
Applications in Our World
For Exercises 31-34, represent the islands
using a graph. Use vertices for islands and
edges for bridges.
33. 34.
Applications in Our World
For Exercises 35-38, represent the maps
using a graph. Use vertices for state and
edges for borders. 36.
35.
Applications in Our World
For Exercises 35-38, represent the maps
using a graph. Use vertices for state and
edges for borders. 38.
37.
Applications in Our World
For Exercises 39-42, draw a graph to
represent floor plans. Use vertices for
rooms and edges for connecting doors.
39. 40.
Applications in Our World
For Exercises 39-42, draw a graph to
represent floor plans. Use vertices for
rooms and edges for connecting doors.
41. 42.
Applications in Our World
For Exercises 43-50, find the smallest
number of colors needed to draw the map
so no regions sharing a common border are
43.the same color. 44.
Applications in Our World
For Exercises 43-50, find the smallest
number of colors needed to draw the map
so no regions sharing a common border are
45.the same color. 46.
Applications in Our World
For Exercises 43-50, find the smallest
number of colors needed to draw the map
so no regions sharing a common border are
47.the same color. 48.
Applications in Our World
For Exercises 43-50, find the smallest
number of colors needed to draw the map
so no regions sharing a common border are
49.the same color. 50.
Applications in Our World
For Exercises 51-54, find the minimum
number of colors needed to paint the
homes with the given floor plan so that no
51.two adjoining rooms 52.
are the same color.
Applications in Our World
For Exercises 50-54, find the minimum
number of colors needed to paint the
homes with the given floor plan so that no
53.two adjoining rooms 54.
are the same color.
Critical Thinking
55. Draw a circuit with five vertices, a loop, and a
bridge.
56. Exercise 55: Draw Circuit Loop Bridge
57. Draw a graph that represents the street map
inExample 4, but this time use vertices to
represent the streets, and edges to describe
which streets intersect. Is your graph different
from the one in Example 4? What can you
conclude?
58. Is it possible to color a graph that has a loop?
Explain.
Critical Thinking
59. Draw a floor plan of where you live similar to the ones in
Exercises 3942, and draw a graph that represents the
floor plan. Use vertices to represent rooms and outside
area, and edges to represent connecting doors. If you live
in a two-story house, use the main floor. If you live in a
dorm room, use a portion of the common area of your
dorm with at least four rooms.
60. The city of New York consists of the boroughs of
Manhattan, Brooklyn, Queens, and the Bronx. Manhattan
is connected to New Jersey by several bridges. Find a
map of New York City with bridges and tunnels included.
Then use the map to draw a graph similar to the one in
Exercises 3134, with the four boroughs and New Jersey
as vertices and bridges/tunnels as edges.
Critical Thinking
61. Find a map of the county you live in and the five
other counties that are nearest to you. Use the
map to draw a graph like the ones in Exercises 35
38. Use vertices to represent counties and edges
to represent the common borders.
62. Graphs can be used to represent social
relationships as well as geographic relationships. If
you are on Facebook, pick four of your Facebook
friends and find out which of them are friends with
each other. (It would be a good idea to pick some
that come from different social or family groups to
make things interesting.) Then draw a graph that
represents the friendships.
Critical Thinking
63.
a. When a graph represents the floor plan of a home
as inExercise 59, what does it mean when the
graph is disconnected?
b. What does it mean if an edge is a loop?
c. What does it mean if an edge is a bridge?
64.
a. When a graph represents a map as inExercise 61,
what does it mean when the graph has a loop?
b. What does it mean when the graph has a bridge?
c. What does a circuit represent?
Selected Answers to
Exercises
Exercise 14-1
Selected Answers

Exercises 13-23

13. A,B,C,D,E,F,G 25. 3


15. B,G,F
17. BandE
19. Answers vary; one
such path isA,B,E,F.
21. G
23. There is no edge
connectingEandD.
Note: there are other
possible colorings.
Selected Answers

27. 4 29. 3

Note: there are other


possible colorings.
Selected Answers
31. 35.

33. 37.
Selected Answers
41.
39.
Selected Answers

Exercises 43-55 Exercises 59-63

43. 2 59. Answers vary


45. 3 61. Answers vary
63.
47. 3
a. The house is split into
49. 4
distinct parts that are not
51. 2 connected.
53. 2 b. There's a door that
55. Answers vary connects one part of a room
to another.
57. No, vertex is adjacent to
c. There's a door that, if
itself if theres a loop; it
removed, would make it
will also be adjacent with impossible to get from one
the same color. part of the house to another.
END OF INTRO TO GRAPH THEORY
INTRODUCTION TO
GRAPH THEORY
Lecture by:

Das könnte Ihnen auch gefallen