abstract machine, what language does M accecpt?

40 Views Asked by At

What language does M accept?

enter image description here

1: {a}3 ∪ {b}3 ∪ {λ}

2: {a}3 ∪ {b}3

3: {a, b}3 ∪ {λ}

4: {a, b}3 ∪ {λ}

I'm not completely sure just yet which one would work. I would appreciate it if you could also explain why it is the correct answer. Thank you.

1

There are 1 best solutions below

0
On

In your finite automaton there are three so called states: $A$, $B$ and $C$. The arrows tell us how we get from one state to another, and the arrow that points to $A$ out of nowhere tells us that the automation starts in state $A$.

The automaton accepts a word if it ends in a final state. $A$ is a final state, as is has two circles around it.

If we put the empty word $\lambda$ into the automaton, the word is accepted. We don't change states at all, but we are already in the final state $A$.

If we put an $a$ or $b$ into the automaton we end up in state $B$. $B$ is not a final state, so the automaton doesn't accept the word. In fact, is has to be a bit longer. If we put another $a$ or $b$ into the automaton we end up in state $C$. Again, this is not a final state, so the word is not accepted. Putting in another $a$ or $b$ however will get us back to the final state $A$ and word is accepted.

So the automaton excepts $\{\lambda, aaa, bbb, abb, aab, aba, baa, \dots \} = \{a^p b^q \mid p+q \mod 3 = 0 \} $. Do you see what language that is?