\documentclass{article}
\usepackage{a4wide}
\usepackage{adjustbox}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{ifthen}
\usetikzlibrary{automata}
\usepackage{datetime}
\lhead{./certificates/ctxtb1-ctxtb2/sim-2.tex}
\rhead{10:52:00.459 on 2025-03-31}
\fancyfoot{}
\begin{document}
\newif\ifntiny
%\ntinyfalse
\ntinytrue
\thispagestyle{fancy}
\begin{center}
\maxsizebox{!}{0.475\textheight}{
\minsizebox{\textwidth}{!}{
\begin{tabular}{@{}c@{}}
% node count = 21
\begin{tikzpicture}[rotate = 0]
%\begin{tikzpicture}[rotate = 90]
\tikzset{initial text=$ $}

\node[accepting, state] at (2,-10) (n0n0n1n1n0) {$p?$\,\ifntiny{\tiny 86}\fi};
\node[accepting, state] at (8,-2) (n1) {$p?$\,\ifntiny{\tiny 94}\fi};
\node[accepting, state] at (6,-10) (n0n1n1n0n1) {$p?$\,\ifntiny{\tiny 106}\fi};
\node[accepting, state] at (7,-4) (n1n0) {$p!$\,\ifntiny{\tiny 79}\fi};
\node[accepting, state] at (3,-12) (n0n0n1n1n1n0) {$end$\,\ifntiny{\tiny 91}\fi};
\node[initial, state] at (5,0) (n) {$\cup$\,\ifntiny{\tiny 830}\fi};
\node[state] at (2,-4) (n0n0) {$\cup$\,\ifntiny{\tiny 823}\fi};
\node[state] at (5,-4) (n0n1) {$\cup$\,\ifntiny{\tiny 828}\fi};
\node[state] at (3,-2) (n0) {$p?$\,\ifntiny{\tiny 829}\fi};
\node[accepting, state] at (8,-6) (n1n1n0) {$p?$\,\ifntiny{\tiny 86}\fi};
\node[accepting, state] at (1,-8) (n0n0n1n0) {$p!$\,\ifntiny{\tiny 79}\fi};
\node[accepting, state] at (9,-8) (n1n1n1n0) {$end$\,\ifntiny{\tiny 91}\fi};
\node[accepting, state] at (3,-8) (n0n0n1n1) {$p!$\,\ifntiny{\tiny 93}\fi};
\node[state] at (4,-6) (n0n1n0) {$p?$\,\ifntiny{\tiny 827}\fi};
\node[accepting, state] at (6,-6) (n0n1n1) {$p?$\,\ifntiny{\tiny 108}\fi};
\node[accepting, state] at (6,-12) (n0n1n1n0n1n0) {$end$\,\ifntiny{\tiny 105}\fi};
\node[accepting, state] at (6,-8) (n0n1n1n0) {$p!$\,\ifntiny{\tiny 107}\fi};
\node[accepting, state] at (3,-10) (n0n0n1n1n1) {$p?$\,\ifntiny{\tiny 92}\fi};
\node[accepting, state] at (2,-6) (n0n0n1) {$p?$\,\ifntiny{\tiny 94}\fi};
\node[accepting, state] at (9,-6) (n1n1n1) {$p?$\,\ifntiny{\tiny 92}\fi};
\node[accepting, state] at (9,-4) (n1n1) {$p!$\,\ifntiny{\tiny 93}\fi};

\draw[->, thick] (n) edge [near start, left] node {} (n0);
\draw[->, thick] (n) edge [near start, left] node {} (n1);
\draw[->, thick] (n0) edge [near start, left] node {a} (n0n0);
\draw[->, thick] (n0) edge [near start, left] node {b} (n0n1);
\draw[->, thick] (n0n0) edge [near start, right, bend right] node {} (n0);
\draw[->, thick] (n0n0) edge [near start, left] node {} (n0n0n1);
\draw[->, thick] (n0n0n1) edge [near start, left] node {a} (n0n0n1n0);
\draw[->, thick] (n0n0n1) edge [near start, left] node {b} (n0n0n1n1);
\draw[->, thick] (n0n0n1n0) edge [near start, right, bend right] node {x} (n0n0n1);
\draw[->, thick] (n0n0n1n1) edge [near start, left] node {x} (n0n0n1n1n0);
\draw[->, thick] (n0n0n1n1) edge [near start, left] node {y} (n0n0n1n1n1);
\draw[->, thick] (n0n0n1n1n0) edge [near start, right, bend right] node {b} (n0n0n1n1);
\draw[->, thick] (n0n0n1n1n1) edge [near start, left] node {e} (n0n0n1n1n1n0);
\draw[->, thick] (n0n1) edge [near start, left] node {} (n0n1n0);
\draw[->, thick] (n0n1) edge [near start, left] node {} (n0n1n1);
\draw[->, thick] (n0n1n0) edge [near start, right, bend right] node {b} (n0n1);
\draw[->, thick] (n0n1n1) edge [near start, left] node {b} (n0n1n1n0);
\draw[->, thick] (n0n1n1n0) edge [near start, right, bend right] node {x} (n0n1n1);
\draw[->, thick] (n0n1n1n0) edge [near start, left] node {y} (n0n1n1n0n1);
\draw[->, thick] (n0n1n1n0n1) edge [near start, left] node {e} (n0n1n1n0n1n0);
\draw[->, thick] (n1) edge [near start, left] node {a} (n1n0);
\draw[->, thick] (n1) edge [near start, left] node {b} (n1n1);
\draw[->, thick] (n1n0) edge [near start, right, bend right] node {x} (n1);
\draw[->, thick] (n1n1) edge [near start, left] node {x} (n1n1n0);
\draw[->, thick] (n1n1) edge [near start, left] node {y} (n1n1n1);
\draw[->, thick] (n1n1n0) edge [near start, right, bend right] node {b} (n1n1);
\draw[->, thick] (n1n1n1) edge [near start, left] node {e} (n1n1n1n0);

\end{tikzpicture}
\end{tabular}}}
\end{center}
\end{document}
