SlideShare a Scribd company logo
1 of 21
NP-Complete
Problems
Dr. C.V. Suresh Babu
•

Problems that
What if aCross the Line
problem has:
o An exponential upper bound
o A polynomial lower bound

• We have only found exponential algorithms, so it
appears to be intractable.
• But... we can’t prove that an exponential solution
is needed, we can’t prove that a polynomial
algorithm cannot be developed, so we can’t say
the problem is intractable...
•

NP-Complete
The upper bound suggests the
Problems
problem is intractable

• The lower bound suggests the
problem is tractable
• The lower bound is linear: O(N)
• They are all reducible to each other
o If we find a reasonable algorithm
(or prove intractability) for one,
then we can do it for all of them!
Traveling Salesman
5-Clique
Hamiltonian Path
Map Coloring
Vertex Cover (VC)
• Given a graph and an integer k, is there a
collection of k vertices such that each edge is
connected to one of the vertices in the collection?
•

Class
With N teachers with certain hour
Scheduling
restrictions M classes to be scheduled,
Problem
can we:
o Schedule all the classes
o Make sure that no two teachers teach
the same class at the same time
o No teacher is scheduled to teach two
classes at once
Pair Programming Problem
• With N students and K projects, where N is
even, can we:
o Assign pairs of students to each project
o Every student works on every project
o No student has the same partner more
than once

• Is this an NP-complete problem?
Graph isomorphism
• Graph isomorphism is NP-hard; is it NP-complete?
NP and P
• What is NP?
• NP is the set of all decision problems (question with yesor-no answer) for which the 'yes'-answers can be verified
in polynomial time (O(n^k) where n is the problem size,
and k is a constant) by a deterministic Turing machine.
Polynomial time is sometimes used as the definition of
fast or quickly.
• What is P?
• P is the set of all decision problems which can be solved
in polynomial time by a deterministic Turing machine.
Since it can solve in polynomial time, it can also be
verified in polynomial time. Therefore P is a subset of NP.
NP-Complete
• What is NP-Complete?
• A problem x that is in NP is also in NP-Complete if
and only if every other problem in NP can be
quickly (ie. in polynomial time) transformed into x. In
other words:
• x is in NP, and
• Every problem in NP is reducible to x
• So what makes NP-Complete so interesting is that if
any one of the NP-Complete problems was to be
solved quickly then all NP problems can be solved
quickly
NP-Hard
• What is NP-Hard?
• NP-Hard are problems that are at least as hard as
the hardest problems in NP. Note that NP-Complete
problems are also NP-hard. However not all NP-hard
problems are NP (or even a decision problem),
despite having 'NP' as a prefix. That is the NP in NPhard does not mean 'non-deterministic polynomial
time'. Yes this is confusing but its usage is
entrenched and unlikely to change.
Certifi
cates

• Returning true: in order to show that the
schedule can be made, we only have
to show one schedule that works
o This is called a certificate.
• Returning false: in order to show that the
schedule cannot be made, we must
test all schedules.
Oracles
• If we could make the ‘right decision’ at all
decision points, then we can determine
whether a solution is possible very quickly!
o If the found solution is valid, then True
o If the found solution is invalid, then False

• If we could find the certificates quickly, NPcomplete problems would become tractable –
O(N)
• This (magic) process that can always make
the right guess is called an Oracle.
Determinism vs.
Nondeterminism
• Nondeterministic algorithms produce an
answer by a series of “correct guesses”
• Deterministic algorithms (like those that a
computer executes) make decisions based
on information.
NP-Complete
“NP-Complete” comes from:
o Nondeterministic Polynomial
o Complete - “Solve one, Solve them all”
There are more NP-Complete problems than
provably intractable problems.
Proving NPCompleteness
• Show that the problem is in NP. (i.e. Show that a
certificate can be verified in polynomial time.)
• Assume it is not NP complete
• Show how to convert an existing NPC problem
into the problem that we are trying to show is NP
Complete (in polynomial time).
• If we can do it we’ve done the proof!
• Why?
• If we can turn an exisiting NP-complete problem
into our problem in polynomial time... →←
Become Famous!
To get famous in a hurry, for any NPComplete problem:
o Raise the lower bound
(via a stronger proof)
o Lower the upper bound
(via a better algorithm)
They’ll be naming buildings after you
before you are dead!
Np complete

More Related Content

What's hot

Np completeness
Np completenessNp completeness
Np completenessRajendran
 
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycleBacktracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cyclevarun arora
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of AlgorithmsSwapnil Agrawal
 
Randomized Algorithms
Randomized AlgorithmsRandomized Algorithms
Randomized AlgorithmsKetan Kamra
 
