SlideShare a Scribd company logo
1 of 13
Rimsha Tabusam
Kiran Ashfaq
Anwal
P-NP & NP Completeness
P & NP
P
P is a set of all decision
problems which can be solved
in polynomial time by a
deterministic turning machine.
since it can be solve in
polynomial time, it can also be
verified In polynomial time.
Therefore P is a subset of NP.
NP
NP is a set of all decision
problems(questions with
YES/NO answer).These
Algorithms are non-
deterministic but take
polynomial time.
Deterministic & non-deterministic
Each and every statement how it works we know it clearly. we
write the statements we are sure how they work.
We don’t know how they are working.
So how we can write. Produced an
answer by a series of “correct guesses.
Polynomial Time:
The time required for a computer to solve a problem, where this
time is a simple polynomial function of the size of the input.
Expontial Time:
Exponential time. An algorithm is said to be exponential time, if
T(n) is upper bounded by 2, where poly(n) is some polynomial in n.
... Sometimes, exponential time is used to refer to algorithms that
have T(n) = 2, where the exponent is at most a linear function of n.
Polynomial Time Expontial Time
P is shown as subset of NP
The deterministic algorithms
(we know today) is the part
of non-deterministic
algorithms.
Satisfiability
A Boolean expression is in conjunctive normal form if it is the
conjunction of a set of clauses, each of which is the disjunction of a set
of literals, each of these being either a variable or the negation of a
variable. ... However, CNF-SAT, the collection of satisfiable
CNF expressions, is NP-complete.
Reduction
A reduction is an algorithm for transforming one
problem into another problem. A reduction from one
problem to another may be used to show that the
second problem is at least as difficult as the first.
NP-hard & NP-Completeness
A problem is NP-complete if any
problem in NP can be reduced to it in
polynomial time AND it is also in NP(and
thus solutions can be verified in
polynomial time). In other words, the set
of NP-complete problems is the set
formed by the intersection
of NP and NP-hard. ... However, not
all NP-Hard problems are NP-Complete.
NP-Complete
NP-Complete comes from
1.Non-Deterministic polynomial
2.Complete-”Solve one Solve them all”
There is more NP-Complete problems than provably intractable
problem.
P-NP ,NP-Complete, NP-Hard
P-NP ,NP-Complete, NP-Hard

More Related Content

What's hot (20)

Longest Common Subsequence
Longest Common SubsequenceLongest Common Subsequence
Longest Common Subsequence
 
Longest Common Subsequence
Longest Common SubsequenceLongest Common Subsequence
Longest Common Subsequence
 
9. chapter 8 np hard and np complete problems
9. chapter 8   np hard and np complete problems9. chapter 8   np hard and np complete problems
9. chapter 8 np hard and np complete problems
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
Job sequencing with deadline
Job sequencing with deadlineJob sequencing with deadline
Job sequencing with deadline
 
Big O Notation
Big O NotationBig O Notation
Big O Notation
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of Algorithms
 
Sum of subset problem.pptx
Sum of subset problem.pptxSum of subset problem.pptx
Sum of subset problem.pptx
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
 
Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic Notations
 
Knapsack Problem
Knapsack ProblemKnapsack Problem
Knapsack Problem
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Np hard
Np hardNp hard
Np hard
 
Np completeness
Np completenessNp completeness
Np completeness
 
sum of subset problem using Backtracking
sum of subset problem using Backtrackingsum of subset problem using Backtracking
sum of subset problem using Backtracking
 
Introduction to dynamic programming
Introduction to dynamic programmingIntroduction to dynamic programming
Introduction to dynamic programming
 
Tsp is NP-Complete
Tsp is NP-CompleteTsp is NP-Complete
Tsp is NP-Complete
 
Backtracking
Backtracking  Backtracking
Backtracking
 

Similar to P np & np completeness

Similar to P np & np completeness (20)

UNIT -IV DAA.pdf
UNIT  -IV DAA.pdfUNIT  -IV DAA.pdf
UNIT -IV DAA.pdf
 
