SlideShare a Scribd company logo
1 of 23
Graph Theory
Mr. Saleem Mustafa
Varying Applications (examples)
• Computer networks
• Distinguish between two chemical compounds with the same
molecular formula but different structures
• Solve shortest path problems between cities
• Scheduling exams and assign channels to television stations
Topics Covered
• Definitions
• Types
• Terminology
• Representation
• Sub-graphs
• Connectivity
• Hamilton and Euler definitions
• Shortest Path
• Planar Graphs
• Graph Coloring
Definitions - Graph
A generalization of the simple concept of a set of
dots, links, edges or arcs.
Representation: Graph G =(V, E) consists set of vertices denoted by V,
or by V(G) and set of edges E, or E(G)
Definitions – Edge Type
Directed: Ordered pair of vertices. Represented as (u, v) directed from vertex u to v.
Undirected: Unordered pair of vertices. Represented as {u, v}. Disregards any sense of direction
and treats both end vertices interchangeably.
u v
u v
Definitions – Edge Type
• Loop: A loop is an edge whose endpoints are equal i.e., an edge joining a vertex
to it self is called a loop. Represented as {u, u} = {u}
• Multiple Edges: Two or more edges joining the same pair of vertices.
u
Definitions – Graph Type
Simple (Undirected) Graph: consists of V, a nonempty set of vertices,
and E, a set of unordered pairs of distinct elements of V called edges
(undirected)
Representation Example: G(V, E), V = {u, v, w}, E = {{u, v}, {v, w}, {u, w}}
u v
w
Definitions – Graph Type
Multigraph: G(V,E), consists of set of vertices V, set of Edges E and a
function f from E to {{u, v}| u, v V, u ≠ v}. The edges e1 and e2 are
called multiple or parallel edges if f (e1) = f (e2).
Representation Example: V = {u, v, w}, E = {e1, e2, e3}
u
v
w
e1
e2
e3
Definitions – Graph Type
Pseudograph: G(V,E), consists of set of vertices V, set of Edges E and a
function F from E to {{u, v}| u, v Î V}. Loops allowed in such a graph.
Representation Example: V = {u, v, w}, E = {e1, e2, e3, e4}
u
v
w
e1
e3
e2
e4
Definitions – Graph Type
Directed Graph: G(V, E), set of vertices V, and set of Edges E, that are
ordered pair of elements of V (directed edges)
Representation Example: G(V, E), V = {u, v, w}, E = {(u, v), (v, w), (w, u)}
u
w
v
Definitions – Graph Type
Directed Multigraph: G(V,E), consists of set of vertices V, set of Edges E
and a function f from E to {{u, v}| u, v V}. The edges e1 and e2 are
multiple edges if f(e1) = f(e2)
Representation Example: V = {u, v, w}, E = {e1, e2, e3, e4}
u
w
v
e1
e2
e3
e4
Definitions – Graph Type
Type Edges Multiple Edges
Allowed ?
Loops Allowed ?
Simple Graph undirected No No
Multigraph undirected Yes No
Pseudograph undirected Yes Yes
Directed Graph directed No Yes
Directed
Multigraph
directed Yes Yes
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 (k) = 0
Representation Example: For V = {u, v, w} , E = { {u, w}, {u, v} }, deg (u) = 2, deg (v) = 1, deg (w) = 1, deg (k) = 0, w and v are pendant , k is isolated
u
k
w
v
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
u
w
v
Theorems: Undirected Graphs
Theorem 1
The Handshaking theorem:
(why?) Every edge connects 2 vertices



