> < ^ Date: Fri, 03 Oct 1997 08:10:55 -0500 (CDT)
> < ^ From: Bruce W. Colletti <bcolletti@compuserve.com >
> ^ Subject: Code Improvement

Am using GAP 3.4.4 (DOS) and seek to improve the code below. There's
undoubtedly a better way known to veteran GAP users (I'm new). Indeed, I
ran the code overnight (Pentium-100) and it hadn't yet solved the first
iteration. Curiously, the screen was cleared sometime during the run for
unknown reasons. This has never happened before in GAP (my system won't
automatically alter screen).

While there may be a simple proof to the question, at present I'm interested
in experimenting with GAP and wonder what brings my system to its knees.

Thankx for any insights offerred.




- Let S(n) be the symmetric group on n letters (n is even)

- Let H = <(1,2),(3,4),(5,6),...,(n-1,n)> 
   - Let B := <(1,3)(2,4),(3,5)(4,6),(5,7)(6,8),...>, where i'th generator
is (2i-1,2i+1)(2i,2(i+1))

   - Show HB is a subgroup and H intersect B is {identity}.  To show the
former, I use HB = BH iff HB is a group.  I loop through n = 14, 16, 18, 20.


k := 10;
for n in 2*[7..k] do
    G := SymmetricGroup(n);
# A will be [[1,2],[3,4],...,[n-1,n]]

A := [];
for i in [1..n/2] do Add(A,[2*i-1,2*i]); od;

H := List(A,x->MappingPermListList(x,Reversed(x)));
H := Subgroup(G,H);

# B will be [(1,3)(2,4),(3,5)(4,6),(5,7)(6,8),...]

B := [];
for i in [1..Length(A)-1] do
    p := MappingPermListList(Concatenation(A[i],A[i+1]),

B := Subgroup(G,B);

# HB = BH?

D1 := DoubleCoset(H,(),B);
D2 := DoubleCoset(B,(),H);
    Print("\nn=",n," group(HB)? ",D1=D2,"  |H intsect B| = ",

Miles-Receive-Header: reply

> < [top]