lecture 28
lecture 28lecture 28
lecture 28
 
AA ppt9107
AA ppt9107AA ppt9107
AA ppt9107
 
UNIT-V.pdf daa unit material 5 th unit ppt
UNIT-V.pdf daa unit material 5 th unit pptUNIT-V.pdf daa unit material 5 th unit ppt
UNIT-V.pdf daa unit material 5 th unit ppt
 
class23.ppt
class23.pptclass23.ppt
class23.ppt
 
CSE680-17NP-Complete.pptx
CSE680-17NP-Complete.pptxCSE680-17NP-Complete.pptx
CSE680-17NP-Complete.pptx
 
Algorithm chapter 10
Algorithm chapter 10Algorithm chapter 10
Algorithm chapter 10
 
PNP.pptx
PNP.pptxPNP.pptx
PNP.pptx
 
PNP.pptx
PNP.pptxPNP.pptx
PNP.pptx
 
NP completeness
NP completenessNP completeness
NP completeness
 
P versus NP
P versus NPP versus NP
P versus NP
 
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
 
Np Completeness
Np CompletenessNp Completeness
Np Completeness
 
lecture 27
lecture 27lecture 27
lecture 27
 
Teori pnp
Teori pnpTeori pnp
Teori pnp
 
teteuueieoeofhfhfjffkkkfkfflflflhshssnnvmvvmvv,v,v,nnxmxxm
teteuueieoeofhfhfjffkkkfkfflflflhshssnnvmvvmvv,v,v,nnxmxxmteteuueieoeofhfhfjffkkkfkfflflflhshssnnvmvvmvv,v,v,nnxmxxm
teteuueieoeofhfhfjffkkkfkfflflflhshssnnvmvvmvv,v,v,nnxmxxm
 
Complexity theory
Complexity theory Complexity theory
Complexity theory
 
Np complete
Np completeNp complete
Np complete
 
P vs NP
P vs NP P vs NP
P vs NP
 
lect5-1.ppt
lect5-1.pptlect5-1.ppt
lect5-1.ppt
 

More from Anwal Mirza

Training & development
Training & developmentTraining & development
Training & developmentAnwal Mirza
 
Training and dev
Training and devTraining and dev
Training and devAnwal Mirza
 
Testing and selection
Testing and selectionTesting and selection
Testing and selectionAnwal Mirza
 
Strategic planning
Strategic planningStrategic planning
Strategic planningAnwal Mirza
 
Hci scanrio-exercise
Hci scanrio-exerciseHci scanrio-exercise
Hci scanrio-exerciseAnwal Mirza
 
Hci user interface-design principals
Hci user interface-design principalsHci user interface-design principals
Hci user interface-design principalsAnwal Mirza
 
Hci user interface-design principals lec 7
Hci user interface-design principals lec 7Hci user interface-design principals lec 7
Hci user interface-design principals lec 7Anwal Mirza
 
Hci user centered design 11
Hci user centered design 11Hci user centered design 11
Hci user centered design 11Anwal Mirza
 
Hci lec 1 & 2
Hci lec 1 & 2Hci lec 1 & 2
Hci lec 1 & 2Anwal Mirza
 
Hci interace affects the user lec 8
Hci interace affects the user lec 8Hci interace affects the user lec 8
Hci interace affects the user lec 8Anwal Mirza
 
Hci evaluationa frame work lec 14
Hci evaluationa frame work lec 14Hci evaluationa frame work lec 14
Hci evaluationa frame work lec 14Anwal Mirza
 
Hci design collaboration lec 9 10
Hci  design collaboration lec 9 10Hci  design collaboration lec 9 10
Hci design collaboration lec 9 10Anwal Mirza
 

More from Anwal Mirza (20)

Training & development
Training & developmentTraining & development
Training & development
 
Training and dev
Training and devTraining and dev
Training and dev
 
Testing and selection
Testing and selectionTesting and selection
Testing and selection
 
