<p>The FNP version of an NP-complete language $L$ asks to solve the following problem on every input $x$:</p>

<p>1) If $x \not\in L$, output "NO".</p>

<p>2) If $x \in L$, output some witness "w" such that a polynomial-time entity, given $(x,w)$, can verify that $x \in L$.</p>

<p>Consider the transformation $T$ of the above scheme: If the FNP machine answered "NO", $T$ answers "NO". Otherwise, $T$ answers "YES".</p>

<p>Obviously $T$ is a Karp-reduction of any NP-complete problem to the corresponding FNP-complete instance.</p>

CC BY-SA 2.5
2010-09-10T05:55:09.437Z
okay I think I have finally understood it. Just to re-iterate: Since every decision problem can be reduced to its corresponding FNP version, it is no harder than it. However, I was wondering if both need the same method to solve. i.e. Is the decision problem any easier than the FNP one which asks for the answer. I think this _"A basic question about FNP problems is whether they're self-reducible; that is, whether they reduce to the corresponding NP decision problems"_ from the complexity Zoo link clarifies it. Thanks!!
dhruvbird
CC BY-SA 2.5
2010-09-09T18:32:30.813Z
2010-09-09T18:32:30.813Z
Sadeq Dousti
<p>FNP-Complete problem is the search version of an NP-complete decision problem "Is there a Hamiltonian graph in the input graph". The search version which is FNP-complete asks for an algorithm that produces the edges of a Hamiltonian cycle or report there is none. As far as verifying the correctness of the decision problem, you can use it as oracle to find the Hamiltonian cycle and then verify that the cycle is Hamiltonian.</p>

CC BY-SA 2.5
2010-09-09T18:06:56.663Z
okay so I am guessing that my original dilemma about trying to classify the FNP version as NP-complete was incorrect since the FNP version of the decision problem involves generating the solution. However since I can always verify the solution in polynomial time, would it be right to say that the FNP version is NP-hard?
dhruvbird
CC BY-SA 2.5
2010-09-09T22:56:17.957Z
problems in FNP are "search problems", and problems from NP are "decision problems". The definitions of FNP and NP are different and it is not correct to say that a problem in TFNP is hard for NP or viceversa. Indeed, $NP\neq P$ iff $FNP \neq FP$, because search problem and their corresponding decision versions are polynomially related.
Marcos Villagra
CC BY-SA 2.5
2010-09-09T18:01:12.617Z
2010-09-09T18:01:12.617Z
Mohammad Al-Turkistany
<p>This post is linked to: <a href="https://cstheory.stackexchange.com/questions/1088/fnp-complexity-class">FNP complexity class</a></p>

<p>Many places say that the decision version of Hamiltonian Cycle is NP-Complete, and NP-Complete problems are those whose solution can be verified in polynomial time.</p>

<p>Suppose I ask someone "Does a Hamiltonian Cycle exist?" and she answers "YES", then how can I (in polynomial time) verify that she is not lying? (I am assuming here that the solution I got "YES" is the only thing I have with me)</p>

<p>Alternate interpretation: Is <em>"Any given solution to L can be verified quickly (in polynomial time)"</em> to be interpreted as <em>"Given some solution to the Hamiltonian Cycle problem for this graph, it can be verified quickly"</em>?</p>

<p>If it is the latter, then things fall into place.</p>

<p>Quoting from <a href="http://en.wikipedia.org/wiki/FNP_(complexity)" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/FNP_(complexity)</a>:
<em>"This means that the FNP version of every NP-complete problem is NP-hard."</em></p>

<p>Is this necessarily true?</p>

<p>And comparing with the Hamiltonian Cycle problem, if she (the solver) says "YES and here it is ..." then I can take that and verify if it is actually a Hamiltonian Cycle. Hence, shouldn't this (FNP) version <strike>actually be NP-Complete</strike> not be NP-hard? What am I missing here?</p>

