Here you can ask questions and find or give answers to organizational, academic and other questions about studying computer science.

1.1k questions

1.2k answers

1.6k comments

532 users

0 votes

This answer was invalid and I do not know why. Thanks for your help in advance.
c) Regular Grammar 3

Konstruieren Sie eine rechtsreguläre Grammatik für die folgende Sprache: L = {w ∈ {a,b}* | w has at least one occurrence of the substring aba}
S -> abaA | aS | bS
A -> b | 

in # Mandatory Modules Bachelor by (160 points)

1 Answer

+1 vote
 
Best answer

Your grammar describes the language waba + wabab where w is any word consisting of letters a and b. So, the occurrence of aba is not at an arbitrary place within the word.

Why not the following?

S -> aS | bS | A
A -> abaB
B -> aB | bB | 
by (166k points)
selected by
Imprint | Privacy Policy
...