A group $G$ is said to be special if it can be decomposed into direct product of two groups $A$ and $B$ Where $B$ is a abelian group which is a direct product of $Z_2$'s ( cyclic group of order 2 ) and group $A$ is non abelian and it contains an element of order $x$. One more thing known about $A$ is it has $y$ number of conjugacy classes.
$$G = A \times B$$
Now given a group $G$ by table representation i want to find whether given group is special or not
Question : What could be the brute force way to test if group is special or not?
I am thinking like first finding the sylow subgroups and then from those try to to do something.
Any high level idea or technique will be appreciated.
I would say first identify an idenity element of $G$:
To do that do:
Now looking at the direct product, each summand is isomorphic to the subgroup $1 \oplus C \oplus \cdots \oplus 1$ so that if $G = A \oplus (\Bbb{Z}_2)^k$. You want to test if there are $k$ elements $x$ such that $x^2 = e$ and such that for any two elements $x, x'$, you have $C_x \cap C_{x'} = 1$ which is to say $x \neq x'$. So you need only to search for $k$ such distinct elements. First search for $k = 1$. Then iterate and search for $k = 2$ by keeping a set (for fast lookup) of previously found elements. So search for the maximum $k$ such that the above holds. Only search up to $k = |G| - 6 = |G| - 5 - |e|$ since no group $\leq 5$ in order is non-abelian.
The next step is to test whether the remainder summand $A$ is abelian. First take all remaining elements (leftover after above $\Bbb{Z}_2^k$ step, and see if they form a group. If they do then by closure they are disjoint from the rest of the $x \in $ above step by definition.
Then verify that $A$ is non-abelian. To do that just look at the composition table like a matrix and verify that it is non-symmetric across the diagonal.
If any part of the above fails, return an error code indicating NotGroup, NotSpecial, and so on...
Correction to the above: You may have that $A \geqslant \Bbb{Z}_2$ for some generator $x$ in the $\Bbb{Z}_2^k$ step above. If that's true, then for each $k = 1, 2, \dots, |G| - 6$ perform the last step (rearrange above pseudocode) and search for groupness and non-abelianness in the remainder after $k$ elements removed. Continue all the way to $|G| - 6$ always if and only iff you want to list all possible special group decompositions.