1. Define a deterministic finite automaton over the alphabet {a, b} which accepts the set of all strings that end with the substring ab or ba.
A DFA or Deterministic Finite Automaton is such that for an input symbol , there is a single resultant state or say there is only transition possible.
The above mentioned question is solved in below images.
Here qo is the initial state . set of input elements is {a,b} .
Set of Final states is {q2,q4} .
Set of all possible states are {q0, q1,q2,q3,q4}.
Get Answers For Free
Most questions answered within 1 hours.