SlideShare a Scribd company logo
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.
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

chapter 1
chapter 1chapter 1
chapter 1
yatheesha
 
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
Priyank Jain
 
Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2
showslidedump
 
Presentation of daa on approximation algorithm and vertex cover problem
Presentation of daa on approximation algorithm and vertex cover problem Presentation of daa on approximation algorithm and vertex cover problem
Presentation of daa on approximation algorithm and vertex cover problem
sumit gyawali
 
BackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and ExamplesBackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and Examples
Fahim Ferdous
 
Graph colouring
Graph colouringGraph colouring
Graph colouring
Priyank Jain
 
All pair shortest path
All pair shortest pathAll pair shortest path
All pair shortest path
Arafat Hossan
 
Complexity of Algorithm
Complexity of AlgorithmComplexity of Algorithm
Complexity of Algorithm
Muhammad Muzammal
 
Asymptotic notation
Asymptotic notationAsymptotic notation
Asymptotic notation
Dr Shashikant Athawale
 
Backtracking Algorithm.ppt
Backtracking Algorithm.pptBacktracking Algorithm.ppt
Backtracking Algorithm.ppt
SalmIbrahimIlyas
 
Graphs in Data Structure
 Graphs in Data Structure Graphs in Data Structure
Graphs in Data Structure
hafsa komal
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of Algorithms
Swapnil Agrawal
 
Graph Coloring and Its Implementation
Graph Coloring and Its ImplementationGraph Coloring and Its Implementation
Graph Coloring and Its Implementation
IJARIIT
 
graph theory
graph theory graph theory
graph theory
ganith2k13
 
Graph coloring using backtracking
Graph coloring using backtrackingGraph coloring using backtracking
Graph coloring using backtracking
shashidharPapishetty
 
9. chapter 8 np hard and np complete problems
9. chapter 8   np hard and np complete problems9. chapter 8   np hard and np complete problems
9. chapter 8 np hard and np complete problems
Jyotsna Suryadevara
 
Backtracking
Backtracking  Backtracking
Backtracking
Vikas Sharma
 
Algorithms Lecture 2: Analysis of Algorithms I
Algorithms Lecture 2: Analysis of Algorithms IAlgorithms Lecture 2: Analysis of Algorithms I
Algorithms Lecture 2: Analysis of Algorithms I
Mohamed Loey
 
NP Complete Problems
NP Complete ProblemsNP Complete Problems
NP Complete Problems
Nikhil Joshi
 
NP completeness
NP completenessNP completeness
NP completeness
Amrinder Arora
 

What's hot (20)

chapter 1
chapter 1chapter 1
chapter 1
 
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
 
Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2
 
Presentation of daa on approximation algorithm and vertex cover problem
Presentation of daa on approximation algorithm and vertex cover problem Presentation of daa on approximation algorithm and vertex cover problem
Presentation of daa on approximation algorithm and vertex cover problem
 
BackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and ExamplesBackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and Examples
 
Graph colouring
Graph colouringGraph colouring
Graph colouring
 
All pair shortest path
All pair shortest pathAll pair shortest path
All pair shortest path
 
Complexity of Algorithm
Complexity of AlgorithmComplexity of Algorithm
Complexity of Algorithm
 
Asymptotic notation
Asymptotic notationAsymptotic notation
Asymptotic notation
 
Backtracking Algorithm.ppt
Backtracking Algorithm.pptBacktracking Algorithm.ppt
Backtracking Algorithm.ppt
 
Graphs in Data Structure
 Graphs in Data Structure Graphs in Data Structure
Graphs in Data Structure
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of Algorithms
 
Graph Coloring and Its Implementation
Graph Coloring and Its ImplementationGraph Coloring and Its Implementation
Graph Coloring and Its Implementation
 
graph theory
graph theory graph theory
graph theory
 
Graph coloring using backtracking
Graph coloring using backtrackingGraph coloring using backtracking
Graph coloring using backtracking
 
