7

This paper http://www.mountainvistasoft.com/docs/BattleshipsAsDecidabilityProblem.pdf says that the decision problem, "Given a particular puzzle, is there a solution?" is NP-Complete. I don't understand why this can't be done in polynomial time. Given constraints that no two ships can be orthogonally or diagonally adjacent, why not just create a grid where there are 2 times as many columns as "bins" with enough rows to put a "separator" run in between every ship. I've seen the reduction demonstrated this way and it seems like it could be done in polynomial time.

Derek
  • 71
  • 1
  • 2

2 Answers2

5

As Andreas T mentions, what you're missing is that the grid is part of the instance.
The instance specifies both the grid and the ships.

Why can't the Battleship puzzle be solved in polynomial time? This is the one million dollar question (literally). But since the paper you mention proves that Battleship is NP-complete, the widely believed conjecture P≠NP implies that Battleship cannot be solved in polynomial time.

The paper goes on to prove that Battleship cannot be solved in polynomial time even when the solution is unique, unless NP=RP, which is also considered unlikely. This is a more realistic version of the problem, since in practice Battleship problems have a unique solution.

David Richerby
  • 82,470
  • 26
  • 145
  • 239
Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514
0

What it means is: They have found an NP-complete problem that could be solved by creating a very cleverly designed "Battleship" instance of at most polynomial larger size, solving the "Battleship" instance and creating a solution for the original instance from that.

It's really a guess, but I suppose they figured out a way to simulate logical circuits by setting up a "Battleship" problem. With "Game of Life", I think you can create "gliders" that effectively simulate a very primitive computer.

gnasher729
  • 32,238
  • 36
  • 56