Created
December 6, 2022 01:51
-
-
Save MasWag/940c9a732a39a7be78ea006fb1988b60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{tikz} | |
\usetikzlibrary{automata, positioning} | |
\begin{document} | |
\begin{tikzpicture} | |
\node[state,initial,accepting] (q0) {$q_0$}; | |
\node[state] (q1) at (1,2) {$q_1$}; | |
\node[state] (q2) [below right=of q0] {$q_2$}; | |
\path[->] | |
(q0) edge node[above left] {hoge} (q1) | |
(q1) edge[loop right] node[right] {hoge} (q1) | |
(q1) edge[bend right=5] node[below left] {1 to 2} (q2) | |
(q2) edge[bend right=5] node[right] {2 to 1} (q1) | |
; | |
\path[->] | |
(q2) edge[bend left=60] node[below left] {hoge} (q0) | |
; | |
\end{tikzpicture} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment