SlideShare a Scribd company logo
5
Most read
12
Most read
16
Most read
DAA
PRESENTATION
BY
YASH BRID 2019130008
ABHISHEK CHOPRA 2019130009
ADWAIT HEGDE 2019130019
DECISION PROBLEM
CHROMATIC NUMBER
CHROMATIC NUMBER IS THE MINIMUM NUMBER
OF COLORS REQUIRED TO COLOR ANY GRAPH
SUCH THAT NO TWO ADJACENT VERTICES OF IT
ARE ASSIGNED THE SAME COLOR.
PROBLEM STATEMENT
What are NP Problems?
NP is set of decision problems whose solutions are hard to find but easy to verify and
can be solved by a Non-deterministic Turing Machine in Polynomial time.
A Non-deterministic Turing Machine is a theoretical model of computation whose
governing rules specify more than one possible action when in some given situations i.e.
the set of rules of a Non-deterministic Turing Machine may prescribe more than one
action to be performed for any given situation.
A problem X is NP-Complete if there is an NP problem Y, such that Y is reducible to X in
polynomial time. NP-Complete problems can be solved by a Non-deterministic Turing
Machine in polynomial time.
What is a Non-deterministic Turing Machine?
What is a NP-Complete problem?
PROBLEM DEFINITION
What is a NP-Hard Problem?
Satisfiability with at most 3 literals per clause.
Reduction to NP-Hard problem is possible
It is a reduction from 3-SAT.
The complexity class of decision problems that are intrinsically harder than those that
can be solved by a nondeterministic Turing machine in polynomial time. When a decision
version of a combinatorial optimization problem is proved to belong to the class of NP-
complete problems, then the optimization version is NP-hard.
Therefore, it is a NP-Hard Problem.
Why is CNDP a NP-Hard Problem?
Graph Colouring: Graph Coloring is the process of assigning colors to the vertices of a
graph such that no two adjacent vertices of it are assigned the same
color.
THEORY
Chromatic number: Chromatic Number is the minimum number of colors required
to color any graph such that no two adjacent vertices of it are
assigned the same color.
Example:
ALGORITHM
Create a recursive function that takes current index, number of vertices and output
color array.
If the current index is equal to number of vertices. Check if the output color
configuration is safe.
If the conditions are met, print the configuration and break.
Assign color to a vertex (1 to m).
For every assigned color recursively call the function with next index and number of
vertices.
If any recursive function returns true break the loop and return true.
There are quite a few ways in which we can solve the Chromatic Number Decision
Problem (CNDP), backtracking and naive are two of them.
Naive:
1.
2.
3.
4.
5.
6.
Create a recursive function that takes the graph, current index, number of vertices
and output color array.
If the current index is equal to number of vertices. Print the color configuration in
output array.
Assign color to a vertex (1 to m).
For every assigned color, check if the configuration is safe, recursively call the
function with next index and number of vertices.
If any recursive function returns true break the loop and return true
If no recusive function returns true then return false.
Backtracking:
1.
2.
3.
4.
5.
6.
Chromatic Number of a Graph (Graph Colouring)
Chromatic Number of a Graph (Graph Colouring)
Chromatic Number of a Graph (Graph Colouring)
Chromatic Number of a Graph (Graph Colouring)
Chromatic Number of a Graph (Graph Colouring)
SOME EXAMPLES
APPLICATION
Map Colouring
Sudoku
Register Allocation
Time Table Scheduling
Mobile Radio Frequency
MAP COLOURING
Four colors are sufficient
to color any map
We place a vertex in each
region
4-coloring thereom
Fill in the blank
cells so that each
row, column and
box has the
characters 1 to 9
exactly once
SUDOKU
How do we schedule the
exam so that no two exams
with a common student
are scheduled at same
time?
How many minimum time
slots are needed to
schedule all exams?
TIMETABLE MAKING
CNDP is an np-hard problem
NP-hard are still under research,
so until these are found one will
have to use the algorithm with
exponential time complexity
(naive/backtracking)
CONCLUSION
REFERENCES
Proof: http://cs.bme.hu/thalg/3sat-to-3col.pdf
https://www.kodnest.com/free-online-courses/algorithm-
2/lessons/graph-coloring/
https://www.youtube.com/watch?v=e2cF8a5aAhE
QUESTIONS
Chromatic Number of a Graph (Graph Colouring)

More Related Content

What's hot (20)

PPTX
AVL Tree in Data Structure
Vrushali Dhanokar
 
PPTX
implementation of travelling salesman problem with complexity ppt
AntaraBhattacharya12
 
PPTX
Algorithm analysis (All in one)
jehan1987
 
PDF
9. chapter 8 np hard and np complete problems
Jyotsna Suryadevara
 
PPTX
Greedy Algorithm - Knapsack Problem
Madhu Bala
 
PPTX
Isomorphic graph
umair khan
 
PPT
Planning
ahmad bassiouny
 
PPTX
Propositional logic
Rushdi Shams
 
PPTX
Euler graph
AAQIB PARREY
 
PPTX
State Space Search and Control Strategies in Artificial Intelligence.pptx
RSAISHANKAR
 
PPTX
Graph coloring problem(DAA).pptx
Home
 
PPT
Np cooks theorem
Narayana Galla
 
PPTX
Local search algorithm
Megha Sharma
 
PDF
Search problems in Artificial Intelligence
ananth
 
PPTX
Problem reduction AND OR GRAPH & AO* algorithm.ppt
arunsingh660
 
PPT
Heuristic Search Techniques Unit -II.ppt
karthikaparthasarath
 
PDF
P, NP, NP-Complete, and NP-Hard
Animesh Chaturvedi
 
PDF
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
vikas dhakane
 
PDF
State Space Search in ai
vikas dhakane
 
PPTX
Daa unit 1
Abhimanyu Mishra
 
AVL Tree in Data Structure
Vrushali Dhanokar
 
implementation of travelling salesman problem with complexity ppt
AntaraBhattacharya12
 
Algorithm analysis (All in one)
jehan1987
 
9. chapter 8 np hard and np complete problems
Jyotsna Suryadevara
 
Greedy Algorithm - Knapsack Problem
Madhu Bala
 
Isomorphic graph
umair khan
 
Planning
ahmad bassiouny
 
Propositional logic
Rushdi Shams
 
Euler graph
AAQIB PARREY
 
State Space Search and Control Strategies in Artificial Intelligence.pptx
RSAISHANKAR
 
Graph coloring problem(DAA).pptx
Home
 
Np cooks theorem
Narayana Galla
 
Local search algorithm
Megha Sharma
 
Search problems in Artificial Intelligence
ananth
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
arunsingh660
 
Heuristic Search Techniques Unit -II.ppt
karthikaparthasarath
 
P, NP, NP-Complete, and NP-Hard
Animesh Chaturvedi
 
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
vikas dhakane
 
State Space Search in ai
vikas dhakane
 
Daa unit 1
Abhimanyu Mishra
 

Similar to Chromatic Number of a Graph (Graph Colouring) (20)

PPT
Graph Coloring : Greedy Algorithm & Welsh Powell Algorithm
Priyank Jain
 
PPTX
graph coloring back tracking and applications in realA time.pptx
jhansirani64003
 
PPTX
DAA_Hard_Problems_(4th_Sem).pptxxxxxxxxx
rishabhgndu2023
 
PDF
UNIT-V.pdf daa unit material 5 th unit ppt
JyoReddy9
 
PDF
Analysis and design of algorithms part 4
Deepak John
 
PDF
Extended online graph edge coloring
ijcsa
 
PPTX
NP completeness
Amrinder Arora
 
PPT
Confidence interval two tail tests-lower bounds upperbounds
ssuser3c3f88
 
PPTX
NP-Completeness - II
Amrinder Arora
 
PDF
SATISFIABILITY METHODS FOR COLOURING GRAPHS
cscpconf
 
DOCX
Ca notes
ankitadhoot
 
PPTX
Webinar : P, NP, NP-Hard , NP - Complete problems
Ziyauddin Shaik
 
DOC
Time and space complexity
Ankit Katiyar
 
PPT
Backtracking
Vikas Sharma
 
PPTX
Graph coloring Algorithm
আদনান ফিরোজ
 
PPTX
Undecidable Problems and Approximation Algorithms
Muthu Vinayagam
 
PDF
Joco pavone
Mario Pavone
 
PDF
Algorithm chapter 10
chidabdu
 
PPT
CS 354 Understanding Color
Mark Kilgard
 
PPTX
Combinatorial Optimization
Institute of Technology, Nirma University
 
Graph Coloring : Greedy Algorithm & Welsh Powell Algorithm
Priyank Jain
 
graph coloring back tracking and applications in realA time.pptx
jhansirani64003
 
DAA_Hard_Problems_(4th_Sem).pptxxxxxxxxx
rishabhgndu2023
 
UNIT-V.pdf daa unit material 5 th unit ppt
JyoReddy9
 
Analysis and design of algorithms part 4
Deepak John
 
Extended online graph edge coloring
ijcsa
 
NP completeness
Amrinder Arora
 
Confidence interval two tail tests-lower bounds upperbounds
ssuser3c3f88
 
NP-Completeness - II
Amrinder Arora
 
SATISFIABILITY METHODS FOR COLOURING GRAPHS
cscpconf
 
