"David Harmon" <source@netcom.com> wrote in message
news:4051c06e.292372142@news.west.earthlink.net...
[color=blue]
> On Sat, 17 Jan 2004 03:55:15 GMT in comp.lang.c++, "JimC"
> <jimc@cross-comp.com> was alleged to have written:[color=green]
> >But we must use the following rule:
> >
> > An element can be moved only if it is next to the x element,
> > in the same row or column, and it must be exchanged with the x element.[/color]
>
>
http://www.google.com/search?q=%2215+puzzle%22
>[/color]
Thanks!
Ah.... so then the problem is informally known as "the 15-Puzzle" and is
solvable iff the sum of inversions in the initial layout is an even number. The
puzzle seems to have been around at least since the 1870s.
Of the many articles turned up by the preceding Google search, I thought
the following following two were quite good:
http://www.javaonthebrain.com/java/puzz15/ http://mathworld.wolfram.com/15Puzzle.html