SlideShare une entreprise Scribd logo
1  sur  6
Télécharger pour lire hors ligne
3-Coloring is NP-Complete

• 3-Coloring is in NP
• Certificate: for each node a color from {1, 2, 3}
• Certifier: Check if for each edge (u, v ), the color of u is
different from that of v
• Hardness: We will show 3-SAT ≤P 3-Coloring
Reduction Idea
Start with 3-SAT formula φ with n variables x1 , . . . , xn and m
clauses C1 , . . . , Cm . Create graph Gφ such that Gφ is 3-colorable iff
φ is satisfiable
• need to establish truth assignment for x1 , . . . , xn via colors for

some nodes in Gφ .
• create triangle with node True, False, Base
• for each variable xi two nodes vi and vi connected in a
¯

triangle with common Base
• If graph is 3-colored, either vi or vi gets the same color as
¯

True. Interpret this as a truth assignment to vi
• For each clause Cj = (a ∨ b ∨ c), create a small gadget graph
• gadget graph connects to nodes corresponding to a, b, c
• needs to implement OR
OR-Gadget Graph

Property: if a, b, c are colored False in a 3-coloring then output
node of OR-gadget has to be colored False.
Property: if one of a, b, c is colored True then OR-gadget can be
3-colored such that output node of OR-gadget is colored True.
Reduction

• create triangle with node True, False, Base
• for each variable xi two nodes vi and vi connected in a
¯

triangle with common Base
• for each clause Cj = (a ∨ b ∨ c), add OR-gadget graph with

input nodes a, b, c and connect output node of gadget to both
False and Base
Reduction Outline
Example
ϕ = (u ∨ ¬v ∨ w ) ∧ (v ∨ x ∨ ¬y )
Variable and negation
have complementary
colours
Literals get colour T or F

T

F

Palette

N

OR−gates
~u

u

~v

v

~w

w

~x

x

~y

y
Correctness of Reduction
φ is satisfiable implies Gφ is 3-colorable
• if xi is assigned True, color vi True and vi False
¯
• for each clause Cj = (a ∨ b ∨ c) at least one of a, b, c is

colored True. OR-gadget for Cj can be 3-colored such that
output is True.
Gφ is 3-colorable implies φ is satisfiable
• if vi is colored True then set xi to be True, this is a legal truth

assignment
• consider any clause Cj = (a ∨ b ∨ c). it cannot be that all

a, b, c are False. If so, output of OR-gadget for Cj has to be
colored False but output is connected to Base and False!

Contenu connexe

Tendances

Lsn 11-5: Law of Sines
Lsn 11-5: Law of SinesLsn 11-5: Law of Sines
Lsn 11-5: Law of SinesKate Nowak
 
A demographic timebomb correction
A demographic timebomb correctionA demographic timebomb correction
A demographic timebomb correctionblessedkkr
 
Graphing day 1 worked
Graphing day 1 workedGraphing day 1 worked
Graphing day 1 workedJonna Ramsey
 
Greedy Algorithm - Huffman coding
Greedy Algorithm - Huffman codingGreedy Algorithm - Huffman coding
Greedy Algorithm - Huffman codingMd Monirul Alom
 
Graphing day 2 worked
Graphing day 2 workedGraphing day 2 worked
Graphing day 2 workedJonna Ramsey
 
2.1 graphing quadratic functions
2.1 graphing quadratic functions2.1 graphing quadratic functions
2.1 graphing quadratic functionslothomas
 
Num Integration
Num IntegrationNum Integration
Num Integrationmuhdisys
 
4.5 tan and cot.ppt worked
4.5   tan and cot.ppt worked4.5   tan and cot.ppt worked
4.5 tan and cot.ppt workedJonna Ramsey
 
Triple product of vectors
Triple product of vectorsTriple product of vectors
Triple product of vectorsguest581a478
 
De Bruijn Sequences for Fun and Profit
De Bruijn Sequences for Fun and ProfitDe Bruijn Sequences for Fun and Profit
De Bruijn Sequences for Fun and ProfitAleksandar Bradic
 
Alg II 2-7 Transformations
Alg II 2-7 TransformationsAlg II 2-7 Transformations
Alg II 2-7 Transformationsjtentinger
 
4.5 sec and csc worked 3rd
4.5   sec and csc worked 3rd4.5   sec and csc worked 3rd
4.5 sec and csc worked 3rdJonna Ramsey
 
Alg1 ch0407example5
Alg1 ch0407example5Alg1 ch0407example5
Alg1 ch0407example5amymallory
 
Problem set3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Problem set3 | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurProblem set3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Problem set3 | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurVivekananda Samiti
 
4.7 inverse functions.ppt worked
4.7   inverse functions.ppt worked4.7   inverse functions.ppt worked
4.7 inverse functions.ppt workedJonna Ramsey
 
