<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: The 15-puzzle groupoid (1)</title>
	<atom:link href="http://www.neverendingbooks.org/index.php/the-15-puzzle-groupoid-1.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.neverendingbooks.org/index.php/the-15-puzzle-groupoid-1.html</link>
	<description>lieven le bruyn&#039;s blog</description>
	<lastBuildDate>Fri, 20 Jan 2012 16:50:41 +0100</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Bruce MacKenzie</title>
		<link>http://www.neverendingbooks.org/index.php/the-15-puzzle-groupoid-1.html/comment-page-1#comment-12679</link>
		<dc:creator>Bruce MacKenzie</dc:creator>
		<pubDate>Sun, 02 Jan 2011 20:22:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.neverendingbooks.org/?p=14#comment-12679</guid>
		<description>In implementing a computer simulation of the 15 puzzle I have found that it is possible to map the legal
	positions of the puzzle 1:1 to a permutation group.  This makes a groupoid treatment unnecessary.
	
	
	Key to the approach is a toroidal mapping of the puzzle grid.  The columns and rows wrap such that moving
	four spaces in any cardinal direction takes one back to the original position.  Any state of the puzzle may be
	converted to a state with the void token (token 16) in position 16 by rolling the columns and rows right and down.
	For example:
	15 12  7  1  &#x21D2;    1 15 12  7  &#x21D2;    9  2  6 11
	14 10 16  5  &#x21D2;    5 14 10 16  &#x21D2;   13  3  4  8 
	 2  6 11  9  &#x21D2;    9  2  6 11  &#x21D2;    1 15 12  7
	 3  4  8 13  &#x21D2;   13  3  4  8  &#x21D2;    5 14 10 16 

Given a toroidal mapping of the grid, the above rearrangement may be seen as a simple translation of the origin. As such the 
essential metric of the token positions is preserved. Tokens 1 through 15 in the rearranged tableau define a permutation. In GAP cycle notation:
  
(1,9)(3,6)(4,11,12,7)(5,13)(10,15)

This permutation gives the arrangement of the tokens relative to the void token.  The representation is completed with two cyclic
 permutation groups of order 4.
These may be viewed simply as counters giving the number of positions left and up the origin has been shifted.

(1,9)(3,6)(4,11,12,7)(5,13)(10,15) * (16,18)(17,19) * (20,21,22,23)

where up 1 = (16,17,18,19) and left 1 = (20,21,22,23)



	 
It is easily seen that any arrangement of tokens in the fifteen puzzle may be uniquely an unambiguously translated into a permutation of this form.  The legal
moves of the puzzle involve swapping the void token with an adjacent token.  These moves may be modeled by applying one of the following
permutations to the state&#039;s representation.

L := (1,4,3,2)(5,8,7,6)(9,12,11,10)(13,15,14)(20,21,22,23);
R := (1,2,3,4)(5,6,7,8)(9,10,11,12)(13,14,15)(20,23,22,21);
U := (1,13,9,5)(2,14,10,6)(3,15,11,7)(4,12,8)(16,17,18,19);
D := (1,5,9,13)(2,6,10,14)(3,7,11,15)(4,8,12)(16,19,18,17);

where L swaps the void token with the token to the left, etc.


Given this assertion(evident on inspection), all states of the puzzle may be modeled by products of the above generators. The remaining issue is that the
above generators may be applied in ways inappropriate to the physical puzzle.  R applied to the identity position swaps the void token with the 
token in position 13:
 
  1  2  3  4
  5  6  7  8
  9 10 11 12
 16 14 15 13
 
 It can be shown that all of these swaps beyond the edges of the puzzle may be accomplished with legal puzzle moves.  For example, the above position may
 be arrived at by the move sequence, L L L U R D R R U L L L D R R U R D L L L.  Thus, all products formed from the above generators represent legal puzzle positions.
And therefore, the group formed from the above generators is a well formed model of the 15 puzzle.</description>
		<content:encoded><![CDATA[<p>In implementing a computer simulation of the 15 puzzle I have found that it is possible to map the legal<br />
	positions of the puzzle 1:1 to a permutation group.  This makes a groupoid treatment unnecessary.</p>
<p>	Key to the approach is a toroidal mapping of the puzzle grid.  The columns and rows wrap such that moving<br />
	four spaces in any cardinal direction takes one back to the original position.  Any state of the puzzle may be<br />
	converted to a state with the void token (token 16) in position 16 by rolling the columns and rows right and down.<br />
	For example:<br />
	15 12  7  1  &#x21D2;    1 15 12  7  &#x21D2;    9  2  6 11<br />
	14 10 16  5  &#x21D2;    5 14 10 16  &#x21D2;   13  3  4  8<br />
	 2  6 11  9  &#x21D2;    9  2  6 11  &#x21D2;    1 15 12  7<br />
	 3  4  8 13  &#x21D2;   13  3  4  8  &#x21D2;    5 14 10 16 </p>
<p>Given a toroidal mapping of the grid, the above rearrangement may be seen as a simple translation of the origin. As such the<br />
essential metric of the token positions is preserved. Tokens 1 through 15 in the rearranged tableau define a permutation. In GAP cycle notation:</p>
<p>(1,9)(3,6)(4,11,12,7)(5,13)(10,15)</p>
<p>This permutation gives the arrangement of the tokens relative to the void token.  The representation is completed with two cyclic<br />
 permutation groups of order 4.<br />
These may be viewed simply as counters giving the number of positions left and up the origin has been shifted.</p>
<p>(1,9)(3,6)(4,11,12,7)(5,13)(10,15) * (16,18)(17,19) * (20,21,22,23)</p>
<p>where up 1 = (16,17,18,19) and left 1 = (20,21,22,23)</p>
<p>It is easily seen that any arrangement of tokens in the fifteen puzzle may be uniquely an unambiguously translated into a permutation of this form.  The legal<br />
moves of the puzzle involve swapping the void token with an adjacent token.  These moves may be modeled by applying one of the following<br />
permutations to the state&#8217;s representation.</p>
<p>L := (1,4,3,2)(5,8,7,6)(9,12,11,10)(13,15,14)(20,21,22,23);<br />
R := (1,2,3,4)(5,6,7,8)(9,10,11,12)(13,14,15)(20,23,22,21);<br />
U := (1,13,9,5)(2,14,10,6)(3,15,11,7)(4,12,8)(16,17,18,19);<br />
D := (1,5,9,13)(2,6,10,14)(3,7,11,15)(4,8,12)(16,19,18,17);</p>
<p>where L swaps the void token with the token to the left, etc.</p>
<p>Given this assertion(evident on inspection), all states of the puzzle may be modeled by products of the above generators. The remaining issue is that the<br />
above generators may be applied in ways inappropriate to the physical puzzle.  R applied to the identity position swaps the void token with the<br />
token in position 13:</p>
<p>  1  2  3  4<br />
  5  6  7  8<br />
  9 10 11 12<br />
 16 14 15 13</p>
<p> It can be shown that all of these swaps beyond the edges of the puzzle may be accomplished with legal puzzle moves.  For example, the above position may<br />
 be arrived at by the move sequence, L L L U R D R R U L L L D R R U R D L L L.  Thus, all products formed from the above generators represent legal puzzle positions.<br />
And therefore, the group formed from the above generators is a well formed model of the 15 puzzle.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

