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

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
 
Approximation algorithms
Approximation algorithmsApproximation algorithms
Approximation algorithmsGanesh Solanke
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemMohammad Imam Hossain
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithmMohd Arif
 
The n Queen Problem
The n Queen ProblemThe n Queen Problem
The n Queen ProblemSukrit Gupta
 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithmsGanesh Solanke
 
Perceptron (neural network)
Perceptron (neural network)Perceptron (neural network)
Perceptron (neural network)EdutechLearners
 
Chess board problem(divide and conquer)
Chess board problem(divide and conquer)Chess board problem(divide and conquer)
Chess board problem(divide and conquer)RASHIARORA8
 
Learning rule of first order rules
Learning rule of first order rulesLearning rule of first order rules
Learning rule of first order rulesswapnac12
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notationsNikhil Sharma
 
sum of subset problem using Backtracking
sum of subset problem using Backtrackingsum of subset problem using Backtracking
sum of subset problem using BacktrackingAbhishek Singh
 

What's hot (20)

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
 
Daa notes 3
Daa notes 3Daa notes 3
Daa notes 3
 
np complete
np completenp complete
np complete
 
Approximation algorithms
Approximation algorithmsApproximation algorithms
Approximation algorithms
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
4.6 halting problem
4.6 halting problem4.6 halting problem
4.6 halting problem
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithm
 
The n Queen Problem
The n Queen ProblemThe n Queen Problem
The n Queen Problem
 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithms
 
Vertex cover Problem
Vertex cover ProblemVertex cover Problem
Vertex cover Problem
 
Perceptron (neural network)
Perceptron (neural network)Perceptron (neural network)
Perceptron (neural network)
 
Chess board problem(divide and conquer)
Chess board problem(divide and conquer)Chess board problem(divide and conquer)
Chess board problem(divide and conquer)
 
Np cooks theorem
Np cooks theoremNp cooks theorem
Np cooks theorem
 
Learning rule of first order rules
Learning rule of first order rulesLearning rule of first order rules
Learning rule of first order rules
 
Complexity of Algorithm
Complexity of AlgorithmComplexity of Algorithm
Complexity of Algorithm
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Np completeness
Np completenessNp completeness
Np completeness
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
sum of subset problem using Backtracking
sum of subset problem using Backtrackingsum of subset problem using Backtracking
sum of subset problem using Backtracking
 
Knapsack problem using fixed tuple
Knapsack problem using fixed tupleKnapsack problem using fixed tuple
Knapsack problem using fixed tuple
 

Viewers also liked

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 (15)

Randomized Algorithm
Randomized AlgorithmRandomized Algorithm
Randomized Algorithm
 
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
 
Algorithm chapter 10
Algorithm chapter 10Algorithm chapter 10
Algorithm chapter 10
 
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
 

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

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
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
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
"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
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
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
 
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
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
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
 
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!
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
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
 
"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
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
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
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
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?
 
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
 
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
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 

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!