algorithm - Knight's Tour on a 5 x 5 Board Start from any Square? -


i'd check logic here...

i wrote code solve knight's tour , works 8x8 boards starting knight @ square.

but... on 5x5 board show no solution possible when starting @ square (0, 1).

what tried 5x5 starting knight @ row 0, col 1:

  1. warnsdorff's path
  2. added roth (tie breakers based on euclidean distance center).

since did not produce solution did code basic recursion backtracking test every possible path -- no solution found when starting 5x5 on 1, 0.

i looked everywhere list of exhaustive solutions 5x5 board found none.

is there no solution 5x5 when starting @ square 0, 1?

thank you!

correct, there no solution when start @ of squares adjacent corner square.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -