In: Computer Science
Automata Question.
Over the alphabet Σ = {a, b}:
1) Give a DFA, M1, that accepts a Language L1 = { w | w has exactly 2 a’s }
2) Give a DFA, M2, that accepts a Language L2 = { w | w has at least 2 b’s }
3) Give acceptor for L1 intersection L2
4) Give acceptor for L1 - L2
Deterministic Finite Automaton (DFA)
In DFA, for each input symbol, one can determine the state to which the machine will move. Hence, it is called Deterministic Automaton. As it has a finite number of states, the machine is called Deterministic Finite Machine or Deterministic Finite Automaton.
Formal Definition of a DFA
A DFA can be represented by a 5-tuple (Q, ∑, δ, q0, F) where −
1. A DFA, M1, that accepts a Language L1 = { w | w has exactly 2 a’s }
sol:
Here b's are free to choose.It means there can be any number of b's.
2.A DFA, M2, that accepts a Language L2 = { w | w has at least 2 b’s }
sol:
3.Acceptor for L1 intersection L2
4. Acceptor for L1 - L2
NOTE: Always remember for constructing DFA ,for problems like start,exactly,atmost it will require dead state and no dead state required for end,atleast,contain.
Q is a finite set of states.
∑ is a finite set of symbols called the alphabet.
δ is the transition function where δ: Q × ∑ → Q
q0 is the initial state from where any input is processed (q0 ∈ Q).
F is a set of final state/states of Q (F ⊆ Q).
Graphical Representation of a DFA
A DFA is represented by digraphs called state diagram.