Assuming P != NP
The euler diagram shows a part not part of P and NP-complete. I read on wikipedia that this set is called NP-Intermediate.
Euler Diagram
I have some doubts as to how are NPI problems defined?
An NP-intermediate problem is a decision problem that
is in NP (that is, "yes" answers can be verified in polynomial time),
is not in P (that is, there is no polynomial-time algorithm for solving the problem), and
is not NP-complete.
That last criterion can be stated in a number of different ways. One way to say this is that there is no polynomial-time mapping reduction from SAT to that particular problem.
These problems are primarily of theoretical interest right now because we don't know if any NP-intermediate problems exist - if we could find one, we'd have a problem in NP that's not in P, meaning that P ≠ NP! However, they're interesting because if we can prove that P ≠ NP, then we know that there are some problems in NP that are too hard to be solved in polynomial time, but which aren't among the "hardest" of the hard problems in NP (the problems that are NP-complete).
In the event that P = NP, then there would not be any NP-intermediate problems because you couldn't have a problem in NP but not in P. If P ≠ NP, then Ladner's theorem guarantees at least one NP-intermediate problem exists, but does so by specifically constructing a problem that is highly artificial and designed solely to be NP-intermediate in that case. Right now, with a few exceptions (notably the graph isomorphism problem), all the problems we know of in NP are either squarely in P or known to be NP-complete.
Related
Among P, NP, NP hard and NP-complete, only the NP-complete set is restricted to decision problems (those that have a binary solution). What is the reason for this? Why not define it simply as the intersection of NP and NP-hard? And this leads to another question - there must be problems that are not necessarily decision problems and also have the property that any problem in NP can be reduced to them in polynomial time. Is this then a set encompassing NP-complete? Is there already a name for this set?
EDIT: Per the comment by Matt and also the post: What are the differences between NP, NP-Complete and NP-Hard?, its seems P and NP are defined only for decision problems. That would resolve this question apart from why they would be defined this way. But, this seems to be in contradiction to the book Introduction to Algorithms by Cormen et.al. In chapter 34, the section titled "NP-completeness and the classes P and NP", they simply say: "P consists of those problems that are solvable in polynomial time". They even say later, "NP-completeness applies directly not to optimization problems, but to decision problems" but say no such thing about P and NP.
The classes P and NP are indeed classes of decision problems. I don’t have my copy of CLRS handy, but if they’re claiming that P and NP are all problems solvable in polynomial time or nondeterministic polynomial time, respectively, they are incorrect.
There are some good theoretical reasons why it’s helpful to define P and NP as sets of decision problems. Working with decision problems makes reducibility much easier (reducing one problem to another doesn’t require transforming output), simplifies the model by eliminating issues of how big the answer to a question must be, makes it easier to define nondeterministic computation, etc.
But none of those are “dealbreakers” in the sense that you can define analogous complexity classes that involve computing functions rather than just coming up with yes or no answers. For example, the classes FP and FNP are the function problem versions of P and NP, and the question of whether FP = FNP is similarly open.
I am trying to understand the relationships between P, NP, NP-Complete and NP-Hard.
I believe I am starting to understand the general idea but, I am hung up on this question(see title).
What is an example of a problem that is not solvable in P time, is verifiable in P time but is not NP-Complete?
If there is some piece of understanding I am missing please fill me in.
Thanks in advance
As noted in the comments, this is the wrong site for this question. However, it can be answered briefly:
What is an example of a problem that is not solvable in P time, is verifiable in P time but is not NP-Complete?
If I understand you, what you want are problems that are (1) not in P, (2) in NP, and (3) not in NPC. Such problems are the NP-intermediate (NPI) problems.
It is not known if there is any such problem, because it is not known if P=NP.
If P=NP then clearly there are no such problems; if P=NP then also P=NPC, and therefore every problem which can be verified in P time is in all of P, NP and NPC because they are equal.
If P!=NP then it is known that there are such problems; at least one exists. Unfortunately we do not know if any real-world problems we face are in NPI provided that P!=NP. A list of likely candidates can be found here:
https://en.wikipedia.org/wiki/NP-intermediate
In short: knowing whether NPI is empty or not is equivalent to solving proving P!=NP, so get cracking! If you can find a problem that is definitely in NP but definitely not in P or NPC, then there's a big money prize awaiting you.
Why is NP-hard unequal to NP-complete?
My informal understanding of definitions being used:
NP - all problems that can be verified in polynomial time
NP-complete - all problems that are NP and NP-hard
NP-hard - at least as hard as the hardest problem in NP
Decision Problem - A problem that asks a question with regards to an input and outputs a bool value
Confusion:
The problem with unknown solution of P vs NP arises from the fact that we cannot prove or disprove all problems in NP can be solved in polynomial time. It feels like a similar question arises from NP-complete vs NP-hard. How do we know all problems in NP-hard cannot be verified in polynomial time and thus result in NP-hard=NP-complete?
Here is my line of reasoning
From online research the distinction seems that this has something to do with decision problems (a concept I'm entirely new to but seem simple enough). I think this means that problems in NP have complementary decision problems that ask if an input is the solution to the problem. Let's say the problem is to find an optimal solution. I believe the complementary decision problem to be "is the given input the optimal solution?"and I believe that if this decision problem is verifiable in polynomial time then the problem is NP-complete (or in NP). So this means that NP-hard problems that aren't NP-complete problems are those that either have no decision problem (which I believe is never true since any brute force solution can answer this) or a problem is NP-hard and not NP-complete if it has a decision problem that's not verifiable in polynomial time. If it is the latter then it feels like we have the same problem from P vs NP. That is, how do we confirm all decision problems in NP-hard do not have polynomial time solutions?
Sorry if the above phrasing is weird. I will try and clarify any confusion in my question.
notes
I am interested in both an intuitive explanation and a formal explanation (a proof if it's a complicated answer). The formal explanation can certainly be a link to an academic paper. I don't want anyone to invest a significant amount of time into an overly complicated proof that may be beyond the scope of my understanding (I've found complexity theory to become very quickly... complex).
If it helps for the sake of explanation I have done work on the traveling salesman problem and I am currently working on a paper for the nurse scheduling problem (I believe these are NP-hard problems).
NP-Hard includes all problems whose solutions can be used to derive solutions to problems in NP with polynomial overhead.
This includes lots of problems that aren't in NP. For instance, the halting problem - an undecidable problem - is NP-Hard, because any problem in NP can be reduced to it in polynomial time:
Reduce any problem in NP to an instance of the NP-Complete problem 3-SAT
Construct in polynomial time a TM which checks all assignments and halts iff a satisfying assignment is found.
Use a solution to the halting problem to tell whether the TM halts.
If it halts, accept; otherwise, reject.
I get that if you can do a polynomial time reduction from "every" problem then it proves that the problem is at least as hard as every problem in NP. Except, how do we know that we've discovered every problem in NP? Can't there exist problems that we may not have discovered or proven exist in NP but CANNOT be reduced to any np-complete problem? Or is this still an open question?
As others have correctly stated, the existence of the problem that is NP, but is not NP-complete would imply that P != NP, so finding one would bring you a million dollar and eternal glory. One famous problem that is believed to belong in this class is integer factorization. However, your original question was
Can't there exist problems that we may not have discovered or proven
exist in NP but CANNOT be reduced to any np-complete problem?
The answer is no. By definition of NP-completeness, one of two
necessary conditions for a problem A to be NP-complete is that every NP problem needs to be reducible in polynomial time to A. If you want to find out how to prove that every single NP problem can be reducible in polynomial time to some NP-complete problem, have a look at the proof of Cook-Levin theorem that states that 3-SAT problem is NP-complete. It was the first proven NP-complete problem and many other NP-complete problems are later proven to be NP-complete by finding the appropriate reduction from 3-SAT to these problems.
NP consists of all problems that could (theoretically) be solved by being able to make lucky guesses, guessing the solution and checking in polynomial time that the solution is correct. For example, the travelling salesman problem "can I visit the capitols of all 50 states of the USA with a trip of less than 9,825 miles" can be solved by guessing a trip and checking that it is not too long.
And one problem in NP is basically simulating a programmable computer circuit with various inputs and checking whether a certain output can be achieved. And that programmable computer circuit is powerful enough to solve all problems in NP.
So yes, we know all about all problems in NP.
(Then of course an NP complete problem can by definition be used to solve any problem in NP. If there is a problem that it cannot solve, that problem is not in NP).
Except, how do we know that we've discovered every problem in NP?
We don't. The set of all problems in the universe is not only infinite, but uncountable.
Can't there exist problems that we may not have discovered or proven
exist in NP but CANNOT be reduced to any np-complete problem?
We don't know that. We suspect that this is the case, but this hasn't been proven yet. If we were to find a NP problem that is not in NP-Complete, it would be proof that P =/= NP.
It is one of the great unsolved problems in CS. Many brilliant minds have been taking a go at it, but this nut has been one tough one to crack.
I know if I reduce an NP-complete problem to a unknown problem P then I'm sure that P is itself NP-complete. And I know if I reduce a Problem P to an NP-complete problem there is no conclusion. So I want to give an example to show that we can reduce a Polynomial solvable problem P to an NP-complete one.
If I reduce an NP-complete problem to a unknown problem P then I'm
sure that P is itself NP-complete
No, this is not well formulated. If an NP-complete problem A is reducible to a problem P all we can say is that any problem in NP is reducible to P. To say that P is NP-complete we need to know additionally that P is itself in NP.
What you probably intended to say was
If I reduce an NP-complete problem to some a unknown problem P in NP then I'm
sure that P is itself NP-complete
Now to your original question.
give an example to show that we can reduce a Polynomial solvable
problem P to an NP-complete one
Consider the problem known as 2-SAT: Given a boolean formula in conjunctive normal form such that each disjunction contains at most two variables tell it if is satisfiable.
Solving this problem following an algorithm by Aspvall, Plass & Tarjan (1979) involves building an implication graph and finding all its strongly connected components. The paper proves that the formula is satisfiable if and only if the implication graph does not contain a strongly connected component that include some variable together with its negation. It also shows that this algorithm is linear in the size of the formula encoding.
So
there exists a linear algorithm for 2-SAT.
2-SAT is reducible to unrestricted boolean satisfiability problem known as SAT.
This gives an example of a polynomially solvable problem (2-SAT) that is reducible to an NP-complete problem (SAT).