[GAP Forum] Random elements of a permutation group.

Franz Gaehler gaehler at math.uni-bielefeld.de
Tue Mar 17 15:00:07 GMT 2015


Dear Kieran,

> I opened two instances of GAP on two different machines. I ran the
> following code on both instances:
> 
> G := SymmetricGroup(15);;
> for i in [ 1 .. 20 ] do
>     Display(Random(G));
> od;
> 
> And both produced the same list of elements:

please have a look at section 14.7 of the reference manual.
You can reset the default random number generator used by most
library methods to a new seed at the beginning of each GAP session:

Reset(GlobalMersenneTwister,1234567);

With different seeds, you obtain different random sequences.
The default seed is 1.

Best regards, Franz
_____________________________________________________________________________
Dr. Franz Gähler          Phone  +49 521 / 106   3876
Faculty of Mathematics    Fax    +49 521 / 106 153876
Bielefeld University      Email  gaehler at math.uni-bielefeld.de
D-33615 Bielefeld         http://www.math.uni-bielefeld.de/~gaehler/



More information about the Forum mailing list