semigroups / Semigroups

The GAP package Semigroups
https://semigroups.github.io/Semigroups/
Other
24 stars 36 forks source link

Partial Jones and Motzkin monoids #131

Closed james-d-mitchell closed 8 years ago

james-d-mitchell commented 9 years ago

Originally reported by: Anonymous


#!gap

PJonesMonoid := function( n )
    local  cup, gap, ll, i, ext;
    if n = 1 then 
        return RegularSemigroup( Monoid( 
                Bipartition( [ [ 1, -1 ] ] ),
                Bipartition( [ [ 1 ], [ -1 ] ] )
            ) );
    fi;
    cup := [  ];
    gap := [  ];
    ll := List( [ 1 .. n ], j -> [ j, -j ] );
    for i in [ 1 .. n-1 ] do 
        ext := Union(ll{[1..i-1]}, ll{[i+2..n]});
        Add( cup, Bipartition( Union( ext, [ [ i, i+1 ], [ -i, -i-1 ] ] ) ) );
        Add( gap, Bipartition( Union( ext, [ [ i ], [ -i ], [ i+1, -i-1 ] ] ) ) );
    od;
    Add( gap, Bipartition( Union( ll{[1..n-1]}, [ [ n ], [ -n ] ] ) ) );
    ll := Union( cup, gap );
    return RegularSemigroup( Monoid( ll ) );
end; 
MotzkinMonoid := function( n )
    local  cup, up, ll, i, ext;
    if n = 1 then
        return RegularSemigroup( Monoid(
                Bipartition( [ [ 1, -1 ] ] ),
                Bipartition( [ [ 1 ], [ -1 ] ] )
            ) );
    fi;
    cup := [  ];
    up := [  ];
    ll := List( [ 1 .. n ], j -> [ j, -j ] );
    for i in [ 1 .. n-1 ] do
        ext := Union(ll{[1..i-1]}, ll{[i+2..n]});
        Add( cup, Bipartition( Union( ext, [ [ i, i+1 ], [ -i, -i-1 ] ] ) ) );
        Add( up, Bipartition( Union( ext, [ [ i ], [ i+1, -i], [ -i-1 ] ] ) ) );
    od;
    ll := Union( cup, up, List( up, Star ) );
    return RegularSemigroup( Monoid( ll ) );
end;

james-d-mitchell commented 9 years ago

Original comment by James Mitchell (Bitbucket: james-d-mitchell, GitHub: james-d-mitchell):


Removing milestone: 2.6 (automated comment)

james-d-mitchell commented 9 years ago

Original comment by James Mitchell (Bitbucket: james-d-mitchell, GitHub: james-d-mitchell):


This was resolved in release 2.6.

james-d-mitchell commented 9 years ago

Original comment by James Mitchell (Bitbucket: james-d-mitchell, GitHub: james-d-mitchell):


Right you do get a big speed up if you put create it using RegularSemigroup. Beware that if the semigroup is not regular, then this will cause extreme weirdness!

james-d-mitchell commented 9 years ago

Original comment by thefrettinghand (Bitbucket: thefrettinghand, GitHub: thefrettinghand):


It looks like we get significant speedups when playing with these guys if we call them using RegularSemigroup.

#!GAP

MotzkinMonoid := n -> RegularSemigroup( JonesMonoid(n),AsBipartitionSemigroup( POI( n ) ) );
PartialJonesMonoid := n -> RegularSemigroup( JonesMonoid(n),AsBipartitionSemigroup( Semigroup( Idempotents( POI( n ) ) ) ) );
james-d-mitchell commented 9 years ago

Original comment by James East (Bitbucket: James_East, GitHub: Unknown):


#!gap
PartialBrauerMonoid(n):=Semigroup(BrauerMonoid(n),AsBipartitionSemigroup(SymmetricInverseMonoid(n)));
james-d-mitchell commented 9 years ago

Original comment by James East (Bitbucket: James_East, GitHub: Unknown):


PartialJonesMonoid(n) is generated by JonesMonoid(n) and the rank n-1 partial identity functions.

MotzkinMonoid(n) is generated by JonesMonoid(n) and POI(n).

PartialBrauerMonoid(n) is generated by BrauerMonoid(n) and any rank n-1 partial permutation (e.g., a partial identity).