Drawing automata for languages

194 Views Asked by At

I'm trying to draw two automata for these two languages: enter image description here

For the first one, I know that the minimum is n = 1, m = 1, but I'm having troubles drawing a NFA for it.

The second one the minimum is n = 2, m = 1, but I still don't know how to start the NFA.

I have this for q2:

enter image description here

1

There are 1 best solutions below

10
On BEST ANSWER

Look at small numbers first. For the second language, the first valid $(n,m)$ pairs are $(1,2)$, $(2,1)$, $(3,3)$, and all others are of the form $(3k+n,3l+m)$, where $(n,m)$ is one of the starting pairs.

Hence the language can be described by $S \leftarrow abb|aab|aaabbb|aaaS|Sbbb$. It should be straightforward to draw an automata from this description.

enter image description here