DFA M = ({q_0, q_1, q_2}, {0,1}, delta, q_0, {q_1}), delta is:
delta | 0 1
q_0 | q_0 q_1
q_1 | q_0 q_2
q_2 | q_2 q_1
a) What graphic transition?
My solution:
q_0 ->1 0<- q1 ->1 1<- q2 0<-
b) This automaton accepts the word 01, 101, 00111, 11001?
My solution:
Yes
c) Find two words that the automaton rejects
My solution:
10 and 110
Are correct ?
seems correct even though a) is not clear
yeah its correct
No he's fine, because when you don't specify what does the DFA do in a specific state on a specific input, its interpreted as entering a "pit" state - one from which the automata can not accept any word.
Thank you. Please look this:
Find a DFA that recognizes all strings over the alphabet {01}, except those containing the substring 001
My solution:
q0 => go "1" to q0 and "0" to q1
q1 => go "1" to q0 and "0" to q2
q2 => go "0" to q1 and "1" to q3
q3 => go "0,1" to q3
M = ({q0, q1, q2, q3}, {01}, delta, q0, {q0, q1, q2})
is correct ?
Perhaps this is a shortcut you may take, but your assumption is not part of the formal definition. Q is the set of all states, therefore your "pit" state (my q3) must be an element of Q (which you did not formally define), and for each pair of state an input symbol, there is one transition to the next state. Therefore there _must_ be a transition for (q0, b) and (q1, a) and your "pit" state must also have a ("pit", a) and ("pit", b) all of which do not exist. You may interpret it however you would like, but formally, it is wrong.
Right, your DFA is suppose to accept strings that begin with "ab" and reject strings that begin with aa, or b. However, your DFA does not accept nor reject strings that begin with aa or b - it just fails. Your professor may allow the shortcut bobdark suggested, but formally it is wrong.
Yes. (although I am assuming your alphabet is {0,1} not {01})
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks