SlideShare a Scribd company logo
Graph Theory
Varying Applications (examples)
Computer networks
Distinguish between two chemical compounds
with the same molecular formula but different
structures
Solve shortest path problems between cities
Topics Covered
Definitions
Types
Terminology
Representation
Connectivity
Shortest Path
Planar Graphs
Graph Coloring
Definitions - Graph
A graph is any collection of
• Dots (Vertices)
• Arcs/Lines (Edges) that join the points
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 non-empty 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
Graph theory
Example: Draw graph with
(a) 4 vertices and 5 edges
(b) 4 vertices and 3 edges (no loops)
(c) 3 vertices and 4 edges
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
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
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
Representation
Incidence (Matrix): Most useful when information about
edges is more desirable than information about vertices.
Adjacency (Matrix/List): Most useful when information about
the vertices is more desirable than information about the
edges. These two representations are also most popular since
information about the vertices is often more desirable than
edges in most applications
Representation- Incidence Matrix
Representation Example: G = (V, E)
e1 e2 e3
v 1 0 1
u 1 1 0
w 0 1 1
v w
u
e1
e3
e2
Representation- Adjacency Matrix
Example: Undirected Graph G (V, E)
v u w
v 0 1 1
u 1 0 1
w 1 1 0
u
v w
Representation- Adjacency Matrix
Example: directed Graph G (V, E)
v u w
v 0 1 0
u 0 0 1
w 1 0 0
u
v w
Representation- Adjacency List
Each node (vertex) has a list of which nodes (vertex) it is adjacent
Example: undirectd graph G (V, E)
node Adjacency List
u v , w
v w, u
w u , v
u
v w
Connectivity
Basic Idea: In a Graph Reachability among vertices by traversing
the edges
Application Example:
- In a city to city road-network, if one city can be reached from
another city.
- Problems if determining whether a message can be sent
between two computers using intermediate links
- Efficiently planning routes for data delivery in the Internet
Connectivity – Path
A Path is a sequence of edges that begins at a vertex of a
graph and travels along edges of the graph, always connecting
pairs of adjacent vertices.
Representation example: G = (V, E), Path P represented, from u
to v is {{u, 1}, {1, 4}, {4, 5}, {5, v}}
1
u
3
4 5
2
v
Connectivity – Connectedness
Undirected Graph
An undirected graph is connected if there exists is a simple
path between every pair of vertices
v1
v2
v3
v5
v4
Connectivity – Connectedness
Directed Graph
Representation example: G1 (Strong component), G2 (Weak
Component), G3 is undirected graph representation of G2 or
G1
G2
G1 G3
Connectivity – Connectedness
Directed Graph
Strongly connected Components: subgraphs of a Graph G
that are strongly connected
Representation example: G1 is the strongly connected
component in G
G1
G
Representation- Incidence Matrix
e1 e2 e3
a 1 0 0
b 1 1 0
c 0 1 1
d 0 0 1
e 0 0 0
f 0 0 0
e4 e5 e6 e7
0 0 0 1
0 0 0 0
0 1 1 0
1 0 0 0
1 1 0 0
0 0 1 1
a b
c d
e
f
e1
e2
e3
e4
e5
e6
e7
Shortest Path
Generalize distance to weighted setting
Graph G = (V,E) with weight function W (assigning real values to edges)
Weight of path p = v1  v2  …  vk is
Shortest path = a path of the minimum weight
Applications
◦ static/dynamic network routing
◦ robot motion planning
◦ map/route generation in traffic
1
1
1
( ) ( , )
k
i i
i
w p w v v



 
Planar Graphs
Planar graph is a graph that can be embedded in the plane, i.e.,
it can be drawn on the plane in such a way that its edges intersect
only at their endpoints.
In other words, it can be drawn in such a way that no edges
cross each other.
Planar Graphs
Representation examples: Q3
Planar Graphs
Theorem : Euler's planar graph theorem
For a connected planar graph or multigraph:
v – e + r = 2
number
of vertices
number
of edges
number
of regions
Planar Graphs
Planar Graphs
Example of Euler’s theorem
K4
R1
R2
R3
A planar graph divides the plane
into several regions (faces)
v=4,e=6,r=4, v-e+r=2
R4
Graph Coloring
 In its simplest form, it is a way of coloring the vertices of a
graph such that no two adjacent vertices share the same
color; this is called a vertex coloring.
Similarly, an edge coloring assigns a color to each edge so
that no two adjacent edges share the same color
face coloring of a planar graph assigns a color to each face
or region so that no two faces that share a boundary have the
same color.
Application examples: scheduling, register allocation in a
microprocessor, frequency assignment in mobile radios, and
pattern matching
Vertex Coloring
Edge coloring
Face/Region coloring

More Related Content

What's hot

Graph Theory Introduction
Graph Theory IntroductionGraph Theory Introduction
Graph Theory Introduction
MANISH T I
 
Graphs in Data Structure
 Graphs in Data Structure Graphs in Data Structure
Graphs in Data Structure
hafsa komal
 
Presentation on graphs
Presentation on graphsPresentation on graphs
Presentation on graphs
ForwardBlog Enewzletter
 
Data Structure Graph DMZ #DMZone
Data Structure Graph DMZ #DMZoneData Structure Graph DMZ #DMZone
Data Structure Graph DMZ #DMZone
Doug Needham
 
Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2
showslidedump
 
Application Of Graph Data Structure
Application Of Graph Data StructureApplication Of Graph Data Structure
Application Of Graph Data Structure
Gaurang Dobariya
 
Graph theory
Graph theoryGraph theory
Graph theory
Jeane Paguio
 
Graph
GraphGraph
Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)
Robert Almazan
 
18 Basic Graph Algorithms
18 Basic Graph Algorithms18 Basic Graph Algorithms
18 Basic Graph Algorithms
Andres Mendez-Vazquez
 
introduction to graph theory
introduction to graph theoryintroduction to graph theory
introduction to graph theory
Chuckie Balbuena
 
Graph representation
Graph representationGraph representation
Graph representation
Tech_MX
 
graph theory
graph theorygraph theory
graph theory
Shashank Singh
 
Graph theory
Graph theoryGraph theory
Graph theory
manikanta361
 
Graph
GraphGraph
1535 graph algorithms
1535 graph algorithms1535 graph algorithms
1535 graph algorithms
Dr Fereidoun Dejahang
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
Ehsan Hamzei
 
Basics on Graph Theory
Basics on Graph TheoryBasics on Graph Theory
Basics on Graph Theory
Guillaume Guérard
 

What's hot (18)

Graph Theory Introduction
Graph Theory IntroductionGraph Theory Introduction
Graph Theory Introduction
 
Graphs in Data Structure
 Graphs in Data Structure Graphs in Data Structure
Graphs in Data Structure
 
Presentation on graphs
Presentation on graphsPresentation on graphs
Presentation on graphs
 
Data Structure Graph DMZ #DMZone
Data Structure Graph DMZ #DMZoneData Structure Graph DMZ #DMZone
Data Structure Graph DMZ #DMZone
 
Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2
 
Application Of Graph Data Structure
Application Of Graph Data StructureApplication Of Graph Data Structure
Application Of Graph Data Structure
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Graph
GraphGraph
Graph
 
Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)
 
18 Basic Graph Algorithms
18 Basic Graph Algorithms18 Basic Graph Algorithms
18 Basic Graph Algorithms
 
introduction to graph theory
introduction to graph theoryintroduction to graph theory
introduction to graph theory
 
Graph representation
Graph representationGraph representation
Graph representation
 
graph theory
graph theorygraph theory
graph theory
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Graph
GraphGraph
Graph
 
1535 graph algorithms
1535 graph algorithms1535 graph algorithms
1535 graph algorithms
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Basics on Graph Theory
Basics on Graph TheoryBasics on Graph Theory
Basics on Graph Theory
 

Similar to Tn 110 lecture 8

graph.ppt
graph.pptgraph.ppt
graph.ppt
SumitSamanta16
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).ppt
ishan743441
 
graph ASS (1).ppt
graph ASS (1).pptgraph ASS (1).ppt
graph ASS (1).ppt
ARVIND SARDAR
 
LEC 1.pptx
LEC 1.pptxLEC 1.pptx
LEC 1.pptx
ssuserc1e786
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptx
ARVIND SARDAR
 
