SlideShare une entreprise Scribd logo
1  sur  44
24/08/2022 presented by : EL KHADRI MUSTAPHA 2
24/08/2022 3
presented by : EL KHADRI MUSTAPHA
The author: Edsger Wybe Dijkstra
"Computer Science is no more about computers than
astronomy is about telescopes."
http://www.cs.utexas.edu/~EWD/ 4
24/08/2022
Edsger Wybe Dijkstra
- May 11, 1930 – August 6, 2002
- Received the 1972 A. M. Turing Award, widely considered
the most prestigious award in computer science.
- The Schlumberger Centennial Chair of Computer
Sciences at The University of Texas at Austin from 1984
until 2000
- Made a strong case against use of the GOTO statement
in programming languages and helped lead to its
deprecation.
- Known for his many essays on programming.
5
Single-Source Shortest Path Problem
Single-Source Shortest Path Problem - The problem of
finding shortest paths from a source vertex v to all other
vertices in the graph.
24/08/2022 6
Dijkstra's algorithm
Dijkstra's algorithm - is a solution to the single-source
shortest path problem in graph theory.
Works on both directed and undirected graphs. However,
all edges must have nonnegative weights.
Input: Weighted graph G={E,V} and source vertex v∈V,
such that all edge weights are nonnegative
Output: Lengths of shortest paths (or the shortest paths
themselves) from a given source vertex v∈V to all other
vertices
24/08/2022 7
Dijkstra's algorithm - Pseudocode
dist[s] ←0 (distance to source vertex is zero)
for all v ∈ V–{s}
do dist[v] ←∞ (set all other distances to infinity)
S←∅ (S, the set of visited vertices is initially empty)
Q←V (Q, the queue initially contains all vertices)
while Q ≠∅ (while the queue is not empty)
do u ← mindistance(Q,dist) (select the element of Q with the min. distance)
S←S∪{u} (add u to list of visited vertices)
Q←Q/{u}
for all v ∈ neighbors[u] intesect Q
do if dist[v] > dist[u] + w(u, v) (if new shortest path found)
then dist[v] ←dist[u] + w(u, v) (set new value of shortest path)
(if desired, add traceback code)
return dist
24/08/2022 8
Dijkstra Animated Example
24/08/2022 9
Dijkstra Animated Example
24/08/2022 10
Dijkstra Animated Example
24/08/2022 11
Dijkstra Animated Example
24/08/2022 12
Dijkstra Animated Example
24/08/2022 13
Dijkstra Animated Example
24/08/2022 14
Dijkstra Animated Example
24/08/2022 15
Dijkstra Animated Example
24/08/2022 16
Dijkstra Animated Example
24/08/2022 17
Dijkstra Animated Example
24/08/2022 18
 As mentioned, Dijkstra’s algorithm calculates the
shortest path to every vertex.
 However, it is about as computationally expensive to
calculate the shortest path from vertex u to every
vertex using Dijkstra’s as it is to calculate the shortest
path to some particular vertex v.
 Therefore, anytime we want to know the optimal path
to some other vertex from a determined origin, we can
use Dijkstra’s algorithm.
DIJKSTRA'S ALGORITHM - WHY USE IT?
24/08/2022 19
Applications of Dijkstra's Algorithm
- Traffic Information Systems are most prominent use
- Mapping (Map Quest, Google Maps)
- Routing Systems
24/08/2022 20
EXERCISE
 Find the shortest Path from E to S ?
 What about S to E ?
24/08/2022 21
Solution
24/08/2022 22
24/08/2022 23
What is graph coloring ?
Associating a color or color label with the vertices ,
egdes or faces of a graph while fulfilling a certain
criteria is called a graph coloring.
24/08/2022 24
three different ways to color a
graph
 VERTEX COLORING : to color the vertices in the
graph in such a way that two adjacent vertices do not
have the same color .
Adjacent vertices: two verices are adjacent if they are
connected through an edge
24/08/2022 25
three different ways to color a
graph
EDGE COLORING : to color the edges in the graph in
such a way that two adjacent edges do not have the
same color.
Adjacent edges : two edges are adjacent if they are
connected to a common vertex.
24/08/2022 26
three different ways to color a
graph
FACE COLORING : To color the faces in a planar graph in
such a way that two adjacent faces do not have the same
color.
Adjacent faces : Two faces are adjacent if they share a
common edge.
A 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. Such a drawing is called a plane graph or planar
embedding of the graph.
24/08/2022 27
 Edge and Face coloring can be transformed into Vertex
version .
3 colors exemple
24/08/2022 28
Chromatic Number
χ - least number of colors needed to color a graph
 Chromatic number of a complete graph:
χ(Kn) = n
24/08/2022 29
Properties of χ(G)
 χ(G) = 1 if and only if G is totally disconnected
 χ(G) ≥ 3 if and only if G has an odd cycle (equivalently, if G is not
bipartite)
 χ(G) ≤ Δ(G)+1 (maximum degree)
24/08/2022 30
Exemple 1
24/08/2022 31
Exemple 2
24/08/2022 32
If we have a complete subgraph with n vertices, then the number of colors is
≥ n
24/08/2022 33
Welsh-Powell algorithm
24/08/2022 34
Exemple: Welsh-Powell algorithm
24/08/2022 35
Welsh-Powell algorithm
24/08/2022 36
Welsh-Powell algorithm
24/08/2022 37
Welsh-Powell algorithm
24/08/2022 38
Welsh-Powell algorithm
24/08/2022 39
Welsh-Powell algorithm
24/08/2022 40
Welsh-Powell algorithm
24/08/2022 41
Welsh-Powell algorithm
24/08/2022 42
But …..
24/08/2022 43
References
 Dijkstra’s original paper:
