Construct a DFA that accepts a string{a,b) with ab being followed by bb.
Answers
Answer:
you all are God for me my friends please follow and thank you brainlist me my all answers
DFA that accepts a string{a,b) with ab being followed by bb.
Explanation:
The desired language is:
L1 = {ε, abb, abbabb, bbbbabb, abbabbabbabbabbbb, ....}
We find that each string of the language containing 'a is followed by bb'.
Consider this:
L2 = {ba, baab, bbaba, ....}
The above language is not accepted by DFA because some of the string does not contain 'a followed by bb'.
Please find attached the state transition diagram of the language containing 'a followed by bb'.
From the diagram, we see that state V is both the initial and final state. Upon getting b as the input, V remains as itself. Upon getting a as input, it will transit to a normal state W, which on getting a will transit to the dead state Z. If at this state, W gets b as the input, it transit to X, which on getting b will transit to the final state V. If X got a as input, it will transit to the same dead state Z. The state Z is called the dead state because on getting any input, it will not transit to any of the final states ever. It is like a dead end.