GroupElementToWord
✖
GroupElementToWord
Details and Options

- The group element g must belong to the given group.
- GroupElementToWord[group,g] gives the word of g in the form of a list of nonzero integers {m1,…,mk} representing generators in the list returned by GroupGenerators[group]. A positive integer
in the word represents the
generator, and a negative integer
represents the inverse of the
generator.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Take a permutation g in a group G:

https://wolfram.com/xid/0bh1rl67ave8g6-x6xwq4
Decompose g as a product of generators of G (negative integers represent inverse generators):

https://wolfram.com/xid/0bh1rl67ave8g6-8jfeja

Reconstruct the permutation from the word:

https://wolfram.com/xid/0bh1rl67ave8g6-ecqw64

Scope (2)Survey of the scope of standard use cases
Decompose a permutation as a product of the default generators of a symmetric group:

https://wolfram.com/xid/0bh1rl67ave8g6-no7o4u

Decompose the same permutation using a different set of generators for the same group:

https://wolfram.com/xid/0bh1rl67ave8g6-ekv0fd

The returned words are usually not optimal:

https://wolfram.com/xid/0bh1rl67ave8g6-mx43lr

https://wolfram.com/xid/0bh1rl67ave8g6-3nki0a


https://wolfram.com/xid/0bh1rl67ave8g6-vcehex


https://wolfram.com/xid/0bh1rl67ave8g6-peebsl


https://wolfram.com/xid/0bh1rl67ave8g6-5rsxg7

Options (3)Common values & functionality for each option
GroupBaseAction (1)
The algorithm uses a table of coset representatives of the group stabilizers associated to a given base. The choice of this base might strongly affect the resulting word:

https://wolfram.com/xid/0bh1rl67ave8g6-22zrfi

https://wolfram.com/xid/0bh1rl67ave8g6-x1n8pi


https://wolfram.com/xid/0bh1rl67ave8g6-6vh573

MaxIterations (1)
Frequently, it is possible to improve the result by allowing the internal algorithm to perform a number of additional iterations:

https://wolfram.com/xid/0bh1rl67ave8g6-7t7rtw

https://wolfram.com/xid/0bh1rl67ave8g6-wcefme


https://wolfram.com/xid/0bh1rl67ave8g6-31pkxg

Method (1)
GroupElementToWord uses the Minkwitz algorithm, with a number of parameters:

https://wolfram.com/xid/0bh1rl67ave8g6-nrb04s
Fine-tuning of those parameters may produce shorter words:

https://wolfram.com/xid/0bh1rl67ave8g6-zg95dq


https://wolfram.com/xid/0bh1rl67ave8g6-8ol3dm


https://wolfram.com/xid/0bh1rl67ave8g6-8wwmr8

Applications (1)Sample problems that can be solved with this function
Check that the mapping relating respective generators of these two groups is a homomorphism:

https://wolfram.com/xid/0bh1rl67ave8g6-y0ck2e

https://wolfram.com/xid/0bh1rl67ave8g6-nomb30
This implements the homomorphism, extending the mapping of generators to all elements:

https://wolfram.com/xid/0bh1rl67ave8g6-1rxzsd
Check that for any two elements of G1, the homomorphism property is obeyed:

https://wolfram.com/xid/0bh1rl67ave8g6-2tqsr0

In this case, the homomorphism is actually an isomorphism:

https://wolfram.com/xid/0bh1rl67ave8g6-xcgtqc

Properties & Relations (4)Properties of the function, and connections to other functions
GroupElementFromWord reconstructs the original group element from the word:

https://wolfram.com/xid/0bh1rl67ave8g6-nyzdbe


https://wolfram.com/xid/0bh1rl67ave8g6-mthje3


https://wolfram.com/xid/0bh1rl67ave8g6-kaziv6

Identity generators are not used, but affect the indexing of the other generators:

https://wolfram.com/xid/0bh1rl67ave8g6-ddkd6y

https://wolfram.com/xid/0bh1rl67ave8g6-p102vq

The identity permutation always corresponds to the empty word:

https://wolfram.com/xid/0bh1rl67ave8g6-usl45d

https://wolfram.com/xid/0bh1rl67ave8g6-t2x56s

The element must belong to the group:

https://wolfram.com/xid/0bh1rl67ave8g6-0p7u1y

https://wolfram.com/xid/0bh1rl67ave8g6-vttua4


https://wolfram.com/xid/0bh1rl67ave8g6-2q35dz


Neat Examples (1)Surprising or curious use cases
The group of a 3×3×3 Rubik's cube is usually given in terms of six generators:

https://wolfram.com/xid/0bh1rl67ave8g6-hg7msy
However, one of them is redundant, and the group can actually be constructed with only five face rotations:

https://wolfram.com/xid/0bh1rl67ave8g6-rf98hl

https://wolfram.com/xid/0bh1rl67ave8g6-va30ep

This is a possible word expressing the sixth rotation in terms of the first five and their inverses:

https://wolfram.com/xid/0bh1rl67ave8g6-tohcf0


https://wolfram.com/xid/0bh1rl67ave8g6-rcwl13

After removing the generators corresponding to opposite faces, the remaining four still move all facelets, but now they only generate a subgroup of index 2048:

https://wolfram.com/xid/0bh1rl67ave8g6-vex555

https://wolfram.com/xid/0bh1rl67ave8g6-5pvhws

This is because there are two disconnected sets of edge facelets:

https://wolfram.com/xid/0bh1rl67ave8g6-btjr43

Compare with the original situation:

https://wolfram.com/xid/0bh1rl67ave8g6-fhrrmg

Wolfram Research (2012), GroupElementToWord, Wolfram Language function, https://reference.wolfram.com/language/ref/GroupElementToWord.html.
Text
Wolfram Research (2012), GroupElementToWord, Wolfram Language function, https://reference.wolfram.com/language/ref/GroupElementToWord.html.
Wolfram Research (2012), GroupElementToWord, Wolfram Language function, https://reference.wolfram.com/language/ref/GroupElementToWord.html.
CMS
Wolfram Language. 2012. "GroupElementToWord." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GroupElementToWord.html.
Wolfram Language. 2012. "GroupElementToWord." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GroupElementToWord.html.
APA
Wolfram Language. (2012). GroupElementToWord. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GroupElementToWord.html
Wolfram Language. (2012). GroupElementToWord. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GroupElementToWord.html
BibTeX
@misc{reference.wolfram_2025_groupelementtoword, author="Wolfram Research", title="{GroupElementToWord}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/GroupElementToWord.html}", note=[Accessed: 29-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_groupelementtoword, organization={Wolfram Research}, title={GroupElementToWord}, year={2012}, url={https://reference.wolfram.com/language/ref/GroupElementToWord.html}, note=[Accessed: 29-March-2025
]}