9. chapter 8 np hard and np complete problems
9. chapter 8   np hard and np complete problems9. chapter 8   np hard and np complete problems
9. chapter 8 np hard and np complete problems
 
Backtracking
Backtracking  Backtracking
Backtracking
 
Algorithms Lecture 2: Analysis of Algorithms I
Algorithms Lecture 2: Analysis of Algorithms IAlgorithms Lecture 2: Analysis of Algorithms I
Algorithms Lecture 2: Analysis of Algorithms I
 
NP Complete Problems
NP Complete ProblemsNP Complete Problems
NP Complete Problems
 
NP completeness
NP completenessNP completeness
NP completeness
 

Similar to Chromatic Number of a Graph (Graph Colouring)

UNIT-V.pdf daa unit material 5 th unit ppt
UNIT-V.pdf daa unit material 5 th unit pptUNIT-V.pdf daa unit material 5 th unit ppt
UNIT-V.pdf daa unit material 5 th unit ppt
JyoReddy9
 
Analysis and design of algorithms part 4
Analysis and design of algorithms part 4Analysis and design of algorithms part 4
Analysis and design of algorithms part 4
Deepak John
 
Extended online graph edge coloring
Extended online graph edge coloringExtended online graph edge coloring
Extended online graph edge coloring
ijcsa
 
Confidence interval two tail tests-lower bounds upperbounds
Confidence interval two tail tests-lower bounds upperboundsConfidence interval two tail tests-lower bounds upperbounds
Confidence interval two tail tests-lower bounds upperbounds
ssuser3c3f88
 
NP-Completeness - II
NP-Completeness - IINP-Completeness - II
NP-Completeness - II
Amrinder Arora
 
SATISFIABILITY METHODS FOR COLOURING GRAPHS
SATISFIABILITY METHODS FOR COLOURING GRAPHSSATISFIABILITY METHODS FOR COLOURING GRAPHS
SATISFIABILITY METHODS FOR COLOURING GRAPHS
cscpconf
 
Ca notes
Ca notesCa notes
Ca notes
ankitadhoot
 
Webinar : P, NP, NP-Hard , NP - Complete problems
Webinar : P, NP, NP-Hard , NP - Complete problems Webinar : P, NP, NP-Hard , NP - Complete problems
Webinar : P, NP, NP-Hard , NP - Complete problems
Ziyauddin Shaik
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexity
Ankit Katiyar
 
Graph coloring Algorithm
Graph coloring AlgorithmGraph coloring Algorithm
Graph coloring Algorithm
আদনান ফিরোজ
 
Undecidable Problems and Approximation Algorithms
Undecidable Problems and Approximation AlgorithmsUndecidable Problems and Approximation Algorithms
Undecidable Problems and Approximation Algorithms
Muthu Vinayagam
 
Joco pavone
Joco pavoneJoco pavone
Joco pavone
Mario Pavone
 
Algorithm chapter 10
Algorithm chapter 10Algorithm chapter 10
Algorithm chapter 10
chidabdu
 
CS 354 Understanding Color
CS 354 Understanding ColorCS 354 Understanding Color
CS 354 Understanding Color
Mark Kilgard
 
Combinatorial Optimization
Combinatorial OptimizationCombinatorial Optimization
Combinatorial Optimization
Institute of Technology, Nirma University
 
Internship
InternshipInternship
NP Complete Problems in Graph Theory
NP Complete Problems in Graph TheoryNP Complete Problems in Graph Theory
NP Complete Problems in Graph Theory
Seshagiri Rao Kornepati
 
class23.ppt
class23.pptclass23.ppt
class23.ppt
AjayPratap828815
 
Computability - Tractable, Intractable and Non-computable Function
Computability - Tractable, Intractable and Non-computable FunctionComputability - Tractable, Intractable and Non-computable Function
Computability - Tractable, Intractable and Non-computable Function
Reggie Niccolo Santos
 
