Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 1 ( Ex . 1 , Chapter 4 of [ Martin; 2 0 1 1 ] ) . In below, say what language (

Exercise 1(Ex.1, Chapter 4 of [Martin; 2011]). In below, say what language (a subset of {a, b}*) is generated by the context-free grammar with the indicated productions.Exercise 3(Ex.28, Chapter 4 of [Martin; 2011]). Draw an NFA accepting the language
generated by the grammar with productions and prove it is minimal
SabA|bB|aba
Ab|aB|bA
BaB|aA
Exercise 4(Ex.38, Chapter 4 of [Martin; 2011]).
In each case below, show that the grammar is ambiguous, and find an equivalent unambiguous
grammar.
b.
SABA
AaA|
BbB|
c.SaSb|aaSb|
Exercise 5(Ex.50, Chapter 4 of [Martin; 2011]).
Given the context-free grammar G, find a CFG G' with no -productions and no unit productions
that generates the language L(G)-{1}.
a.G has productions
SABA
AaA|A
BbB|A|
S ->T T
T -> aT | T a | b
Exercise 2(Ex.10, Chapter 4 of [Martin; 2011]).
Find context-free grammars generating the languages below.
{aibj | j 2i}
Exercise 3(Ex.28, Chapter 4 of [Martin; 2011]). Draw an NFA accepting the language generated by the grammar with productions and prove it is minimal
S -> abA | bB | aba
A -> b | aB | bA
B -> aB | aA
Exercise 4(Ex.38, Chapter 4 of [Martin; 2011]).
In each case below, show that the grammar is ambiguous, and find an equivalent unambiguous grammar.
b. S -> ABA
A -> aA |\Lambda
B->bB |\Lambda
c. S -> aSb | aaSb |\Lambda
Exercise 5(Ex.50, Chapter 4 of [Martin; 2011]).
Given the context-free grammar G, find a CFG G with no \Lambda -productions and no unit productions that generates the language L(G){\Lambda }.
a. G has productions
S -> ABA
A -> aA |\Lambda
B-> bB |\Lambda
image text in transcribed

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 Systems For Advanced Applications 17th International Conference Dasfaa 2012 Busan South Korea April 2012 Proceedings Part 1 Lncs 7238

Authors: Sang-goo Lee ,Zhiyong Peng ,Xiaofang Zhou ,Yang-Sae Moon ,Rainer Unland ,Jaesoo Yoo

2012 Edition

364229037X, 978-3642290374

More Books

Students also viewed these Databases questions

Question

Explain the chemical properties of acids with examples.

Answered: 1 week ago

Question

Write the properties of Group theory.

Answered: 1 week ago