// Ouput: accepts if n has
// an even amount of 0s
// Example: accepts 100100
//
// Even Amount of 0s Algorithm
// for Turing Machine Simulator
// turingmachinesimulator.com
//
// --------- States -----------|
// q0 amount of 0s mod2 == 0 |
// q1 amount of 0s mod2 == 1 |
// qAccept - accepting state |
//-----------------------------|
name: Even amount of zeros
init: q0
accept: qAccept
q0,0
q1,0,>
q1,0
q0,0,>
q0,1
q0,1,>
q1,1
q1,1,>
q0,_
qAccept,_,-
No hay comentarios:
Publicar un comentario