Strategic planning
Strategic planningStrategic planning
Strategic planning
 
Recruitment
RecruitmentRecruitment
Recruitment
 
Job analysis
Job analysisJob analysis
Job analysis
 
Interviewing
Interviewing Interviewing
Interviewing
 
Hrm ppt ch. 01
Hrm ppt ch. 01Hrm ppt ch. 01
Hrm ppt ch. 01
 
Hrm challenges
Hrm challengesHrm challenges
Hrm challenges
 
Firstpage
FirstpageFirstpage
Firstpage
 
Hci scanrio-exercise
Hci scanrio-exerciseHci scanrio-exercise
Hci scanrio-exercise
 
Hci user interface-design principals
Hci user interface-design principalsHci user interface-design principals
Hci user interface-design principals
 
Hci user interface-design principals lec 7
Hci user interface-design principals lec 7Hci user interface-design principals lec 7
Hci user interface-design principals lec 7
 
Hci user centered design 11
Hci user centered design 11Hci user centered design 11
Hci user centered design 11
 
Hci lec 5,6
Hci lec 5,6Hci lec 5,6
Hci lec 5,6
 
Hci lec 4
Hci lec 4Hci lec 4
Hci lec 4
 
Hci lec 1 & 2
Hci lec 1 & 2Hci lec 1 & 2
Hci lec 1 & 2
 
Hci interace affects the user lec 8
Hci interace affects the user lec 8Hci interace affects the user lec 8
Hci interace affects the user lec 8
 
Hci evaluationa frame work lec 14
Hci evaluationa frame work lec 14Hci evaluationa frame work lec 14
Hci evaluationa frame work lec 14
 
Hci design collaboration lec 9 10
Hci  design collaboration lec 9 10Hci  design collaboration lec 9 10
Hci design collaboration lec 9 10
 

Recently uploaded

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 

Recently uploaded (20)

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 

P np & np completeness

  • 2. P-NP & NP Completeness
  • 3. P & NP P P is a set of all decision problems which can be solved in polynomial time by a deterministic turning machine. since it can be solve in polynomial time, it can also be verified In polynomial time. Therefore P is a subset of NP. NP NP is a set of all decision problems(questions with YES/NO answer).These Algorithms are non- deterministic but take polynomial time.
  • 4. Deterministic & non-deterministic Each and every statement how it works we know it clearly. we write the statements we are sure how they work. We don’t know how they are working. So how we can write. Produced an answer by a series of “correct guesses.
  • 5. Polynomial Time: The time required for a computer to solve a problem, where this time is a simple polynomial function of the size of the input. Expontial Time: Exponential time. An algorithm is said to be exponential time, if T(n) is upper bounded by 2, where poly(n) is some polynomial in n. ... Sometimes, exponential time is used to refer to algorithms that have T(n) = 2, where the exponent is at most a linear function of n.
  • 7. P is shown as subset of NP The deterministic algorithms (we know today) is the part of non-deterministic algorithms.
  • 8. Satisfiability A Boolean expression is in conjunctive normal form if it is the conjunction of a set of clauses, each of which is the disjunction of a set of literals, each of these being either a variable or the negation of a variable. ... However, CNF-SAT, the collection of satisfiable CNF expressions, is NP-complete.
  • 9. Reduction A reduction is an algorithm for transforming one problem into another problem. A reduction from one problem to another may be used to show that the second problem is at least as difficult as the first.
  • 10. NP-hard & NP-Completeness A problem is NP-complete if any problem in NP can be reduced to it in polynomial time AND it is also in NP(and thus solutions can be verified in polynomial time). In other words, the set of NP-complete problems is the set formed by the intersection of NP and NP-hard. ... However, not all NP-Hard problems are NP-Complete.
  • 11. NP-Complete NP-Complete comes from 1.Non-Deterministic polynomial 2.Complete-”Solve one Solve them all” There is more NP-Complete problems than provably intractable problem.