This is a bit off-topic (though it is about N-queens) but I've long wanted to 
ask people if an idea I had once is a well-known one. It once occurred to me 
that solutions to N-rooks can be viewed as linear transformations that 
correspond to permutations of a vector. So, then I wondered to what sort of 
transformations solutions to N-queens correspond. I'll leave a gap in case 
anyone wants to think about it...

















Okay, N-queens solutions correspond to transformations in which no two entries 
in the permuted vector are the same distance apart as they were before. This 
leads to a simple algorithm for finding solutions. Fill a vector with the 
digits 1 to veclen, generate permutations, and see if the difference between 
any two element indices is the same as the difference between their contents. 
You can then easily reverse engineer the board.

Is this well known?

Thanks,

--Jerry Jackson

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to