You are on page 1of 40

CHAPTER SIX

mathematics
of graphs

mathematics in the modern world


what is a graph?
a graph is a set of points called vertices
and line segments or curves called
edges that connects the vertices.
the following table lists five students at a college. An "X"
indicates that the two students participate in the same study
group this semester.

constructing
a graph a. draw a graph that represents this information where each vertex
represents a student and an edge connects two vertices if the
corresponding students study together

b. use your graph to answer the following questions: which


student is involved the most study group with the others? Which
student has only one study group in common with the others? How
many study groups does Laura have in common with others
solution

constructing
a graph
a. we draw five vertices (in any configuration we wish) to
represent the five students and connect vertices with edges
according to the table

b. the vertex corresponding to Amber is connected to more


edges than the others, so she is involved with more study
groups (three) than the others. Kayla is the only student with
one study group in common, as her vertex is the only one
connected to just one edge. Laura's Vertex is connected to
two edges, so she shares two study groups with the others
in general, a graph can include vertices that are not joined to any edges,
but all edges must begin and end at vertices. If two or more edges
connect the same vertices, they are called multiple edges. If an edge
begins and ends at the same vertex, it is called a loop.

A graph is called connected if any vertex can be reached from any other
vertex by tracking along the edges. (Essentially, the graph consists of
one "piece.") A connected graph in which every possible edge is drawn
between vertices (without multiple edges) is called a complete graph.
this graph has five vertices this is a connected graph this graph is not connected; it this is a complete graph with
but no edges. it is not that has a pair of connected consists of two different five vertices.
connected. pair of multiple edges. Note sections. it also contains a
that two edges cross in the loop.
center, but there is no vertex
there. unless a dot is drawn,
the edges are considered to
pass over each other without
touching.
Note that it does not matter whether the edges are drawn straight or curved, and their
lengths are not important. Nor is the placement of the vertices important. All that
matters is which vertices are connected by edges.

Consequently, the three graphs shown below are considered equivalent graphs
because the edges form the same connections of vertices in each graph.
determine whether the two
graphs are equivalent.
Despite the fact that the two graphs have different
arrangements of vertices and edges. they are
equivalent. To illustrate, we examine the edges of
each graph. The first graph contains six edges; we
solution can list them by indicating which two vertices they
connect. The edges are AC, AE, BD, BE, CE, and DE.
If we do the same for the second graph, we get the
same six edges. Because the two graphs represent
the same connections among the vertices, they are
equivalent.
euler circuits
in terms of graph, the original problem can be stated
as follows: can we start at any vertex, move through
each edge once (but not more than once), and return
to the starting vertex?

a path in a graph can be thought of as a movement


from one vertex to another by traversing edges. We
can refer to our movement by vertex letters. For
example, in the graph shown in the figure on the left,
one path would be A-B-A-C.
euler circuits
if a path ends at the same vertex at which it
started, it is called a closed path, or circuit.

For the graph on the left, the path A-D-F-G-


E-B-A is a circuit because it begins and ends
at the same vertex.

The path A-D-F-G-E-H is not a circuit as the


path ends at a different vertex than the one
it started at.
euler circuits
a circuit that uses every edge, but never
uses the same edge twice, is called an Euler
Circuit. (the path may cross through vertices
more than once.)

The path B-D-F-G-H-E-C-B-A-D-G-E-B is a


Euler Circuit. it begins and ends at the same
vertex and uses each edge exactly once.

A-B-C-E-H-G-B-D-A is not a Euler Circuit.


the path begins and ends at the same vertex
but uses edges DF, DG, or FG.
a connected graph is
Eulerian Graph Eulerian if and only if
Theorem every vertex of the
graph is of even degree.

note: degree (of a vertex) is the number of edges that meet at a vertex
which of the following
graph has an Euler Circuit?
solution
a. vertices C and D are of odd degree. By the Eulerian
graph theorem, the graph does not have a Euler
Circuit

b. All vertices are of even degree. By the Eulerian


graph theorem, the graph has an Euler Circuit.
Euler Path Euler Path Theorem
Euler Path is a path a connected graoh contains an Euler
(not necessarily a path if and only if the graph has two
circuit) that uses vertices of odd degree with all other
every edge once and vertices of even degree. Every Euler
only once. path must start at one of the vertices
of odd degree and end at the other.
weighted graphs

the figure on the left shows the map of cities.


if our priority is to visit each city, we could
travel along the rout A-B-C-D-E-F-G-A. This
path visits each vertex once and returns to
the starting vertex without visiting any other
vertex twice. This type of path is called a
Hamiltonian Circuit.
path that begins and ends at
the same vertex and passes
hamiltonian through each vertex of a
circuit graph exactly once. a graph
contains a Hamiltonian
circuit is called Hamiltonian.
consider a connected graph with
at least three vertices and no
Dirac's multiple edges. Let n be the
number of vertices in the graph. if
theorem every vertex has degree of at least
n/2, then the graph must be
Hamiltonian.
a graph in which each
weighted edge is associated with a
value called weight. the
graphs value can represent any
quantity we desire.
algorithms in
complete graphs
unfortunately, there is no known shortcuts for finding the
optimal Hamiltonian circuit in a weighted graph. There are,
however, two algorithms. Both of these algorithms apply
ONLY TO COMPLETE GRAPHS (graphs in which every
possible edge is drawn between vertices without any
multiple edges).
PS Voice-Over Services | 2020
1.choose a vertex to start at, then travel along
the connected edge that has the smallest
weight (if two or more edges have the same
weight, pick any one.)

2. after arriving the next vertex, travel along


the greedy
the edge of smallest weight that connects to a
vertex not yet visited. continue this process
algorithm
until you have visited all vertices

3.return to the starting vertex


use the greedy algorithm to
find a Hamiltonian circuit in
the weighted graph shown
on the left. Start at vertex A.
solution
1. begin with the weights of 2. At D, the edge with the 3. At B, the edge with the
the edges from A are 13, 5, smallest weight is DB. Connect smallest weight is BF. Connect B
4, 15 and 8. The smallest D to B to F
number is 4. Connect A to D
solution
4. At F, the edge with the 5. At E, the edge with the 6. All vertices have been visited,
smallest weight, 7, is FD. smallest weight whose vertex so we are at step 3 of the
However, D has already been has not been visited is C. algorithm. We return to the
visited. Choose the next smallest Connect E to C. starting vertex by connected C
weight, edge FE. Connect F to E. to A.

The Hamiltonian Circuit is A-D-B-F-E-C-A.


The weight is 4 + 2 + 5 + 10 + 6 + 15 = 42
a graph that can be
drawn so that no edges planar
graph
intersect each other
(except at vertices).
how is the graph planar?

as given, the graph has a several interacting edges. however, we can redraw the graph in an
equivalent form in which no edges touch except at vertices by redrawing the two red edges show
below. To verify that the second graph is equivalent to the first, we can label the vertices and check
that the edges join the same vertices in each graph. Because the given graph is equivalent to a
graph whose edge do not intersect, the graph is planar.
if a graph G has a subgraph
that is not planar, then G is
also not planar. In subgraph
particular, if G contains the
Utilities Graph or K5 as a theorem
subgraph, G is not planar.
how is the graph nonplanar?

solution
in the figure on the right, we have
highlighted edges connecting the top six
vertices. If we consider the highlighted
edges and attached vertices as a subgraph,
we can verify that the subgraph is a utilities
graph. By the preceeding theorem, we know
that this is not planar.
Euler's Formula
Euler noticed a connection between various
features of planar graphs. In addition to
edges and vertices, he looked at faces of a
graph. In a planar drawing of a graph, the
edges divide the graph into different regions
called faces.

the region surrounding the graph, or the


exterior, is also considered a face, called the
infinite face.
in a connected planar graph
drawn with no intersecting
edges, let:
v = the number of vertices
euler's
e = the number of edges
f = number of faces
formula
v+f=e+2
count the number of edges, vertices and
faces, and then verify Euler's formula.
solution
there are 7 edges, 5 vertices and 4 faces (counting the
infinite face) in the graph.
Thus, v + f = 5 + 4 = 9 and e + 2 = 7 + 2 = 9 so v + f = e + 2,
as Euler's formula predicts.
graphing coloring
here is a map of the contiguous
states of the United States colored
similarly. Note that the map has
only four colors and that no two
states that share a common border
have the same color.
coloring
maps
graphing coloring
suppose the map on figure 6.21 shows the countries, labeled as letters of a
continent. We will assume that no country is split into more than one piece and
countries that touch at just a corner point will not be considered neighbors. We
can represent each country by a vertex, placed anywhere within the boundary of
that country. We will then connect two vertices with an edge if two
corresponding countries are neighbors- that is, if they share a common
boundary. The result is shown in Figure 6.22.
every planar graph four-color
is 4-colorable. theorem
the chromatic number of a graph
the minimum number of colors needed to color a
graph so that no edge connects vertices of the
same color is called the chromatic number of the
graph. In general, there is no efficient method of
finding the chromatic number of a graph, but we
have a theorem that can tell us whether a graph
is 2-colorable.
a graph is 2-colorable
if and only if it has no 2-colorable
circuits that consist of graph theorem
odd number of vertices.
find the chromatic number
of the utilities graph.
solution
note that the graph contains circuits such as A-Y-C-Z-B-X-A with six
vertices and A-Y-B-X-A with four vertices. It seems that any circuit we
find, in fact, involves an even number of vertices. It is difficult to determine
whether we have looked at all possible circuits but our observations
suggest that the graph may be 2-colorable. a little trial and error confirms
this if we simple color vertices A, B, and C one color and the remaining
vertices another. Thus the Utilities graph has a chromatic number of 2.

You might also like