简体   繁体   中英

What's wrong with my answer?(Finite Automata)

Quite confused with this problem here regarding finite automata

Consider the finite automaton

M=({q0,q1}, {0}, {((q0,0),q1), ((q1,0),q0)}, q0, {q1}). 

If the alphabet is {0,1} , what happens to the machine if the input string contains 1? Modify the FA so that the problem is resolved.

I tried to change the transition function ((q0, 0),q1)) into ((q0,1),q1)) , which from my understanding would make the finite automata correct. Professor says its still wrong. Any help with this?

As of now your automata accepts strings that has an odd number of zeroes. because 2 0's will take you back to the same start state again and q_1 is only on 0 away from q_0. But this dfa still remains incomplete, as there is no mapping for delta (q_0,1), delta(q_1,1) So, in-case you encounter a 1, you need to clearly stay in the same place, ie q0 or q1 since this does not change the number of 0's you have seen up until then

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM