scan right erase done 1 → 1, R + → 1, R 1 → 1, R ⊔ → ⊔, L 1 → ⊔, S
The machine as drawn — 4 states, 5 transitions.
The author’s examples, run + → accept 1+11 → accept +1 → accept 1111+111111 → accept 1 → reject ++11 → reject 11 → reject +111+111111 → reject
Definition $$ \begin{aligned} M &= (Q, \Sigma, \Gamma, \delta, q_0, F) \\Q &= \{ \text{scan}, \text{right}, \text{erase}, \text{done} \} \\\Sigma &= \{ \text{1}, \text{+} \} \\\Gamma &= \{ \text{1}, \text{+}, \text{w}, \text{ }, \text{=}, \text{>}, \text{'}, \text{.}, \text{r}, \text{e}, \text{p}, \text{a}, \text{t}, \text{(}, \text{l}, \text{n}, \text{g}, \text{h}, \text{-}, \text{)}, \text{$\sqcup$} \} \\q_0 &= \text{scan} \\F &= \{ \text{done} \} \\\delta &: Q \times \Gamma \to Q \times \Gamma \times \{L, R, S\} \end{aligned} $$
Verified by the library ✓ Halts — 1 steps ✓ Tests pass — 8 examples checked ✓ Deterministic
Machine code tm.%2B1.%20'()-%2E%3D%3Eaeghlnprtw@h:---02RB02RA------------------------------------------------------_00LC---02RB------------------------------------------------------_------00SZ------------------------------------------------------
Size 4 states · 5 transitions Level Intro Licence Creative Commons Attribution 4.0 Tags arithmetic unary computing-a-function