Exercício para leitura de cifras 3
Exercício para leitura de cifras 3Exercício para leitura de cifras 3
Exercício para leitura de cifras 3Bordoeseprimas
 

Tendances (19)

Lsn 11-5: Law of Sines
Lsn 11-5: Law of SinesLsn 11-5: Law of Sines
Lsn 11-5: Law of Sines
 
A demographic timebomb correction
A demographic timebomb correctionA demographic timebomb correction
A demographic timebomb correction
 
Graphing day 1 worked
Graphing day 1 workedGraphing day 1 worked
Graphing day 1 worked
 
P13 019
P13 019P13 019
P13 019
 
Day 3 examples
Day 3 examplesDay 3 examples
Day 3 examples
 
Greedy Algorithm - Huffman coding
Greedy Algorithm - Huffman codingGreedy Algorithm - Huffman coding
Greedy Algorithm - Huffman coding
 
Graphing day 2 worked
Graphing day 2 workedGraphing day 2 worked
Graphing day 2 worked
 
2.1 graphing quadratic functions
2.1 graphing quadratic functions2.1 graphing quadratic functions
2.1 graphing quadratic functions
 
Num Integration
Num IntegrationNum Integration
Num Integration
 
4.5 tan and cot.ppt worked
4.5   tan and cot.ppt worked4.5   tan and cot.ppt worked
4.5 tan and cot.ppt worked
 
Triple product of vectors
Triple product of vectorsTriple product of vectors
Triple product of vectors
 
De Bruijn Sequences for Fun and Profit
De Bruijn Sequences for Fun and ProfitDe Bruijn Sequences for Fun and Profit
De Bruijn Sequences for Fun and Profit
 
Alg II 2-7 Transformations
Alg II 2-7 TransformationsAlg II 2-7 Transformations
Alg II 2-7 Transformations
 
4.5 sec and csc worked 3rd
4.5   sec and csc worked 3rd4.5   sec and csc worked 3rd
4.5 sec and csc worked 3rd
 
Alg1 ch0407example5
Alg1 ch0407example5Alg1 ch0407example5
Alg1 ch0407example5
 
Problem set3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Problem set3 | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurProblem set3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Problem set3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
 
4.7 inverse functions.ppt worked
4.7   inverse functions.ppt worked4.7   inverse functions.ppt worked
4.7 inverse functions.ppt worked
 
18 inmo_03
18  inmo_0318  inmo_03
18 inmo_03
 
Exercício para leitura de cifras 3
Exercício para leitura de cifras 3Exercício para leitura de cifras 3
Exercício para leitura de cifras 3
 

En vedette (18)

Embedded
EmbeddedEmbedded
Embedded
 
Firewall
FirewallFirewall
Firewall
 
Classical cryptography1
Classical cryptography1Classical cryptography1
Classical cryptography1
 
Des1
Des1Des1
Des1
 
Slides cao
Slides caoSlides cao
Slides cao
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
C sharp notes
C sharp notesC sharp notes
C sharp notes
 
Cloudcomputingit703 130915004442-phpapp01
Cloudcomputingit703 130915004442-phpapp01Cloudcomputingit703 130915004442-phpapp01
Cloudcomputingit703 130915004442-phpapp01
 
i_os_development_environment
i_os_development_environmenti_os_development_environment
i_os_development_environment
 
Android ax app wcf
Android ax app wcfAndroid ax app wcf
Android ax app wcf
 
3 a. hil climbing
3 a. hil climbing3 a. hil climbing
3 a. hil climbing
 
Caqa5e ch1 with_review_and_examples
Caqa5e ch1 with_review_and_examplesCaqa5e ch1 with_review_and_examples
Caqa5e ch1 with_review_and_examples
 
Sp800 94.pdf
Sp800 94.pdfSp800 94.pdf
Sp800 94.pdf
 
Alifeofinspiration nelsonmandela1918-2013-131205232125-phpapp02
Alifeofinspiration nelsonmandela1918-2013-131205232125-phpapp02Alifeofinspiration nelsonmandela1918-2013-131205232125-phpapp02
Alifeofinspiration nelsonmandela1918-2013-131205232125-phpapp02
 
Nelson Mandela
Nelson Mandela Nelson Mandela
Nelson Mandela
 
Advanced databases -client /server arch
Advanced databases -client /server archAdvanced databases -client /server arch
Advanced databases -client /server arch
 
Aes
AesAes
Aes
 
Owasp top 10
Owasp top 10Owasp top 10
Owasp top 10
 

Similaire à coloring method

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政謙 陳
 
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
 
BFS, Breadth first search | Search Traversal Algorithm
BFS, Breadth first search | Search Traversal AlgorithmBFS, Breadth first search | Search Traversal Algorithm
BFS, Breadth first search | Search Traversal AlgorithmMSA Technosoft
 
Ass. (3)graph d.m
Ass. (3)graph d.mAss. (3)graph d.m
Ass. (3)graph d.mSyed Umair
 
