In[]:=
MultiwaySystem[{"AB""BA","BA""AB"},StringTuples["AB",6],10,"StatesGraph"]
Out[]=
In[]:=
Groupify[{gens:{__String},rels_}]:=Module[{igens=ToLowerCase[gens]},{Flatten@{gens,igens},Flatten[{rels,ToLowerCase[#2]ToLowerCase[#1]&@@@rels,Table[{gens[[i]]<>igens[[i]]"",igens[[i]]<>gens[[i]]""},{i,Length[gens]}]}]}]
Groupify
In[]:=
TreePlot[Graph[CayleyNestGraph[{{"A","B"},{"AAA"""}},{""},6],GraphLayout"SpringElectricalEmbedding"],Center]
Out[]=
In[]:=
TreePlot[Graph[CayleyNestGraph[{{"A","B"},{"AA"""}},{""},6],GraphLayout"SpringElectricalEmbedding"],Center,VertexLabelsAutomatic]
Out[]=
In[]:=
GraphElementData["EdgeShapeFunction"]
Out[]=
{Arrow,BoxLine,CarvedArcArrow,CarvedArrow,DashedLine,DiamondLine,DotLine,DottedLine,FilledArcArrow,FilledArrow,HalfFilledArrow,HalfFilledDoubleArrow,HalfUnfilledArrow,HalfUnfilledDoubleArrow,Line,ShortCarvedArcArrow,ShortCarvedArrow,ShortFilledArcArrow,ShortFilledArrow,ShortUnfilledArcArrow,ShortUnfilledArrow,UnfilledArcArrow,UnfilledArrow}
In[]:=
TreePlot[Graph[CayleyNestGraph[{{"A","B"},{"AA"""}},{""},4],GraphLayout"SpringElectricalEmbedding"],Center,VertexLabelsAutomatic,EdgeLabels(DirectedEdge[x_,y_]If[StringLength[y]0,"",StringTake[y,-1]])]
Out[]=
In[]:=
TreePlot[Graph[CayleyNestGraph[{{"A","B"},{"AB""BA","BA""AB"}},{""},6],GraphLayout"SpringElectricalEmbedding"],Center,VertexLabelsAutomatic]
Out[]=
Reduction of the tree by the relations is revealed in cycles, which are the edges in the states graph

Cayley graph is more about events than states....

Cayley graph edges just add generators on the right

Cayley graph colors:

Multiway graph from group