Question

5. (5 points) Give context-free grammar that generate the following languages (1) (w is a binary string, and w starts and end

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

1)S ->0T0 | 1T1

T -> 1T | 0T | ^ (^==empty string)

since S starts and ends with same number that is 0 or 1 , if we take any string that starts and ends with same number this grammar satisfies.

2)S -> S

This is the empty language.How many times we apply this production we get only S.

By applying this finite times we are not deriving any sentences hence the language is empty.

Note: if all the sentences can be derived by applying productions finite times that is called  language .

if u understand like else post a comment.

Add a comment
Know the answer?
Add Answer to:
5. (5 points) Give context-free grammar that generate the following languages (1) (w is a binary...
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