\begin{tikzpicture}[>=stealth, st/.style={circle, draw, minimum size=5.5mm, inner sep=0pt, font=\scriptsize}, exc/.style={st, draw=blue!75!black, thick, fill=blue!10}, sst/.style={st, fill=orange!40}] \draw[rounded corners=9pt] (0,0) rectangle (3.4,2.1); \node[font=\small] at (0.3,1.85) {$E$}; \node[st] (e1) at (0.75,0.65) {}; \node[st] (e2) at (1.55,1.45) {}; \node[st] (e3) at (2.1,0.55) {}; \node[sst] (s) at (2.95,1.3) {$s$}; \draw[rounded corners=9pt] (4.3,0.15) rectangle (5.7,1.95); \node[font=\small] at (5.45,1.72) {$X$}; \node[exc] (x1) at (4.95,1.35) {$x_1$}; \node[exc] (x2) at (4.95,0.6) {$x_2$}; \draw[->] (e1) -- (e2); \draw[->] (e2) -- (e3); \draw[->] (e3) -- (e1); \draw[->] (s) -- (e2); \draw[->, dotted, thick] (e3) to[bend right=18] (x2); \draw[->] (x1) to[bend right=14] (s); \draw[->] (x2) -- (x1); \draw[->] (x2) to[bend left=12] (s); \node[font=\scriptsize, align=center, text width=3.3cm] at (1.7,-0.45) {in-weight one at every state of $E$ except $s$}; \node[font=\scriptsize, align=center, text width=2.3cm] at (5.0,-0.45) {edges from $X$ end in $X\cup\{s\}$}; \begin{scope}[xshift=8.9cm, yshift=1.15cm] \node[exc] (q0) at (90:0.95) {$0$}; \node[sst] (q1) at (0:0.95) {$1$}; \node[st] (q2) at (270:0.95) {$2$}; \node[st] (q3) at (180:0.95) {$3$}; \draw[->] (q0) to[bend left=15] (q1); \draw[->, dashed] (q0) to[bend right=15] (q1); \draw[->, dashed] (q1) -- (q2); \draw[->, dashed] (q2) -- (q3); \draw[->, dashed] (q3) -- (q0); \draw[->] (q1) to[loop right, looseness=6] (q1); \draw[->] (q2) to[loop below, looseness=6] (q2); \draw[->] (q3) to[loop left, looseness=6] (q3); \node[font=\scriptsize, align=center, text width=3.6cm] at (0,-2.0) {$C_4$: $a$ solid, $b$ dashed;\\ $x=0$, $s=1$, $E=\{1,2,3\}$}; \end{scope} \end{tikzpicture}