SlideShare a Scribd company logo
2
Most read
3
Most read
6
Most read
Welcome to Discrete Mathematics
PRESENTATION
Topics: Graph Theory
Submited by:
Md: Aliul Kadir akib
Daffodil International University
Mail:aliulkadir@gmail.com
Introduction
 What is a graph G?
 It is a pair G = (V, E),
where
 V = V(G) = set of vertices
 E = E(G) = set of edges
 Example:
 V = {s, u, v, w, x, y, z}
 E = {(x,s), (x,v), (x,v), (x,u),
(v,w), (s,v), (s,u), (s,w), (s,y),
(w,y), (u,y), (u,z),(y,z)}
Special edges
 Parallel edges
 Two or more edges
joining a pair of vertices
 in the example, a and b
are joined by two parallel
edges
 Loops
 An edge that starts and
ends at the same vertex
 In the example, vertex d
has a loop
Special graphs
 Simple graph
 A graph without loops
or parallel edges.
 Weighted graph
 A graph where each
edge is assigned a
numerical label or
“weight”.
Directed graphs (digraphs)
G is a directed graph or
digraph if each edge
has been associated
with an ordered pair
of vertices, i.e. each
edge has a direction
Terminology – Undirected graphs
 u and v are adjacent if {u, v} is an edge, e is called incident with u and
v. u and v are called endpoints of {u, v}
 Degree of Vertex (deg (v)): the number of edges incident on a vertex.
A loop contributes twice to the degree (why?).
 Pendant Vertex: deg (v) =1
 Isolated Vertex: deg (v) = 0
 Representation Example: For V = {u, v, w} , E = { {u, w}, {u, w}, (u,
v) }, deg (u) = 2, deg (v) = 1, deg (w) = 1, deg (k) = 0, w and v are
pendant , k is isolated
Terminology – Directed graphs
 For the edge (u, v), u is adjacent to v OR v is adjacent from u, u –
Initial vertex, v – Terminal vertex
 In-degree (deg-
(u)): number of edges for which u is terminal vertex
 Out-degree (deg+
(u)): number of edges for which u is initial vertex
Note: A loop contributes 1 to both in-degree and out-degree (why?)
Representation Example: For V = {u, v, w} , E = { (u, w), ( v, w), (u, v) },
deg-
(u) = 0, deg+
(u) = 2, deg-
(v) = 1,
deg+
(v) = 1, and deg-
(w) = 2, deg+
(u) = 0
Theorems: Undirected Graphs
Theorem 1
The Handshaking theorem:
(why?) Every edge connects 2 vertices
∑∈
=
Vv
ve2
Theorems: Undirected Graphs
Theorem 2:
An undirected graph has even number of vertices
with odd degree
even
Voof
=⇒
⇒
⇒
∈⇒
+==
∑
∑∑∑
∈
∈∈∈
2
21
Vv
1,
VvVuVv
deg(v)termsecond
evenalsoistermsecondHence
2e.issumsinceevenisinequalitylastthe
ofsidehandrighton thetermslast twotheofsumThe
even.isinequalitylasttheofsidehandrightin thefirst termThe
Vfor vevenis(v)deg
deg(v)deg(u)deg(v)2e
verticesdegreeoddtorefersV2andverticesdegreeevenofsettheis1Pr
Definitions – Graph Type
Simple graphs – special cases
 Wheels: Wn, obtained by adding additional
vertex to Cn and connecting all vertices to
this new vertex by new edges.
Representation Example: W3, W4
Complete graph K n
 Let n > 3
 The complete graph Kn is
the graph with n vertices
and every pair of vertices
is joined by an edge.
 The figure represents K5
Bipartite graphs
 A bipartite graph G is a
graph such that
 V(G) = V(G1) ∪ V(G2)
 |V(G1)| = m, |V(G2)| = n
 V(G1) ∩V(G2) = ∅
 No edges exist between
any two vertices in the
same subset V(Gk), k =
1,2
Complete bipartite graph Km,n
 A bipartite graph is the
complete bipartite graph Km,n if
every vertex in V(G1) is joined
to a vertex in V(G2) and
conversely,
 |V(G1)| = m
 |V(G2)| = n
