NFA & DFA for (1|0)*00

Non-deterministic finite automaton

w =   F =
 true or false
Accepted integers between 0 and 50
num list

Logic (NFA)
01
> aaba
 bcϕ
* cϕϕ
Logic (DFA)
01
> aba
bca
* cca
function delta(q, c) { // (1|0)*10
if (q=='a' && c=='0') return 'a'
if (q=='a' && c=='1') return 'ab'
if (q=='b' && c=='0') return 'c'
return ''; //default -- no transition
}
function accept(w, F='c', Q='a') {
//w: input String
//F: final state(s)
//Q: current state(s)
let i = 0, txt = Q
while (i < w.length) {
let c = w[i], T=''
for (let q of Q)
T = union(T, delta(q, c))
Q = T
if (Q == '') break
i++; txt += ", "+c+" -> "+Q+'\n'+Q
}
input.selectionStart = i
input.selectionEnd = i+1
let a = intersect(Q, F).length > 0
return txt+' '+(a? "Accept" : "Reject")
}