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