math618

41 Reputation

5 Badges

19 years, 265 days

MaplePrimes Activity


These are replies submitted by math618

Thank you for your interest in my gadget.I wrote it just for playing the puzzle M12:-)

In group package,the function "elements" returns the elements of the permutation group generated by set of permutations in disjoint cycle notation.In fact,the command "elements" create a table whose indices are all the elements of the permutation group  by using Dimino's algorithm,then return those indices in curly brackets.It is a pity that  we cannot  determine or indicate explicitly the factors of each element with the generators(I do not know whether there is a function in maple which can do this).So,I create another table in my function "elems" which can record the factorization of the permutation at the  time of generating a new permutation.After using "elems", you can get a table whose indices are all the elements of  the permutation group in disjoint cycle notation,and whose entries are the factorizations of corresponding indices in string type.

Calling Sequence
     elems(pg)
     elems(gens)
Parameters
     pg   - permutation group
     gens - set of permutations in disjoint cycle notation,like  {[[2,3,1]],[[2,3]],[[2,4]]}  or{5,x=[[2,3,1]],y=[[2,3]],z=[[2,4]]} ,5 is the degree of the permutation group
 

You can find the code here.

After running the code,you can use the function elems like
> with(group):
> pg1:=elems({5,x=[[2,3,1]],y=[[2,3]],z=[[2,4]]}):

                 [2, 3, 1, 4, 5], be defined as, "x"
                 [1, 3, 2, 4, 5], be defined as, "y"
                 [1, 4, 3, 2, 5], be defined as, "z"

> pg1[[[2,3,4]]];
> mulperms([[2,3]],[[2,4]]);

                                 "yz"
                             [[2, 3, 4]]

> pg1[[[1,4],[2,3]]];
> foldl(mulperms, [[2,3]], [[2,4]], [[2,3]], [[2,3,1]], [[2,4]]);

                               "yzyxz"
                           [[1, 4], [2, 3]]

> print(pg1);
table([[[1, 2]] = "yx", [[1, 4, 3, 2]] = "yzxz",[[1, 3, 4]] = "yzyxy", [[1, 3, 2]] = "yxy",[[1, 2], [3, 4]] = "yzx", [[1, 4, 2, 3]] = "xz",[[1, 2, 4, 3]] = "zx", [[1, 3], [2, 4]] = "zxy",[[2, 3, 4]] = "yz", [] = "yy", [[1, 2, 4]] = "zyx",[[1, 2, 3]] = "x", [[2, 4]] = "z", [[1, 3, 4, 2]] = "yzxy",[[1, 3]] = "xy", [[1, 4, 2]] = "yxz", [[1, 3, 2, 4]] = "zyxy" , [[1, 4, 3]] = "zxz", [[2, 3]] = "y", [[1, 2, 3, 4]] = "yzyx", [[2, 4, 3]] = "zy",[[1, 4], [2, 3]] = "yzyxz", [[3, 4]] = "yzy",[[1, 4]] = "zyxz" ])


> pg2:=elems({[[2,1]],[[2,3]]}):

                    [1, 3, 2], be defined as, "a"
                    [2, 1, 3], be defined as, "b"

> indices(pg2);

  [[[1, 2]]], [[[1, 3, 2]]], [[]], [[[1, 2, 3]]], [[[1, 3]]], [[[2, 3]]]

> entries(pg2);

            ["b"], ["ba"], ["aa"], ["ab"], ["aba"], ["a"]

 > pg3:=elems(permgroup(5, {a=[[1,2],[4,5]], b=[[5,4,3,2,1]]})):

                 [2, 1, 3, 5, 4], be defined as, "a"
                 [5, 1, 2, 3, 4], be defined as, "b"

That's great!Thank you!

That's great!Thank you!

I just tried to find a way to convert a integer string  to "real" number.Google can't help me,but let me here to see the topic,and let me think in my way.

My English is poor,so I'm not master the maple soft.

3q for your laconic method.

I have an other question:is there any operator can supersede "mulperms",which can simplify the formula mulperms(e1,mulperms(e2,e3)) like the product of number a,b,c:a*(b*c).

I just tried to find a way to convert a integer string  to "real" number.Google can't help me,but let me here to see the topic,and let me think in my way.

My English is poor,so I'm not master the maple soft.

3q for your laconic method.

I have an other question:is there any operator can supersede "mulperms",which can simplify the formula mulperms(e1,mulperms(e2,e3)) like the product of number a,b,c:a*(b*c).

Page 1 of 1