Machine Learning: Introduction to Neural Networks
Machine Learning: Introduction to Neural NetworksMachine Learning: Introduction to Neural Networks
Machine Learning: Introduction to Neural NetworksFrancesco Collova'
 
Algorithm chapter 10
Algorithm chapter 10Algorithm chapter 10
Algorithm chapter 10chidabdu
 
Bruteforce algorithm
Bruteforce algorithmBruteforce algorithm
Bruteforce algorithmRezwan Siam
 
Greedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack ProblemGreedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack ProblemMadhu Bala
 
Binary Class and Multi Class Strategies for Machine Learning
Binary Class and Multi Class Strategies for Machine LearningBinary Class and Multi Class Strategies for Machine Learning
Binary Class and Multi Class Strategies for Machine LearningPaxcel Technologies
 
Rabin karp string matching algorithm
Rabin karp string matching algorithmRabin karp string matching algorithm
Rabin karp string matching algorithmGajanand Sharma
 

What's hot (20)

np complete
np completenp complete
np complete
 
Greedy Algorithms
Greedy AlgorithmsGreedy Algorithms
Greedy Algorithms
 
5.1 greedy
5.1 greedy5.1 greedy
5.1 greedy
 
String matching algorithms
String matching algorithmsString matching algorithms
String matching algorithms
 
Np completeness
Np completenessNp completeness
Np completeness
 
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycleBacktracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of Algorithms
 
Daa notes 3
Daa notes 3Daa notes 3
Daa notes 3
 
Randomized Algorithms
Randomized AlgorithmsRandomized Algorithms
Randomized Algorithms
 
Graph coloring problem
Graph coloring problemGraph coloring problem
Graph coloring problem
 
Tsp is NP-Complete
Tsp is NP-CompleteTsp is NP-Complete
Tsp is NP-Complete
 
Machine Learning: Introduction to Neural Networks
Machine Learning: Introduction to Neural NetworksMachine Learning: Introduction to Neural Networks
Machine Learning: Introduction to Neural Networks
 
Algorithm chapter 10
Algorithm chapter 10Algorithm chapter 10
Algorithm chapter 10
 
Divide and conquer
Divide and conquerDivide and conquer
Divide and conquer
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
 
Bruteforce algorithm
Bruteforce algorithmBruteforce algorithm
Bruteforce algorithm
 
Greedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack ProblemGreedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack Problem
 
Binary Class and Multi Class Strategies for Machine Learning
Binary Class and Multi Class Strategies for Machine LearningBinary Class and Multi Class Strategies for Machine Learning
Binary Class and Multi Class Strategies for Machine Learning
 
Rabin karp string matching algorithm
Rabin karp string matching algorithmRabin karp string matching algorithm
Rabin karp string matching algorithm
 
Backtracking
Backtracking  Backtracking
Backtracking
 

Viewers also liked

Introduction to NP Completeness
Introduction to NP CompletenessIntroduction to NP Completeness
Introduction to NP CompletenessGene Moo Lee
 
lecture 28
lecture 28lecture 28
lecture 28sajinsc
 
Social Piggybacking: Leveraging Common Friends to Generate Event Streams
Social Piggybacking: Leveraging Common Friends to Generate Event StreamsSocial Piggybacking: Leveraging Common Friends to Generate Event Streams
Social Piggybacking: Leveraging Common Friends to Generate Event StreamsMarco Serafini
 
Efficient Primary-Backup replication on top of consensus
Efficient Primary-Backup replication on top of consensusEfficient Primary-Backup replication on top of consensus
Efficient Primary-Backup replication on top of consensusMarco Serafini
 
Réplication des bases de données
Réplication des bases de donnéesRéplication des bases de données
Réplication des bases de donnéessie92
 
Réplication de base de données oracle avec Golden Gate
Réplication de base de données oracle avec Golden GateRéplication de base de données oracle avec Golden Gate
Réplication de base de données oracle avec Golden GateMor THIAM
 
Introduction au datamining, concepts et techniques
Introduction au datamining, concepts et techniquesIntroduction au datamining, concepts et techniques
Introduction au datamining, concepts et techniquesIsmail CHAIB
 
Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Kalyan Acharjya
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial DomainDEEPASHRI HK
 
The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017LinkedIn
 

Viewers also liked (17)

Vertex cover Problem
Vertex cover ProblemVertex cover Problem
Vertex cover Problem
 
Randomized Algorithm
Randomized AlgorithmRandomized Algorithm
Randomized Algorithm
 
Introduction to NP Completeness
Introduction to NP CompletenessIntroduction to NP Completeness
Introduction to NP Completeness
 
lecture 28
lecture 28lecture 28
lecture 28
 
