In: Computer Science
1. Design a FA for the language L = {w : na(w) ≤ 4}.
2. Design a FA that accepts all strings that contain the substring aba.
3. Design a FA for the language L = {ai baj : i, j ≥ 0, i + j is odd}
4. Design a FA for the language L = {bnam : n ≤ 2, m ≥ 3}
Question 1:
taking alphabet over {a,b}
finite automata is
Question 2:
contains substring "aba"
Question : 3
a^i ba^j where i+j=odd
that means if i is even j is odd
or else j is even i is odd
Simulation:
Question 4:
b^n a^m n<=2 and m>=3
that means no of b is not greater than 2
and no of a is not less than 3
simulation:
Any queries comment please