3
$\begingroup$

My mathematica running on Wolfram Cloud seems to break down if I use a SymmetricGroup greater than 6. As a basic example, when I run,

group1 = GroupMultiplicationTable[SymmetricGroup[6]];
Print[Length[group1]];

I get 720 as output. However, Running the same code with 7 as in,

group1 = GroupMultiplicationTable[SymmetricGroup[7]];
Print[Length[group1]];

causes the notebook to display the running icon for about a minute, and then stop with no output. I am running this code in a notebook on Wolfram Cloud. I have tried running it on desktop Mathematica, but this also ceases to work for SymmetricGroups greater than 7.

$\endgroup$
7
  • 1
    $\begingroup$ Perhaps you are exceeding some memory limitation? Displaying the result and the MaxMemoryUsed for 5 and then for 6 shows how rapidly this is growing and consuming memory. From that could you estimate the size for 7,8,9,10..? It doesn't look like it is a small simple smoothly increasing amount $\endgroup$
    – Bill
    Mar 26, 2023 at 21:40
  • 2
    $\begingroup$ Hm. This would be an integer matrix of size $7! \times 7! = 5040 \times 5040$, right? That fits comfortably into memory... $\endgroup$ Mar 26, 2023 at 21:43
  • $\begingroup$ Perhaps to add clarity, my end goal was to display a histogram of the orders of elements in the Symmetric Group. I have code that works when plugging in SymmetricGroups up to size 6, but using SymmetricGroup[7] fails because for some reason getting the length of the GroupMultiplicationTable returns 1 once it is 7 or greater. Furthermore, I only need to go up to SymmetricGroup[9]. $\endgroup$
    – nj869
    Mar 26, 2023 at 22:01
  • 1
    $\begingroup$ You can get the histogram of orders with something like Histogram[PermutationOrder /@ GroupElements[SymmetricGroup[9]]]. $\endgroup$
    – jose
    Mar 28, 2023 at 23:17
  • $\begingroup$ You're probably exceeding the time limit, which for basic wolframcloud seems to be about one minute. See CloudAccountData[], "SessionEvaluationTimeLimit" -> Quantity[60, "Seconds"] $\endgroup$
    – Michael E2
    May 23, 2023 at 23:15

1 Answer 1

1
$\begingroup$

Here's what I think is happening. There's a bug/buglet in time-constraining the call to whatever library function computes the group multiplication table. Even on my laptop, this runs for about a minute, not the requested time constraint of 10 sec. (buglet), and then returns $Aborted:

TimeConstrained[
 GroupMultiplicationTable[SymmetricGroup[7]] // ByteCount,
 10]

On wolframcloud, it runs for a minute and the kernel crashes (bug).

I would think that wolframcloud would implement the "SessionEvaluationTimeLimit" of 60 sec. by wrapping commands in TimeConstrained[]. It wouldn't be hard to do it in other ways, I suppose, but TimeConstrained[] is already part of the WL system. Clearly(?) there is some other stuff involved in communicating between the web-notebook and the server kernel that is probably involved, but I don't know what it is.

My advice is to report it to WRI so that they can investigate.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.