Skip to main content
added 52 characters in body
Source Link
Breakpoint
  • 210
  • 2
  • 9

This a hand drawn solution to your problem, I'll explain the transitions,

Before you see the diagram, note that those are not 2 different DFAs, but I have drawn one more transition of states q1, q3, q5 to make the image more clear, as it is already very messed up.

The answer

q0 is the start state, machine has not seen anything until now.

On scanning the first symbol, suppose, it turns out to be 'a' d

d(q0, a) -> q1 machine (d is the transition function)

machine is in q1 now.

ifIf it sees another 'a' it will reach q2 which can beCAN BE the final state, 

else it will reach q7 from where it will never reach any final state because 'a' has not repeated.

from q2, if machine see another 'a' it will go back to q1 else it will go to q3 (onon seeing a 'b' or q5 on seeing a 'c')

Same thing goes on for 'b' and 'c'

If afterAfter scanning the complete string, if the machine is in final state then the string is in the language else, it is not in the language.

This assumeassumes that the empty string epsilon is not in Double-Letter(L)

In that case q0 will be also be a final state.

This a hand drawn solution to your problem, I'll explain the transitions,

Before you see the diagram, note that those are not 2 different DFAs, but I have drawn one more transition of states q1, q3, q5 to make the image more clear, as it is already very messed up.

The answer

q0 is the start state, machine has not seen anything until now.

On scanning the first symbol, it turns out to be 'a' d(q0, a) -> q1 machine is in q1 now.

if it sees another 'a' it will reach q2 which can be the final state, else it will reach q7 from where it will never reach any final state because 'a' has not repeated.

from q2, if machine see another 'a' it will go back to q1 else it will go to q3 (on seeing a 'b' or q5 on seeing a 'c')

Same thing goes on for 'b' and 'c'

If after scanning the complete string, the machine is in final state then the string is in the language else, it is not in the language.

This assume the empty string epsilon is not in Double-Letter(L)

In that case q0 will be also be a final state.

This a hand drawn solution to your problem, I'll explain the transitions,

Before you see the diagram, note that those are not 2 different DFAs, but I have drawn one more transition of states q1, q3, q5 to make the image more clear, as it is already very messed up.

The answer

q0 is the start state, machine has not seen anything until now.

On scanning the first symbol, suppose, it turns out to be 'a'

d(q0, a) -> q1 (d is the transition function)

machine is in q1 now.

If it sees another 'a' it will reach q2 which CAN BE the final state, 

else it will reach q7 from where it will never reach any final state because 'a' has not repeated.

from q2, if machine see another 'a' it will go back to q1 else it will go to q3 on seeing a 'b' or q5 on seeing a 'c'

Same thing goes on for 'b' and 'c'

After scanning the complete string, if the machine is in final state then the string is in the language else, it is not in the language.

This assumes that the empty string epsilon is not in Double-Letter(L)

In that case q0 will be also be a final state.

Source Link
Breakpoint
  • 210
  • 2
  • 9

This a hand drawn solution to your problem, I'll explain the transitions,

Before you see the diagram, note that those are not 2 different DFAs, but I have drawn one more transition of states q1, q3, q5 to make the image more clear, as it is already very messed up.

The answer

q0 is the start state, machine has not seen anything until now.

On scanning the first symbol, it turns out to be 'a' d(q0, a) -> q1 machine is in q1 now.

if it sees another 'a' it will reach q2 which can be the final state, else it will reach q7 from where it will never reach any final state because 'a' has not repeated.

from q2, if machine see another 'a' it will go back to q1 else it will go to q3 (on seeing a 'b' or q5 on seeing a 'c')

Same thing goes on for 'b' and 'c'

If after scanning the complete string, the machine is in final state then the string is in the language else, it is not in the language.

This assume the empty string epsilon is not in Double-Letter(L)

In that case q0 will be also be a final state.