On 5/29/07, Green Kobold <[EMAIL PROTECTED]> wrote:
>
> Hi Community,
>
> I excuse this simple questions, if here is not the place to ask them,
> please tell me. I am trying some applications of groups for sound
> organization, I studied some theory, for implementation i intend using
> sage, on which i installed external python libraries with perfect
> success! Thanks, guys, sage is surprisingly nice!
>
> Anyway, I am not used to computational algebra, and here goes some
> simple questions:
>
> 1) I have a set X on which i am trying to implement permutations. I
> know that if G is Group : G.degree() gives me the number of elements
> in which G acts. How can I call all groups with degree equal to the
> number of elements on X? I mean to get a set of groups whose:
> XG = {G is Group : G.degree() == len(X)} or even:
> XG = {G is Group : G.degree() <= len(X)}
>
> It would be nice to have classifications for all groups in XG or
> choose to only select permutation groups. Including which ones are
> subgroups of which.
It sounds like you want the "lattice" of all subgroups of the symmetric
group S_n, where n = len(X). This set grows very rapidly as n increases.
Are you only concerned with small numbers like n = 3 or 4 or 5?
>
> 2) Say X = numpy.array([3.5, 8.5, 9.0]) and S=SymmetricGroup(3)
>
> And I want to apply permutations, elements of S in X.
>
> For one element:
> I have to give X's index permuted and write it somewhere:
>
> sage: perm = numpy.zeros([len(X)])
> sage: list(S)[3]
> (1,2,3)
> sage: for i in X:
> ....: perm[list(S)[3](X.index(i) +1) -1]=i
> sage: perm
> array([9.00000000000000, 3.50000000000000, 8.50000000000000], dtype=object)
>
> for all elements in S:
>
> sage: perms = zeros(( len(list(S)), len(X) ))
>
> sage: perms
>
> array([[ 0., 0., 0.],
> [ 0., 0., 0.],
> [ 0., 0., 0.],
> [ 0., 0., 0.],
> [ 0., 0., 0.],
> [ 0., 0., 0.]])
>
> sage: for j in list(S):
> ....: for i in X:
> ....: perms[ list(S).index(j) ][ j( X.index(i) +1) -1] = i
>
> sage: perms
> array([[ 3.5, 8.5, 9. ],
> [ 3.5, 9. , 8.5],
> [ 8.5, 3.5, 9. ],
> [ 9. , 3.5, 8.5],
> [ 8.5, 9. , 3.5],
> [ 9. , 8.5, 3.5]])
>
> Exactly what is the order in which elements are listed in list(G)?
It is probably the same order that GAP gives the elements of G.
It probably depends in subtle ways on how the group generators themselves
are listed.
> To list(G) for G with big order takes a long time. Is there a way to
> use elements in list(G) which is faster?
You mean do a for loop over the elements of G without computing
all the elements in G first? Yes, that is implemented. Here is an example:
sage: G = PermutationGroup([[(1,2),(3,4)],[(2,3,4)]])
sage: G.order()
12
sage: [g.order() for g in G]
[1, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 2]
sage:
>
> thanks in advance,
> gk
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---