LaTeXでオートマトンを描く

LaTeXでオートマトンを描く

このオートマトンを LaTeX で再現する必要があります:

ここに画像の説明を入力してください

今のところはこれを持っていますが、エッジをどのように配置するかで行き詰まっています。

\begin{figure}[htbp]
\centering
\begin{tikzpicture}[->,>=stealth',shorten >=5pt,auto,node distance=2.8cm,semithick]
\node[state] (q0)                    {$q_a$};
\node[state]         (q1) [above,right of=q0] {$q_b$};
\node[state]         (q2) [right of=q1] {$q_c$};

\path (q0) edge [loop left]   node {a} (q0);

     (q1) edge [loop right] node {b} (q1);

     (q2) edge [loop right] node {c} (q2);

\end{tikzpicture}
\caption{Beispiel für einen NSA/DSA}
\end{figure}

たとえば、ノードを移動するにはどうすればよいですか?

答え1

このような?

ここに画像の説明を入力してください

\documentclass[tikz,
               border=3mm
               ]{standalone}
\usetikzlibrary{arrows, automata,
                quotes,
                positioning
                }

\begin{document}
    \begin{tikzpicture}[
    node distance = 12mm and 22mm,
every edge/.style = {draw, -stealth', shorten >=1pt},
every edge quotes/.style = {inner sep=1pt, auto},
    semithick
                    ]
\node (q0) [state]                   {$q_a$};
\node (q1) [state,above right=of q0] {$q_b$};
\node (q2) [state,below right=of q0] {$q_c$};
%
\path (q0) edge [loop  left,"$a$"] (q0)
      (q1) edge [loop right,"$b$"] (q1)
      (q2) edge [loop right,"$c$"] (q2)
%
      (q0.45)  edge [bend left,"$b$"] (q1.180)
      (q1.210) edge [bend left,"$a$"] (q0.30)
%
      (q0.330) edge [bend left,"$c$"] (q2.150)
      (q2.180) edge [bend left,"$a$"] (q0.300)
%
      (q1.285) edge [bend left,"$c$"] (q2.75)
      (q2.105) edge [bend left,"$b$"] (q1.265)
      ;
    \end{tikzpicture}
\end{document}

ノードの位置は TikZ ライブラリを使用して決定されpositioning、エッジのラベルには TikZ ライブラリが使用されますquotes

関連情報