SlideShare a Scribd company logo
1 of 16
Present by: Abdul Ahad Abro
1
Graph Theory in Computer Applications
Computer Engineering Department, Ege University, Turkey
November 23-2017
Graph Coloring
Graph Coloring
Problems related to the coloring of maps of regions such as maps of parts of
the world, have generated many result in graph theory. When a map is
colored, two regions with a common border are customarily assigned
different colors.
2
3
Edges connect two vertices if the regions represented by these
vertices have a common border. Two regions that touch at only
one point are not considered adjacent. The resulting graph is
called the dual graph of map.
The problem of coloring the regions of a map is equivalent to
the problem of coloring the vertices of dual graph so that no
two adjacent vertices in this graph have same color.
4
A coloring of a simple graph is the assignment of a color to
each vertex of the graph so that no two adjacent vertices are
assigned the same color. .
Definition 1
5
Definition 2
The chromatic number of a graph is the least number of colors
needed for a coloring of this graph. The chromatic number of a
graph G is denoted by X(G). (Here X is the Greek letter chi.)
6
The chromatic number of a planar graph is no greater than four.
Theorem 1
7
The chromatic number of G is at least three, because the vertices a , b and c
must be assigned different colors. G can be colored with 3 colors, as in red to
a, blue to b and green to c. Then, d can be colored red because it's adjacent to
b and c. Furthermore, e can be colored green because it's adjacent only to
vertices colored red and blue, and f can be colored blue because it's adjacent
only to vertices colored red and green. Finally, g can be colored red because
it's adjacent only to vertices colored blue and green. This produces a coloring
of G using exactly three colors.
Example 1 What are the chromatic number of the graph G and H shown in Figure 3?
The graph H is made of the graph G with an edge connecting a and
g. Any attempt to color H using three colors must follow the same
reasoning as that used to color G, except at the last stage, when all
vertices other than g have been colored. Because g is adjacent to
vertices colored red, blue, and green a fourth color, say brown,
needs to be used. Hence, H has a chromatic number equal to 4.
8
A coloring of Kn can be constructed using n colors by assigning a
different color to each vertex. No two vertices can be assigned the
same color, because every two vertices of this graph are adjacent.
Hence the chromatic number of Kn =n. That is X(Kn) = n. Recall that Kn
is not planar when n ≥ 5, so this result does not contradict the four
color Theorem.) A coloring of K5 using five colors is in figure 5.
Example 2 What is the chromatic number of K n ?
9
The number of colors needed may seem to depend on m and n. Two colors
are needed, because Km,n is a bipartite graph. Hence, X (Km,n) =2. This means
that we can color the set of m vertices with one color and the set of n
vertices with a second color. Because edges connect only a vertex from the
set of m vertices and a vertex from the set of n vertices, no two adjacent
vertices have the same color. A coloring of K3.4 with two colors is displayed in
figure 6.
Example 3 What is the chromatic number of the complete bipartite graph Km,n ,
Where m and n are positive integers?
10
Let n = 6. Pick a vertex and color it red. Proceed clockwise. Assign
second color, blue, to the next vertex reached. Continue in clockwise
direction; the third vertex can be colored red, the fourth vertex blue,
and the fifth vertex red. Finally the sixth vertex, which is adjacent to the
first, can be colored blue. Hence the chromatic number of C6 is 2.
Example 4 What is the chromatic number of graph Cn where n ≥ 3?
Let n = 5. The chromatic number of C5 is 3. A coloring of C5 using
three colors.
11
Application of Graph Colorings
Graph coloring has a variety of applications to problems involving
scheduling and assignments. Note that no efficient algorithm is
known for graph coloring, this does not lead to efficient
algorithms for scheduling and assignments. Example of such
applications is scheduling of final exam.
12
This scheduling problem can be solved using a graph model, with
vertices representing courses and with an edge between two
vertices if there is a common student in the courses they
represent. Each time slot for a final exam is represented by a
different color . A scheduling of the exams corresponds to a
coloring of the associated graph.
Scheduling Final Exams
13
For instance, suppose there are seven finals to be schedule. Suppose
the course are numbered 1 through 7. Suppose that the following pairs
of courses have common student: 1 and 2, 1 and 3, 1 and 4, 1 and 7, 2
and 3, 2 and 4, 2 and 5, 2 and 7, 3 and 4, 3 and 6,3 and 7,4 and 5, 4
and 6,5 and 7, and 6 and 7. In figure 8 the graph associated with this
set of classes is shown. A scheduling consist of a coloring of this graph.
14
Television channels 2 through 13 are assigned to stations in North
America so that no two stations within 150 miles can operate on the
same channel. How can the assignment of channels be modeled by
graph coloring?
Frequency Assignment
Example 6
Construct a graph by assigning a vertex to each station. Two vertices are
connected by an edge if they are located within 150 miles of each other. An
assignment of channels corresponds to a coloring of the graph, where each color
represents a different channel.
Sol:
15
Index Registers
Example 7
In efficient compilers the execution of loops is speeded up when frequently used
variables are stored temporarily in index registers in the central processing unit,
instead of in regular memory. For a given loop, how many index registers are
needed. This problem can be addressed using a graph coloring model. To set up the
model, let each vertex of a graph represent a variable in the loop. There is an edge
between two vertices if the variables they represent must be stored in index
registers at the same time during the execution of the loop. Thus, the chromatic
number of the graph gives the number of index registers needed, because different
registers must be assigned to variables when the vertices representing these
variables are adjacent in the graph.
16

More Related Content

What's hot

introduction to graph theory
introduction to graph theoryintroduction to graph theory
introduction to graph theoryChuckie Balbuena
 
Edge Coloring & K-tuple coloring
Edge Coloring & K-tuple coloringEdge Coloring & K-tuple coloring
Edge Coloring & K-tuple coloringDr. Abdul Ahad Abro
 
Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2showslidedump
 
Graph theory in network system
Graph theory in network systemGraph theory in network system
Graph theory in network systemManikanta satyala
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applicationsManikanta satyala
 
Matrix representation of graph
Matrix representation of graphMatrix representation of graph
Matrix representation of graphRounak Biswas
 
Graph Theory: Connectivity & Isomorphism
Graph Theory: Connectivity & Isomorphism Graph Theory: Connectivity & Isomorphism
Graph Theory: Connectivity & Isomorphism Ashikur Rahman
 
Euler paths and circuits
Euler paths and circuitsEuler paths and circuits
Euler paths and circuits03446940736
 
Interesting applications of graph theory
Interesting applications of graph theoryInteresting applications of graph theory
Interesting applications of graph theoryTech_MX
 
Graph theory introduction - Samy
Graph theory  introduction - SamyGraph theory  introduction - Samy
Graph theory introduction - SamyMark Arokiasamy
 
Graph Application in Traffic Control
Graph Application in Traffic ControlGraph Application in Traffic Control
Graph Application in Traffic ControlMuhammadu Isa
 
Graph coloring problem(DAA).pptx
Graph coloring problem(DAA).pptxGraph coloring problem(DAA).pptx
Graph coloring problem(DAA).pptxHome
 
Graph Theory Introduction
Graph Theory IntroductionGraph Theory Introduction
Graph Theory IntroductionMANISH T I
 

What's hot (20)

introduction to graph theory
introduction to graph theoryintroduction to graph theory
introduction to graph theory
 
Edge Coloring & K-tuple coloring
Edge Coloring & K-tuple coloringEdge Coloring & K-tuple coloring
Edge Coloring & K-tuple coloring
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Lecture-9.pptx
Lecture-9.pptxLecture-9.pptx
Lecture-9.pptx
 
Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2
 
Graph coloring Algorithm
Graph coloring AlgorithmGraph coloring Algorithm
Graph coloring Algorithm
 
Graph theory in network system
Graph theory in network systemGraph theory in network system
Graph theory in network system
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applications
 
Matrix representation of graph
Matrix representation of graphMatrix representation of graph
Matrix representation of graph
 
Connectivity of graph
Connectivity of graphConnectivity of graph
Connectivity of graph
 
Graph Theory: Connectivity & Isomorphism
Graph Theory: Connectivity & Isomorphism Graph Theory: Connectivity & Isomorphism
Graph Theory: Connectivity & Isomorphism
 
Planar graph
Planar graphPlanar graph
Planar graph
 
Euler paths and circuits
Euler paths and circuitsEuler paths and circuits
Euler paths and circuits
 
Interesting applications of graph theory
Interesting applications of graph theoryInteresting applications of graph theory
Interesting applications of graph theory
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Graph theory introduction - Samy
Graph theory  introduction - SamyGraph theory  introduction - Samy
Graph theory introduction - Samy
 
Graph Application in Traffic Control
Graph Application in Traffic ControlGraph Application in Traffic Control
Graph Application in Traffic Control
 
Graph coloring problem(DAA).pptx
Graph coloring problem(DAA).pptxGraph coloring problem(DAA).pptx
Graph coloring problem(DAA).pptx
 
Graph coloring
Graph coloringGraph coloring
Graph coloring
 
Graph Theory Introduction
Graph Theory IntroductionGraph Theory Introduction
Graph Theory Introduction
 

Similar to Graph Theory in Computer Applications

Greedy Edge Colouring for Lower Bound of an Achromatic Index of Simple Graphs
Greedy Edge Colouring for Lower Bound of an Achromatic Index of Simple GraphsGreedy Edge Colouring for Lower Bound of an Achromatic Index of Simple Graphs
Greedy Edge Colouring for Lower Bound of an Achromatic Index of Simple Graphsinventionjournals
 
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
 
Graph Coloring and Its Implementation
Graph Coloring and Its ImplementationGraph Coloring and Its Implementation
Graph Coloring and Its ImplementationIJARIIT
 
Graph Dynamical System on Graph Colouring
Graph Dynamical System on Graph ColouringGraph Dynamical System on Graph Colouring
Graph Dynamical System on Graph ColouringClyde Shen
 
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
 
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
 
Extended online graph edge coloring
Extended online graph edge coloringExtended online graph edge coloring
Extended online graph edge coloringijcsa
 
SATISFIABILITY METHODS FOR COLOURING GRAPHS
SATISFIABILITY METHODS FOR COLOURING GRAPHSSATISFIABILITY METHODS FOR COLOURING GRAPHS
SATISFIABILITY METHODS FOR COLOURING GRAPHScscpconf
 
List Coloring.pptx
List Coloring.pptxList Coloring.pptx
List Coloring.pptxamitkrinbox
 
Application of Vertex Colorings with Some Interesting Graphs
Application of Vertex Colorings with Some Interesting GraphsApplication of Vertex Colorings with Some Interesting Graphs
Application of Vertex Colorings with Some Interesting Graphsijtsrd
 
SAT-PAPER
SAT-PAPER SAT-PAPER
SAT-PAPER Haridh
 
K-M analysis applied to droplet-color variation
K-M analysis applied to droplet-color variationK-M analysis applied to droplet-color variation
K-M analysis applied to droplet-color variationRobert Cornell
 
Farhna shaikh webinar_graphcoloring
Farhna shaikh webinar_graphcoloringFarhna shaikh webinar_graphcoloring
Farhna shaikh webinar_graphcoloringFarhana Shaikh
 
Map Coloring and Some of Its Applications
Map Coloring and Some of Its Applications Map Coloring and Some of Its Applications
Map Coloring and Some of Its Applications MD SHAH ALAM
 

Similar to Graph Theory in Computer Applications (20)

Greedy Edge Colouring for Lower Bound of an Achromatic Index of Simple Graphs
Greedy Edge Colouring for Lower Bound of an Achromatic Index of Simple GraphsGreedy Edge Colouring for Lower Bound of an Achromatic Index of Simple Graphs
Greedy Edge Colouring for Lower Bound of an Achromatic Index of Simple Graphs
 
Bipartite graph
Bipartite graphBipartite graph
Bipartite graph
 
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 Coloring and Its Implementation
Graph Coloring and Its ImplementationGraph Coloring and Its Implementation
Graph Coloring and Its Implementation
 
Graph Dynamical System on Graph Colouring
Graph Dynamical System on Graph ColouringGraph Dynamical System on Graph Colouring
Graph Dynamical System on Graph Colouring
 
graph 2.pptx
graph 2.pptxgraph 2.pptx
graph 2.pptx
 
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
 
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
 
Extended online graph edge coloring
Extended online graph edge coloringExtended online graph edge coloring
Extended online graph edge coloring
 
SATISFIABILITY METHODS FOR COLOURING GRAPHS
SATISFIABILITY METHODS FOR COLOURING GRAPHSSATISFIABILITY METHODS FOR COLOURING GRAPHS
SATISFIABILITY METHODS FOR COLOURING GRAPHS
 
graph theory
graph theorygraph theory
graph theory
 
List Coloring.pptx
List Coloring.pptxList Coloring.pptx
List Coloring.pptx
 
Application of Vertex Colorings with Some Interesting Graphs
Application of Vertex Colorings with Some Interesting GraphsApplication of Vertex Colorings with Some Interesting Graphs
Application of Vertex Colorings with Some Interesting Graphs
 
05 Scalar Visualization
05 Scalar Visualization05 Scalar Visualization
05 Scalar Visualization
 
Coding
CodingCoding
Coding
 
SAT-PAPER
SAT-PAPER SAT-PAPER
SAT-PAPER
 
K-M analysis applied to droplet-color variation
K-M analysis applied to droplet-color variationK-M analysis applied to droplet-color variation
K-M analysis applied to droplet-color variation
 
Sol36
Sol36Sol36
Sol36
 
Farhna shaikh webinar_graphcoloring
Farhna shaikh webinar_graphcoloringFarhna shaikh webinar_graphcoloring
Farhna shaikh webinar_graphcoloring
 
Map Coloring and Some of Its Applications
Map Coloring and Some of Its Applications Map Coloring and Some of Its Applications
Map Coloring and Some of Its Applications
 

More from Dr. Abdul Ahad Abro

Artificial intelligence - AI Complete Concept
Artificial intelligence - AI Complete ConceptArtificial intelligence - AI Complete Concept
Artificial intelligence - AI Complete ConceptDr. Abdul Ahad Abro
 
Shortest-Path Problems - Graph Theory in Computer Applications
Shortest-Path Problems - Graph Theory in Computer ApplicationsShortest-Path Problems - Graph Theory in Computer Applications
Shortest-Path Problems - Graph Theory in Computer ApplicationsDr. Abdul Ahad Abro
 
Connectivity - Graph Theory in Computer Applications
Connectivity - Graph Theory in Computer ApplicationsConnectivity - Graph Theory in Computer Applications
Connectivity - Graph Theory in Computer ApplicationsDr. Abdul Ahad Abro
 
Data mining , Knowledge Discovery Process, Classification
Data mining , Knowledge Discovery Process, ClassificationData mining , Knowledge Discovery Process, Classification
Data mining , Knowledge Discovery Process, ClassificationDr. Abdul Ahad Abro
 
Regression with Microsoft Azure & Ms Excel
Regression with Microsoft Azure & Ms ExcelRegression with Microsoft Azure & Ms Excel
Regression with Microsoft Azure & Ms ExcelDr. Abdul Ahad Abro
 
Expert System - Artificial intelligence
Expert System - Artificial intelligenceExpert System - Artificial intelligence
Expert System - Artificial intelligenceDr. Abdul Ahad Abro
 

More from Dr. Abdul Ahad Abro (9)

DBMS & RDBMS
DBMS & RDBMSDBMS & RDBMS
DBMS & RDBMS
 
Outlier Detection
Outlier DetectionOutlier Detection
Outlier Detection
 
AI vs Human
AI vs HumanAI vs Human
AI vs Human
 
Artificial intelligence - AI Complete Concept
Artificial intelligence - AI Complete ConceptArtificial intelligence - AI Complete Concept
Artificial intelligence - AI Complete Concept
 
Shortest-Path Problems - Graph Theory in Computer Applications
Shortest-Path Problems - Graph Theory in Computer ApplicationsShortest-Path Problems - Graph Theory in Computer Applications
Shortest-Path Problems - Graph Theory in Computer Applications
 
Connectivity - Graph Theory in Computer Applications
Connectivity - Graph Theory in Computer ApplicationsConnectivity - Graph Theory in Computer Applications
Connectivity - Graph Theory in Computer Applications
 
Data mining , Knowledge Discovery Process, Classification
Data mining , Knowledge Discovery Process, ClassificationData mining , Knowledge Discovery Process, Classification
Data mining , Knowledge Discovery Process, Classification
 
Regression with Microsoft Azure & Ms Excel
Regression with Microsoft Azure & Ms ExcelRegression with Microsoft Azure & Ms Excel
Regression with Microsoft Azure & Ms Excel
 
Expert System - Artificial intelligence
Expert System - Artificial intelligenceExpert System - Artificial intelligence
Expert System - Artificial intelligence
 

