0% found this document useful (0 votes)
10 views6 pages

Discrete Graph 3

Uploaded by

cherkos welday
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views6 pages

Discrete Graph 3

Uploaded by

cherkos welday
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

CHAPTER-3

GRAPH THEORY

INTRODUCTION

There are many concrete, practical problems that can be simplified and solved by looking at them from a
different point of view. The Konigsberg Bridge Problem, which we will soon describe, was a long-
standing problem until it was imaginatively solved in 1736 by the great Swiss mathematician LUonhard
Euler (1707-1783). Beginning his scientific career shortly after the death of Sir Isaac Newton, Euler spent
the last 17 years of his life blind, but still very active. Some of his mathematical contributions were to the
theory of convergent sequences and to the calculus of variations. Much of what is taught today about
quadratic equations, conic sections, and quadrics in Euclidean space is just as Euler himself laid out.
Perhaps less known is that Euler was a superb designer of algorithms; he had the uncanny ability of
making order out of chaos, of seeing simple routes through the most complicated situations. It is because
of his imaginative solution to the Konigsberg Bridge Problem that Euler is generally considered to be the
father of
modern-day graph theory. In the eighteenth century, Kinigsberg was the capital of East Prussia.' The
Pregel River flowed through town and split into two branches around Kneiphof island, which is labeled A
in Fig 9.1. Seven bridges crossed the river, providing links among the four land masses labeled A, B, C, D
in the figure. People wondered if it were possible to start on one of the land masses, walk over each of the
seven bridges exactly once, and return to the starting point (without getting wet).To find an abstract
mathematical model of a concrete problem can be a difficult task requiring both ingenuity and experience.
The primary aim of this chapter is to
provide the reader with some of this experience by presenting several real-world

Fig. The bridges of Konigsberg.

Problems and showing how they can be formulated in mathematical terms. This process of translation into
mathematics forces us to sift through all the details of the problem, deciding which ones are important and
which are extraneous. (Those aspects of a "real" problem which make it interesting are sometimes quite
irrelevant and serve primarily to create confusion!) Because the language of mathematics is precise and
without ambiguity, problems which seem complicated when expressed in ordinary language often have
surprisingly straightforward mathematical translations.

A graphical representation of the


Kdnigsberg Bridge Problem

For the Konigsberg Bridge Problem, Euler's idea was to realize that the physical layout of land, water, and
bridges could be modeled by the graph shown in the above figure. The land masses are represented by
small circles (or vertices) and the bridges by lines (or edges) which can be straight or curved. By means of
this graph, the physical problem is transformed into this mathematical one: Given the graph in is it
possible to choose a vertex, then to proceed along the edges one after the other and return to the chosen
vertex covering every edge exactly once? Euler was able to show that this was not possible. Can you?
The Three Houses-Three Utilities Problem is another physical situation which can be modeled by means
of a graph. There are three houses, each of which is to be connected to each of three utilities-water,
electricity, and telephone by means of underground pipes. Is it possible to make these connections without
any
Crossovers? Figure below shows how to describe this problem with a graph. The houses and the utilities
are represented by vertices and the pipes are the lines drawn between the vertices.

The Three Houses-


Three Utilities
Problem.

Terminology of Graph

Graphs
A graph G is a discrete structure consisting of nodes (called vertices) and lines joining the nodes
(called edges). Two vertices are adjacent to each other if they are joint by an edge. The edge joining the
two vertices is said to be an edge incident with them. We use V (G)and E(G) to
denote the set of vertices and edges of G respectively.

For any graph the vertex set V is always non-empty but the edge set E(G) can be empty { if ( ) = ∅
then the graph G is called a null graph} and a vertex is isolated (An isolated vertex is a vertex whose
degree is 0) if it has no edges incident to it.

Example:

u and v are adjacent vertices; e is an edge incident with u and v. e can also be denoted by uv or vu.

Loops and Multiple Edges:


An edges that joins vertex to itself is called a loop. If there are more than one edge joining u and v of
G,then all edges joining u and v form a multiple edge of G.

Simple Graph:
A simple graph is a graph containing no loops and multiple edges.
Degrees of Vertices:
The degree of a vertex is the number of edges incident with it, except that a loop at a vertex
contributes twice to the degree of that vertex. The degree of the vertex v is denoted by deg(v) or d(v).
Example:

d(u) = 5 , d(v) = 3

and d(w) = 2

Exercise:
Find the degree of every vertex of the following graph. When two lines cross, but there isn’t a dot, that
does not count as a vertex, so this graph has only 6 vertices.

Theorem: [The handshaking theorem] Let G be a graph with e edges. Then

Note: The number of vertices of odd degree in a graph G is even.

Complete Graphs:
The complete graph on n vertices, denoted by is the simple graph in which any pair of vertices are
adjacent.

Example:

Subgraphs:
A sub-graph of a graph G is a graph H where V (H)⊆V (G) and E(H)⊆ E(G).
Example:

Complete graph is simple graph in which every pair of its distinct vertices are adjacent. A complete graph
with n vertices is denoted as . The first four complete graphs are
given as examples:
Matrix representation of graphs
(Please read how to add and multiply matrices first)

Adjacency Matrices:
Definition: Given a graph G with vertex set = { , , … } and edge set E, we define the adjacency
matrix of G as follows: Let G be an graph. Suppose , , … are the vertices of G. Then the adjacent
matrix with respect to this ordering of V (G) is the n× n matrix = , where
1 , when vi and v j are adjacent
mij  
0 , otherwise

Example:

= the number of edges connecting and in G

Note that an adjacency matrix of a graph is based on the ordering chosen for the vertices. Hence, there are
as many as n! different adjacency matrices for a graph with n vertices, because there are n! different
orderings of n vertices. The adjacency matrices of a simple graph is symmetric
because if vi is adjacent to vj , then vj is adjacent to vi and if vi is not adjacent to vj , then vj is not adjacent
to vi . Since a simple graph can not have a loop. For the following graph its adjacency matrix given below.

Note: arrow with all zeros represents an isolated vertex

Paths: (way of getting from one vertex to another via edges)


- sequence of vertices in which successive vertices are
joined by an edge that is, A path in a graph is a sequence
of edges that links together two vertices
 Ex. Path from vertex A to vertex C (e2,e5 or e2, e7, e6) Etc.
 A path may have repeated edges (e2,e3,e1,e2,e5).
 The length of a path is determined by the number of edges in that path
 The degree of a vertex is the number of edges touching the vertex.
(loops count twice)

A simple path: is a path in which no vertex is repeated (e2, e7, e6, e4)

A closed path: is a path in which the first and last vertices are the same (e2, e7, e6, e4, e1)
A graph is connected if every pair of vertices is joined by a path.

A circuit is a closed path in which no edges are repeated (e2, e7, e6, e4, e1).

A simple circuit is a circuit with no repeated vertices except for the first and the last (e2, e7, e6, e4,
e1).

Any path that traces the graph by going across each edge exactly once but each vertex atleast once and
starts and ends at the same vertex is called an Euler circuit.
Euler’s Theorem: A graph contains a Euler Circuit if:
1. Graph is Connected
2. Every vertex is of even degree

If a graph has a vertex with odd degree

Then the graph can not have an Euler


circuit. For example this graph has no Euler
circuit

Exercise: Explain why find an answer to the Bridges of Koenigsburg problem is the same as finding an
Euler circuit on the graph shown. (The vertices are like the land masses, and the bridges are represented
by the edges. So finding a solution to the problem is like crossing every edge once, which is the same as
an Euler circuit)
Euler showed that if there is any vertex of the graph that has odd degree, then the graph does not have an
Euler circuit. He also showed that if all of the vertices of the edges have an even degree, then the graph
does have an Euler circuit.

This graph has an Euler circuit, because all of


the vertices have even degree. You can find
the circuit by traveling
along the graph in this order:
A → B →D →C →B →A.
(Notice that vertex B is used twice. This is fine in an Euler circuit.)

Does the graph showing the Koenigsburg bridges have an Euler circuit? Why or why not?
(ANS: It does NOT because it has vertices with odd degree.)
For each of the graphs shown below, decide if they have an Euler circuit. If they do, find an Euler circuit.
If it doesn’t have an Euler circuit, explain why not

Another problem that can be studied through graph theory is what is called the “traveling salesman
problem.” One example from that problem is shown below. It shows 4 cities that a sales representative
would visit, and the distances (in miles) between the cities. The problem is to find the best order for the
sales representative to visit the cities, and return to the starting point, so that the shortest distance possible
is travelled.

Write down some possibilities for paths the sales representative could take, starting in Denver. Which one
is the shortest? Write all of the possibilities that you tested in your math journal. Shortest is 444 miles,
and the route is Denver→Limon→Lamar→Pueblo→Denver. (The reverse route is also correct.)

You might also like