digraph ex1p2a2 { rankdir="LR"; node [texmode="math",shape="circle",style="state"]; q0 [style="state,initial",label="0"]; q7 [style="state,final",label="7"]; edge [texmode="math",lblstyle="auto"]; q0 -> q0 [label="a,b",topath="loop below"]; q0 -> q7 [label="aa"]; q0 -> q7 [label="bb",lblstyle="auto,below"]; q7 -> q7 [label="a,b",topath="loop below"]; }