Recently uploaded

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Recently uploaded (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 

Graph Theory in Computer Applications

  • 1. Present by: Abdul Ahad Abro 1 Graph Theory in Computer Applications Computer Engineering Department, Ege University, Turkey November 23-2017 Graph Coloring
  • 2. Graph Coloring Problems related to the coloring of maps of regions such as maps of parts of the world, have generated many result in graph theory. When a map is colored, two regions with a common border are customarily assigned different colors. 2
  • 3. 3 Edges connect two vertices if the regions represented by these vertices have a common border. Two regions that touch at only one point are not considered adjacent. The resulting graph is called the dual graph of map. The problem of coloring the regions of a map is equivalent to the problem of coloring the vertices of dual graph so that no two adjacent vertices in this graph have same color.
  • 4. 4 A coloring of a simple graph is the assignment of a color to each vertex of the graph so that no two adjacent vertices are assigned the same color. . Definition 1
  • 5. 5 Definition 2 The chromatic number of a graph is the least number of colors needed for a coloring of this graph. The chromatic number of a graph G is denoted by X(G). (Here X is the Greek letter chi.)
  • 6. 6 The chromatic number of a planar graph is no greater than four. Theorem 1
  • 7. 7 The chromatic number of G is at least three, because the vertices a , b and c must be assigned different colors. G can be colored with 3 colors, as in red to a, blue to b and green to c. Then, d can be colored red because it's adjacent to b and c. Furthermore, e can be colored green because it's adjacent only to vertices colored red and blue, and f can be colored blue because it's adjacent only to vertices colored red and green. Finally, g can be colored red because it's adjacent only to vertices colored blue and green. This produces a coloring of G using exactly three colors. Example 1 What are the chromatic number of the graph G and H shown in Figure 3? The graph H is made of the graph G with an edge connecting a and g. Any attempt to color H using three colors must follow the same reasoning as that used to color G, except at the last stage, when all vertices other than g have been colored. Because g is adjacent to vertices colored red, blue, and green a fourth color, say brown, needs to be used. Hence, H has a chromatic number equal to 4.
  • 8. 8 A coloring of Kn can be constructed using n colors by assigning a different color to each vertex. No two vertices can be assigned the same color, because every two vertices of this graph are adjacent. Hence the chromatic number of Kn =n. That is X(Kn) = n. Recall that Kn is not planar when n ≥ 5, so this result does not contradict the four color Theorem.) A coloring of K5 using five colors is in figure 5. Example 2 What is the chromatic number of K n ?
  • 9. 9 The number of colors needed may seem to depend on m and n. Two colors are needed, because Km,n is a bipartite graph. Hence, X (Km,n) =2. This means that we can color the set of m vertices with one color and the set of n vertices with a second color. Because edges connect only a vertex from the set of m vertices and a vertex from the set of n vertices, no two adjacent vertices have the same color. A coloring of K3.4 with two colors is displayed in figure 6. Example 3 What is the chromatic number of the complete bipartite graph Km,n , Where m and n are positive integers?
  • 10. 10 Let n = 6. Pick a vertex and color it red. Proceed clockwise. Assign second color, blue, to the next vertex reached. Continue in clockwise direction; the third vertex can be colored red, the fourth vertex blue, and the fifth vertex red. Finally the sixth vertex, which is adjacent to the first, can be colored blue. Hence the chromatic number of C6 is 2. Example 4 What is the chromatic number of graph Cn where n ≥ 3? Let n = 5. The chromatic number of C5 is 3. A coloring of C5 using three colors.
  • 11. 11 Application of Graph Colorings Graph coloring has a variety of applications to problems involving scheduling and assignments. Note that no efficient algorithm is known for graph coloring, this does not lead to efficient algorithms for scheduling and assignments. Example of such applications is scheduling of final exam.
  • 12. 12 This scheduling problem can be solved using a graph model, with vertices representing courses and with an edge between two vertices if there is a common student in the courses they represent. Each time slot for a final exam is represented by a different color . A scheduling of the exams corresponds to a coloring of the associated graph. Scheduling Final Exams
  • 13. 13 For instance, suppose there are seven finals to be schedule. Suppose the course are numbered 1 through 7. Suppose that the following pairs of courses have common student: 1 and 2, 1 and 3, 1 and 4, 1 and 7, 2 and 3, 2 and 4, 2 and 5, 2 and 7, 3 and 4, 3 and 6,3 and 7,4 and 5, 4 and 6,5 and 7, and 6 and 7. In figure 8 the graph associated with this set of classes is shown. A scheduling consist of a coloring of this graph.
  • 14. 14 Television channels 2 through 13 are assigned to stations in North America so that no two stations within 150 miles can operate on the same channel. How can the assignment of channels be modeled by graph coloring? Frequency Assignment Example 6 Construct a graph by assigning a vertex to each station. Two vertices are connected by an edge if they are located within 150 miles of each other. An assignment of channels corresponds to a coloring of the graph, where each color represents a different channel. Sol:
  • 15. 15 Index Registers Example 7 In efficient compilers the execution of loops is speeded up when frequently used variables are stored temporarily in index registers in the central processing unit, instead of in regular memory. For a given loop, how many index registers are needed. This problem can be addressed using a graph coloring model. To set up the model, let each vertex of a graph represent a variable in the loop. There is an edge between two vertices if the variables they represent must be stored in index registers at the same time during the execution of the loop. Thus, the chromatic number of the graph gives the number of index registers needed, because different registers must be assigned to variables when the vertices representing these variables are adjacent in the graph.
  • 16. 16