SlideShare a Scribd company logo
Complexity Classes
SURYA V
ROLL NO:20
Complexity Classes
Complexity Class is a set of problems with related complexity. These classes
help scientists in classifying difficulties according to the amount of time and
space needed to solve problems and verify the solutions.
TYPES OF COMPLEXITY CLASSES
 P Class
 NP Class
 NP-hard
 NP-complete
P Class
 The P in the P class stands for Polynomial Time. It is the collection of decision
problems(problems with a “yes” or “no” answer) that can be solved by a deterministic
machine (our computers) in polynomial time.
Features
 The solution to P problems is easy to find.
 P is often a class of computational problems that are solvable and tractable. Tractable
means that the problems can be solved in theory as well as in practice. But the
problems that can be solved in theory but not in practice are known as intractable.
Example:
 Merge sort
 Finding the maximum matching.
 Calculating the greatest common divisor.
NP Class
 The NP in NP class stands for Non-deterministic Polynomial Time. It is the collection of decision
problems that can be solved by a non-deterministic machine (note that our computers are
deterministic) in polynomial time.
Features:
 The solutions of the NP class might be hard to find since they are being solved by a non-deterministic
machine but the solutions are easy to verify.
 Problems of NP can be verified by a deterministic machine in polynomial time.
Example:
 Boolean Satisfiability Problem (SAT).
 Hamiltonian Path Problem.
 Graph coloring.
NP-Hard
An NP-hard problem is at least as hard as the hardest problem in NP and it is a class of problems such
that every problem in NP reduces to NP-hard.
Features:
 All NP-hard problems are not in NP.
 It takes a long time to check them. This means if a solution for an NP-hard problem is given then it
takes a long time to check whether it is right or not.
 A problem A is in NP-hard if, for every problem L in NP, there exists a polynomial-time reduction from L
to A.
Example:
 Halting problem.
 Qualified Boolean formulas.
 No Hamiltonian cycle.
NP-Complete
 NP-complete problems are a subset of the larger class of NP (nondeterministic polynomial time)
problems. NP problems are a class of computational problems that can be solved in polynomial time
by a non-deterministic machine and can be verified in polynomial time by a deterministic Machine. A
problem L in NP is NP-complete if all other problems in NP can be reduced to L in polynomial time. If
any NP-complete problem can be solved in polynomial time, then every problem in NP can be solved
in polynomial time.
Example:
 Hamiltonian Cycle.
 Satisfiability.
 Vertex cover
Complexity Classes.pptxfhasfuhaikfuahikhk

More Related Content

PPTX
Introduction to Computational Complexity Theory pptx
PPTX
Np Completeness
PDF
UNIT -IV DAA.pdf
PDF
Algorithm chapter 10
PPT
lecture 27
PPTX
AA ppt9107
PPTX
P np & np completeness
PDF
Complexity Class of Algorithm for Beginner
Introduction to Computational Complexity Theory pptx
Np Completeness
UNIT -IV DAA.pdf
Algorithm chapter 10
lecture 27
AA ppt9107
P np & np completeness
Complexity Class of Algorithm for Beginner

Similar to Complexity Classes.pptxfhasfuhaikfuahikhk (20)

PPT
PPT
lecture 28
PPTX
PDF
teteuueieoeofhfhfjffkkkfkfflflflhshssnnvmvvmvv,v,v,nnxmxxm
PPT
Complexity theory
PDF
UNIT-V.pdf daa unit material 5 th unit ppt
PPT
NP-Completeewwwwwwwwwwwkkjjejjwjjjjjjjjj
PDF
P versus NP
PDF
9. chapter 8 np hard and np complete problems
PPT
PDF
P, NP, NP-Hard & NP-complete problems, Optimization
PPT
PPTX
DAA_Hard_Problems_(4th_Sem).pptxxxxxxxxx
PPTX
UNIT-V.pptx-big data notes-ccs334anna university syllabus
PPT
class23.ppt
PPT
Np completeness h4
PPTX
NP completeness
PPTX
Algorithm Design and Complexity - Course 6
lecture 28
teteuueieoeofhfhfjffkkkfkfflflflhshssnnvmvvmvv,v,v,nnxmxxm
Complexity theory
UNIT-V.pdf daa unit material 5 th unit ppt
NP-Completeewwwwwwwwwwwkkjjejjwjjjjjjjjj
P versus NP
9. chapter 8 np hard and np complete problems
P, NP, NP-Hard & NP-complete problems, Optimization
DAA_Hard_Problems_(4th_Sem).pptxxxxxxxxx
UNIT-V.pptx-big data notes-ccs334anna university syllabus
class23.ppt
Np completeness h4
NP completeness
Algorithm Design and Complexity - Course 6
Ad

More from abhinandpk2405 (20)

