Ask Your Question
2

Memory problem: splitting large conjugacy class into parts

asked 2020-07-09 22:34:03 +0100

bksadie gravatar image

updated 2020-07-26 02:54:26 +0100

I'm trying to do a calculation on certain conjugacy classes in a large (Weyl) group, let's say:

W = WeylGroup(["E",8])
w = W.an_element()
for v in W.conjugacy_class(w):
  if v.length() < 12:
    if v.reduced_word()[0] == 1:
      print v.reduced_word()

A typical conjugacy class of such W has a size in the millions. When I run this on my computer, then after about 100000 iterations it stops and prints

Error, reached the pre-set memory limit
(change it with the -o command line option)

(I'm not sure where to enter this -o command, but it wouldn't suffice anyway.)

I don't know exactly how these conjugacy classes are implemented (via GAP I think), but I was hoping that I could simply resume the calculation by using islice or e.g.

for v in W.conjugacy_class(w)[100000:200000]:
  if v.length() < 12:
    if v.reduced_word()[0] == 1:
      print v.reduced_word()

However this doesn't seem to work - I'm guessing that it's first trying to create the entire list W.conjugacy_class(w)[100000:200000] (after crunching through the first 100000), in a less efficient way than before, taking up more memory than before.

Is there a way around this? Perhaps this can somehow be set up as a queue (in GAP!?) so that it takes up little memory?

edit retag flag offensive close merge delete

Comments

print and no parentheses ? Still not using python3 ?

FrédéricC gravatar imageFrédéricC ( 2020-07-10 12:01:56 +0100 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2020-07-10 12:04:03 +0100

FrédéricC gravatar image

This may be useful:

sage: W = CoxeterGroup(['A',4])
sage: W.elements_of_length(4)
<generator object at 0x7fa17124e930>
edit flag offensive delete link more

Comments

Thank you that actually worked for the particular problem that I described (apparently there's a fast algorithm for computing elements of a certain length), but the more general problem remains...

bksadie gravatar imagebksadie ( 2020-07-26 02:53:23 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-07-09 22:34:03 +0100

Seen: 257 times

Last updated: Jul 26 '20