Search code examples
finite-automatacomputation-theorydfa

Design a FA to accept L, where L = Strings in which ‘a’ always appears tripled


Design a FA to accept L, where L = {Strings in which ‘a’ always appears tripled} over the input set Σ = {a, b}.

This is my solution (A is start state):

DFA

From what I understand the question doesn't say it should always contain "a", it should also accept strings like {b,bb,bbb}. Is this correct?


Solution

  • Your solution appears right to me! It really depends on the interpretation of the question. I also interpreted that a's could also be separated, as long as they were always tripled.

    abbabbbab should be accepted as a's are tripled always, come in threes.

    You should make sure of that! I also did this FA in the case above, but my generic understanding of the question would be your interpretation which looks fine!

    FA automata tripled a's