A homework exercise for my students asks them to find all subgroups of
S_4, which should be a very instructive exercise, even if a bit
unreasonable.  In SAGE, the  conjugacy_classes_subgroups()  method
gets you started, and the quick-and-dirty brute-force code below
creates all possible subgroups by doing the necessary conjugations.

Is there a SAGE command that will do something similar?  Are there
SAGE commands that will make the code below more efficient?  (The
routine below takes about 30 seconds on my reasonably powerful
machine.)

A "subgroups" command would be very useful command for students
learning group theory and experimenting, though time and space might
quickly become a problem.  Any thoughts?

G = SymmetricGroup(4)
conj_sg = G.conjugacy_classes_subgroups()
all_sg=[]
for representative_sg in conj_sg:
  for g in G:
    new_sg=[]
    for h in representative_sg:
      new_sg.append(g^-1*h*g)
    new_sg.sort()
    if not(new_sg in all_sg):
      all_sg.append(new_sg)
for sg in all_sg:
  print sg

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
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://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to