1. Let Σ = {a,b}. Give a context-free grammar that generate the following language: {a¹b²i+k : k ≥ 2,i ≥ 1} + {ai+kô²i : i,k ≥ 0} 2. The following grammar generates exactly all the strings of balanced brackets: SSS S→ (S) The (sole) nonterminal S is the start symbol of the grammar. (a) Show that this grammar is ambiguous. (b) Is this language inherently ambiguous? State your thoughts one way or another (you only need to provide your thoughts, not a proof). 3. Design a deterministic pushdown automaton that recognizes the language : {a²ibka² i,k≥ 1} Draw a table that traces the behavior of your pushdown automaton on the input aaaabbaa and explain how this input is accepted or rejected (as the case might be). 4. Is the language L = {a²ibic²idi : i, j ≥ 0} context-free? Prove one way or another.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter12: Adding Functionality To Your Classes
Section12.5: Virtual Functions
Problem 5E
icon
Related questions
Question

Please draw the diagram where it is asked to be drawn. Don't just describe how to do it. 

 

1. Let Σ = {a,b}. Give a context-free grammar that generate the following language:
{a¹b²i+k : k ≥ 2,i ≥ 1} + {ai+kô²i : i,k ≥ 0}
2. The following grammar generates exactly all the strings of balanced brackets:
SSS
S→ (S)
The (sole) nonterminal S is the start symbol of the grammar.
(a) Show that this grammar is ambiguous.
(b) Is this language inherently ambiguous? State your thoughts one way or another (you
only need to provide your thoughts, not a proof).
3. Design a deterministic pushdown automaton that recognizes the language
:
{a²ibka² i,k≥ 1}
Draw a table that traces the behavior of your pushdown automaton on the input aaaabbaa
and explain how this input is accepted or rejected (as the case might be).
4. Is the language L
=
{a²ibic²idi : i, j ≥ 0} context-free? Prove one way or another.
Transcribed Image Text:1. Let Σ = {a,b}. Give a context-free grammar that generate the following language: {a¹b²i+k : k ≥ 2,i ≥ 1} + {ai+kô²i : i,k ≥ 0} 2. The following grammar generates exactly all the strings of balanced brackets: SSS S→ (S) The (sole) nonterminal S is the start symbol of the grammar. (a) Show that this grammar is ambiguous. (b) Is this language inherently ambiguous? State your thoughts one way or another (you only need to provide your thoughts, not a proof). 3. Design a deterministic pushdown automaton that recognizes the language : {a²ibka² i,k≥ 1} Draw a table that traces the behavior of your pushdown automaton on the input aaaabbaa and explain how this input is accepted or rejected (as the case might be). 4. Is the language L = {a²ibic²idi : i, j ≥ 0} context-free? Prove one way or another.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:
9781337569798
Author:
ECKERT
Publisher:
CENGAGE L
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning