%author: BB
\documentclass[11pt]{article} 
\input shared.texm 
\startfile
\psset{unit=1,labelsep=0.01}
\begin{pspicture}(-9.5,-1.8)(9.5,1.3)
\def\xa{4}\def\xb{8}
\def\NN#1#2#3{\rput(#1,0){\rnode{q#2}{\psframebox[framearc=0.5,fillstyle=solid,fillcolor=lightgray]{\strut\hphantom{\large\lightgray XXXXI}}}}\rput(#1,0){$\{#3\}$}}
\NN{-\xb}{0}{q_0}
\NN{-\xa}{1}{q_0,q_1}
\NN{0}{2}{q_0,q_1,q_2}
\NN{\xa}{3}{q_0,q_3}
\NN{\xb}{4}{q_0,q_1,q_4}
\psset{arrows=->}
\ncline{q0}{q1}\aput{0.5}{$a$}
\ncline{q1}{q2}\aput{0.5}{$a$}
\ncline{q2}{q3}\aput{0.5}{$b$}
\ncline{q3}{q4}\aput{0.5}{$a$}
\psframe[framearc=0.5](6.55,-0.65)(9.45,0.65)
\ncarc[arcangleA=60,arcangleB=60,ncurv=2]{q0}{q0}\bput(0.3){$b$}
\ncarc[arcangleA=60,arcangleB=60,ncurv=2]{q2}{q2}\bput(0.3){$a$}
\ncarc[arcangleA=-30,arcangleB=-30]{q1}{q0}\bput(0.2){$b$}
\ncarc[arcangleA=15,arcangleB=15]{q3}{q0}\aput(0.2){$b$}
\ncarc[arcangleA=20,arcangleB=20]{q4}{q0}\aput(0.2){$b$}
\ncarc[arcangleA=-20,arcangleB=-20]{q4}{q2}\bput(0.2){$a$}
\end{pspicture}\endfile
