Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. A pure grammar, G, is one which uses no variables in its productions. Such a grammar is dened by a triple, (T,P,w), where T

3. A pure grammar, G, is one which uses no variables in its productions. Such a grammar is dened by a triple, (T,P,w), where T is a nite set of terminals, P is a nite set of productions T T, and w is the start word. For such a grammar, dene the language generated by G to be the set of all terminal strings derivable from the start word. For example, if G = ({a,b},P,ab) with P dened by a ab,b bab | bb then one deriva- tion would be ab abb ababb abbabb, so L(G) contains the words ab,abb,ababb, and abbabb, among others. (a) Show that every pure language, L(G), is a CFL by describing how to construct an equivalent CFG, H, from the pure grammar G. (b) Under what circumstances is L(G) nite, for a pure grammar G? (c) Bonus. Show that the pure languages are a proper subset of the CFLs by nding a CFL that cant be generated by a pure grammar.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

=+3 In what ways can an MNE improve or change its approach to IHRM?

Answered: 1 week ago