digraph ex1p1 { rankdir="LR"; node [texmode="math",shape="circle",style="state"]; qX [style="state,initial",label="X"]; qY [style="state,final",label="Y"]; qZ [style="state,final",label="Z"]; edge [texmode="math",lblstyle="auto"]; qX -> qY [label="0"]; qX -> qZ [label="1"]; qZ -> qZ [label="0,1",topath="loop below"]; }