ATM Hopcroft & Ullman's TM for {0^n 1^n : n >= 0} 0 1 // input alphabet, note such comments are permitted at the end of the line 0 1 X Y B // tape alphabet 1 // number of tapes 1 // number of tracks on tape 0 1 // tape 0 is 1-way infinite q0 // the initial state q4 // final state(s) q0 B q4 B r // the transitions do not use "+" since there is only one track q0 0 q1 X r q0 Y q3 Y r q1 0 q1 0 r q1 1 q2 Y l q1 Y q1 Y r q2 0 q2 0 l q2 X q0 X r q2 Y q2 Y l q3 Y q3 Y r q3 B q4 B r end //required