2008 worldfinalsproblemset
2008 worldfinalsproblemset2008 worldfinalsproblemset
2008 worldfinalsproblemsetLuca Zannini
 
Skiena algorithm 2007 lecture20 satisfiability
Skiena algorithm 2007 lecture20 satisfiabilitySkiena algorithm 2007 lecture20 satisfiability
Skiena algorithm 2007 lecture20 satisfiabilityzukun
 
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
 

Similaire à coloring method (20)

Programming Exam Help
Programming Exam Help Programming Exam Help
Programming Exam Help
 
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
 
Lecture-9.pptx
Lecture-9.pptxLecture-9.pptx
Lecture-9.pptx
 
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
 
Computer Science Assignment Help
Computer Science Assignment Help Computer Science Assignment Help
Computer Science Assignment Help
 
Unit 2: All
Unit 2: AllUnit 2: All
Unit 2: All
 
Algorithms Design Exam Help
Algorithms Design Exam HelpAlgorithms Design Exam Help
Algorithms Design Exam Help
 
Algorithms Design Assignment Help
Algorithms Design Assignment HelpAlgorithms Design Assignment Help
Algorithms Design Assignment Help
 
Graphs.pdf
Graphs.pdfGraphs.pdf
Graphs.pdf
 
BFS, Breadth first search | Search Traversal Algorithm
BFS, Breadth first search | Search Traversal AlgorithmBFS, Breadth first search | Search Traversal Algorithm
BFS, Breadth first search | Search Traversal Algorithm
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Ass. (3)graph d.m
Ass. (3)graph d.mAss. (3)graph d.m
Ass. (3)graph d.m
 
2008 worldfinalsproblemset
2008 worldfinalsproblemset2008 worldfinalsproblemset
2008 worldfinalsproblemset
 
FCS (graphs).pptx
FCS (graphs).pptxFCS (graphs).pptx
FCS (graphs).pptx
 
Skiena algorithm 2007 lecture20 satisfiability
Skiena algorithm 2007 lecture20 satisfiabilitySkiena algorithm 2007 lecture20 satisfiability
Skiena algorithm 2007 lecture20 satisfiability
 
Imo 2014
Imo 2014 Imo 2014
Imo 2014
 
Imo2014 sl
Imo2014 slImo2014 sl
Imo2014 sl
 
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
 
NP Complete Problems -- Internship
NP Complete Problems -- InternshipNP Complete Problems -- Internship
NP Complete Problems -- Internship
 
Graphs
GraphsGraphs
Graphs
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Dernier (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

coloring method

  • 1. 3-Coloring is NP-Complete • 3-Coloring is in NP • Certificate: for each node a color from {1, 2, 3} • Certifier: Check if for each edge (u, v ), the color of u is different from that of v • Hardness: We will show 3-SAT ≤P 3-Coloring
  • 2. Reduction Idea Start with 3-SAT formula φ with n variables x1 , . . . , xn and m clauses C1 , . . . , Cm . Create graph Gφ such that Gφ is 3-colorable iff φ is satisfiable • need to establish truth assignment for x1 , . . . , xn via colors for some nodes in Gφ . • create triangle with node True, False, Base • for each variable xi two nodes vi and vi connected in a ¯ triangle with common Base • If graph is 3-colored, either vi or vi gets the same color as ¯ True. Interpret this as a truth assignment to vi • For each clause Cj = (a ∨ b ∨ c), create a small gadget graph • gadget graph connects to nodes corresponding to a, b, c • needs to implement OR
  • 3. OR-Gadget Graph Property: if a, b, c are colored False in a 3-coloring then output node of OR-gadget has to be colored False. Property: if one of a, b, c is colored True then OR-gadget can be 3-colored such that output node of OR-gadget is colored True.
  • 4. Reduction • create triangle with node True, False, Base • for each variable xi two nodes vi and vi connected in a ¯ triangle with common Base • for each clause Cj = (a ∨ b ∨ c), add OR-gadget graph with input nodes a, b, c and connect output node of gadget to both False and Base
  • 5. Reduction Outline Example ϕ = (u ∨ ¬v ∨ w ) ∧ (v ∨ x ∨ ¬y ) Variable and negation have complementary colours Literals get colour T or F T F Palette N OR−gates ~u u ~v v ~w w ~x x ~y y
  • 6. Correctness of Reduction φ is satisfiable implies Gφ is 3-colorable • if xi is assigned True, color vi True and vi False ¯ • for each clause Cj = (a ∨ b ∨ c) at least one of a, b, c is colored True. OR-gadget for Cj can be 3-colored such that output is True. Gφ is 3-colorable implies φ is satisfiable • if vi is colored True then set xi to be True, this is a legal truth assignment • consider any clause Cj = (a ∨ b ∨ c). it cannot be that all a, b, c are False. If so, output of OR-gadget for Cj has to be colored False but output is connected to Base and False!