V
v
v
e )
deg(
2
Theorems: Undirected Graphs
Theorem 2:
An undirected graph has even number of vertices with odd degree
even
V
oof

















2
2
1
V
v
1,
V
v
V
u
V
v
deg(u)
term
second
even
also
is
term
second
Hence
2e.
is
sum
since
even
is
inequality
last
the
of
side
hand
right
on the
terms
last two
the
of
sum
The
even.
is
inequality
last
the
of
side
hand
right
in the
first term
The
V
for v
even
is
(v)
deg
deg(v)
deg(u)
deg(v)
2e
vertices
degree
odd
to
refers
V2
and
vertices
degree
even
of
set
the
is
1
Pr
Theorems: directed Graphs
• Theorem 3: deg + (u) = deg - (u) = |E|


Simple graphs – special cases
• Complete graph: Kn, is the simple graph that contains exactly one edge
between each pair of distinct vertices.
Representation Example: K1, K2, K3, K4
K2
K1
K4
K3
Simple graphs – special cases
• Cycle: Cn, n ≥ 3 consists of n vertices v1, v2, v3 … vn and edges {v1, v2},
{v2, v3}, {v3, v4} … {vn-1, vn}, {vn, v1}
Representation Example: C3, C4
C3 C4
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
W3 W4
Simple graphs – special cases
• N-cubes: Qn, vertices represented by 2n bit strings of length n. Two
vertices are adjacent if and only if the bit strings that they represent
differ by exactly one bit positions
Representation Example: Q1, Q2
0
10
1
00
11
Q1
01
Q2
Bipartite graphs
• In a simple graph G, if V can be partitioned into two disjoint sets V1 and V2 such that
every edge in the graph connects a vertex in V1 and a vertex V2 (so that no edge in G
connects either two vertices in V1 or two vertices in V2)
Application example: Representing Relations
Representation example: V1 = {v1, v2, v3} and V2 = {v4, v5, v6},
v1
v2
v3
v4
v5
v6
V1
V2
Complete Bipartite graphs
• Km,n is the graph that has its vertex set portioned into two subsets of m
and n vertices, respectively There is an edge between two vertices if
and only if one vertex is in the first subset and the other vertex is in the
second subset.
Representation example: K2,3, K3,3
K2,3 K3,3

More Related Content

Similar to Graph Theory Guide

Lecture 1--Graph Algorithms -- Basics.pptx
Lecture 1--Graph Algorithms -- Basics.pptxLecture 1--Graph Algorithms -- Basics.pptx
Lecture 1--Graph Algorithms -- Basics.pptxChandanGiri21
 
Graphs (Models & Terminology)
Graphs (Models & Terminology)Graphs (Models & Terminology)
Graphs (Models & Terminology)zunaira saleem
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringSaurabh Kaushik
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theoryArvindBorge
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptxswapnilbs2728
 
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theoryBCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theoryRai University
 
Ass. (3)graph d.m
Ass. (3)graph d.mAss. (3)graph d.m
Ass. (3)graph d.mSyed Umair
 
Elements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptxElements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptxmiki304759
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphsNabeel Ahsen
 

Similar to Graph Theory Guide (20)

graph.ppt
graph.pptgraph.ppt
graph.ppt
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Lecture 1--Graph Algorithms -- Basics.pptx
Lecture 1--Graph Algorithms -- Basics.pptxLecture 1--Graph Algorithms -- Basics.pptx
Lecture 1--Graph Algorithms -- Basics.pptx
 
Graphs (Models & Terminology)
Graphs (Models & Terminology)Graphs (Models & Terminology)
Graphs (Models & Terminology)
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theory
 
Graphs.pdf
Graphs.pdfGraphs.pdf
Graphs.pdf
 
DATA STRUCTURE PRESENTATION.pptx
DATA STRUCTURE  PRESENTATION.pptxDATA STRUCTURE  PRESENTATION.pptx
DATA STRUCTURE PRESENTATION.pptx
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx
 
Graph representation
Graph representationGraph representation
Graph representation
 
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theoryBCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
 
graph theory
graph theorygraph theory
graph theory
 
Unit 2: All
Unit 2: AllUnit 2: All
Unit 2: All
 
Graphs - Discrete Math
Graphs - Discrete MathGraphs - Discrete Math
Graphs - Discrete Math
 
Ch08.ppt
Ch08.pptCh08.ppt
Ch08.ppt
 
Magtibay buk bind#2
Magtibay buk bind#2Magtibay buk bind#2
Magtibay buk bind#2
 
Ass. (3)graph d.m
Ass. (3)graph d.mAss. (3)graph d.m
Ass. (3)graph d.m
 
Elements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptxElements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptx
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphs
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 

More from ssuserc1e786

Bcsm-f20-405(Web-design).pptx
Bcsm-f20-405(Web-design).pptxBcsm-f20-405(Web-design).pptx
Bcsm-f20-405(Web-design).pptxssuserc1e786
 
W1_Lec01_Lec02_Layouts.pptx
W1_Lec01_Lec02_Layouts.pptxW1_Lec01_Lec02_Layouts.pptx
W1_Lec01_Lec02_Layouts.pptxssuserc1e786
 
Lecture W5 CN IP Subnetting P2.pptx
Lecture W5 CN IP Subnetting P2.pptxLecture W5 CN IP Subnetting P2.pptx
Lecture W5 CN IP Subnetting P2.pptxssuserc1e786
 
Lecture W2 CN Network Types, Layered approach.pptx
Lecture W2 CN Network Types, Layered approach.pptxLecture W2 CN Network Types, Layered approach.pptx
Lecture W2 CN Network Types, Layered approach.pptxssuserc1e786
 
Lecture W4 CN IP Addressing P1.pptx
Lecture W4 CN IP Addressing P1.pptxLecture W4 CN IP Addressing P1.pptx
Lecture W4 CN IP Addressing P1.pptxssuserc1e786
 
W2_Lec03_Lec_04_Activity.pptx
W2_Lec03_Lec_04_Activity.pptxW2_Lec03_Lec_04_Activity.pptx
W2_Lec03_Lec_04_Activity.pptxssuserc1e786
 
W1_Lec01_Lec02_Intro.pptx
W1_Lec01_Lec02_Intro.pptxW1_Lec01_Lec02_Intro.pptx
W1_Lec01_Lec02_Intro.pptxssuserc1e786
 

More from ssuserc1e786 (7)

Bcsm-f20-405(Web-design).pptx
Bcsm-f20-405(Web-design).pptxBcsm-f20-405(Web-design).pptx
Bcsm-f20-405(Web-design).pptx
 
W1_Lec01_Lec02_Layouts.pptx
W1_Lec01_Lec02_Layouts.pptxW1_Lec01_Lec02_Layouts.pptx
W1_Lec01_Lec02_Layouts.pptx
 
Lecture W5 CN IP Subnetting P2.pptx
Lecture W5 CN IP Subnetting P2.pptxLecture W5 CN IP Subnetting P2.pptx
Lecture W5 CN IP Subnetting P2.pptx
 
Lecture W2 CN Network Types, Layered approach.pptx
Lecture W2 CN Network Types, Layered approach.pptxLecture W2 CN Network Types, Layered approach.pptx
Lecture W2 CN Network Types, Layered approach.pptx
 
Lecture W4 CN IP Addressing P1.pptx
Lecture W4 CN IP Addressing P1.pptxLecture W4 CN IP Addressing P1.pptx
Lecture W4 CN IP Addressing P1.pptx
 
W2_Lec03_Lec_04_Activity.pptx
W2_Lec03_Lec_04_Activity.pptxW2_Lec03_Lec_04_Activity.pptx
W2_Lec03_Lec_04_Activity.pptx
 
W1_Lec01_Lec02_Intro.pptx
W1_Lec01_Lec02_Intro.pptxW1_Lec01_Lec02_Intro.pptx
W1_Lec01_Lec02_Intro.pptx
 

Recently uploaded

Training Methods and Training Objectives
Training Methods and Training ObjectivesTraining Methods and Training Objectives
Training Methods and Training Objectivesmintusiprd
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Ameerpet high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls Ameerpet high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls Ameerpet high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls Ameerpet high-profile Call Girladitipandeya
 
LPC Operations Review PowerPoint | Operations Review
LPC Operations Review PowerPoint | Operations ReviewLPC Operations Review PowerPoint | Operations Review
LPC Operations Review PowerPoint | Operations Reviewthomas851723
 
LPC Warehouse Management System For Clients In The Business Sector
LPC Warehouse Management System For Clients In The Business SectorLPC Warehouse Management System For Clients In The Business Sector
LPC Warehouse Management System For Clients In The Business Sectorthomas851723
 
Risk management in surgery (bailey and love).pptx
Risk management in surgery (bailey and love).pptxRisk management in surgery (bailey and love).pptx
Risk management in surgery (bailey and love).pptxSaujanya Jung Pandey
 
Introduction to LPC - Facility Design And Re-Engineering
Introduction to LPC - Facility Design And Re-EngineeringIntroduction to LPC - Facility Design And Re-Engineering
Introduction to LPC - Facility Design And Re-Engineeringthomas851723
 
VIP Kolkata Call Girl Rajarhat 👉 8250192130 Available With Room
VIP Kolkata Call Girl Rajarhat 👉 8250192130  Available With RoomVIP Kolkata Call Girl Rajarhat 👉 8250192130  Available With Room
VIP Kolkata Call Girl Rajarhat 👉 8250192130 Available With Roomdivyansh0kumar0
 
{ 9892124323 }} Call Girls & Escorts in Hotel JW Marriott juhu, Mumbai
{ 9892124323 }} Call Girls & Escorts in Hotel JW Marriott juhu, Mumbai{ 9892124323 }} Call Girls & Escorts in Hotel JW Marriott juhu, Mumbai
{ 9892124323 }} Call Girls & Escorts in Hotel JW Marriott juhu, MumbaiPooja Nehwal
 
