I’m new to abstract algebra, so recently, I came up with a curious question: Given a group $G$ and a subset $S$ of $G$, is there a general algorithm to decide whether $\langle S \rangle = G$?
A special case which I find interesting is when $G = S_n$ (finite symmetric groups), can we still come up with such algorithm to decide this problem? If possible, is the algorithm efficient (i.e in polynomial time)?
(I think if the search space $G$ is finite, I might be able to come up with an exponential time brute force algorithm which takes $g_1, g_2 \in S$ and put $g_1g_2, g_2g_1$ back to $S$ repeatedly until there is no more new elements; not sure though if this is correct.)
A concrete formulation of this question is more like: “Does the problem of checking whether $S$ generates $G$ in P, EXP, or even decidable or not?” for $G = S_n$, for finite $G$, and for general $G$.
In the Cayley (multiplication) table model, this problem reduces to membership testing (Cayley Group Membership, or CGM).
Instance: Let $G$ be a finite group given by its multiplication table. Let $S \subseteq G$, and let $x \in G$.
Decision: Is $x \in \langle S \rangle$?
It is known that CGM belongs to $\textsf{L}$. We may use a logspace transducer to write down the Cayley graph $\text{Cay}(G, S)$. We then apply Reingold's logspace pathfinding algorithm to decide if there is a path from the identity element of $G$ to $x$.
To test whether $G = \langle S \rangle$, we apply the above algorithm for each $x \in G$.
In certain cases, we can achieve alternate parallel bounds (uniform $\textsf{AC}$ circuits of depth $\text{poly } \log \log |G|$). See: https://www.sciencedirect.com/science/article/pii/S0022000001917647
Edit: Even in the permutation group setting, membership testing is in $\textsf{NC}$ (https://ix.cs.uoregon.edu/~luks/NC.pdf). If I remember correctly from the last time I did the analysis, at most $O(\log m)$ iterations suffice (where $m$ is the number of generators- i.e., the size of the input), and each iteration is $\textsf{AC}^{1}$-computable. This gives us a bound of $\textsf{AC}^{2}$. Multiplying permutations is $\textsf{FL}$-complete ($\textsf{FL}$ is the class of logspace-computable functions, as opposed to decision problems); see Cook--McKenzie (https://www.cs.utoronto.ca/~sacook/homepage/cook_mckenzie.pdf). So we have a lower bound on how much better we can do.
This technique is still theoretical. I would be surprised if it led to efficient practical implementations.