Question

I am not asking for the solution, it's an assignment, but I didn't see any question like that, I am asking for what's does it means:

The question:

Create a Regular Grammar that generates the same language which is generated by the following Context Free Grammar:

G = {{S,X,Y}, {a,b,c}, S, P} Where P is:

S ----> aaS
S ----> bX
X ----> cYb

X ----> cb
Y ----> bbY
Y ----> bb

Does it means to generate the language? I am confused about creating RG from CFG.

Was it helpful?

Solution

Good question and this topic is worth knowing. I would seek help from a TA or something of that nature. The study of finite automaton is vital to a successful career in computer science in my opinion.

The languages that can be represented by CFGs and RLs are very different and the question is designed to help you understand that.

I don't really like the use of the word "generate", "accept" is more appropriate. Find the RL that accepts the same strings as CFG given below is how I would write the question.

Keep in mind that a regular language is equivalent to a finite state machine, so you can work in this by drawing one that accepts the stings accepted by the given CFG.

Find the answer to your question, but doing so here is kind of the wrong place to do so.

now to do this problem for fun...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top