Professional Documents
Culture Documents
Design of Dfa
Design of Dfa
Design of Dfa
Solution:
Explanation
1.We have to create DFA which will accept string of length 2 on alphabet {a,
b}
2.So first thing about creating DFA which will accept of 1 length string, that
is pretty simple
3.You just take 2 states, 1 length string can be accepted. Now take 2 length
string for that we need 3 states
Explanation
We have to create DFA which will accept string of length ≥ 2 on alphabet {a, b}.
1. So again first thing about creating DFA which will accept of 1 length string,
that is pretty simple.
2. You just take 2 states 1 length string can be accepted.
3. Now take 2 length string for that we need 3 states.
4. And third state will be final state.
5. And if input comes over state C then it will go to C itself to accept strings
greater than 2
6. Now if string < 2 will not reach final state, so will not be accepted.
1. Think about the language content = {∈,a, b, ab, ba, bb, aa}
2. So again first thing about creating DFA which will accept of ∈, that is
first state will be final state
3. Then we have to accept single letter that is two states will be required
and second state also will be final state
4. Now we need to accept 2 input symbols one after another in case of aa
or ab or bb or ba
5. And strings which are greater than 3 should not be accepted.
6. So we have to attach 1 more state as dead state.
Solution:
The strings that will be generated for this particular languages are 000,
0001, 1000, 10001, .... in which 0 always appears in a clump of 3. The
transition graph is as follows: