complexity question regarding whether it is decision problem

49 Views Asked by At

When self teaching complexity theory and seeing arguments that were made online. I get some confusion. In the class, we classify problems into

P: can be computed polynomially

NP: given a claimed solution and certificate, whether it is the true solution can be checked in polynomial time

NP-hard: Ability of solving this polynomially implies ability of solving all NP problem polynomially

NP-complete: both NP-hard and NP

In this set up, we do not differentiate whether a problem is decision or not. The classification from this definition is the same as the classification that distinguishes whether a problem is decision problem or not... Is it right?

1

There are 1 best solutions below

0
On

The classes $\mathcal{P}$, $\mathcal{NP}$ are defined for decision problems. The class $\mathcal{NP}-HARD$ does not contain only decision problems. So $\mathcal{NP}$-Complete problems are the hardest problems in $\mathcal{NP}$, but the optimization problems of such $\mathcal{NP}$-Complete problems are $\mathcal{NP}$-Hard.

Consider for example the HAMILTONIAN CIRCUIT $(HC)$ problem in $\mathcal{NP}$-Complete. We reduce $HC \leq_{p} TSP_{OPT}$, the optimization version of the traveling salesman problem. We consider our input $G$ for $HC$ and suppose $G$ has a Hamiltonian Circuit. We then construct $K_{|V(G)|}$ from $G$. Each edge along the Hamiltonian Circuit in $G$ is weighted $1$ in the $K_{|V(G)|}$ construction, and all other edges in $K_{|V(G)|}$ are weighted $2$. So the solution to $TSP_{OPT}$ is the Hamiltonian circuit in $G$. So $TSP_{OPT}$ is $\mathcal{NP}$-Hard, but not in $\mathcal{NP}$ (as it is not a decision problem).