A polynomial-time algorithm for deciding whether a language has a polynomial time algorithm - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-19T17:16:29Z http://mathoverflow.net/feeds/question/35525 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/35525/a-polynomial-time-algorithm-for-deciding-whether-a-language-has-a-polynomial-time A polynomial-time algorithm for deciding whether a language has a polynomial time algorithm Sid 2010-08-13T19:22:46Z 2010-11-30T08:58:40Z <p>Let $L$ be a language in $NP$. Then are there any results on whether there exists a polynomial-time algorithm (polynomial in the length of the description of $L$) to decide whether $L \in P$? Are there any results on the hardness of the search version of the problem vs. the decision version?</p> <p>The only result I can think of is that $P=NP$ implies the existence of such an algorithm since then an algorithm which outputs $True$ everytime works.</p> http://mathoverflow.net/questions/35525/a-polynomial-time-algorithm-for-deciding-whether-a-language-has-a-polynomial-time/35530#35530 Answer by Ricky Demer for A polynomial-time algorithm for deciding whether a language has a polynomial time algorithm Ricky Demer 2010-08-13T19:31:47Z 2010-08-13T19:31:47Z <p>If there is such an algorithm, then P = NP.</p> <p>.</p> <p>L(m) := {s : machine(m) halts within length(s) steps and sat_instance(s) is true}</p> <p>If P != NP, then "Is L(m) in P?" is equivalent to "Does machine(m) run forever?".</p> http://mathoverflow.net/questions/35525/a-polynomial-time-algorithm-for-deciding-whether-a-language-has-a-polynomial-time/35571#35571 Answer by Chris Beck for A polynomial-time algorithm for deciding whether a language has a polynomial time algorithm Chris Beck 2010-08-14T10:00:18Z 2010-08-14T10:00:18Z <p>For any NP-complete problem, search and decision are polynomially related to each other. </p> <p>If we can find solutions in polynomial time then surely we can decide if a solution exists in polynomial time.</p> <p>On the other hand, using self reducibility of SAT, we can show that the search problem can be solved in polynomial time using an oracle to the decision version of SAT. Here's the technique:</p> <p>Suppose I am given formula F, a SAT instance on n variables, and an oracle to decide satisfiability. To solve the search problem, we show how to extend any particular partial solution by fixing a value for one more variable. Then we just start with the empty assignment and repeat this process n times.</p> <p>Given F, first use Oracle to decide if F has a solution, and if it doesn't, then report Fail. Assuming that it does, we will now find a solution. Take the first variable of F, call it X_1 (any arbitrary variable will do), and plug in True for it, simplifying F accordingly. Then take this resulting formula and give it to the SAT oracle. If by hypothesizing that X_1 = True, we have now made it so that there is no solution to F, then we know that any solution will have X_1 = False. If the oracle said that there are still solutions when X_1 = True, then we retain this partial assignment and proceed. Whatever value we decided on for X_1, we plug that into F and simplify, then repeat for X_2 ... X_n. At the end we must have found a full solution.</p> <p>This property is called self-reducibility of SAT -- the point is that SAT on instances of length n can be solved in polynomial time with oracle access to SAT on instances of length n-1. Clearly any other NP-complete problem has a similar self-reduction - for instance with HAM CYCLE, I could take a vertex with more than 2 edges, and then make smaller graphs by deleting one of its edges. Polynomially many graphs result this way, and each is smaller then the initial graph. If one of them has a HAM CYCLE, I can just focus on that smaller graph and start deleting edges from it... eventually, I will be left with one massive Hamiltonian cycle. If none of them has a HAM CYCLE, then I know the original graph didn't have one either. </p> <p>Additionally, many NP problems that are not NP-complete will have search to decision reductions. For instance, Graph Isomorphism. Along slightly different lines, problems like Discrete Logarithm have what is called Ransom Self Reducibility -- if you have an oracle that solves a large fraction of smaller instances of a problem successfully, then you can solve the problem on a larger input size. This kind of property allows you to reduce worst case to average case, and so a way to try to establish Average Case hardness of a problem, which is important for Cryptography.</p> <p>Not all NP problems are known to be self-reducible though. Although many common ones are, the result in this paper rules out any simple proof for every single problem in NP.</p> <p><a href="http://www.google.com/url?sa=t&amp;source=web&amp;cd=5&amp;ved=0CDEQFjAE&amp;url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.157.3658%26rep%3Drep1%26type%3Dpdf&amp;ei=02VmTMjIC4K8sQPW0OSXDQ&amp;usg=AFQjCNEvu2rttkpbEQ7X0C9MIlrU-FIgJA&amp;sig2=k7eTQI6BgHMTaIMv312UXA" rel="nofollow">http://www.google.com/url?sa=t&amp;source=web&amp;cd=5&amp;ved=0CDEQFjAE&amp;url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.157.3658%26rep%3Drep1%26type%3Dpdf&amp;ei=02VmTMjIC4K8sQPW0OSXDQ&amp;usg=AFQjCNEvu2rttkpbEQ7X0C9MIlrU-FIgJA&amp;sig2=k7eTQI6BgHMTaIMv312UXA</a></p> <p>Your question is also tangentially related to the Dichotomy Conjecture for CSPs. The problem can be posed as follows. Given any particular CSP language, determining if a particular CSP in that language is satisfiable is an NP problem. For some CSP languages, the corresponding problem is NP-complete, for instance 3SAT, while for others such as XORSAT, the problem is known to be in P. Is it true that, for every CSP language, the corresponding problem will be solvable in polynomial time OR NP-complete? Given a description of a particular CSP language, can we determine in polynomial time whether the corresponding problem is solvable in Polynomial Time or NP-complete? There has been much work and a resurgence of interest in this problem in recent years, and it seems that top researchers are getting close to resolving it in the affirmative.</p> http://mathoverflow.net/questions/35525/a-polynomial-time-algorithm-for-deciding-whether-a-language-has-a-polynomial-time/47767#47767 Answer by Zirui Wang for A polynomial-time algorithm for deciding whether a language has a polynomial time algorithm Zirui Wang 2010-11-30T08:58:40Z 2010-11-30T08:58:40Z <p>Acutally if there is such an algorithm, then <em>false</em>, because Rice's theorem states that every nontrivial property of the RE languages is undecidable.</p>