What Is Co NP
What Is Co NP
90% Refund @Courses DSA Data Structure Analysis of Algorithms Sorting Searching Greedy Recurs
In computer science, there exist some problems whose solutions are not yet
found, the problems are divided into classes known as Complexity Classes.
In complexity theory, a Complexity Class is a set of problems with related
complexity. These classes help scientists to group problems based on how
much time and space they require to solve problems and verify the solutions.
It is the branch of the theory of computation that deals with the resources
required to solve a problem.
The common resources are time and space, meaning how much time the
algorithm takes to solve a problem and the corresponding memory usage.
We use cookies to ensure you have the best browsing experience on our website. By using
our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Got It !
Policy
https://www.geeksforgeeks.org/types-of-complexity-classes-p-np-conp-np-hard-and-np-complete/?ref=lbp 1/11
13/02/2024, 07:27 P, NP, CoNP, NP hard and NP complete | Complexity Classes - GeeksforGeeks
1. P Class
2. NP Class
3. CoNP Class
4. NP-hard
5. 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 in polynomial time.
Features:
https://www.geeksforgeeks.org/types-of-complexity-classes-p-np-conp-np-hard-and-np-complete/?ref=lbp 2/11
13/02/2024, 07:27 P, NP, CoNP, NP hard and NP complete | Complexity Classes - GeeksforGeeks
well as in practice. But the problems that can be solved in theory but not
in practice are known as intractable.
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 in polynomial time.
Features:
The solutions of the NP class are 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 Turing machine in polynomial time.
Example:
It indicates that if someone can provide us with the solution to the problem,
we can find the correct and incorrect pair in polynomial time. Thus for the NP
class problem, the answer is possible, which can be calculated in polynomial
time.
We use cookies to ensure you have the best browsing experience on our website. By using
our site, you acknowledge that you have read and understood our Cookie Policy & Privacy
Policy
https://www.geeksforgeeks.org/types-of-complexity-classes-p-np-conp-np-hard-and-np-complete/?ref=lbp 3/11
13/02/2024, 07:27 P, NP, CoNP, NP hard and NP complete | Complexity Classes - GeeksforGeeks
This class contains many problems that one would like to be able to solve
effectively:
Co-NP Class
Co-NP stands for the complement of NP Class. It means if the answer to a
problem in Co-NP is No, then there is proof that can be checked in
polynomial time.
Features:
NP-hard class
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:
https://www.geeksforgeeks.org/types-of-complexity-classes-p-np-conp-np-hard-and-np-complete/?ref=lbp 4/11
13/02/2024, 07:27 P, NP, CoNP, NP hard and NP complete | Complexity Classes - GeeksforGeeks
NP-complete class
A problem is NP-complete if it is both NP and NP-hard. NP-complete
problems are the hard problems in NP.
Features:
1. Hamiltonian Cycle.
2. Satisfiability.
3. Vertex cover.
Complexity
Characteristic feature
Class
Feeling lost in the world of random DSA topics, wasting time without
progress? It's time for a change! Join our DSA course, where we'll guide you
We use cookies to ensure you have the best browsing experience on our website. By using
onyou
our site, anacknowledge
exciting journey toread
that you have master DSA efficiently
and understood and&on
our Cookie Policy schedule.
Privacy
Policy
https://www.geeksforgeeks.org/types-of-complexity-classes-p-np-conp-np-hard-and-np-complete/?ref=lbp 5/11
13/02/2024, 07:27 P, NP, CoNP, NP hard and NP complete | Complexity Classes - GeeksforGeeks
Ready to dive in? Explore our Free Demo Content and join our DSA course,
trusted by over 100,000 geeks!
DSA in C++
DSA in Java
DSA in Python
DSA in JavaScript
Recommended Problems
Solve Problems
Frequently asked DSA Problems
Three 90 Challenge ending on 29th Feb! Last chance to get 90% refund by
completing 90% course in 90 days. Explore offer now.
Previous Next
Similar Reads
Introduction to NP-Complete Difference between NP hard and NP
Complexity Classes complete problem
https://www.geeksforgeeks.org/types-of-complexity-classes-p-np-conp-np-hard-and-np-complete/?ref=lbp 6/11
13/02/2024, 07:27 P, NP, CoNP, NP hard and NP complete | Complexity Classes - GeeksforGeeks
Complete Tutorials
Learn Algorithms with Javascript | DSA DSA Crash Course | Revision Checklist
using JavaScript Tutorial with Interview Guide
umng01
Additional Information
We use cookies to ensure you have the best browsing experience on our website. By using
our site, you acknowledge that you have read and understood our Cookie Policy & Privacy
Policy
https://www.geeksforgeeks.org/types-of-complexity-classes-p-np-conp-np-hard-and-np-complete/?ref=lbp 7/11
13/02/2024, 07:27 P, NP, CoNP, NP hard and NP complete | Complexity Classes - GeeksforGeeks
Company Explore
About Us Job-A-Thon Hiring Challenge
Legal Hack-A-Thon
Careers GfG Weekly Contest
In Media Offline Classes (Delhi/NCR)
Contact Us DSA in JAVA/C++
Advertise with us Master System Design
GFG Corporate Solution Master CP
Placement Training Program GeeksforGeeks Videos
Apply for Mentor Geeks Community
Languages DSA
Python Data Structures
Java Algorithms
C++ DSA for Beginners
PHP Basic DSA Problems
GoLang DSA Roadmap
SQL Top 100 DSA Interview Problems
R Language DSA Roadmap by Sandeep Jain
Android Tutorial All Cheat Sheets
Tutorials Archive
https://www.geeksforgeeks.org/types-of-complexity-classes-p-np-conp-np-hard-and-np-complete/?ref=lbp 8/11
13/02/2024, 07:27 P, NP, CoNP, NP hard and NP complete | Complexity Classes - GeeksforGeeks
https://www.geeksforgeeks.org/types-of-complexity-classes-p-np-conp-np-hard-and-np-complete/?ref=lbp 9/11
13/02/2024, 07:27 P, NP, CoNP, NP hard and NP complete | Complexity Classes - GeeksforGeeks
Class 9 Biology
Class 8 Social Science
Complete Study Material English Grammar
https://www.geeksforgeeks.org/types-of-complexity-classes-p-np-conp-np-hard-and-np-complete/?ref=lbp 10/11
13/02/2024, 07:27 P, NP, CoNP, NP hard and NP complete | Complexity Classes - GeeksforGeeks
We use cookies to ensure you have the best browsing experience on our website. By using
our site, you acknowledge that you have read and understood our Cookie Policy & Privacy
Policy
https://www.geeksforgeeks.org/types-of-complexity-classes-p-np-conp-np-hard-and-np-complete/?ref=lbp 11/11