> Didn't get you. Can you explain a bit more?

A partition of the edges of a graph into disjoint matchings is called
an edge-coloring. With the function I gave you, you can compute an
edge-coloring of your graph which, because that graph is a K_{n,n},
will be a collection of disjoint perfect matchings.

Note that it may be a bit slow. You have a faster way to obtain what
you desire with:

sage: n=5;designs.transversal_design(2,n,resolvable=True)._classes
[[[0, 5], [1, 6], [2, 7], [3, 8], [4, 9]],
 [[0, 6], [1, 7], [2, 8], [3, 9], [4, 5]],
 [[0, 7], [1, 8], [2, 9], [3, 5], [4, 6]],
 [[0, 8], [1, 9], [2, 5], [3, 6], [4, 7]],
 [[0, 9], [1, 5], [2, 6], [3, 7], [4, 8]]]

What you see is a list of [list of pairs], and each [list of pairs] is
a perfect matching in graphs.CompleteBipartiteGraph(n,n). They are all
disjoint.

Nathann

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to