CALL ON ➥8923113531 🔝Call Girls Charbagh Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Charbagh Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Charbagh Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Charbagh Lucknow best sexual serviceanilsa9823
 
Day 0- Bootcamp Roadmap for PLC Bootcamp
Day 0- Bootcamp Roadmap for PLC BootcampDay 0- Bootcamp Roadmap for PLC Bootcamp
Day 0- Bootcamp Roadmap for PLC BootcampPLCLeadershipDevelop
 
LPC Facility Design And Re-engineering Presentation
LPC Facility Design And Re-engineering PresentationLPC Facility Design And Re-engineering Presentation
LPC Facility Design And Re-engineering Presentationthomas851723
 
Call now : 9892124323 Nalasopara Beautiful Call Girls Vasai virar Best Call G...
Call now : 9892124323 Nalasopara Beautiful Call Girls Vasai virar Best Call G...Call now : 9892124323 Nalasopara Beautiful Call Girls Vasai virar Best Call G...
Call now : 9892124323 Nalasopara Beautiful Call Girls Vasai virar Best Call G...Pooja Nehwal
 
Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...
Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...
Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...Pooja Nehwal
 
GENUINE Babe,Call Girls IN Badarpur Delhi | +91-8377087607
GENUINE Babe,Call Girls IN Badarpur  Delhi | +91-8377087607GENUINE Babe,Call Girls IN Badarpur  Delhi | +91-8377087607
GENUINE Babe,Call Girls IN Badarpur Delhi | +91-8377087607dollysharma2066
 