Lexical
LexicalLexical
Lexical
 
P vs NP
P vs NPP vs NP
P vs NP
 
Las clases P NP y NP completo
Las clases P NP y NP completoLas clases P NP y NP completo
Las clases P NP y NP completo
 
P vs NP
P vs NPP vs NP
P vs NP
 
Social Piggybacking: Leveraging Common Friends to Generate Event Streams
Social Piggybacking: Leveraging Common Friends to Generate Event StreamsSocial Piggybacking: Leveraging Common Friends to Generate Event Streams
Social Piggybacking: Leveraging Common Friends to Generate Event Streams
 
Efficient Primary-Backup replication on top of consensus
Efficient Primary-Backup replication on top of consensusEfficient Primary-Backup replication on top of consensus
Efficient Primary-Backup replication on top of consensus
 
P versus NP
P versus NPP versus NP
P versus NP
 
Réplication des bases de données
Réplication des bases de donnéesRéplication des bases de données
Réplication des bases de données
 
Réplication de base de données oracle avec Golden Gate
Réplication de base de données oracle avec Golden GateRéplication de base de données oracle avec Golden Gate
Réplication de base de données oracle avec Golden Gate
 
Introduction au datamining, concepts et techniques
Introduction au datamining, concepts et techniquesIntroduction au datamining, concepts et techniques
Introduction au datamining, concepts et techniques
 
Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017
 

Similar to Np complete (20)

PNP.pptx
PNP.pptxPNP.pptx
PNP.pptx
 
PNP.pptx
PNP.pptxPNP.pptx
PNP.pptx
 
Np complete
Np completeNp complete
Np complete
 
UNIT-V.ppt
UNIT-V.pptUNIT-V.ppt
UNIT-V.ppt
 
AA ppt9107
AA ppt9107AA ppt9107
AA ppt9107
 
P np & np completeness
P np & np completenessP np & np completeness
P np & np completeness
 
CSE680-17NP-Complete.pptx
CSE680-17NP-Complete.pptxCSE680-17NP-Complete.pptx
CSE680-17NP-Complete.pptx
 
NP-Completeness-myppt.pptx
NP-Completeness-myppt.pptxNP-Completeness-myppt.pptx
NP-Completeness-myppt.pptx
 
lecture 27
lecture 27lecture 27
lecture 27
 
teteuueieoeofhfhfjffkkkfkfflflflhshssnnvmvvmvv,v,v,nnxmxxm
teteuueieoeofhfhfjffkkkfkfflflflhshssnnvmvvmvv,v,v,nnxmxxmteteuueieoeofhfhfjffkkkfkfflflflhshssnnvmvvmvv,v,v,nnxmxxm
teteuueieoeofhfhfjffkkkfkfflflflhshssnnvmvvmvv,v,v,nnxmxxm
 
Complexity theory
Complexity theory Complexity theory
Complexity theory
 
Basic_concepts_NP_Hard_NP_Complete.pdf
Basic_concepts_NP_Hard_NP_Complete.pdfBasic_concepts_NP_Hard_NP_Complete.pdf
Basic_concepts_NP_Hard_NP_Complete.pdf
 
lect5-1.ppt
lect5-1.pptlect5-1.ppt
lect5-1.ppt
 
CNIT 141: 9. Hard Problems
CNIT 141: 9. Hard ProblemsCNIT 141: 9. Hard Problems
CNIT 141: 9. Hard Problems
 
Teori pnp
Teori pnpTeori pnp
Teori pnp
 
CNIT 141 9. Hard Problems
CNIT 141 9. Hard ProblemsCNIT 141 9. Hard Problems
CNIT 141 9. Hard Problems
 
Np completeness h4
Np completeness  h4Np completeness  h4
Np completeness h4
 
DAA.pdf
DAA.pdfDAA.pdf
DAA.pdf
 
DAA.pdf
DAA.pdfDAA.pdf
DAA.pdf
 
Np Completeness
Np CompletenessNp Completeness
Np Completeness
 

More from Dr. C.V. Suresh Babu (20)

Data analytics with R
Data analytics with RData analytics with R
Data analytics with R
 
Association rules
Association rulesAssociation rules
Association rules
 
Clustering
ClusteringClustering
Clustering
 
Classification
ClassificationClassification
Classification
 
Blue property assumptions.
Blue property assumptions.Blue property assumptions.
Blue property assumptions.
 
Introduction to regression
Introduction to regressionIntroduction to regression
Introduction to regression
 
DART
DARTDART
DART
 
Mycin
MycinMycin
Mycin
 
Expert systems
Expert systemsExpert systems
Expert systems
 
Dempster shafer theory
Dempster shafer theoryDempster shafer theory
Dempster shafer theory
 
Bayes network
Bayes networkBayes network
Bayes network
 
Bayes' theorem
Bayes' theoremBayes' theorem
Bayes' theorem
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
 
Rule based system
Rule based systemRule based system
Rule based system
 
Formal Logic in AI
Formal Logic in AIFormal Logic in AI
Formal Logic in AI
 
Production based system
Production based systemProduction based system
Production based system
 
Game playing in AI
Game playing in AIGame playing in AI
Game playing in AI
 
Diagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AIDiagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AI
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”
 

Recently uploaded

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
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
 
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
 
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
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
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
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Recently uploaded (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
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)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
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
 
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)
 
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
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
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!
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
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...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

Np complete

  • 2. • Problems that What if aCross the Line problem has: o An exponential upper bound o A polynomial lower bound • We have only found exponential algorithms, so it appears to be intractable. • But... we can’t prove that an exponential solution is needed, we can’t prove that a polynomial algorithm cannot be developed, so we can’t say the problem is intractable...
  • 3. • NP-Complete The upper bound suggests the Problems problem is intractable • The lower bound suggests the problem is tractable • The lower bound is linear: O(N) • They are all reducible to each other o If we find a reasonable algorithm (or prove intractability) for one, then we can do it for all of them!
  • 8. Vertex Cover (VC) • Given a graph and an integer k, is there a collection of k vertices such that each edge is connected to one of the vertices in the collection?
  • 9. • Class With N teachers with certain hour Scheduling restrictions M classes to be scheduled, Problem can we: o Schedule all the classes o Make sure that no two teachers teach the same class at the same time o No teacher is scheduled to teach two classes at once
  • 10. Pair Programming Problem • With N students and K projects, where N is even, can we: o Assign pairs of students to each project o Every student works on every project o No student has the same partner more than once • Is this an NP-complete problem?
  • 11. Graph isomorphism • Graph isomorphism is NP-hard; is it NP-complete?
  • 12. NP and P • What is NP? • NP is the set of all decision problems (question with yesor-no answer) for which the 'yes'-answers can be verified in polynomial time (O(n^k) where n is the problem size, and k is a constant) by a deterministic Turing machine. Polynomial time is sometimes used as the definition of fast or quickly. • What is P? • P is the set of all decision problems which can be solved in polynomial time by a deterministic Turing machine. Since it can solve in polynomial time, it can also be verified in polynomial time. Therefore P is a subset of NP.
  • 13. NP-Complete • What is NP-Complete? • A problem x that is in NP is also in NP-Complete if and only if every other problem in NP can be quickly (ie. in polynomial time) transformed into x. In other words: • x is in NP, and • Every problem in NP is reducible to x • So what makes NP-Complete so interesting is that if any one of the NP-Complete problems was to be solved quickly then all NP problems can be solved quickly
  • 14. NP-Hard • What is NP-Hard? • NP-Hard are problems that are at least as hard as the hardest problems in NP. Note that NP-Complete problems are also NP-hard. However not all NP-hard problems are NP (or even a decision problem), despite having 'NP' as a prefix. That is the NP in NPhard does not mean 'non-deterministic polynomial time'. Yes this is confusing but its usage is entrenched and unlikely to change.
  • 15. Certifi cates • Returning true: in order to show that the schedule can be made, we only have to show one schedule that works o This is called a certificate. • Returning false: in order to show that the schedule cannot be made, we must test all schedules.
  • 16. Oracles • If we could make the ‘right decision’ at all decision points, then we can determine whether a solution is possible very quickly! o If the found solution is valid, then True o If the found solution is invalid, then False • If we could find the certificates quickly, NPcomplete problems would become tractable – O(N) • This (magic) process that can always make the right guess is called an Oracle.
  • 17. Determinism vs. Nondeterminism • Nondeterministic algorithms produce an answer by a series of “correct guesses” • Deterministic algorithms (like those that a computer executes) make decisions based on information.
  • 18. NP-Complete “NP-Complete” comes from: o Nondeterministic Polynomial o Complete - “Solve one, Solve them all” There are more NP-Complete problems than provably intractable problems.
  • 19. Proving NPCompleteness • Show that the problem is in NP. (i.e. Show that a certificate can be verified in polynomial time.) • Assume it is not NP complete • Show how to convert an existing NPC problem into the problem that we are trying to show is NP Complete (in polynomial time). • If we can do it we’ve done the proof! • Why? • If we can turn an exisiting NP-complete problem into our problem in polynomial time... →←
  • 20. Become Famous! To get famous in a hurry, for any NPComplete problem: o Raise the lower bound (via a stronger proof) o Lower the upper bound (via a better algorithm) They’ll be naming buildings after you before you are dead!