graph.ppt
graph.pptgraph.ppt
Data structure graphs
Data structure  graphsData structure  graphs
Data structure graphs
Uma mohan
 
Graph theory presentation
Graph theory presentationGraph theory presentation
Graph theory presentation
Aliul Kadir Akib
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
yogeshbairagi126
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
AqeelAbbas94
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
nabati
 
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
Rai University
 
Graphs.pptx
Graphs.pptxGraphs.pptx
Graphs.pptx
satvikkushwaha1
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx
swapnilbs2728
 
Magtibay buk bind#2
Magtibay buk bind#2Magtibay buk bind#2
Magtibay buk bind#2
Sofia Palawan
 
DATA STRUCTURE PRESENTATION.pptx
DATA STRUCTURE  PRESENTATION.pptxDATA STRUCTURE  PRESENTATION.pptx
DATA STRUCTURE PRESENTATION.pptx
MdMinhajulAbedin1711
 
lec 09-graphs-bfs-dfs.ppt
lec 09-graphs-bfs-dfs.pptlec 09-graphs-bfs-dfs.ppt
lec 09-graphs-bfs-dfs.ppt
TalhaFarooqui12
 
Graph Introduction.ppt
Graph Introduction.pptGraph Introduction.ppt
Graph Introduction.ppt
Faruk Hossen
 
Graphs.pdf
Graphs.pdfGraphs.pdf
Graphs.pdf
pubggaming58982
 
graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________
ssuser1989da
 

Similar to Tn 110 lecture 8 (20)

graph.ppt
graph.pptgraph.ppt
graph.ppt
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).ppt
 
graph ASS (1).ppt
graph ASS (1).pptgraph ASS (1).ppt
graph ASS (1).ppt
 
LEC 1.pptx
LEC 1.pptxLEC 1.pptx
LEC 1.pptx
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptx
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
Data structure graphs
Data structure  graphsData structure  graphs
Data structure graphs
 
Graph theory presentation
Graph theory presentationGraph theory presentation
Graph theory presentation
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
 
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
 
Graphs.pptx
Graphs.pptxGraphs.pptx
Graphs.pptx
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx
 
Magtibay buk bind#2
Magtibay buk bind#2Magtibay buk bind#2
Magtibay buk bind#2
 
DATA STRUCTURE PRESENTATION.pptx
DATA STRUCTURE  PRESENTATION.pptxDATA STRUCTURE  PRESENTATION.pptx
DATA STRUCTURE PRESENTATION.pptx
 
lec 09-graphs-bfs-dfs.ppt
lec 09-graphs-bfs-dfs.pptlec 09-graphs-bfs-dfs.ppt
lec 09-graphs-bfs-dfs.ppt
 
Graph Introduction.ppt
Graph Introduction.pptGraph Introduction.ppt
Graph Introduction.ppt
 
Graphs.pdf
Graphs.pdfGraphs.pdf
Graphs.pdf
 
graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________
 

More from ITNet

lecture 8 b main memory
lecture 8 b main memorylecture 8 b main memory
lecture 8 b main memory
ITNet
 
lecture 9.pptx
lecture 9.pptxlecture 9.pptx
lecture 9.pptx
ITNet
 
lecture 10.pptx
lecture 10.pptxlecture 10.pptx
lecture 10.pptx
ITNet
 
lecture 11.pptx
lecture 11.pptxlecture 11.pptx
lecture 11.pptx
ITNet
 
lecture 12.pptx
lecture 12.pptxlecture 12.pptx
lecture 12.pptx
ITNet
 
lecture 13.pptx
lecture 13.pptxlecture 13.pptx
lecture 13.pptx
ITNet
 
lecture 15.pptx
lecture 15.pptxlecture 15.pptx
lecture 15.pptx
ITNet
 
kandegeeee.pdf
kandegeeee.pdfkandegeeee.pdf
kandegeeee.pdf
ITNet
 
Ia 124 1621324160 ia_124_lecture_02
Ia 124 1621324160 ia_124_lecture_02Ia 124 1621324160 ia_124_lecture_02
Ia 124 1621324160 ia_124_lecture_02
ITNet
 
