Construct NFA and DFA which accepts all the strings that ends with aa or bb or ab or ba.
I had to get the total number of states required to form the above NFA as well as DFA. I tried to construct for aa or bb separately and then for ab or ba separately, but here all of them are together.
I tried a little look into this and please let me know if it’s correct or not. If not what is the correct logic and answer.
NFA =
a,b a,b (a,b)
q0=====>q1=====>q2
Surabhi Yadav is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.