Thank you very much for all the suggestions. A little bit more of 
background. I am working on this patch
http://trac.sagemath.org/sage_trac/ticket/14127
and would like to have an efficient way of generating the rook placements.

On Wednesday, March 20, 2013 11:17:37 AM UTC-4, Alejandro Morales wrote:
>
> I want to implement a not so slow function for counting/generating all 
> placements of non-attacking rooks in a board. Currently I am generating all 
> partial permutations and checking whether they are in the board.
>
> An alternative would be to encode the board belonging to an n x n grid as 
> a bipartite graph ( I the cell (i,j) is in the board then I have the edge 
> (i,j) ). Then rook placements are just matchings on this graph. 
>
> I coud not find an implementation of matchings in the Graph Theory 
> functions.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to