Hacker News new | ask | show | jobs
by tromp 1214 days ago
> Your algorithm is tasked to find a proper coloring using the smallest number of colors.

That's not an NP type problem, in the sense that you cannot verify in polynomial time whether a coloring is minimal or not.

1 comments

> That's not an NP type problem

The comment I was referring to was talking about "decision problems and general problems" and there always being a reduction between them.

Now "general problems" is a bit vague, but in my classes on optimization the students are intuitively led to believe that optimization problems always have a decision problem associated with them, so we can talk about NP-hardness of optimization problems, too. Which is often true, but not always.

As a good example, if you consider graph coloring, you can argue that the associated decision problem is "given a graph G, and a parameter k, answer yes if G is colorable with at most k colors". This way, slightly informally, you can talk about NP-hardness of finding the smallest number of colors for a graph.

However, the optimization problem I presented -- coloring k-colorable graphs -- is a valid optimization problem, it is interesting and has been studied in the past, but it has no good decision problem associated with it.

> it has no good decision problem associated with it.

I disagree. You can efficiently find a k-coloring of any k-colorable graph if you can efficiently decide what graphs are k-colorable.