1. Give a context-free grammar for the following language L: L = fakbjcjdkg 2. Design a pushdown automaton for the language L in the above problem. 3. Design a context-free grammar for the following language L: L=fanbbbc3nr where n>0g

CIS-303: Homework 6: (80 points)
1. Give a context-free grammar for the following language L:
L = fakbjcjdkg
2. Design a pushdown automaton for the language L in the above problem.
3. Design a context-free grammar for the following language L:
L=fanbbbc3nr where n>0g
(This was a problem on last year’s second midterm exam.)
4. Design a context-free grammar for the set L of balanced strings of delimeters of two
types () and []. For example, ([()[]]([])) is in L but [(]) is not.
5. Design a nondeterministic pushdown automaton that recognizes the following lan-
guage:
L=faibjck where i k or bothg
6. Give a context-free grammar for the following language L:
L = fw2f1,2,3,4g j w does not contain the substring 222g
7. Consider the following grammar:
S!aSA j 
A!bA j 
Show that the above grammar is ambiguous by giving two di erent derivation trees
for the string aabbbb
8. Consider the following grammar:
S!SAB j 
A!aA j 
B!bB j 
Show that the above grammar is ambiguous by nding a string with two di erent
derivation trees. You must give the string and draw the derivation trees.

Calculate a fair price for your paper

Such a cheap price for your free time and healthy sleep

1650 words
-
-
Place an order within a couple of minutes.
Get guaranteed assistance and 100% confidentiality.
Total price: $78
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, how can I help?