Connected graphs
 A graph is connected if
every pair of vertices
can be connected by a
path
 Each connected
subgraph of a non-
connected graph G is
called a component of G
Paths and cycles
 A path of length n is a
sequence of n + 1
vertices and n
consecutive edges
 A cycle is a path that
begins and ends at
the same vertex
Euler cycles
 An Euler cycle in a graph G is a
simple cycle that passes through
every edge of G only once.
 The Konigsberg bridge problem:
 Starting and ending at the same point, is it
possible to cross all seven bridges just
once and return to the starting point?
 This problem can be represented
by a graph
 Edges represent bridges and
each vertex represents a region.
Degree of a vertex
 The degree of a vertex
v, denoted by δ(v), is
the number of edges
incident on v
 Example:
 δ(a) = 4, δ(b) = 3,
 δ(c) = 4, δ(d) = 6,
 δ(e) = 4, δ(f) = 4,
 δ(g) = 3.
Sum of the degrees of a graph
Theorem : If G is a graph with m edges and n
vertices v1, v2,…, vn, then
n
Σ δ(vi) = 2m
i = 1
In particular, the sum of the degrees of all the
vertices of a graph is even.
Shortest Path Problems
• Directed weighted graph.
• Path length is sum of weights of edges on path.
• The vertex at which the path begins is the source
vertex.
• The vertex at which the path ends is the
destination vertex.
0
3 9
5 11
3
6
5
7
6
s
t x
y z
2
2 1
4
3
Example
1
2
3
4
5
6
7
2
6
16
7
8
10
3
14
4
4
5 3
1
• A shorter path will cost only 11
Representations of graphs
 Adjacency matrix
Rows and columns are
labeled with ordered
vertices
write a 1 if there is an edge
between the row vertex
and the column vertex
and 0 if no edge exists
between them
v w x y
v 0 1 0 1
w 1 0 1 1
x 0 1 0 1
y 1 1 1 0
Euler’s formula
 If G is planar graph,
 v = number of vertices
 e = number of edges
 f = number of faces,
including the exterior face
 Then: v – e + f = 2
Graph theory presentation

More Related Content

PPTX
Introduction to Graph Theory
PPTX
Introduction to Graph Theory
PPTX
Graph Theory
PPT
Graphs - Discrete Math
PPTX
Ppt of graph theory
PPTX
Graph theory
PDF
Graph theory and its applications
PPTX
graph theory
Introduction to Graph Theory
Introduction to Graph Theory
Graph Theory
Graphs - Discrete Math
Ppt of graph theory
Graph theory
Graph theory and its applications
graph theory

What's hot (20)

PPTX
Graph theory
PPTX
Matrix Representation Of Graph
PPTX
Slides Chapter10.1 10.2
PPT
Graph colouring
PPTX
Planar graph
PPT
Graph theory
PDF
Introduction to Graph Theory
PPT
Applications of graphs
PPTX
Graph coloring
PDF
Graph Theory: Trees
PPTX
CMSC 56 | Lecture 15: Closures of Relations
PDF
introduction to graph theory
PPTX
Double Integrals
PPTX
Dijkstra's algorithm presentation
PPT
Graph isomorphism
PPTX
Graph Theory
PPT
Floyd Warshall Algorithm
PPTX
Matrices ppt
PPTX
Principle of mathematical induction
PPTX
Trees and graphs
Graph theory
Matrix Representation Of Graph
Slides Chapter10.1 10.2
Graph colouring
Planar graph
Graph theory
Introduction to Graph Theory
Applications of graphs
Graph coloring
Graph Theory: Trees
CMSC 56 | Lecture 15: Closures of Relations
introduction to graph theory
Double Integrals
Dijkstra's algorithm presentation
Graph isomorphism
Graph Theory
Floyd Warshall Algorithm
Matrices ppt
Principle of mathematical induction
Trees and graphs
Ad

Similar to Graph theory presentation (20)

