←back to thread

108 points BerislavLopac | 1 comments | | HN request time: 0.208s | source
Show context
andrewla ◴[] No.43716179[source]
The example given doesn't seem right to me.

> There is one problem, though, that I find easily explainable. Place a token at the bottom left corner of a grid that extends infinitely up and right, call that point (0, 0). You're given list of valid displacement moves for the token, like (+1, +0), (-20, +13), (-5, -6), etc, and a target point like (700, 1). You may make any sequence of moves in any order, as long as no move ever puts the token off the grid. Does any sequence of moves bring you to the target?

If someone gives you such a sequence, it seems trivial to verify it in linear time. Even for arbitrary dimensions, and such witness can be verified in linear time.

replies(4): >>43716238 #>>43716279 #>>43716408 #>>43717130 #
Choco31415 ◴[] No.43716238[source]
A sequence is easy to verify. Choosing the sequence not so much.

Roughly put that is the certificate definition of being in NP.

replies(1): >>43716522 #
andrewla ◴[] No.43716522[source]
The goal here was to show that it was strictly NP-hard, i.e. harder than any problem in NP.
replies(1): >>43717284 #
Nevermark ◴[] No.43717284[source]
Harder to solve, not necessarily harder to verify?

If I am understanding things right.

replies(1): >>43718075 #
andrewla ◴[] No.43718075[source]
The crazy thing about the definition of NP-completeness is that Cook's theorem says that all problems in NP can be reduced in polynomial time to an NP-complete problem. So if a witness to a problem can be verified in polynomial time, it is by definition in NP and can be reduced to an NP-complete problem.

If I can verify a solution to this problem by finding a path in polynomial time, it is by definition in NP. The goal here was to present an example of a problem known to not be in NP.

replies(1): >>43722944 #
1. thaumasiotes ◴[] No.43722944[source]
> The crazy thing about the definition of NP-completeness is that Cook's theorem says that all problems in NP can be reduced in polynomial time to an NP-complete problem.

What were you trying to say here? Cook's theorem says that SAT is NP-complete. "All problems in NP can be reduced in polynomial time to an NP-complete problem" is just a part of the definition of NP-completeness.