0% found this document useful (0 votes)
16 views

Module 1- Part I

The document is a course outline for an 'Introduction to Graph Theory' class, detailing its history, definitions, and applications. It covers foundational concepts such as finite and infinite graphs, isolated and pendant vertices, and includes various problems related to graph theory. The course aims to provide students with a comprehensive understanding of graph properties and their relevance in various fields.

Uploaded by

Lucky Sinha
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)
16 views

Module 1- Part I

The document is a course outline for an 'Introduction to Graph Theory' class, detailing its history, definitions, and applications. It covers foundational concepts such as finite and infinite graphs, isolated and pendant vertices, and includes various problems related to graph theory. The course aims to provide students with a comprehensive understanding of graph properties and their relevance in various fields.

Uploaded by

Lucky Sinha
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/ 48

4th semester course

Introduction to
Graph Theory
By: Nandini B M,
Assistant Professor.
Dept. of ISE, NIE, Mysuru.

Dr. NANDNI B M, Asst. Prof., ISE, NIE


Dr. NANDNI B M, Asst. Prof., ISE, NIE
The History of Graph Theory

Graph theory was first introduced in the 18th century (1736) by the Swiss
mathematician Leonhard Euler. His work on the famous “Seven Bridges of
Königsberg problem,” is considered the origin of graph theory.

Leonhard
Euler

The city of Königsberg in Prussia (present-day Kaliningrad, Russia) was set on both sides
of the Pregel River and included two large islands — Kneiphof and Lomse — that were
connected to each other via the two mainland portions of the city by seven bridges. The
problem was to devise a walk through the city that would cross each of those bridges

Dr.
onceNANDNI
and only once. B M, Asst. Prof., ISE, NIE
Overview
What is Graph theory?
History of Graph Theory
Basic definitions of Graphs
Applications of Graphs
Finite and Infinite Graphs
Isolated and pendant vertex
Null Graph
Solving Problems

Dr. NANDNI B M, Asst. Prof., ISE, NIE


What is a Graph Theory?
Graph theory is a branch of discrete mathematics that studies the
properties and structures of graphs, which are combinatorial
representations of pairwise relationships between entities using vertices
(nodes) and edges (links).

Dr. NANDNI B M, Asst. Prof., ISE, NIE


Applications of Graph
Graphs can be used to model many types of relations
and processes in physical, biological, social and
information systems, and it has a wide range of useful
applications, such as:

social media search engines Google maps chemistry Computer network

Finding communities Ranking hyperlinks in GPS in Google maps to find Study of molecules networks issues such as
in networks, such as search engines the shortest path home. and atoms in connectivity, scalability,
social media Various locations are chemistry, routing, security,
(friend/connection represented as vertices or DNA sequencing modeling the network
recommendations), or nodes and the roads are
and simulation are to be
for possible spread of represented as edges and
considered
COVID-19 in the graph theory is used to find
community through shortest path between two
contacts. nodes

Dr. NANDNI B M, Asst. Prof., ISE, NIE


Applications of Graph

Electrical Network
Königsberg Bridge Problem
Problems

Utilities Problem
Seating Problem

Dr. NANDNI B M, Asst. Prof., ISE, NIE


The History of Graph Theory

Graph theory was first introduced in the 18th century (1736) by the Swiss
mathematician Leonhard Euler. His work on the famous “Seven Bridges of
Königsberg problem,” is considered the origin of graph theory.

Leonhard
Euler

The city of Königsberg in Prussia (present-day Kaliningrad, Russia) was set on both sides
of the Pregel River and included two large islands — Kneiphof and Lomse — that were
connected to each other via the two mainland portions of the city by seven bridges. The
problem was to devise a walk through the city that would cross each of those bridges

Dr.
onceNANDNI
and only once. B M, Asst. Prof., ISE, NIE
The History of Graph Theory

For the next 100 years nothing more was done in the field. In 1847, G. R.
Kirchhoff (1824-1887) developed the theory of trees for their applications in
electrical networks.

Gustav R Kirchhoff

The concept of trees, a connected graph without cycles, appeared