Ia 124 1621324143 ia_124_lecture_01
Ia 124 1621324143 ia_124_lecture_01Ia 124 1621324143 ia_124_lecture_01
Ia 124 1621324143 ia_124_lecture_01
ITNet
 
Cp 121 lecture 01
Cp 121 lecture 01Cp 121 lecture 01
Cp 121 lecture 01
ITNet
 
Cp 111 5 week
Cp 111 5 weekCp 111 5 week
Cp 111 5 week
ITNet
 
Teofilo kisanji university mbeya (TEKU) ambassador 2020
Teofilo kisanji university mbeya (TEKU) ambassador 2020Teofilo kisanji university mbeya (TEKU) ambassador 2020
Teofilo kisanji university mbeya (TEKU) ambassador 2020
ITNet
 
Tn 110 lecture 2 logic
Tn 110 lecture 2 logicTn 110 lecture 2 logic
Tn 110 lecture 2 logic
ITNet
 
Tn 110 lecture 1 logic
Tn 110 lecture 1 logicTn 110 lecture 1 logic
Tn 110 lecture 1 logic
ITNet
 
internet
internetinternet
internet
ITNet
 
Im 111 lecture 1
Im 111   lecture 1Im 111   lecture 1
Im 111 lecture 1
ITNet
 
development study perspective full
development study perspective fulldevelopment study perspective full
development study perspective full
ITNet
 
Gender issues in developement
Gender issues in developementGender issues in developement
Gender issues in developement
ITNet
 
Religion
ReligionReligion
Religion
ITNet
 

More from ITNet (20)

lecture 8 b main memory
lecture 8 b main memorylecture 8 b main memory
lecture 8 b main memory
 
lecture 9.pptx
lecture 9.pptxlecture 9.pptx
lecture 9.pptx
 
lecture 10.pptx
lecture 10.pptxlecture 10.pptx
lecture 10.pptx
 
lecture 11.pptx
lecture 11.pptxlecture 11.pptx
lecture 11.pptx
 
lecture 12.pptx
lecture 12.pptxlecture 12.pptx
lecture 12.pptx
 
lecture 13.pptx
lecture 13.pptxlecture 13.pptx
lecture 13.pptx
 
lecture 15.pptx
lecture 15.pptxlecture 15.pptx
lecture 15.pptx
 
kandegeeee.pdf
kandegeeee.pdfkandegeeee.pdf
kandegeeee.pdf
 
Ia 124 1621324160 ia_124_lecture_02
Ia 124 1621324160 ia_124_lecture_02Ia 124 1621324160 ia_124_lecture_02
Ia 124 1621324160 ia_124_lecture_02
 
Ia 124 1621324143 ia_124_lecture_01
Ia 124 1621324143 ia_124_lecture_01Ia 124 1621324143 ia_124_lecture_01
Ia 124 1621324143 ia_124_lecture_01
 
Cp 121 lecture 01
Cp 121 lecture 01Cp 121 lecture 01
Cp 121 lecture 01
 
Cp 111 5 week
Cp 111 5 weekCp 111 5 week
Cp 111 5 week
 
Teofilo kisanji university mbeya (TEKU) ambassador 2020
Teofilo kisanji university mbeya (TEKU) ambassador 2020Teofilo kisanji university mbeya (TEKU) ambassador 2020
Teofilo kisanji university mbeya (TEKU) ambassador 2020
 
Tn 110 lecture 2 logic
Tn 110 lecture 2 logicTn 110 lecture 2 logic
Tn 110 lecture 2 logic
 
Tn 110 lecture 1 logic
Tn 110 lecture 1 logicTn 110 lecture 1 logic
Tn 110 lecture 1 logic
 
internet
internetinternet
internet
 
Im 111 lecture 1
Im 111   lecture 1Im 111   lecture 1
Im 111 lecture 1
 
development study perspective full
development study perspective fulldevelopment study perspective full
development study perspective full
 
Gender issues in developement
Gender issues in developementGender issues in developement
Gender issues in developement
 
Religion
ReligionReligion
Religion
 

Recently uploaded

Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 

Recently uploaded (20)

Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 