E. W. Dijkstra. (1959) A Note on Two Problems in Connection with Graphs.
Numerische Mathematik, 1. 269-271.
 MIT OpenCourseware, 6.046J Introduction to Algorithms.
< http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-
Science/6-046JFall-2005/CourseHome/> Accessed 4/25/09
 Meyers, L.A. (2007) Contact network epidemiology: Bond percolation applied
to infectious disease prediction and control. Bulletin of the American
Mathematical Society 44: 63-86.
 Department of Mathematics, University of Melbourne. Dijkstra’s Algorithm.
<http://www.ms.unimelb.edu.au/~moshe/620-261/dijkstra/dijkstra.html >
Accessed 4/25/09
24/08/2022 44

Contenu connexe

Similaire à ENSA_Agadir_Hassane_Bouzahir_Last_Chapter_ENSA_Coloring_Dijkstra.pptx

Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)Mohanlal Sukhadia University (MLSU)
 
Introduction to Graphs
Introduction to GraphsIntroduction to Graphs
Introduction to GraphsFulvio Corno
 
A study-of-vertex-edge-coloring-techniques-with-application
A study-of-vertex-edge-coloring-techniques-with-applicationA study-of-vertex-edge-coloring-techniques-with-application
A study-of-vertex-edge-coloring-techniques-with-applicationIjcem Journal
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptxswapnilbs2728
 
Graph terminology and algorithm and tree.pptx
Graph terminology and algorithm and tree.pptxGraph terminology and algorithm and tree.pptx
Graph terminology and algorithm and tree.pptxasimshahzad8611
 
Hamilton Path & Dijkstra's Algorithm
Hamilton Path & Dijkstra's AlgorithmHamilton Path & Dijkstra's Algorithm
Hamilton Path & Dijkstra's AlgorithmMahesh Singh Madai
 
Applications and Properties of Unique Coloring of Graphs
Applications and Properties of Unique Coloring of GraphsApplications and Properties of Unique Coloring of Graphs
Applications and Properties of Unique Coloring of GraphsIJERA Editor
 
Total Dominating Color Transversal Number of Graphs And Graph Operations
Total Dominating Color Transversal Number of Graphs And Graph OperationsTotal Dominating Color Transversal Number of Graphs And Graph Operations
Total Dominating Color Transversal Number of Graphs And Graph Operationsinventionjournals
 
Unit26 shortest pathalgorithm
Unit26 shortest pathalgorithmUnit26 shortest pathalgorithm
Unit26 shortest pathalgorithmmeisamstar
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptxARVIND SARDAR
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theoryArvindBorge
 
Distributed coloring with O(sqrt. log n) bits
Distributed coloring with O(sqrt. log n) bitsDistributed coloring with O(sqrt. log n) bits
Distributed coloring with O(sqrt. log n) bitsSubhajit Sahu
 

Similaire à ENSA_Agadir_Hassane_Bouzahir_Last_Chapter_ENSA_Coloring_Dijkstra.pptx (20)

Class8 calculus ii
Class8 calculus iiClass8 calculus ii
Class8 calculus ii
 
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
 
Unit ix graph
Unit   ix    graph Unit   ix    graph
Unit ix graph
 
Introduction to Graphs
Introduction to GraphsIntroduction to Graphs
Introduction to Graphs
 
A study-of-vertex-edge-coloring-techniques-with-application
A study-of-vertex-edge-coloring-techniques-with-applicationA study-of-vertex-edge-coloring-techniques-with-application
A study-of-vertex-edge-coloring-techniques-with-application
 
Unit 9 graph
Unit   9 graphUnit   9 graph
Unit 9 graph
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx
 
Graph terminology and algorithm and tree.pptx
Graph terminology and algorithm and tree.pptxGraph terminology and algorithm and tree.pptx
Graph terminology and algorithm and tree.pptx
 
Hamilton Path & Dijkstra's Algorithm
Hamilton Path & Dijkstra's AlgorithmHamilton Path & Dijkstra's Algorithm
Hamilton Path & Dijkstra's Algorithm
 
Graph theory
Graph theoryGraph theory
Graph theory
 
graph theory
graph theory graph theory
graph theory
 
Applications and Properties of Unique Coloring of Graphs
Applications and Properties of Unique Coloring of GraphsApplications and Properties of Unique Coloring of Graphs
Applications and Properties of Unique Coloring of Graphs
 
Total Dominating Color Transversal Number of Graphs And Graph Operations
Total Dominating Color Transversal Number of Graphs And Graph OperationsTotal Dominating Color Transversal Number of Graphs And Graph Operations
Total Dominating Color Transversal Number of Graphs And Graph Operations
 
Dijkstra's Algorithm
Dijkstra's Algorithm Dijkstra's Algorithm
Dijkstra's Algorithm
 
Unit26 shortest pathalgorithm
Unit26 shortest pathalgorithmUnit26 shortest pathalgorithm
Unit26 shortest pathalgorithm
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptx
 
graph ASS (1).ppt
graph ASS (1).pptgraph ASS (1).ppt
graph ASS (1).ppt
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theory
 
Distributed coloring with O(sqrt. log n) bits
Distributed coloring with O(sqrt. log n) bitsDistributed coloring with O(sqrt. log n) bits
Distributed coloring with O(sqrt. log n) bits
 
Graph theory presentation
Graph theory presentationGraph theory presentation
Graph theory presentation
 

Dernier

Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksMagic Marks
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersMairaAshraf6
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 

Dernier (20)

Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic Marks
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 

ENSA_Agadir_Hassane_Bouzahir_Last_Chapter_ENSA_Coloring_Dijkstra.pptx