绘制有限状态机

绘制有限状态机

我想将弧从状态 Q2 扩大到 Q9,有什么帮助吗?这是代码。谢谢。

   \node[thick, state, initial] (A){$q_{1}$};
   \node[thick, state] (B) [right of=A]{$q_{2}$};
   \node[thick, state] (C) [right of=B]{$q_{3}$};
   \node[thick, state] (D) [above right of=C]{$q_{4}$};
   \node[thick, state] (E) [below right of=C]{$q_{5}$};
   \node[thick, state] (F) [right of=D]{$q_{6}$};
   \node[thick, state] (G) [right of=E]{$q_{7}$};
   \node[thick, state] (H) [below right of=F]{$q_{8}$};
   \node[thick, state] (I) [right of=H]{$q_{9}$};
   \node[thick, state,accepting] (J) [right of=I]{$q_{10}$};
   
   \path[thick] 
        (A) edge[above] node{$\varepsilon$} (B)
        (B) edge[above] node{$\varepsilon$} (C)
        (D) edge[above] node{$z$} (F)
        (E) edge[above] node{$y$} (G)
        (H) edge[above] node{$\varepsilon$} (I)
        (I) edge[above] node{$x$} (J)
        (C) edge [bend left] node {$\varepsilon$} (D)
        (C) edge [bend right] node {$\varepsilon$} (E)
        (F) edge [bend left] node {$\varepsilon$} (H)
        (G) edge [bend right] node {$\varepsilon$} (H)
        (B) edge [bend right] node {$\varepsilon$} (I)
        (H) edge [bend right] node {$\varepsilon$} (C);

在此处输入图片描述

相关内容