# Draw this picture using TikZ

How to draw this picture using TikZ?

• Have you made an attempt at all? If you show minimal effort people are usually much more willing to help you completing your goal. Commented Mar 7, 2022 at 9:47
• If you know a bit about tikz then this is not hard at all. It can be done in vanilla tikz or via tikz-cd. Commented Mar 7, 2022 at 10:14
• Please search on the site for graph or commutative diagram and you will find tons of ressources. Commented Mar 7, 2022 at 10:26
• This question may be closed soon because the problem is not clear. Are you asking about commutative diagrams in general? Or specifically how to circle the nodes in tikzcd? Or how to get the double circle around q_5? Or how to make the "loop arrows" above q_1 and q_2? Please be specific. Commented Mar 7, 2022 at 23:49

Here is a tikz-cd solution

\documentclass{article}

\usepackage{tikz-cd}
\newcommand{\e}{\varepsilon}

\begin{document}

\begin{tikzcd}[column sep=1.5cm, cells={nodes={draw, circle, inner sep=.5mm}}]
|[draw=none]|\arrow[r] & q_0\arrow[r,"{a,\e\to a}"] & q_1\arrow[r,"{\e,\e\to\e}"]\arrow[<-,loop above,"{a,\e\to a}"]
& q_2\arrow[r,"{\e,\e\to\e}"]\arrow[<-,loop above,"{b,\e\to\e}"] & q_3\arrow[r,"{c,a\to\e}"]
& q_4\arrow[r,"{c,\e\to\e}"] & |[double]|q_5\arrow[ll, bend right,"{\e,\e\to\e}"']
\end{tikzcd}

\end{document}

• My compliments for your patience :-) +1 Commented Mar 7, 2022 at 21:01
• @Sebastiano, usually I don't answer when OP doesn't make an effort, but I couldn't remember the |[...]| syntax for changing the node shape in tikz-cd. I figured since I was looking it up anyway I'd give an answer. Commented Mar 7, 2022 at 22:41