by randomwalker · 17y ago · 0 comments
A couple of days ago he gave me a copy of his paper on Leaper graphs (On dead trees.. quaint :-) His office is a few doors from mine.) Along with a charming note about rewards for finding bugs. Anyway, Leaper graphs are the graphs that describe the moves of a generalized Knight on generalized chessboard. So I researched this some more, and found that Knuth was the first to enumerate all the Knight's tours that are invariant under 180° rotation.
At this point I'm thinking, this sounds like it could be an ICFP problem, and a language like Haskell would be ideally suited for it. Nope, turns out he wrote the program in his C variant. http://sunburn.stanford.edu/~knuth/programs/sham.w I'm amazed you can write that in C and have it turn out as short as it was. It also looks like it has goto's.
I really don't know what to take away from it.
EDIT: Sorry, I understand now. If the knight's tour ends directly opposite it's starting position, it is invariant under 180 degree rotation.
As you can see from those examples, a symmetric tour is a rather regular-looking object; a random tour has an extremely low probability of being symmetric.
Obviously Knuth thinks that books as a medium are still valid. (I am with him on this one.)
I have not read the book nor do I have any clue about Leaper graphs, but for some reason he thought it could help to research this. How can this research / knowledge help? Maybe it's just fun, I don't know.