# Random Group of order $4096$ with a center of size $2$

How can I create a random group of order $4096$ with a center of size $2$ ?

The algorithm should be able to create every possible group with the given properties in principle. I think the list of groups with the required properties is far too large and probably not even known.

I tried semidirect products. But first, I can produce only a small part of the possible groups with that and second, either there are too many homomorphisms (and I do not know whether GAP can choose a random homomorphism) or the groups I get have a center with a size larger than $2$.

I did not find a command in GAP constructing a random group of a given order, if the list of all groups is not available.

Any suggestions ?

• "Random group of order $\;2^{12}\;$"? If you specify that its center is of size two, how random do you want it to be? The number of groups of order $\;4,096\;$ seems to be at least in the hundreds of thousands of millions, and very probably in the trillions. "Randomly" can be a rather pretty long shot to produce a group as the one you want. – DonAntonio Mar 29 '16 at 8:24
• Do you mean that groups of order $4096$ have a center of size $2$ very rarely, and therefore it would take very long to get a group with $|Z|=2$ by just choosing random groups of order $4096$ ? – Peter Mar 29 '16 at 8:28
• No, I didn't say so. In fact, I've no idea what the size of the centers of those groups can possibly be (except that it cannot be of size $\;2^{11}\;$ as then $\;G/Z(G)\;$ would be cyclic non-trivial and this is impossilbe always). What I meant is that there are so many groups of order $\;4,096\;$ that taking randomly one and expecting it will have a center of size $\;2\;$ can be a very long shot unless something more is known, or conditioned, on such groups. – DonAntonio Mar 29 '16 at 8:35
• I tried to get know more precisely the meaning of question. Let me say this, and know which direction you want to go. Consider two groups of order $2^6$ with center of order $2$ and take their central product. You may replace groups of order $2^6$ by one of order $2^5$ and other of order $2^7$,or one of order $2^4$ and other of order $2^8$, or.....(in short: take central products of groups of order $<2^{11}$ with center of order $2$, in possible ways to get group of order $2^{11}$.) – p Groups Mar 29 '16 at 8:53
• At the end, I want center of order $2$. It seems, constructing random groups until it appears takes a very long time in average, so I probably need a method to rule out large centers to get such a group quickly. – Peter Mar 31 '16 at 22:20

This might be a way to achieve the desired goal, but I do not claim that it is the best way. (Whatever "best" might mean)

First, some work. Higman counted the number of $p$-class 2 groups (length of the lower exponent-$p$ series is 2) of order $p^n$ and concluded that there are at least $p^{2(n^3-6n^2)/27}$ such groups. Therefore, there are at least $2^{64}$ groups of order $4096$.

If you want a $2$-group with center of order $2$, then the $p$-class of the group can range from 3 to 12. If the $p$-class is 2, then the Frattini subgroup is a central subgroup, and in this case is equal to the center. Therefore, $G$ is $11$-generated and $G'=Z(G)=\Phi(G)$, so $G$ is extraspecial which cannot be true. Alternatively, the commutator map is a symplectic form of an odd dimensional space, and therefore, has a radical. Hence, the center has more than 2 elements.

If the $p$-class is $c\in\{3,...,12\}$, then $G$ is a central quotient of the $p$-covering group of $G/P_c(G)$. Specifically, if $P$ is the $p$-covering group of $G/P_c(G)$, then for some $H<Z(P)$, with $[Z(P):H]=2$, $G\cong P/H$. (Details: https://en.wikipedia.org/wiki/P-group_generation_algorithm)

The next issue one might consider is distribution. It seems that the larger the $p$-class, the fewer the number of groups bounded by a specific order. I don't think a statement like this has been proven, but there is data to back this is belief. Therefore, it seems most groups with a center of order 2 would be $p$-class 3. Hence, applying a uniform distribution to $p$-class would not result in a uniform distribution among the groups of order $4096$ and center of order $2$. I'm not sure if you care about this, but it's worth a mention.

With these ideas, one way to generate a random group would be the following (this is basically the $p$-group generation algorithm).

1. Randomly choose the $p$-class: $c$.
2. Randomly choose $c-1$ positive integers whose sum is $11$: $d_1,...,d_{c-1}$.
3. Construct a random group $G$ of $p$-class $2$, order $d_1+d_2$, and generated by $d_1$ elements.
4. Construct the $p$-covering group of $G$: $P$.
5. Construct a random central subgroup $H$ of $P$, where $[Z(P):H]=d_3$, and set $G=P/H$.
6. For all other $d_4,...,d_{c-1}$, do steps 4 and 5 again.
7. Construct the $p$-covering group of $G$.
8. Construct a random central subgroup $H$ of $P$, where $[Z(P):H]=1$.
9. $G=P/H$.

It is possible that at some point in this, the group is terminal. That is, it is equal to its $p$-cover. If this happens, start over or backtrack.

To construct a random group of $p$-class 2, it is enough to construct $d_2$ random $d_1\times d_1$ matrices along with a quadratic map from a $d_1$ dimensional vector space into a $d_2$ dimensional vector space. I'm not sure if GAP has commands to do this, but if $d_1+d_2\leq 9$, then you can choose a random $p$-class 2 group from the databases in GAP and go from there.