implicitly in the work of Gustav Kirchhoff, who employed graph-theoretical
ideas in the calculation of currents in electrical networks or circuits.
Dr. NANDNI B M, Asst. Prof., ISE, NIE
The History of Graph Theory

Ten years later, A. Cayley (1821-1895) discovered


trees while he was trying to enumerate the isomers
of saturated hydrocarbons CnH2n + 2.

Arthur Cayley

Dr. NANDNI B M, Asst. Prof., ISE, NIE


The History of Graph Theory
It is believed that A. F. Möbius (1790-1868) first presented the four-color
problem in one of his lectures in 1840. Four color map theorem, states
that no more than four colors are required to color the regions of any
map so that no two adjacent regions have the same color.

A. F. Möbius

Dr. NANDNI B M, Asst. Prof., ISE, NIE


Another problem
• Once upon a time, there was a king with five sons.
In his will, he stated that after his death the sons
should divide the kingdom into five provinces so
that the boundary of each province should have a
frontier line in common with each of the other four
provinces.
• Here the problem is whether one can draw five
mutually neighboring regions in the plane.
• The king further stated that all five brothers should
join the provincial capital by roads so that no two K5
roads interest.
• Here the problem is that deciding whether the
graph K5 if planar.
Dr. NANDNI B M, Asst. Prof., ISE, NIE
Another problem
• The other milestone is due to Sir W. R. Hamilton (1805-1865).
• In the year 1859 he invented a puzzle and sold it for 25 guineas
to a game manufacturer in Dublin. The puzzle consisted of a
wooden, regular dodecahedron (a polyhedron with 12 faces
and 20 corners, each face being a regular pentagon and
three edges meeting at each corner;).
Sir W. R. Hamilton

• The corners were marked with the names of 20 important


cities: London, New York, Delhi, Paris, and so on.
• The object in the puzzle was to find. a route along the edges of
the dodecahedron, passing through each of the 20 cities
exactly once.
• Although the solution of this specific problem is easy to obtain,
to date no one has found a necessary and sufficient condition
for the existence of such a route (called Hamiltonian circuit) in

Dr. NANDNI B M, Asst. Prof., ISE, NIE


an arbitrary graph.
loop or self-loop

What is a Graph?
parallel edges
• A linear graph (or simply a graph) G = (V, E) consists
of a set of objects V = {v1 v2, . . .} called vertices, and
another set E = {e1, e2,. . .}, whose elements are called
edges.
• Each edge ek is identified with an unordered pair (vi,
vj) of vertices.
• The vertices vi vj associated with edge ek are called
the end vertices of ek.
• The most common representation of a graph is by
Fig: Graph with five vertices and seven edges.
means of a diagram, in which the vertices are
represented as points and each edge as a line
segment joining its end vertices. A graph that has neither self-loops nor parallel
edges is called a simple graph.

A graph that has self-loops or parallel edges is


called a Multigraph.
Dr. NANDNI B M, Asst. Prof., ISE, NIE
Finite and Infinite Graphs

• A graph with a finite number of vertices as well as a finite


number of edges is called a finite graph;
• otherwise, it is an infinite graph.

Dr. NANDNI B M, Asst. Prof., ISE, NIE


ISOLATED VERTEX, PENDANT VERTEX

• A vertex having no incident edge is called an


isolated vertex. Vertices v4 and v7 are isolated
vertices.
• A vertex of degree one is called a pendant vertex
or an end vertex. Vertex v3 is a pendant vertex.
• Two adjacent edges are said to be in series if their
common vertex is of degree two.
• In Fig. the two edges incident on v1 are in series.

Dr. NANDNI B M, Asst. Prof., ISE, NIE


NULL GRAPH

• a graph, without any edges, is called a null graph.


• In other words, every vertex in a null graph is an isolated
vertex.

Dr. NANDNI B M, Asst. Prof., ISE, NIE


