Some solved examples of
Design of a DFA
Construct a DFA that accepts all strings from the language
L = { ^ , a, aa, aaa, aaaa, . . .}
Construct a DFA that accepts all strings from the language
L = {a, aa, aaa, aaaa, . . .}
Solution:
Construct a DFA that accepts all strings from the language
L = {strings of size divisible by 3} over Σ= {a}
Solution:
L: {^, aaa, aaaaaa, aaaaaaaaa, . . .}
Construct a DFA that accepts all strings from the language
L = {strings with odd number of b’s} over Σ= {a,b}
Solution:
Construct a DFA which accepts set of all strings over Σ={a,b} of length 2
Solution:
L = {aa, ab, ba, bb}
Design a DFA that accepts the unary number divisible by 3
Construct a DFA which accepts set of all strings over Σ={a,b} of length ≥2
Solution:
Design a DFA such that:
L = {anbm | n,m ≥ 1} over Σ={a, b}
Solution:
Language L = {ab, aab, aaab, abbb, aabb, aaaabbbb, ...}
Design a DFA that
accepts all strings of 0’s and 1’s that contain substring 01
Design a DFA that
accepts all strings of a’s and b’s with
even number of a’s and even number of b’s
(Hint: Strings may contain only even number of a’s <or> only even number of b’s <or> both even number of a’s and even number of b’s)
Design a DFA that
accepts all strings over {0,1} that does not contain three consecutive 1’s
Design a DFA that
accepts all strings of 0’s and 1’s that ends with 01
Design a DFA that
accepts set of strings in which number of a’s are divisible by 3 over {a, b}
Design a DFA that
accepts set of strings which starts with 01
Design a DFA that
accepts the strings containing exactly four 1’s over {0, 1}