While thinking about the generation of a lot of similar yet distinct pictures from a simple set of primitives I ended up trying to find an efficient algorithm to generate the elements of a symmetry group generated from a finite set of operations.
For example, in 2D, given the two operations $F = \text{"reflection through an axis A"}$ and $R = \text{"clockwise 90° rotation"}$, I can generate the symmetry group of the square (I think it is called $D_4$).
In my head I could come to the conclusion that this group has exactly 8 elements, written in terms of F and R, (I being the identity): $\{I, R, R^2, R^3, AR, A, RA, R^2A\}$.
However, I cannot find either a formal proof that there are no more elements, or an algorithm that would produce those elements without trial and error.
Is there such an algorithm that could be applicable to other set of generator (say 60° rotation and one reflection) ?
PS: When I say efficient algorithm I really mean deterministic, provably terminating algorithm, the complexity is probably terrible anyway if such an algorithm exists PPS: I think there is a way to formulate this in term of permutation, but I don't have the required background and cannot understand how it works, let alone the answer to a similar question in an isomorphic space.