Tn 110 lecture 8

  • 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
  • 4. Definitions - Graph A graph is any collection of • Dots (Vertices) • Arcs/Lines (Edges) that join the points 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 non-empty 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. Graph theory Example: Draw graph with (a) 4 vertices and 5 edges (b) 4 vertices and 3 edges (no loops) (c) 3 vertices and 4 edges
  • 9. 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
  • 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. 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
  • 13. Representation Incidence (Matrix): Most useful when information about edges is more desirable than information about vertices. Adjacency (Matrix/List): Most useful when information about the vertices is more desirable than information about the edges. These two representations are also most popular since information about the vertices is often more desirable than edges in most applications
  • 14. Representation- Incidence Matrix Representation Example: G = (V, E) e1 e2 e3 v 1 0 1 u 1 1 0 w 0 1 1 v w u e1 e3 e2
  • 15. Representation- Adjacency Matrix Example: Undirected Graph G (V, E) v u w v 0 1 1 u 1 0 1 w 1 1 0 u v w
  • 16. Representation- Adjacency Matrix Example: directed Graph G (V, E) v u w v 0 1 0 u 0 0 1 w 1 0 0 u v w
  • 17. Representation- Adjacency List Each node (vertex) has a list of which nodes (vertex) it is adjacent Example: undirectd graph G (V, E) node Adjacency List u v , w v w, u w u , v u v w
  • 18. Connectivity Basic Idea: In a Graph Reachability among vertices by traversing the edges Application Example: - In a city to city road-network, if one city can be reached from another city. - Problems if determining whether a message can be sent between two computers using intermediate links - Efficiently planning routes for data delivery in the Internet
  • 19. Connectivity – Path A Path is a sequence of edges that begins at a vertex of a graph and travels along edges of the graph, always connecting pairs of adjacent vertices. Representation example: G = (V, E), Path P represented, from u to v is {{u, 1}, {1, 4}, {4, 5}, {5, v}} 1 u 3 4 5 2 v
  • 20. Connectivity – Connectedness Undirected Graph An undirected graph is connected if there exists is a simple path between every pair of vertices v1 v2 v3 v5 v4
  • 21. Connectivity – Connectedness Directed Graph Representation example: G1 (Strong component), G2 (Weak Component), G3 is undirected graph representation of G2 or G1 G2 G1 G3
  • 22. Connectivity – Connectedness Directed Graph Strongly connected Components: subgraphs of a Graph G that are strongly connected Representation example: G1 is the strongly connected component in G G1 G
  • 23. Representation- Incidence Matrix e1 e2 e3 a 1 0 0 b 1 1 0 c 0 1 1 d 0 0 1 e 0 0 0 f 0 0 0 e4 e5 e6 e7 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 0 0 0 1 1 a b c d e f e1 e2 e3 e4 e5 e6 e7
  • 24. Shortest Path Generalize distance to weighted setting Graph G = (V,E) with weight function W (assigning real values to edges) Weight of path p = v1  v2  …  vk is Shortest path = a path of the minimum weight Applications ◦ static/dynamic network routing ◦ robot motion planning ◦ map/route generation in traffic 1 1 1 ( ) ( , ) k i i i w p w v v     
  • 25. Planar Graphs Planar graph is a graph that can be embedded in the plane, i.e., it can be drawn on the plane in such a way that its edges intersect only at their endpoints. In other words, it can be drawn in such a way that no edges cross each other.
  • 28. Theorem : Euler's planar graph theorem For a connected planar graph or multigraph: v – e + r = 2 number of vertices number of edges number of regions Planar Graphs
  • 29. Planar Graphs Example of Euler’s theorem K4 R1 R2 R3 A planar graph divides the plane into several regions (faces) v=4,e=6,r=4, v-e+r=2 R4
  • 30. Graph Coloring  In its simplest form, it is a way of coloring the vertices of a graph such that no two adjacent vertices share the same color; this is called a vertex coloring. Similarly, an edge coloring assigns a color to each edge so that no two adjacent edges share the same color face coloring of a planar graph assigns a color to each face or region so that no two faces that share a boundary have the same color. Application examples: scheduling, register allocation in a microprocessor, frequency assignment in mobile radios, and pattern matching