SlideShare a Scribd company logo
1 of 10
Download to read offline
By
Dr. Heman Pathak
Associate Professor
Dept.of Comp. Sc.
KGC - Dehradun
 A graph G is a pair(V, E) of a set of vertices V
and a set of edges E.
 The edges are unordered pairs of the form(i, j)
where i, j∈V.
 Two vertices i and j are said to be adjacent if
and only if (i, j)∈E and non-adjacent otherwise.
 Assume that a graph has n vertices.
 A graph can be represented by an Adjacency
Matrix n X n.
2
GRAPH COLORING
3
GRAPH COLORING
 The graph coloring problem is an
assignment of colors to the vertices
such that no two adjacent vertices are
assigned the same color.
 A k-coloring of a graph G is a coloring
of G using k colors.
4
THE GRAPH COLORING PROBLEM
5
THE GRAPH COLORING PROBLEM
Colours (C) Vertices (n) Combinations
1 1 1
1 2 1
1 3 1
2 1 2
2 2 4
2 3 8
3 1 3
3 2 9
3 3 27
In general Cn Combinations for C color and n Vertices
 No. of Vertices : n
 No of Colors : C
 Graph : A[n][n]
 Possible Solutions : Cn
 No. of PEs required : Cn
 P(i0,i1,i2,………….in-1) : corresponds to a coloring of
vertex 0 with i0, a coloring of vertex 1 with i1,…………..and a
coloring of vertex n-1 with in-1.
 Each PE initially sets its value in the n dimensional candidate
array to 1.
THE GRAPH COLORING PROBLEM
6
 It then spend (n2)time determining whether, for the
particular assignment of color to vertices it represents,
two adjacent vertices have been given the same color.
 If A[j,k] = 1 and ij = ik, then the coloring is not valid.
 If PE detects invalid coloring, it sets it candidate to 0.
 If after n2 comparisons its candidate array is still 1, then
coloring is valid.
 By summing over Cn elements in the candidate array, it
can be determined whether there exists a valid coloring
or not.
THE GRAPH COLORING PROBLEM
7
THE GRAPH COLORING PROBLEM
8
V0 V1 V2
V0 0 1 0
V1 1 0 1
V2 0 1 0
THE GRAPH COLORING PROBLEM
9
THE GRAPH COLORING PROBLEM
 It takes (log 𝐶 𝑛) steps to spawn 𝐶 𝑛 PEs
 Every processor executes the doubly-nested for
loops in (n2).
 Summing the 𝐶 𝑛 elements of answer requires
(log 𝐶 𝑛) using 𝐶 𝑛 PEs
 Overall complexity of the algorithm is
(n2 + 𝒍𝒐𝒈 𝑪 𝒏) = (n2 + 𝒏 𝒍𝒐𝒈 𝑪)
 Because c<n then complexity reduces to (n2). 10

More Related Content

What's hot

Deep learning for image video processing
Deep learning for image video processingDeep learning for image video processing
Deep learning for image video processingYu Huang
 
Cloud computing using Eucalyptus
Cloud computing using EucalyptusCloud computing using Eucalyptus
Cloud computing using EucalyptusAbhishek Dey
 
AWS Well Architected Framework - Walk Through
AWS Well Architected Framework - Walk ThroughAWS Well Architected Framework - Walk Through
AWS Well Architected Framework - Walk ThroughKaushik Mohanraj
 
Cloud computing- Benefits,Future and Challenges
Cloud computing- Benefits,Future and Challenges Cloud computing- Benefits,Future and Challenges
Cloud computing- Benefits,Future and Challenges RohitKumar3153
 
Google app engine
Google app engineGoogle app engine
Google app engineSuraj Mehta
 
Cloud platforms - Cloud Computing
Cloud platforms - Cloud ComputingCloud platforms - Cloud Computing
Cloud platforms - Cloud ComputingAditi Rai
 
Heart disease prediction system
Heart disease prediction systemHeart disease prediction system
Heart disease prediction systemSWAMI06
 
Cloud security and security architecture
Cloud security and security architectureCloud security and security architecture
Cloud security and security architectureVladimir Jirasek
 
Distributed Server
Distributed ServerDistributed Server
Distributed ServerRajan Kumar
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portionMoe Moe Myint
 
