\begin{frame} \frametitle{Drawing Turing Machines} \begin{goal}{} The transition graph for a TMs contains \begin{talign} \text{an arrow \quad \alert{$q \stackrel{a/b\text{ }X}{\longrightarrow} q'$} \quad} \text{whenever \quad \alert{$\delta(q,a) = (q',b,X)$}} \end{talign} \end{goal} \begin{exampleblock}{} The Turing machine $M = (Q,\Sigma,\Gamma,\delta,q_0,\Box,F)$ with $\Sigma = \{\, a,b \,\}$, $\Gamma = \{\, a,b,\Box \,\}$, $Q = \{\, q_0,q_1,q_2 \,\}$, $F = \{\, q_2 \,\}$ and \begin{talign} \delta(q_0,a) &= (q_1,b,R) & \delta(q_1,a) &= (q_0,b,R) \\ \delta(q_0,b) &= (q_0,a,R) & \delta(q_1,b) &= (q_1,a,R) \\ && \delta(q_1,\Box) &= (q_2,\Box,L) \end{talign} can be visualised as \begin{center} \begin{tikzpicture}[default,node distance=25mm,->,s/.style={minimum size=5mm}] \node (q0) [state,s] {$q_0$}; \draw ($(q0) + (-8mm,0mm)$) -- (q0); \node (q1) [state,s,right of=q0] {$q_1$}; \node (q2) [fstate,s,right of=q1] {$q_2$}; \draw (q0) to[bend left=20] node [label,above] {$a/b$ $R$} (q1); \draw (q0) to[tloop] node [label,above] {$b/a$ $R$} (q0); \draw (q1) to[bend left=20] node [label,below] {$a/b$ $R$} (q0); \draw (q1) to[tloop] node [label,above] {$b/a$ $R$} (q1); \draw (q1) to node [label,above] {$\Box/\Box$ $L$} (q2); \end{tikzpicture} \end{center} \end{exampleblock} \end{frame}