LPC User Requirements for Automated Storage System Presentation
LPC User Requirements for Automated Storage System PresentationLPC User Requirements for Automated Storage System Presentation
LPC User Requirements for Automated Storage System Presentationthomas851723
 
Fifteenth Finance Commission Presentation
Fifteenth Finance Commission PresentationFifteenth Finance Commission Presentation
Fifteenth Finance Commission Presentationmintusiprd
 

Recently uploaded (20)

Training Methods and Training Objectives
Training Methods and Training ObjectivesTraining Methods and Training Objectives
Training Methods and Training Objectives
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Ameerpet high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls Ameerpet high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls Ameerpet high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls Ameerpet high-profile Call Girl
 
LPC Operations Review PowerPoint | Operations Review
LPC Operations Review PowerPoint | Operations ReviewLPC Operations Review PowerPoint | Operations Review
LPC Operations Review PowerPoint | Operations Review
 
LPC Warehouse Management System For Clients In The Business Sector
LPC Warehouse Management System For Clients In The Business SectorLPC Warehouse Management System For Clients In The Business Sector
LPC Warehouse Management System For Clients In The Business Sector
 
Risk management in surgery (bailey and love).pptx
Risk management in surgery (bailey and love).pptxRisk management in surgery (bailey and love).pptx
Risk management in surgery (bailey and love).pptx
 
Becoming an Inclusive Leader - Bernadette Thompson
Becoming an Inclusive Leader - Bernadette ThompsonBecoming an Inclusive Leader - Bernadette Thompson
Becoming an Inclusive Leader - Bernadette Thompson
 
Introduction to LPC - Facility Design And Re-Engineering
Introduction to LPC - Facility Design And Re-EngineeringIntroduction to LPC - Facility Design And Re-Engineering
Introduction to LPC - Facility Design And Re-Engineering
 
Call Girls Service Tilak Nagar @9999965857 Delhi 🫦 No Advance VVIP 🍎 SERVICE
Call Girls Service Tilak Nagar @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SERVICECall Girls Service Tilak Nagar @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SERVICE
Call Girls Service Tilak Nagar @9999965857 Delhi 🫦 No Advance VVIP 🍎 SERVICE
 
sauth delhi call girls in Defence Colony🔝 9953056974 🔝 escort Service
sauth delhi call girls in Defence Colony🔝 9953056974 🔝 escort Servicesauth delhi call girls in Defence Colony🔝 9953056974 🔝 escort Service
sauth delhi call girls in Defence Colony🔝 9953056974 🔝 escort Service
 
VIP Kolkata Call Girl Rajarhat 👉 8250192130 Available With Room
VIP Kolkata Call Girl Rajarhat 👉 8250192130  Available With RoomVIP Kolkata Call Girl Rajarhat 👉 8250192130  Available With Room
VIP Kolkata Call Girl Rajarhat 👉 8250192130 Available With Room
 
{ 9892124323 }} Call Girls & Escorts in Hotel JW Marriott juhu, Mumbai
{ 9892124323 }} Call Girls & Escorts in Hotel JW Marriott juhu, Mumbai{ 9892124323 }} Call Girls & Escorts in Hotel JW Marriott juhu, Mumbai
{ 9892124323 }} Call Girls & Escorts in Hotel JW Marriott juhu, Mumbai
 
CALL ON ➥8923113531 🔝Call Girls Charbagh Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Charbagh Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Charbagh Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Charbagh Lucknow best sexual service
 
Day 0- Bootcamp Roadmap for PLC Bootcamp
Day 0- Bootcamp Roadmap for PLC BootcampDay 0- Bootcamp Roadmap for PLC Bootcamp
Day 0- Bootcamp Roadmap for PLC Bootcamp
 
LPC Facility Design And Re-engineering Presentation
LPC Facility Design And Re-engineering PresentationLPC Facility Design And Re-engineering Presentation
LPC Facility Design And Re-engineering Presentation
 
Call now : 9892124323 Nalasopara Beautiful Call Girls Vasai virar Best Call G...
Call now : 9892124323 Nalasopara Beautiful Call Girls Vasai virar Best Call G...Call now : 9892124323 Nalasopara Beautiful Call Girls Vasai virar Best Call G...
Call now : 9892124323 Nalasopara Beautiful Call Girls Vasai virar Best Call G...
 
Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...
Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...
Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...
 
Rohini Sector 16 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 16 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 16 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 16 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
GENUINE Babe,Call Girls IN Badarpur Delhi | +91-8377087607
GENUINE Babe,Call Girls IN Badarpur  Delhi | +91-8377087607GENUINE Babe,Call Girls IN Badarpur  Delhi | +91-8377087607
GENUINE Babe,Call Girls IN Badarpur Delhi | +91-8377087607
 
LPC User Requirements for Automated Storage System Presentation
LPC User Requirements for Automated Storage System PresentationLPC User Requirements for Automated Storage System Presentation
LPC User Requirements for Automated Storage System Presentation
 
Fifteenth Finance Commission Presentation
Fifteenth Finance Commission PresentationFifteenth Finance Commission Presentation
Fifteenth Finance Commission Presentation
 

