0

How to draw this picture using TikZ? enter image description here

4
  • 1
    Have you made an attempt at all? If you show minimal effort people are usually much more willing to help you completing your goal.
    – Ingmar
    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.
    – daleif
    Commented Mar 7, 2022 at 10:14
  • Please search on the site for graph or commutative diagram and you will find tons of ressources.
    – SebGlav
    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.
    – Sandy G
    Commented Mar 7, 2022 at 23:49

1 Answer 1

7

Here is a tikz-cd solution

enter image description here

\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}
2
  • 1
    My compliments for your patience :-) +1
    – Sebastiano
    Commented Mar 7, 2022 at 21:01
  • 1
    @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.
    – Sandy G
    Commented Mar 7, 2022 at 22:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .