Describing grammar language / which language does this automaton recognize

48 Views Asked by At

I'm studying some questions about Automaton / Regular Expressions and I'm stuck in these questions.


Question 54

Which language does the automaton below recognize?

Automaton image

I tried trial and error, but I couldn't get any good results.


Question 66

a) Present 3 words generated by the grammar below. Show the sequence of rules used for the generation of word.

S → bS | aA | ϵ
A → bA | aS

My awnser:

S -> bS -> baA -> baaS -> baaϵ -> baa
S -> aA -> aaS -> aaϵ -> aa
S -> aA -> abA -> abaS -> abaϵ -> aba

b) Describe what language this grammar generates.

I tried to find a pattern to describe the language, but I couldn't.