Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 120 1 d Solution Created 2026-10-03 Updated 2026-10-06
The regular language is nonempty because it represents every element of the group. Find any accepted word using Breadth-first search in its finite-state automaton. If is the empty word, it already represents the identity.
Otherwise begin with and repeatedly apply the linear-time multiplication in an automatic structure to the lettersThese letters belong to by symmetry of the alphabet. All intermediate words lie in , and the final word representsHence an identity representative can be constructed effectively:This is a finite preliminary computation depending only on the fixed automatic structure for a group; it uses no test for whether an arbitrary word represents the identity.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 120 1 e Solution Created 2026-10-03 Updated 2026-10-06
Write the input word over an alphabet as . Starting with , obtain from by linear-time multiplication in an automatic structure with . Mathematical induction givesThe time complexity of step is at most a constant times . Summing the costs givesThe automatic structure for a group, and are fixed, so the required representative isFor the empty word, return in constant time.