ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 26 Sep 2016 17:59:30 -0500Generating all elements of $SL_2(\mathbb{F}_q)$https://ask.sagemath.org/question/34960/generating-all-elements-of-sl_2mathbbf_q/ What is the fastest way to create a set with all elements of $SL_2(\mathbb{F}_q)$ for $q$ some prime power of size about $50$? One way to do it is to find a representative for each conjugacy class and then use the ConjugacyClass method, but this seems inefficient. Is there a better way?Mon, 26 Sep 2016 16:01:48 -0500https://ask.sagemath.org/question/34960/generating-all-elements-of-sl_2mathbbf_q/Answer by tmonteil for <p>What is the fastest way to create a set with all elements of $SL_2(\mathbb{F}_q)$ for $q$ some prime power of size about $50$? One way to do it is to find a representative for each conjugacy class and then use the ConjugacyClass method, but this seems inefficient. Is there a better way?</p>
https://ask.sagemath.org/question/34960/generating-all-elements-of-sl_2mathbbf_q/?answer=34961#post-id-34961You can define your group as follows:
sage: G = SL(2,GF(53))
Then you can get the list of its elements with the `list` method:
sage: L = G.list()
On my 5+ years old laptop, it takes about 44 seconds.
Mon, 26 Sep 2016 17:59:30 -0500https://ask.sagemath.org/question/34960/generating-all-elements-of-sl_2mathbbf_q/?answer=34961#post-id-34961