Graph Theory Guide

  • 2. Varying Applications (examples) • Computer networks • Distinguish between two chemical compounds with the same molecular formula but different structures • Solve shortest path problems between cities • Scheduling exams and assign channels to television stations
  • 3. Topics Covered • Definitions • Types • Terminology • Representation • Sub-graphs • Connectivity • Hamilton and Euler definitions • Shortest Path • Planar Graphs • Graph Coloring
  • 4. Definitions - Graph A generalization of the simple concept of a set of dots, links, edges or arcs. Representation: Graph G =(V, E) consists set of vertices denoted by V, or by V(G) and set of edges E, or E(G)
  • 5. Definitions – Edge Type Directed: Ordered pair of vertices. Represented as (u, v) directed from vertex u to v. Undirected: Unordered pair of vertices. Represented as {u, v}. Disregards any sense of direction and treats both end vertices interchangeably. u v u v
  • 6. Definitions – Edge Type • Loop: A loop is an edge whose endpoints are equal i.e., an edge joining a vertex to it self is called a loop. Represented as {u, u} = {u} • Multiple Edges: Two or more edges joining the same pair of vertices. u
  • 7. Definitions – Graph Type Simple (Undirected) Graph: consists of V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements of V called edges (undirected) Representation Example: G(V, E), V = {u, v, w}, E = {{u, v}, {v, w}, {u, w}} u v w
  • 8. Definitions – Graph Type Multigraph: G(V,E), consists of set of vertices V, set of Edges E and a function f from E to {{u, v}| u, v V, u ≠ v}. The edges e1 and e2 are called multiple or parallel edges if f (e1) = f (e2). Representation Example: V = {u, v, w}, E = {e1, e2, e3} u v w e1 e2 e3
  • 9. Definitions – Graph Type Pseudograph: G(V,E), consists of set of vertices V, set of Edges E and a function F from E to {{u, v}| u, v Î V}. Loops allowed in such a graph. Representation Example: V = {u, v, w}, E = {e1, e2, e3, e4} u v w e1 e3 e2 e4
  • 10. Definitions – Graph Type Directed Graph: G(V, E), set of vertices V, and set of Edges E, that are ordered pair of elements of V (directed edges) Representation Example: G(V, E), V = {u, v, w}, E = {(u, v), (v, w), (w, u)} u w v
  • 11. Definitions – Graph Type Directed Multigraph: G(V,E), consists of set of vertices V, set of Edges E and a function f from E to {{u, v}| u, v V}. The edges e1 and e2 are multiple edges if f(e1) = f(e2) Representation Example: V = {u, v, w}, E = {e1, e2, e3, e4} u w v e1 e2 e3 e4
  • 12. Definitions – Graph Type Type Edges Multiple Edges Allowed ? Loops Allowed ? Simple Graph undirected No No Multigraph undirected Yes No Pseudograph undirected Yes Yes Directed Graph directed No Yes Directed Multigraph directed Yes Yes
  • 13. 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 (k) = 0 Representation Example: For V = {u, v, w} , E = { {u, w}, {u, v} }, deg (u) = 2, deg (v) = 1, deg (w) = 1, deg (k) = 0, w and v are pendant , k is isolated u k w v
  • 14. 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 u w v
  • 15. Theorems: Undirected Graphs Theorem 1 The Handshaking theorem: (why?) Every edge connects 2 vertices    V v v e ) deg( 2
  • 16. Theorems: Undirected Graphs Theorem 2: An undirected graph has even number of vertices with odd degree even V oof                  2 2 1 V v 1, V v V u V v deg(u) term second even also is term second Hence 2e. is sum since even is inequality last the of side hand right on the terms last two the of sum The even. is inequality last the of side hand right in the first term The V for v even is (v) deg deg(v) deg(u) deg(v) 2e vertices degree odd to refers V2 and vertices degree even of set the is 1 Pr
  • 17. Theorems: directed Graphs • Theorem 3: deg + (u) = deg - (u) = |E|  
  • 18. Simple graphs – special cases • Complete graph: Kn, is the simple graph that contains exactly one edge between each pair of distinct vertices. Representation Example: K1, K2, K3, K4 K2 K1 K4 K3
  • 19. Simple graphs – special cases • Cycle: Cn, n ≥ 3 consists of n vertices v1, v2, v3 … vn and edges {v1, v2}, {v2, v3}, {v3, v4} … {vn-1, vn}, {vn, v1} Representation Example: C3, C4 C3 C4
  • 20. 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 W3 W4
  • 21. Simple graphs – special cases • N-cubes: Qn, vertices represented by 2n bit strings of length n. Two vertices are adjacent if and only if the bit strings that they represent differ by exactly one bit positions Representation Example: Q1, Q2 0 10 1 00 11 Q1 01 Q2
  • 22. Bipartite graphs • In a simple graph G, if V can be partitioned into two disjoint sets V1 and V2 such that every edge in the graph connects a vertex in V1 and a vertex V2 (so that no edge in G connects either two vertices in V1 or two vertices in V2) Application example: Representing Relations Representation example: V1 = {v1, v2, v3} and V2 = {v4, v5, v6}, v1 v2 v3 v4 v5 v6 V1 V2
  • 23. Complete Bipartite graphs • Km,n is the graph that has its vertex set portioned into two subsets of m and n vertices, respectively There is an edge between two vertices if and only if one vertex is in the first subset and the other vertex is in the second subset. Representation example: K2,3, K3,3 K2,3 K3,3