PDF
compiler.pdfljdvgepitju4io3elkhldhyreyio4uw
PDF
process.pdfzljwiyrouyaeutoaetodtusiokklhh
PDF
threads (1).pdfmjlkjfwjgliwiufuaiusyroayr
PPTX
2.Cache Memory.pptxoigeyu49-gasdihurovhvhd;oig
PPTX
Controlling I.pptxkosgpwoywpooiptiewpito
PPTX
linux unit 4 (2).pptxjiy8t7r7iguyguyy888
PPTX
LINUX M1 P4 notes.pptxgyfdes e4e4e54v 4
PPTX
Linux unit 2 part 3 notes.pptxl;lk;l; k
PPTX
randomaccess.pptxdfghjkoigyrsreuitttrdok
PPTX
Command line arguments & This keyword.pptx
PPTX
Efficiency,Perfomance& (1)studyhihhu.pptx
PPTX
Marketing Strategyyguigiuiiiguooogu.pptx
PPTX
Raid structure os.pptxmbj;fdjhlljtzejtjdfi
PPTX
QueueUsingArray-1.pptxnansbsbssnsnxbxbhs
PDF
Microprocessor module 4.pdfbabssbabanjxnsb
PPTX
KERNEL_I[1].pptxhbffffgbbbbbggg ffffvbbbhhhm
PPTX
ssosnnnnnnnnlkkkkkkkkkkkkkkkkkkkkkk.pptx
PPTX
Types of Operating Systemdddddddddd.pptx
PPTX
hhtp (3).pptx hyper text transfer protocol
PPTX
topologies abhi.pptxtopologiessssssssssd
compiler.pdfljdvgepitju4io3elkhldhyreyio4uw
process.pdfzljwiyrouyaeutoaetodtusiokklhh
threads (1).pdfmjlkjfwjgliwiufuaiusyroayr
2.Cache Memory.pptxoigeyu49-gasdihurovhvhd;oig
Controlling I.pptxkosgpwoywpooiptiewpito
linux unit 4 (2).pptxjiy8t7r7iguyguyy888
LINUX M1 P4 notes.pptxgyfdes e4e4e54v 4
Linux unit 2 part 3 notes.pptxl;lk;l; k
randomaccess.pptxdfghjkoigyrsreuitttrdok
Command line arguments & This keyword.pptx
Efficiency,Perfomance& (1)studyhihhu.pptx
Marketing Strategyyguigiuiiiguooogu.pptx
Raid structure os.pptxmbj;fdjhlljtzejtjdfi
QueueUsingArray-1.pptxnansbsbssnsnxbxbhs
Microprocessor module 4.pdfbabssbabanjxnsb
KERNEL_I[1].pptxhbffffgbbbbbggg ffffvbbbhhhm
ssosnnnnnnnnlkkkkkkkkkkkkkkkkkkkkkk.pptx
Types of Operating Systemdddddddddd.pptx
hhtp (3).pptx hyper text transfer protocol
topologies abhi.pptxtopologiessssssssssd
Ad

Recently uploaded (20)

PPTX
Introduction to Building Materials
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
My India Quiz Book_20210205121199924.pdf
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
1_English_Language_Set_2.pdf probationary
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Computer Architecture Input Output Memory.pptx
PDF
HVAC Specification 2024 according to central public works department
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
advance database management system book.pdf
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PPTX
History, Philosophy and sociology of education (1).pptx
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Introduction to Building Materials
FORM 1 BIOLOGY MIND MAPS and their schemes
LDMMIA Reiki Yoga Finals Review Spring Summer
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Computing-Curriculum for Schools in Ghana
My India Quiz Book_20210205121199924.pdf
B.Sc. DS Unit 2 Software Engineering.pptx
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
1_English_Language_Set_2.pdf probationary
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Computer Architecture Input Output Memory.pptx
HVAC Specification 2024 according to central public works department
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
advance database management system book.pdf
Share_Module_2_Power_conflict_and_negotiation.pptx
History, Philosophy and sociology of education (1).pptx
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
A powerpoint presentation on the Revised K-10 Science Shaping Paper

Complexity Classes.pptxfhasfuhaikfuahikhk

  • 2. Complexity Classes Complexity Class is a set of problems with related complexity. These classes help scientists in classifying difficulties according to the amount of time and space needed to solve problems and verify the solutions. TYPES OF COMPLEXITY CLASSES  P Class  NP Class  NP-hard  NP-complete
  • 3. P Class  The P in the P class stands for Polynomial Time. It is the collection of decision problems(problems with a “yes” or “no” answer) that can be solved by a deterministic machine (our computers) in polynomial time. Features  The solution to P problems is easy to find.  P is often a class of computational problems that are solvable and tractable. Tractable means that the problems can be solved in theory as well as in practice. But the problems that can be solved in theory but not in practice are known as intractable. Example:  Merge sort  Finding the maximum matching.  Calculating the greatest common divisor.
  • 4. NP Class  The NP in NP class stands for Non-deterministic Polynomial Time. It is the collection of decision problems that can be solved by a non-deterministic machine (note that our computers are deterministic) in polynomial time. Features:  The solutions of the NP class might be hard to find since they are being solved by a non-deterministic machine but the solutions are easy to verify.  Problems of NP can be verified by a deterministic machine in polynomial time. Example:  Boolean Satisfiability Problem (SAT).  Hamiltonian Path Problem.  Graph coloring.
  • 5. NP-Hard An NP-hard problem is at least as hard as the hardest problem in NP and it is a class of problems such that every problem in NP reduces to NP-hard. Features:  All NP-hard problems are not in NP.  It takes a long time to check them. This means if a solution for an NP-hard problem is given then it takes a long time to check whether it is right or not.  A problem A is in NP-hard if, for every problem L in NP, there exists a polynomial-time reduction from L to A. Example:  Halting problem.  Qualified Boolean formulas.  No Hamiltonian cycle.
  • 6. NP-Complete  NP-complete problems are a subset of the larger class of NP (nondeterministic polynomial time) problems. NP problems are a class of computational problems that can be solved in polynomial time by a non-deterministic machine and can be verified in polynomial time by a deterministic Machine. A problem L in NP is NP-complete if all other problems in NP can be reduced to L in polynomial time. If any NP-complete problem can be solved in polynomial time, then every problem in NP can be solved in polynomial time. Example:  Hamiltonian Cycle.  Satisfiability.  Vertex cover