ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 18 Feb 2022 13:24:03 +0100Memory full and Weyl grouphttps://ask.sagemath.org/question/61141/memory-full-and-weyl-group/I have a problem of finding all regular intervals in the Coxeter group A9. When I use the code below for small groups A1 up to A4 I find the intervals. But for big groups like A7, A8 (these are symmetric groups S8 and S9), etc in sage 9.5 they say that the memory is full. Is there a way of cleaning the used memory so that I can get the last intervals? Because I want to see how the last few intervals look like. Down is the code.
W = WeylGroup('A9', prefix='s')
s1, s2, s3, s4, s5 = W.simple_reflections()
S = W.simple_reflections()
T = W.reflections()
for u in W:
for v in W:
if u != v and v != W.long_element() and u.bruhat_le(v):
K = Set([t for t in T if u.bruhat_le(t*u) and (t*u).bruhat_le(v)])
if K.cardinality() == v.length() - u.length():
print([u, v])Thu, 17 Feb 2022 02:01:07 +0100https://ask.sagemath.org/question/61141/memory-full-and-weyl-group/Comment by FrédéricC for <p>I have a problem of finding all regular intervals in the Coxeter group A9. When I use the code below for small groups A1 up to A4 I find the intervals. But for big groups like A7, A8 (these are symmetric groups S8 and S9), etc in sage 9.5 they say that the memory is full. Is there a way of cleaning the used memory so that I can get the last intervals? Because I want to see how the last few intervals look like. Down is the code.</p>
<pre><code>W = WeylGroup('A9', prefix='s')
s1, s2, s3, s4, s5 = W.simple_reflections()
S = W.simple_reflections()
T = W.reflections()
for u in W:
for v in W:
if u != v and v != W.long_element() and u.bruhat_le(v):
K = Set([t for t in T if u.bruhat_le(t*u) and (t*u).bruhat_le(v)])
if K.cardinality() == v.length() - u.length():
print([u, v])
</code></pre>
https://ask.sagemath.org/question/61141/memory-full-and-weyl-group/?comment=61189#post-id-61189and in fact maybe you can replace `K=...` by
K = sum(1 for t in T if u.bruhat_le(t*u) and (t*u).bruhat_le(v))
to compute directly the cardinality.Fri, 18 Feb 2022 13:24:03 +0100https://ask.sagemath.org/question/61141/memory-full-and-weyl-group/?comment=61189#post-id-61189Comment by FrédéricC for <p>I have a problem of finding all regular intervals in the Coxeter group A9. When I use the code below for small groups A1 up to A4 I find the intervals. But for big groups like A7, A8 (these are symmetric groups S8 and S9), etc in sage 9.5 they say that the memory is full. Is there a way of cleaning the used memory so that I can get the last intervals? Because I want to see how the last few intervals look like. Down is the code.</p>
<pre><code>W = WeylGroup('A9', prefix='s')
s1, s2, s3, s4, s5 = W.simple_reflections()
S = W.simple_reflections()
T = W.reflections()
for u in W:
for v in W:
if u != v and v != W.long_element() and u.bruhat_le(v):
K = Set([t for t in T if u.bruhat_le(t*u) and (t*u).bruhat_le(v)])
if K.cardinality() == v.length() - u.length():
print([u, v])
</code></pre>
https://ask.sagemath.org/question/61141/memory-full-and-weyl-group/?comment=61155#post-id-61155Why do you use Set instead of a list ?Thu, 17 Feb 2022 18:53:13 +0100https://ask.sagemath.org/question/61141/memory-full-and-weyl-group/?comment=61155#post-id-61155Comment by FrédéricC for <p>I have a problem of finding all regular intervals in the Coxeter group A9. When I use the code below for small groups A1 up to A4 I find the intervals. But for big groups like A7, A8 (these are symmetric groups S8 and S9), etc in sage 9.5 they say that the memory is full. Is there a way of cleaning the used memory so that I can get the last intervals? Because I want to see how the last few intervals look like. Down is the code.</p>
<pre><code>W = WeylGroup('A9', prefix='s')
s1, s2, s3, s4, s5 = W.simple_reflections()
S = W.simple_reflections()
T = W.reflections()
for u in W:
for v in W:
if u != v and v != W.long_element() and u.bruhat_le(v):
K = Set([t for t in T if u.bruhat_le(t*u) and (t*u).bruhat_le(v)])
if K.cardinality() == v.length() - u.length():
print([u, v])
</code></pre>
https://ask.sagemath.org/question/61141/memory-full-and-weyl-group/?comment=61142#post-id-61142You can directly iterate over the Bruhat intervals using
sage: W = WeylGroup('A4', prefix='s')
sage: P = W.bruhat_poset()
sage: [(u,v) for u,v in P.relations_iterator()]Thu, 17 Feb 2022 10:27:32 +0100https://ask.sagemath.org/question/61141/memory-full-and-weyl-group/?comment=61142#post-id-61142