To make it simple and not have to deal with the 8 queens problem that is different with the 5 queens one, I'll ask in a different way.
I am not familiar with implementing in Python such terms as "standard depth-first search of the solution space", "permutation", "recursion", "'canonical' form", ... I couldn't find the "Wolffram site's Dudeney reference". How would you write a function that will populate a list with a list of numbers with all the possibilities? For example a list of 3 numbers taken among 4 [0,1,2,3] without duplicates. The result should be: [0,1,2] [0,1,3] [0,2,3] [1,2,3] I would apply this to my problem by adding conditions. Thanks again for your help. -- http://mail.python.org/mailman/listinfo/python-list