Application Center - Maplesoft

# Knight's Tour

You can switch back to the summary page by clicking here.

Knight's Tour

Dr. Yury Zavarovsky

All-Russian Distance Institute of Finance & Economics

A knight's tour is a sequence of moves of a knight on a chessboard such that the knight visits every square only once.

This application presents the implementation of this task in Maple. Required parameters of the procedure (named  KnightTour)  are:

address  - the address of the initial square,  in the algebraic notation (for example, f3 or g6)

opt  - an optional parameter that can be one of the following:

1) if  opt is sequence  (by default) then  the procedure returns the sequence of moves of the knight in the usual algebraic notation,

2)  if  opt is diagram   then  the procedure returns the plot of moves of the knight and  sequentially numbers all the visited squares,

3) if  opt is animation  then  the procedure returns an animation of moves of the knight.

In the procedure is used a solution with maximum symmetry by George Jelliss, http://www.mayhematics.com/t/8f.htm

KnightTour := proc(address::symbol, opt::symbol := sequence)

 (1)