Magic Tour

Author

Eric W. Weisstein
March 17, 2003

This notebook downloaded from http://mathworld.wolfram.com/notebooks/RecreationalMath/MagicTour.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/MagicTour.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Initialization

<<MagicSquares`;

Kings

KingsMagicTour={
		{61,62,63,64,1,2,3,4},
		{60,11,58,57,8,7,54,5},
		{12,59,10,9,56,55,6,53},
		{13,14,15,16,49,50,51,52},
		{20,19,18,17,48,47,46,45},
		{21,38,23,24,41,42,27,44},
		{37,22,39,40,25,26,43,28},
		{36,35,34,33,32,31,30,29}};
{MagicQ[KingsMagicTour],ColSums[KingsMagicTour]}

TourPlot[KingsMagicTour]

Knights

8×8 Semimagic

Jaenisch

Jaenisch={
	{63,22,15,40,1,42,59,18},
		{14,39,64,21,60,17,2,43},
		{37,62,23,16,41,4,19,58},
		{24,13,38,61,20,57,44,3},
		{11,36,25,52,29,46,5,56},
		{26,51,12,33,8,55,30,45},
		{35,10,49,28,53,32,47,6},
		{50,27,34,9,48,7,54,31}};

Through[{SemiMagicQ,MagicQ,
	ColSums,RowSums,MainDiagSums}[JaenischsMagicTour]]

Francony

Francony={
{2,59,62,7,18,43,46,23},
{61,6,1,42,63,24,19,44},
{58,3,60,17,8,45,22,47},
{53,16,5,64,41,20,25,36},
{4,57,52,9,32,37,48,21},
{15,54,13,40,49,28,35,26},
{12,51,56,31,10,33,38,29},
{55,14,11,50,39,30,27,34}};

Through[{SemiMagicQ,MagicQ,
	ColSums,RowSums,MainDiagSums}[Francony]]

Beverly

Beverly={
{1,30,47,52,5,28,43,54},
{48,51,2,29,44,53,6,27},
{31,46,49,4,25,8,55,42},
{50,3,32,45,56,41,26,7},
{33,62,15,20,9,24,39,58},
{16,19,34,61,40,57,10,23},
{63,14,17,36,21,12,59,38},
{18,35,64,13,60,37,22,11}
};

Through[{SemiMagicQ,MagicQ,
	ColSums,RowSums,MainDiagSums}[Beverly]]

Plots

Show[GraphicsArray[Partition[TourPlot[#1,LineStyle->Black,DiskStyle->Blue,PlotLabel->StyleForm[#2,FontColor->Black],TextStyle->{FontColor->GrayLevel[.1],FontFamily->"Times",FontSize->10},DisplayFunction->Identity,PlotRange->All]&@@@{
{Beverly,"Beverly 1848, Σ = 282, 210"},
{Jaenisch,"Jaenisch 1862, Σ = 348, 168"},{Francony,"Francony 1882, Σ = 264, 256"}
},2,2,{1,1},{}],GraphicsSpacing->{.4,.1}],PlotRange->All]

Half-Boards 16×16 Magic Half-Tours

HalfBoards={
		{15,20,17,36,13,64,61,34},
		{18,37,14,21,60,35,12,63},
		{25,16,19,44,5,62,33,56},
		{38,45,26,59,22,55,4,11},
		{27,24,39,6,43,10,57,54},
		{40,49,46,23,58,3,32,9},
		{47,28,51,42,7,30,53,2},
		{50,41,48,29,52,1,8,31}};

HalfToursPlot[HalfBoards,ImageSize->200]

Through[{SemiMagicQ,MagicQ,
	ColSums,RowSums,MainDiagSums}[HalfBoards]]

Madachy

MagicTour={
{184,217,170,75,188,219,172,77,228,37,86,21,230,39,88,25},{169,74,185,218,171,76,189,220,85,20,229,38,87,24,231,40},
{216,183,68,167,222,187,78,173,36,227,22,83,42,237,26,89},{73,168,215,186,67,174,221,190,19,84,35,238,23,90,41,232},
{182,213,166,69,178,223,176,79,226,33,82,31,236,43,92,27},{165,72,179,214,175,66,191,224,81,18,239,34,91,30,233,44},
{212,181,70,163,210,177,80,161,48,225,32,95,46,235,28,93},{71,164,211,180,65,162,209,192,17,96,47,240,29,94,45,234},{202,13,126,61,208,15,128,49,160,241,130,97,148,243,132,103},{125,60,203,14,127,64,193,16,129,112,145,242,131,102,149,244},{12,201,62,123,2,207,50,113,256,159,98,143,246,147,104,133},{59,124,11,204,63,114,1,194,111,144,255,146,101,134,245,150},{200,9,122,55,206,3,116,51,158,253,142,99,154,247,136,105},{121,58,205,10,115,54,195,4,141,110,155,254,135,100,151,248},{8,199,56,119,6,197,52,117,252,157,108,139,250,153,106,137},{57,120,7,198,53,118,5,196,109,140,251,156,107,138,249,152}
};

MagicQ[MagicTour]

<<MagicSquares`

TourPlot[MagicTour]