Ca notes
ankitadhoot
 
Webinar : P, NP, NP-Hard , NP - Complete problems
Ziyauddin Shaik
 
Time and space complexity
Ankit Katiyar
 
Backtracking
Vikas Sharma
 
Graph coloring Algorithm
আদনান ফিরোজ
 
Undecidable Problems and Approximation Algorithms
Muthu Vinayagam
 
Joco pavone
Mario Pavone
 
Algorithm chapter 10
chidabdu
 
CS 354 Understanding Color
Mark Kilgard
 
Combinatorial Optimization
Institute of Technology, Nirma University
 
Ad

Recently uploaded (20)

PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPTX
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
PPTX
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
PPTX
Green Building & Energy Conservation ppt
Sagar Sarangi
 
PDF
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
PPTX
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
PDF
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
PDF
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PPTX
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
PDF
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
PPTX
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
PPTX
Day2 B2 Best.pptx
helenjenefa1
 
PPT
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
Green Building & Energy Conservation ppt
Sagar Sarangi
 
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
Day2 B2 Best.pptx
helenjenefa1
 
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
Ad

Chromatic Number of a Graph (Graph Colouring)

  • 1. DAA PRESENTATION BY YASH BRID 2019130008 ABHISHEK CHOPRA 2019130009 ADWAIT HEGDE 2019130019
  • 2. DECISION PROBLEM CHROMATIC NUMBER CHROMATIC NUMBER IS THE MINIMUM NUMBER OF COLORS REQUIRED TO COLOR ANY GRAPH SUCH THAT NO TWO ADJACENT VERTICES OF IT ARE ASSIGNED THE SAME COLOR. PROBLEM STATEMENT
  • 3. What are NP Problems? NP is set of decision problems whose solutions are hard to find but easy to verify and can be solved by a Non-deterministic Turing Machine in Polynomial time. A Non-deterministic Turing Machine is a theoretical model of computation whose governing rules specify more than one possible action when in some given situations i.e. the set of rules of a Non-deterministic Turing Machine may prescribe more than one action to be performed for any given situation. A problem X is NP-Complete if there is an NP problem Y, such that Y is reducible to X in polynomial time. NP-Complete problems can be solved by a Non-deterministic Turing Machine in polynomial time. What is a Non-deterministic Turing Machine? What is a NP-Complete problem? PROBLEM DEFINITION
  • 4. What is a NP-Hard Problem? Satisfiability with at most 3 literals per clause. Reduction to NP-Hard problem is possible It is a reduction from 3-SAT. The complexity class of decision problems that are intrinsically harder than those that can be solved by a nondeterministic Turing machine in polynomial time. When a decision version of a combinatorial optimization problem is proved to belong to the class of NP- complete problems, then the optimization version is NP-hard. Therefore, it is a NP-Hard Problem. Why is CNDP a NP-Hard Problem?
  • 5. Graph Colouring: Graph Coloring is the process of assigning colors to the vertices of a graph such that no two adjacent vertices of it are assigned the same color. THEORY Chromatic number: Chromatic Number is the minimum number of colors required to color any graph such that no two adjacent vertices of it are assigned the same color. Example:
  • 6. ALGORITHM Create a recursive function that takes current index, number of vertices and output color array. If the current index is equal to number of vertices. Check if the output color configuration is safe. If the conditions are met, print the configuration and break. Assign color to a vertex (1 to m). For every assigned color recursively call the function with next index and number of vertices. If any recursive function returns true break the loop and return true. There are quite a few ways in which we can solve the Chromatic Number Decision Problem (CNDP), backtracking and naive are two of them. Naive: 1. 2. 3. 4. 5. 6.
  • 7. Create a recursive function that takes the graph, current index, number of vertices and output color array. If the current index is equal to number of vertices. Print the color configuration in output array. Assign color to a vertex (1 to m). For every assigned color, check if the configuration is safe, recursively call the function with next index and number of vertices. If any recursive function returns true break the loop and return true If no recusive function returns true then return false. Backtracking: 1. 2. 3. 4. 5. 6.
  • 14. APPLICATION Map Colouring Sudoku Register Allocation Time Table Scheduling Mobile Radio Frequency
  • 15. MAP COLOURING Four colors are sufficient to color any map We place a vertex in each region 4-coloring thereom
  • 16. Fill in the blank cells so that each row, column and box has the characters 1 to 9 exactly once SUDOKU
  • 17. How do we schedule the exam so that no two exams with a common student are scheduled at same time? How many minimum time slots are needed to schedule all exams? TIMETABLE MAKING
  • 18. CNDP is an np-hard problem NP-hard are still under research, so until these are found one will have to use the algorithm with exponential time complexity (naive/backtracking) CONCLUSION