Partly based on Ludger Humbert's pics of Unviersal Turing Machine at https://haspe.homeip.net/projekte/ddi/browser/tex/pgf2/turingmaschine-schema.tex


turing-machine-2

Edit and compile if you like:

% Turing Machine
% Author: Sebastian Sardina
\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
\usetikzlibrary{chains,fit,shapes}
\begin{document}
\begin{tikzpicture}
\tikzstyle{every path}=[very thick]
\edef\sizetape{0.7cm}
\tikzstyle{tmtape}=[draw,minimum size=\sizetape]
\tikzstyle{tmhead}=[arrow box,draw,minimum size=.5cm,arrow box
arrows={east:.25cm, west:0.25cm}]
%% Draw TM tape
\begin{scope}[start chain=1 going right,node distance=-0.15mm]
\node [on chain=1,tmtape,draw=none] {$\ldots$};
\node [on chain=1,tmtape] {};
\node [on chain=1,tmtape] (input) {b};
\node [on chain=1,tmtape] {b};
\node [on chain=1,tmtape] {a};
\node [on chain=1,tmtape] {a};
\node [on chain=1,tmtape] {a};
\node [on chain=1,tmtape] {a};
\node [on chain=1,tmtape] {};
\node [on chain=1,tmtape,draw=none] {$\ldots$};
\node [on chain=1] {\textbf{Input/Output Tape}};
\end{scope}
%% Draw TM Finite Control
\begin{scope}
[shift={(3cm,-5cm)},start chain=circle placed {at=(-\tikzchaincount*60:1.5)}]
\foreach \i in {q_0,q_1,q_2,q_3,\ddots,q_n}
\node [on chain] {$\i$};
% Arrow to current state
\node (center) {};
\draw[->] (center) -- (circle-2);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Click to download: turing-machine-2.texturing-machine-2.pdf
Open in Overleaf: turing-machine-2.tex