COMPUTABILITY THEORY

Turing machine for zero star one star

This Turing machine accepts binary strings in the language 01: any number of zeroes followed by any number of ones. It begins in qZeroes and moves right across every zero. When it sees a one, it moves to qOnes, which continues right over one symbols. A blank B at the end of the tape causes acceptance from either state, so the empty string and an all-zero string are included. A zero seen after qOnes would have no valid transition, indicating that the input is outside the language. The example is deliberately compact so the role of each state is easy to read from the diagram.

UPDATED 2026-09-24
TYPEState
EXAMPLETuring machine for zero star one star
Make this diagram your own.

Open it in the AI editor with a prompt pre-filled — keep what works, change what doesn't.

CASE ANALYSIS

Scenario

Ordered-block recognition

Key decisions

  • Zero phase: qZeroes permits any initial run of zeroes.
  • One phase: qOnes records that the first one has been seen.
  • Blank acceptance: either an all-zero input or a completed one run can halt successfully.

When to reuse this

Use this small machine to explain states, tape scanning and language phases before introducing more complex Turing machines.

FAQ

Frequently asked questions

What does 0*1* mean?01
It means zero or more 0 symbols followed by zero or more 1 symbols.
Is 00111 accepted?02
Yes. All zeroes occur before all ones.
Is 010 accepted?03
No. A zero after entering qOnes violates the required order.
Open this example in the editor →

Tweak it with chat, export PNG/SVG, or fork it for your own use case.