Contrast enhancement in digital images
Contrast enhancement in digital imagesContrast enhancement in digital images
Contrast enhancement in digital imagesSakher BELOUADAH
 
[SIGGRAPH 2016] Automatic Image Colorization
[SIGGRAPH 2016] Automatic Image Colorization[SIGGRAPH 2016] Automatic Image Colorization
[SIGGRAPH 2016] Automatic Image ColorizationSatoshi Iizuka
 
Hybrid- and Multi-Cloud by design - IBM Cloud and your journey to Cloud
Hybrid- and Multi-Cloud by design - IBM Cloud and your journey to CloudHybrid- and Multi-Cloud by design - IBM Cloud and your journey to Cloud
Hybrid- and Multi-Cloud by design - IBM Cloud and your journey to CloudAleksandar Francuz
 
Hash functions MD5 and RIPEMD 160
Hash functions MD5 and RIPEMD 160Hash functions MD5 and RIPEMD 160
Hash functions MD5 and RIPEMD 160chutinhha
 

What's hot (20)

Deep learning for image video processing
Deep learning for image video processingDeep learning for image video processing
Deep learning for image video processing
 
Cloud computing using Eucalyptus
Cloud computing using EucalyptusCloud computing using Eucalyptus
Cloud computing using Eucalyptus
 
AWS Well Architected Framework - Walk Through
AWS Well Architected Framework - Walk ThroughAWS Well Architected Framework - Walk Through
AWS Well Architected Framework - Walk Through
 
Cloud computing- Benefits,Future and Challenges
Cloud computing- Benefits,Future and Challenges Cloud computing- Benefits,Future and Challenges
Cloud computing- Benefits,Future and Challenges
 
Google app engine
Google app engineGoogle app engine
Google app engine
 
IP Spoofing
IP SpoofingIP Spoofing
IP Spoofing
 
Cryptography
CryptographyCryptography
Cryptography
 
Cloud platforms - Cloud Computing
Cloud platforms - Cloud ComputingCloud platforms - Cloud Computing
Cloud platforms - Cloud Computing
 
Digital Signature.ppt
Digital Signature.pptDigital Signature.ppt
Digital Signature.ppt
 
Heart disease prediction system
Heart disease prediction systemHeart disease prediction system
Heart disease prediction system
 
Cloud security and security architecture
Cloud security and security architectureCloud security and security architecture
Cloud security and security architecture
 
Distributed Server
Distributed ServerDistributed Server
Distributed Server
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
 
Contrast enhancement in digital images
Contrast enhancement in digital imagesContrast enhancement in digital images
Contrast enhancement in digital images
 
[SIGGRAPH 2016] Automatic Image Colorization
[SIGGRAPH 2016] Automatic Image Colorization[SIGGRAPH 2016] Automatic Image Colorization
[SIGGRAPH 2016] Automatic Image Colorization
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
 
Graphical password ppt
Graphical password pptGraphical password ppt
Graphical password ppt
 
Cloud assessment approach
Cloud assessment approachCloud assessment approach
Cloud assessment approach
 
Hybrid- and Multi-Cloud by design - IBM Cloud and your journey to Cloud
Hybrid- and Multi-Cloud by design - IBM Cloud and your journey to CloudHybrid- and Multi-Cloud by design - IBM Cloud and your journey to Cloud
Hybrid- and Multi-Cloud by design - IBM Cloud and your journey to Cloud
 
Hash functions MD5 and RIPEMD 160
Hash functions MD5 and RIPEMD 160Hash functions MD5 and RIPEMD 160
Hash functions MD5 and RIPEMD 160
 

Similar to Graph Coloring Problem Explained

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
 
On sum edge coloring of regular, bipartite and split graphs
On sum edge coloring of regular,  bipartite and split graphsOn sum edge coloring of regular,  bipartite and split graphs
On sum edge coloring of regular, bipartite and split graphs政謙 陳
 
List Coloring.pptx
List Coloring.pptxList Coloring.pptx
List Coloring.pptxamitkrinbox
 
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
 
Graph Coloring : Greedy Algorithm & Welsh Powell Algorithm
Graph Coloring : Greedy Algorithm & Welsh Powell AlgorithmGraph Coloring : Greedy Algorithm & Welsh Powell Algorithm
Graph Coloring : Greedy Algorithm & Welsh Powell AlgorithmPriyank Jain
 
