In[]:=
LayeredGraphPlot[MultiwaySystem[{"AB""ABBA"},StringTuples["AB",3],5,"StatesGraphStructure"]]
Out[]=
In[]:=
LayeredGraphPlot[MultiwaySystem[{"AB""BABA"},StringTuples["AB",3],5,"StatesGraphStructure"]]
Out[]=
In[]:=
LayeredGraphPlot[MultiwaySystem[{"AB""BABA"},"AAB",7,"StatesGraphStructure"]]
Out[]=