Module 1- Part I
Module 1- Part I
Introduction to
Graph Theory
By: Nandini B M,
Assistant Professor.
Dept. of ISE, NIE, Mysuru.
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
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
Electrical Network
Königsberg Bridge Problem
Problems
Utilities Problem
Seating Problem
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
Arthur Cayley
A. F. Möbius
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.
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
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
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
n(n-1)=2E
E=n(n−1)/2