INCIDENCE AND DEGREE
• When a vertex vi is an end vertex of some edge
ej, vi and ej are said to be incident with (on or
to) each other.
• In Fig., for example, edges e2, e6, and e7 are
incident with vertex v4.
• Two nonparallel edges are said to be adjacent
if they are incident on a common vertex. For
example, e2 and e7 in Fig. are adjacent.
• Similarly, two vertices are said to be adjacent if
they are the end vertices of the same edge. In
Fig., v4 and v5 are adjacent, but v1 and v4 are
Dr. not.
NANDNI B M, Asst. Prof., ISE, NIE
INCIDENCE AND DEGREE

• The number of edges incident on a


vertex vi, with self-loops counted twice,
is called the degree, d(vi) of vertex vi.
• In Fig., for example, d(v1) = d(v3) =
d(v4) = 3, d(v2) = 4, and d(v5) = 1.
• The degree of a vertex is sometimes
also referred to as its valency.
• A pendant vertex has degree 1
Dr. NANDNI B M, Asst. Prof., ISE, NIE
Vertex degree property

Example: d(v1) + d( v2) + d(v3) + d(v4) + d(v5)


= 3 + 4 + 3 + 3+1 = 14 = twice the number of edges.

Dr. NANDNI B M, Asst. Prof., ISE, NIE


THEOREM 1-1: The number of vertices of odd
degree in a graph is always even.
Proof:
Considering the vertices with odd and even degrees separately,
we get

Since the left-hand side in the Eq.(1-2) is even, and the first
expression on the right-hand side is even (being a sum of even
numbers), the second expression must

Because in Eq. (1-3) each d(vk) is odd, the total number of terms
Dr. NANDNI B M,beAsst.
in the sum must Prof.,
even to make ISE, NIEan even number.
the sum
Regular Graphs

• An undirected graph, where each vertex has the same degree is


called a regular graph. If deg(v)=k for all vertices v, the graph is
called k-regular.

• Ex: Is it possible to have 4-regular graph with 10 edges?

• How about 4-regular graph with 15 edges?


Dr. NANDNI B M, Asst. Prof., ISE, NIE
• Ex: Is it possible to have 4-regular graph with 10 edges?

• How about 4-regular graph with 15 edges?

Dr. NANDNI B M, Asst. Prof., ISE, NIE


BIPARTITE GRAPHS
▪▪ G=(V,E) is bipartite if V can be
divided into a partition of V1 and
V2, and each edge is in the form
of {a,b} where a is in V1 and b is
in V2.

▪▪ If every vertex in V1 is connected


to every vertex in V2, then we
have a complete bipartite graph.
This graph is denoted as Km,n,
where |V1|=m and |V2|=n.

Dr. NANDNI B M, Asst. Prof., ISE, NIE


Dr. NANDNI B M, Asst. Prof., ISE, NIE
Dr. NANDNI B M, Asst. Prof., ISE, NIE
Dr. NANDNI B M, Asst. Prof., ISE, NIE
Dr. NANDNI B M, Asst. Prof., ISE, NIE
Dr. NANDNI B M, Asst. Prof., ISE, NIE
Dr. NANDNI B M, Asst. Prof., ISE, NIE
Dr. NANDNI B M, Asst. Prof., ISE, NIE
Dr. NANDNI B M, Asst. Prof., ISE, NIE
PROBLEMS

1. Draw graphs representing problems of (a) two houses and three


utilities; (b) four houses and four utilities, say, water, gas,
electricity, an telephone.

Dr. NANDNI B M, Asst. Prof., ISE, NIE


PROBLEMS
1. Draw graphs representing problems of (a) two houses and three
utilities; (b) four houses and four utilities, say, water, gas,
electricity, an telephone. (c) three houses and three utilities

Dr. NANDNI B M, Asst. Prof., ISE, NIE


PROBLEMS

2. Draw graphs of the following chemical compounds: (a) CH4, (b)


C2H6, (c) C6H6, (d) N2O3. (Hint: Represent atoms by vertices and
chemical bonds between them by edges.)

Dr. NANDNI B M, Asst. Prof., ISE, NIE


PROBLEMS

2. Draw graphs of the following chemical compounds: (a) CH4, (b)


