Question

Problem 1 Create a CFG that generates each of the languages below. [10 points] [10 points] wR is a substring of r if there are strings y, z E {a, b) such that r = ywR2. A = {w I w E {a, b) has more as than bs} B = {w#r l w,xe(a, b) and wR a. b. is a substring of r). Rememb er, c. [10 points] C = {ambck 1 m, n > 0 and k = m + n).

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Below are the CFG's as per the languages specified by you:
Solution a.

S -> Ta | RS | SRT
T -> Ta | λ
R -> RR | aRb | bRa | λ

Solution b.

S → T R
T → aTa | bTb | #R
R → RR | a | b  

Solution c.

S → aSc | B
B → bBc | λ

I hope I could solve your problem.Further, if you have any doubt, please ask.

Add a comment
Know the answer?
Add Answer to:
Problem 1 Create a CFG that generates each of the languages below. [10 points] [10 points]...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT