DFA languages & state diagrams

71 views Asked by At

I am getting confused as a construct some state diagrams of the DFA, I am currently working through a problem with the constraint that {w | w is any string not in a*b*}. I do not understand what a*b* means exactly, can someone summarize that for me, thanks!

1

There are 1 answers

0
Jaya Sri Veeramallu On

a*b* means (zero or more a's followed by zero or more b's) .

Strings present in language a*b* are L={epsilon(zero a's and zero b's) , a, b, ab, aab, abb...... }

DFA for strings in language a*b* are:

∆(q0, epsilon) = q0
∆(q0, a)       = q0
∆(q0, b)       = q1
∆(q1, b)       = q1
∆(q1, a)       = q2
∆(q2, a)       = q2
∆(q2, b)       = q2

Here, ∆ represents transition. q0 is the initial state. q0, q1 are final states.

Similarly DFA for strings not present in language a*b* are:

∆(q0, epsilon) = q0
∆(q0, a)       = q0
∆(q0, b)       = q1
∆(q1, b)       = q1
∆(q1, a)       = q2
∆(q2, a)       = q2
∆(q2, b)       = q2

Here, ∆ represents transition. q0 is the initial state. q2 is the final state.

Here is the image for above DFA's:

[1]: https://i.stack.imgur.com/SAt38.jpg DFA image

Hope You Got it.!!