How can the n-puzzle problem be solved efficiently?

  • Thread starter Thread starter Terilien
  • Start date Start date
  • Tags Tags
    Mathematics
Terilien
Messages
140
Reaction score
0
Given n marbles arrayed in a square with n+1 slots(slot n+1 being empty(labelled with numbers from 1 to n+1) you have to bring them all from their orginal positions to a position in whcih bringing them back woudl take the most moves. The rule is to move each marble to the adjacent square.


I'm really not sure as to how to solve it. I'm really just doing this because I saw it and the fact that i don't know the solution is killing me.


\
 
Physics news on Phys.org
It's kind of hard to understand what you're saying, but it seems like what you're describing is essentially the http://en.wikipedia.org/wiki/Fifteen_puzzle" .
 
Last edited by a moderator:
Yes its just that and I'd like to know how to prove what combination requires the greatest number of moves.
 
According to that page:

For larger versions of the n-puzzle, finding a solution is easy, but the problem of finding the shortest solution is NP-hard.

So I'm guessing there's no easy answer to your question.
 
Prove $$\int\limits_0^{\sqrt2/4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx = \frac{\pi^2}{8}.$$ Let $$I = \int\limits_0^{\sqrt 2 / 4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx. \tag{1}$$ The representation integral of ##\arcsin## is $$\arcsin u = \int\limits_{0}^{1} \frac{\mathrm dt}{\sqrt{1-t^2}}, \qquad 0 \leqslant u \leqslant 1.$$ Plugging identity above into ##(1)## with ##u...
Back
Top