CC BY-SA 2.5
2010-09-09T18:16:41.523Z
I think your question is very vague. It is as if you are saying that FNP is the class of NP-complete problems, which is plain wrong. Please restate your question in a better way.
Sadeq Dousti
CC BY-SA 2.5
2010-09-09T18:20:55.787Z
I am actually trying to figure out why the FNP version of the decision version of the Hamiltonian Cycle problem should be termed as NP-hard.
dhruvbird
CC BY-SA 2.5
2010-09-09T22:46:49.113Z
All NP-complete problems are also NP-hard. (NP-completeness means being NP-hard and being a member of NP.) The search version, essentially by default, solves the decision version. Hence, if the decision version is NP-hard, then the search version must be NP-hard too (else, it would contradict the decision version's NP-hardness).
Daniel Apon
<cc.complexity-theory><complexity-classes><hamiltonian-paths>
On the class of the FNP version of the Hamiltonian Cycle problem
dhruvbird
# On the class of the FNP version of the Hamiltonian Cycle problem

(Asked by: username_0 on 2010-09-09)

This post is linked to: [FNP complexity class](https://cstheory.stackexchange.com/questions/1088/fnp-complexity-class)

Many places say that the decision version of Hamiltonian Cycle is NP-Complete, and NP-Complete problems are those whose solution can be verified in polynomial time.

Suppose I ask someone "Does a Hamiltonian Cycle exist?" and she answers "YES", then how can I (in polynomial time) verify that she is not lying? (I am assuming here that the solution I got "YES" is the only thing I have with me)

Alternate interpretation: Is *"Any given solution to L can be verified quickly (in polynomial time)"* to be interpreted as *"Given some solution to the Hamiltonian Cycle problem for this graph, it can be verified quickly"*?

If it is the latter, then things fall into place.

Quoting from <http://en.wikipedia.org/wiki/FNP_(complexity)>:
*"This means that the FNP version of every NP-complete problem is NP-hard."*

Is this necessarily true?

And comparing with the Hamiltonian Cycle problem, if she (the solver) says "YES and here it is ..." then I can take that and verify if it is actually a Hamiltonian Cycle. Hence, shouldn't this (FNP) version actually be NP-Complete not be NP-hard? What am I missing here?

**Tags:** cc.complexity-theory, complexity-classes, hamiltonian-paths

> **Comments:**
> **username_1**: I think your question is very vague. It is as if you are saying that FNP is the class of NP-complete problems, which is plain wrong. Please restate your question in a better way.  
> **username_0**: I am actually trying to figure out why the FNP version of the decision version of the Hamiltonian Cycle problem should be termed as NP-hard.  
> **username_2**: All NP-complete problems are also NP-hard. (NP-completeness means being NP-hard and being a member of NP.) The search version, essentially by default, solves the decision version. Hence, if the decision version is NP-hard, then the search version must be NP-hard too (else, it would contradict the decision version's NP-hardness).  

---

## 2 answers

### Answer by username_1 on 2010-09-09. Score: 7 | Accepted answer

The FNP version of an NP-complete language $L$ asks to solve the following problem on every input $x$:

1) If $x \not\in L$, output "NO".

2) If $x \in L$, output some witness "w" such that a polynomial-time entity, given $(x,w)$, can verify that $x \in L$.

Consider the transformation $T$ of the above scheme: If the FNP machine answered "NO", $T$ answers "NO". Otherwise, $T$ answers "YES".

Obviously $T$ is a Karp-reduction of any NP-complete problem to the corresponding FNP-complete instance.

> **Comments:**
> **username_0**: okay I think I have finally understood it. Just to re-iterate: Since every decision problem can be reduced to its corresponding FNP version, it is no harder than it. However, I was wondering if both need the same method to solve. i.e. Is the decision problem any easier than the FNP one which asks for the answer. I think this _"A basic question about FNP problems is whether they're self-reducible; that is, whether they reduce to the corresponding NP decision problems"_ from the complexity Zoo link clarifies it. Thanks!!  

---

### Answer by username_3 on 2010-09-09. Score: 2

FNP-Complete problem is the search version of an NP-complete decision problem "Is there a Hamiltonian graph in the input graph". The search version which is FNP-complete asks for an algorithm that produces the edges of a Hamiltonian cycle or report there is none. As far as verifying the correctness of the decision problem, you can use it as oracle to find the Hamiltonian cycle and then verify that the cycle is Hamiltonian.

> **Comments:**
> **username_0**: okay so I am guessing that my original dilemma about trying to classify the FNP version as NP-complete was incorrect since the FNP version of the decision problem involves generating the solution. However since I can always verify the solution in polynomial time, would it be right to say that the FNP version is NP-hard?  
> **username_4**: problems in FNP are "search problems", and problems from NP are "decision problems". The definitions of FNP and NP are different and it is not correct to say that a problem in TFNP is hard for NP or viceversa. Indeed, $NP\neq P$ iff $FNP \neq FP$, because search problem and their corresponding decision versions are polynomially related.  

---