PPTX
GRAPH THEORY PPT for students to re.pptx
PPTX
Unit 2: All
PPTX
GRAPH THEORY - Basic definition with examples
PPTX
Graph theory
PPTX
LEC 1.pptx
PDF
Graphs.pdf
PPTX
graph theory
PPT
Graph theory
PDF
graph theory, DS, Tree, shortest path problem
PPTX
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
PPTX
Module-5 (Part 1), VTU, MCA Mathematical Foundations for Computer Application
PPT
graphass1-23022111180722548-1ba6b00a.ppt
PPT
graph ASS (1).ppt
PPT
8--Introducing-Graph-Terminologies-16042025-020746pm (1).ppt
PPTX
Discrete mathematics 4 on Computer science and engineering.pptx
PPTX
Graph ASS DBATU.pptx
PPT
Graphs in Discrete mathematics for computing
PPT
graph.ppt
PPT
graph.ppt
GRAPH THEORY PPT for students to re.pptx
Unit 2: All
GRAPH THEORY - Basic definition with examples
Graph theory
LEC 1.pptx
Graphs.pdf
graph theory
Graph theory
graph theory, DS, Tree, shortest path problem
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Module-5 (Part 1), VTU, MCA Mathematical Foundations for Computer Application
graphass1-23022111180722548-1ba6b00a.ppt
graph ASS (1).ppt
8--Introducing-Graph-Terminologies-16042025-020746pm (1).ppt
Discrete mathematics 4 on Computer science and engineering.pptx
Graph ASS DBATU.pptx
Graphs in Discrete mathematics for computing
graph.ppt
graph.ppt
Ad

Recently uploaded (20)

PPTX
Safety Seminar civil to be ensured for safe working.
PDF
Integrating Fractal Dimension and Time Series Analysis for Optimized Hyperspe...
PDF
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
PDF
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
PPTX
communication and presentation skills 01
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PDF
Soil Improvement Techniques Note - Rabbi
PPT
introduction to datamining and warehousing
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
PPTX
Current and future trends in Computer Vision.pptx
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PDF
PPT on Performance Review to get promotions
PPTX
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PPT
Total quality management ppt for engineering students
Safety Seminar civil to be ensured for safe working.
Integrating Fractal Dimension and Time Series Analysis for Optimized Hyperspe...
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
communication and presentation skills 01
Automation-in-Manufacturing-Chapter-Introduction.pdf
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
R24 SURVEYING LAB MANUAL for civil enggi
Fundamentals of safety and accident prevention -final (1).pptx
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Soil Improvement Techniques Note - Rabbi
introduction to datamining and warehousing
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
Current and future trends in Computer Vision.pptx
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PPT on Performance Review to get promotions
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
Total quality management ppt for engineering students

