Module 28 Worksheet In Class Questions

advertisement
Module 28 Worksheet
In Class Questions
1) (S10) What is wrong with the following string derivation using the ABG grammar?
S --> aSb --> aaSbb --> aaabbb
2) (S11) Does grammar ABG generate string aSb?
3) (S11) Is aSb  L(ABG)? Why or why not?
4) (S12) How do we prove that a language L is a context-free language (CFL)?
5) (S12) How could we prove that the regular languages are a subset of the context-free
languages?
6) (S13) Give the set of productions P for grammar BALG.
7) (S13) Derive the strings ((( ))) and the strings ( ) (( )) using your grammar.
Take home review questions
1) What is the difference between the symbols --> and ==> ?
2) Give a derivation of the string aaa using the productions from the AG grammar.
3) What is the difference between a grammar G generating a string x and a string x
belonging to L(G)?
4) How do we prove a language L is a CFL?
Download