If P != NP, are there more P than non-P problems or vice versa? [closed] - complexity-theory

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
If P != NP, are there then more Polynomial problems than SuperPolynomial problems, or vice versa?

From a formal languages perspective, there are only countably many problems in P and uncountably many problems not in P. Every problem in P can be solved by a deterministic, polynomial-time Turing machine, and since the number of TMs is countably infinite, the number of languages in P is countably infinite. On the other hand, the number of total languages is equal to the number of possible subsets of strings, so there are uncountably many languages not in P. This result is, interestingly enough, independent of whether P = NP.
If you restrict "problems" to "decidable problems" (that is, problems that are solvable by computers with unbounded time and storage space), then we know that there are only countably many total decidable problems. Countably infinitely many of them are in P and, regardless of whether P = NP, there are countably infinitely many of them not in P.
Hope this helps!

Related

Why can any language in NP run on a P machine? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 2 years ago.
Improve this question
How can I show that any language in NP can also be run on a P machine? I get that the resulting time wouldn't be polynomial.
Is it because any problem in NP can be solved by trying every possible combination which can be solved on a Polynomial turing machine? I find it very hard to come up with a solid real argument.
Thanks <|:-)
The question is unclear. Firstly, a language (or equivalently, a decision problem) cannot "run" on a Turing Machine. A problem may be solved by a Turing Machine. Secondly, what is a "P Machine"? Do you mean a deterministic Turing Machine that terminates after a number of steps that is polynomial with respect to its input?
I can imagine two possible interpretations of your statement.
Every problem in NP can be solved by a deterministic Turing Machine in polynomial time
This is actually an open problem. To prove this, you first prove the P=NP. Once you have done that, congratulations for becoming a Millenium Price winner, and the statement to be proven follows immediately.
Every problem in NP can be solved by a deterministic Turing Machine
Now this is a much weaker statement. We can prove a much stronger and more interesting statement that implies this statement: Every non-deterministic Turing Machine can be simulated by a deterministic Turing Machine.
The proof roughly goes like this: the computation of a non-deterministic Turing Machine on some input can be represented as a computation tree. The simulating machine traverses this tree using a breadth-first search approach (basically using a queue of configurations). The machine stops when it finds a configuration with accepting state or if the tree has been traversed completely. Formalizing this simulation is tedious but possible, but I hope this gives you an intuition why it is possible.

Proving with stirlling approximation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 6 years ago.
Improve this question
How do you prove using Stirling's approximation?
log(n!)=Θ(nlogn)
Any ideas?
I'll give you the broad outline of the proof. You'll have to fill in the details. From this wikipedia article, Stirling's approximation states that for all positive integers n:
Using a little algebra to rearrange the terms, we get
So n! is bounded above and below by the function
Since we're interested in log(n!) we need to determine the behavior of log(f(n)) for large values of n. Doing some more algebra:
For large values of n, the first term is much larger than the rest, so
which completes the outline of the proof.

Some inference about NP [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
this is my first question on this site.
I‌ recently, study on NP. I have some confusion about this Topic, and want to propose my inference and some one verify me.
I) each NP problem can be solved in Exponential Time.
II) if P=NP then NP=NP-Complete.
III) Problem of factorization into 2-prime factor, is NP.
IV) if problem X can reduce to a known NP-Hard problem, then X must be
NP-HARD.
anyone can verify my inference and learn me?‌
I) each NP problem can be solved in Exponential Time.
Yes, this because it can be solved in polynomial time on Non Determinisitc Machine (definition of NP), and thus can be solved on a Deterministic Machine in exponential time.
II) if P=NP then NP=NP-Complete.
Yes, because if P=NP, "yes" and "no" answers for all NP problems are equivalently easy to achieve, run the polynomial time algorithm for the "yes" problem, and answer like it. Result is always correct and runs in polynomial time, assuming such a polynomial time machine exists.
III) Problem of factorization into 2-prime factor, is NP.
Yes. Given an number and its prime factorization - it is easy to verify if this is the correct answer (this is equivalent definition of problem being in NP).
IV) if problem X can reduce to a known NP-Hard problem, then X must be
NP-HARD.
No, it should be the other way around. You need to reduce a known NP-Hard Problem to X, and then you can tag X as NP-Hard.
Rememeber that every problem in NP has a reduction to SAT (Cook Levin theorem), and yet P != NP-Complete (or so we think at least)

If P=NP then how we can we say P=NP=NP-complete? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
In wikipedia I found this diagram. I don't get how under the asumption p=np we get p=np=np-complete?
Not sure this is on topic for stack overflow (Theoretical Comp Sci), but NP-hard, as correctly visualized in the diagram is "the set of problems that are at least as hard as those in NP"; this includes problems that are worse than NP in one sense or another.
NP-complete problems are those problems in NP-hard that have a reducibility relationship with specific problems that are known to be in NP. Essentially, every problem that can be converted in polynomial time or better to a problem in NP-complete is just as hard as the others.
Here are a couple good snippets from CLRS that illustrate the issue:
The class NP consists of those problems that are “verifiable” in polynomial time. What do we mean by a problem being verifiable? If we were somehow given a "certificate” of a solution, then we could verify that the certificate is correct in time polynomial in the size of the input to the problem.
Informally, a problem is in the class NPC—and we refer to it as being NP-complete—if it is in NP and is as “hard” as any problem in NP.
A decidable language L is NP-complete if:
L is in NP, and
L' can be reduced to L in polynomial time for every L' in NP.
If a language L satisfies property 2, but not necessarily property 1, we say that L is NP-hard. We also define NPC to be the class of NP-complete languages.
(I may have the L' and L backwards there, the reducibility symbol is backwards from the way it is read in English.)
So what's the point? Well, you can just solve it with set theory: NP-complete is a subset of NP, and if P=NP, then NP-complete is a subset of P (in fact, they all become equal at that point, since you can solve any of them by first changing them to something your magic P-algorithm can work on). NP-hard still includes some NP-complete problems, but there are other problems outside, which are just hard.

Is 3-SAT polynomially equivalent to INDEPENDENT-SET [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I know that 3-SAT is polynomially reducable to INDEPENDENT-SET problem.
Now is an INDEPENDENT-SET problem polynomially reducable to 3-SAT problem ? Thus are these problems polynomially equivalent?
I think it is, as every instance of INDEPENDENT-SET problem according to me can be represented in 3-SAT ( in some cases after adding a few extra edges ). However I am not clear about this understanding of mine.
Please help me our here.
Yes, the independent set problem can be reduced to 3SAT in polynomial time. The decision problem "given a graph G and number k, is there an independent set in G of size at least k?" is in NP (do you see why?). Since 3SAT is NP-complete, all problems in NP are polynomial-time reducible to it, and therefore the independent set problem is reducible to it.
Hope this helps!

Resources