-->

Tile Trial NP-hard complexity

2019-09-12 17:42发布

问题:

In the game Final Fantasy XIII-3, the player is presented with a couple puzzles. The first puzzle introduced is called Tile Trial, which presents the player with a grid of tiles, some of which have crystals on them. The goal is to retrieve all of the crystals and reach the exit, while stepping on each tile no more than once.

The author of http://arxiv.org/pdf/1203.1633v1.pdf stated that this problem is NP-Hard because a specific case can be reduced to Hamiltonian-cycle. I find that this is a naive assumption, because he developed a specific puzzle that, although suits the rules of the game, just happens to involve Hamiltonian-cycles.

Looking at the general case: We can model each tile of the puzzle as a vertex in a graph. A vertex has an edge to another vertex if two tiles are adjacent. The problem consists in finding a path from the starting tile to the ending tile while transversing all vertex that have crystals and not visiting any vertex more than once.

I believe that this could be reduced to the TSP (Traveling Salesman Problem) where we only need to visit a subset of cities. Assume a regular TSP problem with n cities. However, in this particular problem, we do not have to visit all the n cities, only a specific subset of them, m, where m<=n. The cities in n but not in m don't need to be visited, but they might if the path m1->m2 is larger than m1->n1->m2 for example.

However is this "simpler" TSP problem still NP-hard? Anyone know of a better NP-hard problem that could be used as a reduction?

回答1:

Reducing this problem to TSP wouldn't prove anything interesting. Here, I'll show you.

Consider the problem SUMS-TO-TWELVE, which is the problem of determining whether a particular set of numbers, when summed up, results in twelve. I've decided to reduce this to TSP as follows: Create a graph consisting of a chain of nodes, with as many edges as there are numbers in the input set, and with each edge's cost equal to the corresponding number in the input set. Finally, put an additional edge from the first to the last node, with a cost of zero. If the solution to TSP has cost 12, then the sequence passes SUMS-TO-TWELVE.

Which is a very silly way to see if numbers add to twelve. I haven't proven that SUMS-TO-TWELVE is hard, I've proven that it's easy, or at least, as easy as NP problems -- that is, that it's "in NP". But we don't tend to use reductions to prove that a problem is in NP, because it's easier to just give an algorithm which solves the problem on a nondeterministic Turing machine.

So you often see papers which take some exotic problem and reduce 3SAT or TSP or whatever to it. You rarely see papers which reduce the exotic problem to something else. It's not a useful thing to do.