The Schreier-Sims algorithm Decompose how a combinatorial group can be generated as a subset of a permutation group. Blurb from Wikipedia:
Once performed, it allows a linear time computation of
- the order of a finite permutation group,
- group membership test (is a given permutation contained in a group?),
- and many other tasks.
Check out the minimal demo here.