C2H6, (c) C6H6, (d) N2O3. (Hint: Represent atoms by vertices and
chemical bonds between them by edges.)

Dr. NANDNI B M, Asst. Prof., ISE, NIE


PROBLEMS

3. Draw a graph with 64 vertices representing the squares of


a chessboard. Join these vertices appropriately by edges,
each representing a move of the knight. You will see that in
this graph every vertex is of degree two, three, four, six, or
eight. How many vertices are of each type?

Dr. NANDNI B M, Asst. Prof., ISE, NIE


Solution

Dr. NANDNI B M, Asst. Prof., ISE, NIE


PROBLEMS

Dr. NANDNI B M, Asst. Prof., ISE, NIE


PROBLEMS
5. Draw the graph of the Wheatstone
bridge circuit.

Dr. NANDNI B M, Asst. Prof., ISE, NIE


PROBLEMS
8. Convince yourself that the maximum degree of any vertex in a simple
graph with n vertices is n – 1.

Dr. NANDNI B M, Asst. Prof., ISE, NIE


PROBLEMS
8. Convince yourself that the maximum degree of any vertex in a simple
graph with n vertices is n – 1.

In a simple graph with n vertices, the maximum degree of any vertex can
be n-1.
- This is because a vertex can be connected to all other vertices in the
graph except itself, which gives a maximum of n-1 edges incident to it.
- If a vertex has degree n or more, then it means that it is connected to
atleast one vertex with parallel edges or is connected to itself, which
would make the graph a multi graph.
- Therefore, the maximum degree of any vertex in a simple graph with n
vertices is n-1.
Dr. NANDNI B M, Asst. Prof., ISE, NIE
PROBLEMS

9. Show that the maximum number of edges in a simple graph with n


vertices is n(n – l)/2.

Dr. NANDNI B M, Asst. Prof., ISE, NIE


PROBLEMS
9. Show that the maximum number of edges in a simple graph with n
vertices is n(n – l)/2.

We have that is a simple graph, no parallel or loop exist. Therefore the degree of each vertex
will be one less than the total number of vertices (at most). ie, degree=n-1

eg. we have a graph with two vertices (so one edge) degree=(n-1).

(n-1)=(2-1)=1

We know that the sum of the degree in a simple graph always even ie, ∑d(v)=2E

here d(v)=n-1 : we have n vertices the total degree is n(n-1)

n(n-1)=2E

E=n(n−1)/2

Dr. NANDNI B M, Asst. Prof., ISE, NIE


PROBLEMS
6. Convince yourself that an infinite graph with a finite number of edges
(i.e., a graph with a finite number of edges and an infinite number of
vertices) must have an infinite number of isolated vertices.

Dr. NANDNI B M, Asst. Prof., ISE, NIE


PROBLEMS
7. Show that an infinite graph with a finite number of vertices (i.e., a graph
with a finite number of vertices and an infinite number of edges) will have
at least one pair of vertices (or one vertex in case of parallel self loops)
joined by an infinite number of parallel edges.

Dr. NANDNI B M, Asst. Prof., ISE, NIE


PROBLEMS
5. Decanting problem. You are given three vessels A, B, and C of capacities
8, 5, and 3 gallons, respectively. A is filled, while B and C are empty. Divide
the liquid in A into two equal quantities. [Hint: Let a, b, and c be the
amounts of liquid in A, B, and C, respectively. We have a + b + c = 8 at all
times. Since at least one of the vessels is always empty or full, at least one
of the following equations must always be satisfied: a = 0, a = 8; b = 0, b =
5; c = 0, c = 3. You will find that with these constraints there are 16 possible
states (situations) in this process. Represent this problem by means of a
16-vertex graph. Each vertex stands for a state and each edge for a
permissible change of states between its two end vertices. Now when you
look at this graph it will be clear to you how to go from state (8, 0, 0) to
state (4, 4, 0).] This is the classical decanting problem.
Dr. NANDNI B M, Asst. Prof., ISE, NIE
SOLUTION

Dr. NANDNI B M, Asst. Prof., ISE, NIE

You might also like