# Subgroup method

The **subgroup method** is an algorithm used in the mathematical field of group theory. It is used to find the word of an element. It doesn't always return the minimal word, but it can return optimal words based on the series of subgroups that is used. The code looks like this:

functionoperate(element, generator) <returns generator operated on element>functionsubgroup(g) sequence := (set of subgroups that will be used, depending on the method.) word := []forsubgroup in sequence coset_representatives := [] <fill coset_representatives with coset representatives of (next subgroup)/subgroup>foroperation in coset_representativesifoperate(g, operation) is in the next subgroupthenappend operation onto word g =operate(g, operation)breakreturnword

This article is issued from
Wikipedia.
The text is licensed under Creative
Commons - Attribution - Sharealike.
Additional terms may apply for the media files.