Some New Families on H-Cordial Graphs
Some New Families on H-Cordial GraphsSome New Families on H-Cordial Graphs
Some New Families on H-Cordial GraphsIJMER
 
A linear algorithm for the grundy number of a tree
A linear algorithm for the grundy number of a treeA linear algorithm for the grundy number of a tree
A linear algorithm for the grundy number of a treeijcsit
 
Au2419291933
Au2419291933Au2419291933
Au2419291933IJMER
 

Similar to Graph Coloring Problem Explained (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
 
On sum edge coloring of regular, bipartite and split graphs
On sum edge coloring of regular,  bipartite and split graphsOn sum edge coloring of regular,  bipartite and split graphs
On sum edge coloring of regular, bipartite and split graphs
 
List Coloring.pptx
List Coloring.pptxList Coloring.pptx
List Coloring.pptx
 
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
 
Graph colouring
Graph colouringGraph colouring
Graph colouring
 
Graph Coloring : Greedy Algorithm & Welsh Powell Algorithm
Graph Coloring : Greedy Algorithm & Welsh Powell AlgorithmGraph Coloring : Greedy Algorithm & Welsh Powell Algorithm
Graph Coloring : Greedy Algorithm & Welsh Powell Algorithm
 
graph theory
graph theorygraph theory
graph theory
 
Graph coloring
Graph coloringGraph coloring
Graph coloring
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Graph T
Graph TGraph T
Graph T
 
Graph Coloring
Graph ColoringGraph Coloring
Graph Coloring
 
Sol60
Sol60Sol60
Sol60
 
Sol60
Sol60Sol60
Sol60
 
Graph coloring Algorithm
Graph coloring AlgorithmGraph coloring Algorithm
Graph coloring Algorithm
 
Some New Families on H-Cordial Graphs
Some New Families on H-Cordial GraphsSome New Families on H-Cordial Graphs
Some New Families on H-Cordial Graphs
 
A linear algorithm for the grundy number of a tree
A linear algorithm for the grundy number of a treeA linear algorithm for the grundy number of a tree
A linear algorithm for the grundy number of a tree
 
Au2419291933
Au2419291933Au2419291933
Au2419291933
 
Stochastic Processes Homework Help
Stochastic Processes Homework Help Stochastic Processes Homework Help
Stochastic Processes Homework Help
 
Graph coloring problem
Graph coloring problemGraph coloring problem
Graph coloring problem
 
Abir project
Abir projectAbir project
Abir project
 

More from Heman Pathak

Interconnection Network
Interconnection NetworkInterconnection Network
Interconnection NetworkHeman Pathak
 
Central processing unit
Central processing unitCentral processing unit
Central processing unitHeman Pathak
 
Registers and counters
Registers and countersRegisters and counters
Registers and countersHeman Pathak
 
Sequential Circuit
Sequential CircuitSequential Circuit
Sequential CircuitHeman Pathak
 
Combinational logic 2
Combinational logic 2Combinational logic 2
Combinational logic 2Heman Pathak
 
Combinational logic 1
Combinational logic 1Combinational logic 1
Combinational logic 1Heman Pathak
 
Simplification of Boolean Function
Simplification of Boolean FunctionSimplification of Boolean Function
Simplification of Boolean FunctionHeman Pathak
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesHeman Pathak
 
Chapter 7: Matrix Multiplication
Chapter 7: Matrix MultiplicationChapter 7: Matrix Multiplication
Chapter 7: Matrix MultiplicationHeman Pathak
 
Elementary Parallel Algorithms
Elementary Parallel AlgorithmsElementary Parallel Algorithms
Elementary Parallel AlgorithmsHeman Pathak
 
Chapter 5: Mapping and Scheduling
Chapter  5: Mapping and SchedulingChapter  5: Mapping and Scheduling
Chapter 5: Mapping and SchedulingHeman Pathak
 
Cost optimal algorithm
Cost optimal algorithmCost optimal algorithm
Cost optimal algorithmHeman Pathak
 
Chapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming LanguagesChapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming LanguagesHeman Pathak
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel AlgorithmsHeman Pathak
 
Chapter 1 - introduction - parallel computing
Chapter  1 - introduction - parallel computingChapter  1 - introduction - parallel computing
Chapter 1 - introduction - parallel computingHeman Pathak
 

More from Heman Pathak (15)

Interconnection Network
Interconnection NetworkInterconnection Network
Interconnection Network
 
Central processing unit
Central processing unitCentral processing unit
Central processing unit
 
Registers and counters
Registers and countersRegisters and counters
Registers and counters
 
Sequential Circuit
Sequential CircuitSequential Circuit
Sequential Circuit
 
Combinational logic 2
Combinational logic 2Combinational logic 2
Combinational logic 2
 
Combinational logic 1
Combinational logic 1Combinational logic 1
Combinational logic 1
 
Simplification of Boolean Function
Simplification of Boolean FunctionSimplification of Boolean Function
Simplification of Boolean Function
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic Gates
 
Chapter 7: Matrix Multiplication
Chapter 7: Matrix MultiplicationChapter 7: Matrix Multiplication
Chapter 7: Matrix Multiplication
 
Elementary Parallel Algorithms
Elementary Parallel AlgorithmsElementary Parallel Algorithms
Elementary Parallel Algorithms
 
Chapter 5: Mapping and Scheduling
Chapter  5: Mapping and SchedulingChapter  5: Mapping and Scheduling
Chapter 5: Mapping and Scheduling
 
Cost optimal algorithm
Cost optimal algorithmCost optimal algorithm
Cost optimal algorithm
 
Chapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming LanguagesChapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming Languages
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 
Chapter 1 - introduction - parallel computing
Chapter  1 - introduction - parallel computingChapter  1 - introduction - parallel computing
Chapter 1 - introduction - parallel computing
 

Recently uploaded

SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 

Recently uploaded (20)

SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 

Graph Coloring Problem Explained

  • 1. By Dr. Heman Pathak Associate Professor Dept.of Comp. Sc. KGC - Dehradun
  • 2.  A graph G is a pair(V, E) of a set of vertices V and a set of edges E.  The edges are unordered pairs of the form(i, j) where i, j∈V.  Two vertices i and j are said to be adjacent if and only if (i, j)∈E and non-adjacent otherwise.  Assume that a graph has n vertices.  A graph can be represented by an Adjacency Matrix n X n. 2 GRAPH COLORING
  • 4.  The graph coloring problem is an assignment of colors to the vertices such that no two adjacent vertices are assigned the same color.  A k-coloring of a graph G is a coloring of G using k colors. 4 THE GRAPH COLORING PROBLEM
  • 5. 5 THE GRAPH COLORING PROBLEM Colours (C) Vertices (n) Combinations 1 1 1 1 2 1 1 3 1 2 1 2 2 2 4 2 3 8 3 1 3 3 2 9 3 3 27 In general Cn Combinations for C color and n Vertices
  • 6.  No. of Vertices : n  No of Colors : C  Graph : A[n][n]  Possible Solutions : Cn  No. of PEs required : Cn  P(i0,i1,i2,………….in-1) : corresponds to a coloring of vertex 0 with i0, a coloring of vertex 1 with i1,…………..and a coloring of vertex n-1 with in-1.  Each PE initially sets its value in the n dimensional candidate array to 1. THE GRAPH COLORING PROBLEM 6
  • 7.  It then spend (n2)time determining whether, for the particular assignment of color to vertices it represents, two adjacent vertices have been given the same color.  If A[j,k] = 1 and ij = ik, then the coloring is not valid.  If PE detects invalid coloring, it sets it candidate to 0.  If after n2 comparisons its candidate array is still 1, then coloring is valid.  By summing over Cn elements in the candidate array, it can be determined whether there exists a valid coloring or not. THE GRAPH COLORING PROBLEM 7
  • 8. THE GRAPH COLORING PROBLEM 8 V0 V1 V2 V0 0 1 0 V1 1 0 1 V2 0 1 0
  • 9. THE GRAPH COLORING PROBLEM 9
  • 10. THE GRAPH COLORING PROBLEM  It takes (log 𝐶 𝑛) steps to spawn 𝐶 𝑛 PEs  Every processor executes the doubly-nested for loops in (n2).  Summing the 𝐶 𝑛 elements of answer requires (log 𝐶 𝑛) using 𝐶 𝑛 PEs  Overall complexity of the algorithm is (n2 + 𝒍𝒐𝒈 𝑪 𝒏) = (n2 + 𝒏 𝒍𝒐𝒈 𝑪)  Because c<n then complexity reduces to (n2). 10