SlideShare una empresa de Scribd logo
1 de 6
Descargar para leer sin conexión
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!

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado (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
 

Similar a 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
 

Similar a 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
 

Último

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Último (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

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!