Open dummy-co-der opened 3 years ago
Hello @dummy-co-der,
Thank you for opening an issue. :octocat:
Note - Self-assigns by the original author will be prioritised by mentors manually
To get assigned to this particular issue please use /assign
Check this guide before contributing.
/assign
This issue has been assigned to @dummy-co-der! It will become unassigned if it isn't closed within 12 days. A maintainer can also add the pinned label to prevent it from being unassigned.
@vasu-1 kindly review this and do the needful !
you can work on this issue but make sure that this should not be any duplicate !
NP Completeness
If a polynomial time algorithm exists for any of these problems, all problems in NP would be polynomial time solvable. These problems are called NP-complete. The phenomenon of NP-completeness is important for both theoretical and practical reasons.
NP is the set of alll decision problems (question with yes-or-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.
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.
A problem B that is in NP is also in NP-Complete if and only if every other problem in NP can be quickly (i.e. in polynomial time) transformed into x.
In other words a language B is NP-complete if it satisfies two conditions:- 1) B is in NP 2) Every problem in NP is reducible to B. If a language satisfies the second property, but not necessarily the first one, the language B is known as NP-Hard Informally, a search problem B is NP-Hard if there exists some NP-Complete problem A that Turing reduces to B. The problem in NP-Hard cannot be solved in polynomial time, until P = NP.
NP-complete problems are the hardest problems in the NP set. A decision problem L is NP-complete if:
1) L is in NP
2) Every problem in NP is reducible to L in polynomial time
If a problem is proved to be NPC, there is no need to waste time on trying to find an efficient algorithm for it.
Instead, we can focus on design approximation algorithm.
Following are some NP-Complete problems, for which no polynomial time algorithm is known. 1) Determining whether a graph has a Hamiltonian cycle 2) Determining whether a Boolean formula is satisfiable, etc.
NP-Hard are problems that are at least as hard as the hardest problems in NP. 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 NP-hard does not mean 'non-deterministic polynomial time.'
The following problems are NP-Hard 1) The circuit-satisfiability problem 2) Set Cover 3) Vertex Cover 4) Travelling Salesman Problem
@vasu-1 Kindly review!
Please Make the Pr for the same !
@vasu-1 kindly review PR #8306
7874