Question

Construct a context-free grammar for the language L={ababan> 1}.

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

Context Free Grammar :

A context-free grammar (CFG) consisting of a finite set of grammar rules is a quadruple (N, T, P, S) where

  • N is a set of non-terminal symbols.

  • T is a set of terminals.

  • P is a set of rules, P: N → (N ∪ T)*, i.e., the left-hand side of the production rule P does have any right context or left context.

  • S is the start symbol.

Context Free Grammar for Language L = { a.bn.a.bn.a | n>1} is

The productions are:

S -> aTa

T -> bQb

Q -> bCb | bQb

C ->a

Terminals are {a,b}

Non Terminals are { T,C,Q}

S is the start symbol.

These productions will generate all possible string in the given language L.

Please give me like. Thanks and Regards

Add a comment
Know the answer?
Add Answer to:
Construct a context-free grammar for the language L={ab'ab'an> 1}.
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