bcfbedbf-6679-4d5d-b8a5-7d4c9c48dba4.pptx
bcfbedbf-6679-4d5d-b8a5-7d4c9c48dba4.pptxbcfbedbf-6679-4d5d-b8a5-7d4c9c48dba4.pptx
bcfbedbf-6679-4d5d-b8a5-7d4c9c48dba4.pptx
B.T.L.I.T
 

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

UNIT-V.pdf daa unit material 5 th unit ppt
UNIT-V.pdf daa unit material 5 th unit pptUNIT-V.pdf daa unit material 5 th unit ppt
UNIT-V.pdf daa unit material 5 th unit ppt
 
Analysis and design of algorithms part 4
Analysis and design of algorithms part 4Analysis and design of algorithms part 4
Analysis and design of algorithms part 4
 
Extended online graph edge coloring
Extended online graph edge coloringExtended online graph edge coloring
Extended online graph edge coloring
 
Confidence interval two tail tests-lower bounds upperbounds
Confidence interval two tail tests-lower bounds upperboundsConfidence interval two tail tests-lower bounds upperbounds
Confidence interval two tail tests-lower bounds upperbounds
 
NP-Completeness - II
NP-Completeness - IINP-Completeness - II
NP-Completeness - II
 
SATISFIABILITY METHODS FOR COLOURING GRAPHS
SATISFIABILITY METHODS FOR COLOURING GRAPHSSATISFIABILITY METHODS FOR COLOURING GRAPHS
SATISFIABILITY METHODS FOR COLOURING GRAPHS
 
Ca notes
Ca notesCa notes
Ca notes
 
Webinar : P, NP, NP-Hard , NP - Complete problems
Webinar : P, NP, NP-Hard , NP - Complete problems Webinar : P, NP, NP-Hard , NP - Complete problems
Webinar : P, NP, NP-Hard , NP - Complete problems
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexity
 
Graph coloring Algorithm
Graph coloring AlgorithmGraph coloring Algorithm
Graph coloring Algorithm
 
Undecidable Problems and Approximation Algorithms
Undecidable Problems and Approximation AlgorithmsUndecidable Problems and Approximation Algorithms
Undecidable Problems and Approximation Algorithms
 
Joco pavone
Joco pavoneJoco pavone
Joco pavone
 
Algorithm chapter 10
Algorithm chapter 10Algorithm chapter 10
Algorithm chapter 10
 
CS 354 Understanding Color
CS 354 Understanding ColorCS 354 Understanding Color
CS 354 Understanding Color
 
Combinatorial Optimization
Combinatorial OptimizationCombinatorial Optimization
Combinatorial Optimization
 
Internship
InternshipInternship
Internship
 
NP Complete Problems in Graph Theory
NP Complete Problems in Graph TheoryNP Complete Problems in Graph Theory
NP Complete Problems in Graph Theory
 
class23.ppt
class23.pptclass23.ppt
class23.ppt
 
Computability - Tractable, Intractable and Non-computable Function
Computability - Tractable, Intractable and Non-computable FunctionComputability - Tractable, Intractable and Non-computable Function
Computability - Tractable, Intractable and Non-computable Function
 
bcfbedbf-6679-4d5d-b8a5-7d4c9c48dba4.pptx
bcfbedbf-6679-4d5d-b8a5-7d4c9c48dba4.pptxbcfbedbf-6679-4d5d-b8a5-7d4c9c48dba4.pptx
bcfbedbf-6679-4d5d-b8a5-7d4c9c48dba4.pptx
 

Recently uploaded

2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
VANDANAMOHANGOUDA
 
People as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimalaPeople as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimala
riddhimaagrawal986
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
Atif Razi
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
GauravCar
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
architagupta876
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
gowrishankartb2005
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
ydzowc
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
LAXMAREDDY22
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 

Recently uploaded (20)

2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
 
People as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimalaPeople as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimala
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 

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.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 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