Graph theory presentation

  • 1. Welcome to Discrete Mathematics PRESENTATION Topics: Graph Theory Submited by: Md: Aliul Kadir akib Daffodil International University Mail:[email protected]
  • 2. Introduction  What is a graph G?  It is a pair G = (V, E), where  V = V(G) = set of vertices  E = E(G) = set of edges  Example:  V = {s, u, v, w, x, y, z}  E = {(x,s), (x,v), (x,v), (x,u), (v,w), (s,v), (s,u), (s,w), (s,y), (w,y), (u,y), (u,z),(y,z)}
  • 3. Special edges  Parallel edges  Two or more edges joining a pair of vertices  in the example, a and b are joined by two parallel edges  Loops  An edge that starts and ends at the same vertex  In the example, vertex d has a loop
  • 4. Special graphs  Simple graph  A graph without loops or parallel edges.  Weighted graph  A graph where each edge is assigned a numerical label or “weight”.
  • 5. Directed graphs (digraphs) G is a directed graph or digraph if each edge has been associated with an ordered pair of vertices, i.e. each edge has a direction
  • 6. Terminology – Undirected graphs  u and v are adjacent if {u, v} is an edge, e is called incident with u and v. u and v are called endpoints of {u, v}  Degree of Vertex (deg (v)): the number of edges incident on a vertex. A loop contributes twice to the degree (why?).  Pendant Vertex: deg (v) =1  Isolated Vertex: deg (v) = 0  Representation Example: For V = {u, v, w} , E = { {u, w}, {u, w}, (u, v) }, deg (u) = 2, deg (v) = 1, deg (w) = 1, deg (k) = 0, w and v are pendant , k is isolated
  • 7. Terminology – Directed graphs  For the edge (u, v), u is adjacent to v OR v is adjacent from u, u – Initial vertex, v – Terminal vertex  In-degree (deg- (u)): number of edges for which u is terminal vertex  Out-degree (deg+ (u)): number of edges for which u is initial vertex Note: A loop contributes 1 to both in-degree and out-degree (why?) Representation Example: For V = {u, v, w} , E = { (u, w), ( v, w), (u, v) }, deg- (u) = 0, deg+ (u) = 2, deg- (v) = 1, deg+ (v) = 1, and deg- (w) = 2, deg+ (u) = 0
  • 8. Theorems: Undirected Graphs Theorem 1 The Handshaking theorem: (why?) Every edge connects 2 vertices ∑∈ = Vv ve2
  • 9. Theorems: Undirected Graphs Theorem 2: An undirected graph has even number of vertices with odd degree even Voof =⇒ ⇒ ⇒ ∈⇒ +== ∑ ∑∑∑ ∈ ∈∈∈ 2 21 Vv 1, VvVuVv deg(v)termsecond evenalsoistermsecondHence 2e.issumsinceevenisinequalitylastthe ofsidehandrighton thetermslast twotheofsumThe even.isinequalitylasttheofsidehandrightin thefirst termThe Vfor vevenis(v)deg deg(v)deg(u)deg(v)2e verticesdegreeoddtorefersV2andverticesdegreeevenofsettheis1Pr
  • 11. Simple graphs – special cases  Wheels: Wn, obtained by adding additional vertex to Cn and connecting all vertices to this new vertex by new edges. Representation Example: W3, W4
  • 12. Complete graph K n  Let n > 3  The complete graph Kn is the graph with n vertices and every pair of vertices is joined by an edge.  The figure represents K5
  • 13. Bipartite graphs  A bipartite graph G is a graph such that  V(G) = V(G1) ∪ V(G2)  |V(G1)| = m, |V(G2)| = n  V(G1) ∩V(G2) = ∅  No edges exist between any two vertices in the same subset V(Gk), k = 1,2
  • 14. Complete bipartite graph Km,n  A bipartite graph is the complete bipartite graph Km,n if every vertex in V(G1) is joined to a vertex in V(G2) and conversely,  |V(G1)| = m  |V(G2)| = n
  • 15. Connected graphs  A graph is connected if every pair of vertices can be connected by a path  Each connected subgraph of a non- connected graph G is called a component of G
  • 16. Paths and cycles  A path of length n is a sequence of n + 1 vertices and n consecutive edges  A cycle is a path that begins and ends at the same vertex
  • 17. Euler cycles  An Euler cycle in a graph G is a simple cycle that passes through every edge of G only once.  The Konigsberg bridge problem:  Starting and ending at the same point, is it possible to cross all seven bridges just once and return to the starting point?  This problem can be represented by a graph  Edges represent bridges and each vertex represents a region.
  • 18. Degree of a vertex  The degree of a vertex v, denoted by δ(v), is the number of edges incident on v  Example:  δ(a) = 4, δ(b) = 3,  δ(c) = 4, δ(d) = 6,  δ(e) = 4, δ(f) = 4,  δ(g) = 3.
  • 19. Sum of the degrees of a graph Theorem : If G is a graph with m edges and n vertices v1, v2,…, vn, then n Σ δ(vi) = 2m i = 1 In particular, the sum of the degrees of all the vertices of a graph is even.
  • 20. Shortest Path Problems • Directed weighted graph. • Path length is sum of weights of edges on path. • The vertex at which the path begins is the source vertex. • The vertex at which the path ends is the destination vertex. 0 3 9 5 11 3 6 5 7 6 s t x y z 2 2 1 4 3
  • 22. Representations of graphs  Adjacency matrix Rows and columns are labeled with ordered vertices write a 1 if there is an edge between the row vertex and the column vertex and 0 if no edge exists between them v w x y v 0 1 0 1 w 1 0 1 1 x 0 1 0 1 y 1 1 1 0
  • 23. Euler’s formula  If G is planar graph,  v = number of vertices  e = number of edges  f = number of faces, including the exterior face  Then: v – e + f = 2