How can the n-puzzle problem be solved efficiently?

  • Thread starter Thread starter Terilien
  • Start date Start date
  • Tags Tags
    Mathematics
Click For Summary
The n-puzzle problem involves arranging n marbles in a square with n+1 slots, where the goal is to move the marbles to a position that requires the most moves to return them to their original positions. The discussion references the complexity of solving this problem, likening it to the fifteen puzzle, which is a well-known example. It highlights that while finding a solution for larger n-puzzles is straightforward, determining the shortest solution is NP-hard. As such, there is no simple method to prove which combination requires the greatest number of moves. The challenge lies in the inherent complexity of the problem.
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.
 
Question: A clock's minute hand has length 4 and its hour hand has length 3. What is the distance between the tips at the moment when it is increasing most rapidly?(Putnam Exam Question) Answer: Making assumption that both the hands moves at constant angular velocities, the answer is ## \sqrt{7} .## But don't you think this assumption is somewhat doubtful and wrong?

Similar threads

  • · Replies 29 ·
Replies
29
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 29 ·
Replies
29
Views
4K
Replies
34
Views
3K
Replies
2
Views
3K
Replies
9
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 80 ·
3
Replies
80
Views
10K