[GAP Forum] complex product of two groups

Sandeep Murthy sandeepr.murthy at gmail.com
Wed Apr 18 14:11:24 BST 2012


Hi,

This command

    ListX( H, K, PROD )

will do the product, seems fairly quick.

SRM


On 18 Apr 2012, at 13:49, William DeMeo wrote:

> Dear Forum,
> 
> If I have two subgroups H and K of a group G, what's the best way to
> form what I think is sometimes called the "complex product"?  That is,
> I want to form the set
> 
> HK = { hk : h in H, k in K }
> 
> (I don't want the group generated by H and K.)
> 
> Below is a listing of the obvious/dumb algorithm, but I suspect
> there's a better way to do this in GAP.  If someone knows of one,
> please let me know.
> 
> Thanks!
> -William
> 
> 
> HK:=[];
> for h in H do
>   for k in K do
>      if h*k not in HK then
>         Add(HK,h*k);
>      fi;
>   od;
> od;
> 
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum




More information about the Forum mailing list