[GAP Forum] Permutation of n objects taken r at a time
Levie Bicua
lee_bkua at yahoo.com
Tue Apr 21 08:05:02 BST 2009
Dear GAP forum,
Suppose I wish to get the list of all permutations of n objects taken r at a time
where repetition of elements is allowed? For example from the set
S:=[(1,2), (1,3),(2,3)] , If I will get the permutations of the 3 elements taken 2 at a time with repetition I obtain
T:=[[(1,2),(1,2)], [(1,3),(1,3)], [(2,3),(2,3)], [(1,2),(1,3)], [(1,3),(1,2)], [(1,3),(2,3)], [(2,3),(1,3)], [(1,2),(2,3)], [(2,3), (1,2)]].
I intend to do this for the set
2cyc:=[(),(1,2),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5),(1,2)(3,4),(1,3)(2,4),(1,4)(2,3),
(1,2)(3,5),(1,3)(2,5),(1,5)(2,3),(1,2)(4,5),(1,4)(2,5),(1,5)(2,4),(2,3)(4,5),(2,4)(3,5),(2,5)(3,4),
(1,3)(4,5),(1,4)(3,5),(1,5)(3,4)] with r = 3.
Is there any way GAP can do this especially for a larger set? thanks.
Levi
More information about the Forum
mailing list