[GAP Forum] PartitionsSet
Thomas Breuer
sam at Math.RWTH-Aachen.De
Thu Jun 16 08:19:01 BST 2016
Dear GAP Forum,
Fatemeh Moftakhar wrote
> I need all partitions of {2,..,21}. I mean, I want to run
> PartitionsSet([2..21]). I have servers with 512 gigabyte ram and my
> computer stopped after two days, because it needs more ram. I don't have
> better computer. Is there a faster algorithm? I need these partitions for
> computing supercharacter theories of Janko group J2.
If you really have to run over all these partitions then
this will take a lot of time.
Let us assume that you can process a million of them in a second,
which would be quite fast.
In one year (356 days with 24 hours) you can then process
the following number of partitions.
gap> 10^6 * 3600 * 24 * 356;
30758400000000
gap> NrPartitionsSet( [ 2 .. 21 ] );
51724158235372
I would suggest to find criteria that allow you to exclude most of the
candidates without looking at them.
All the best,
Thomas
P.S.:
Even if you really have to look at each element from a large set
then keeping all of them in memory at the same time is probably
not necessary.
For such purposes, one can think about developing a so-called iterator
for the set.
This is essentially a function that knows which was the last element
you have looked at, and can can be called in order to give you the
next element.
Such functionality exists already in GAP for several kinds of sets,
for example for the set of partitions of a given number.
I am not aware of iterator functionality for the set of partitions
of a set,
but the above numbers show that this approach would not be suitable
in your situation.
More information about the Forum
mailing list