Function Resource

StringPermute

Gives the specified permutation for the characters of a string

ResourceFunction["StringPermute"][string,perm]

permutes the characters of string according to perm.

ResourceFunction["StringPermute"][string,gr]

returns the permuted forms of string under the elements of permutation group gr.

Examples

Basic Examples

Cyclic permutation of three characters in a string:

In[1]:=
ResourceFunction[ "https://www.wolframcloud.com/obj/arnoudb/DeployedResources/Function/\
StringPermute"][ "horse", Cycles[{{1, 3, 2}}]]
Out[1]=

Permute a string under all elements of a group:

In[2]:=
ResourceFunction[ "https://www.wolframcloud.com/obj/arnoudb/DeployedResources/Function/\
StringPermute"]["king", AlternatingGroup[4]]
Out[2]=