Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( ii ) Prove that xaxax can generate any b * * b b * * a b * * . ( iii ) Prove

(ii) Prove that xaxax can generate any b**bb**ab**.
(iii) Prove that S can generate (b**ab**ab**.
(iv) Prove that the language of this CFG is the set of all words in (a+b
with an even number of a's with the following exception: We consider
the word to have an even number of a's, as do all words with no
a's, but of the words with no a's only can be generated.
(v) Show how the difficulty in part (iv) can be alleviated by adding the
production
SxS
(i) For each of the CFG's in Problems 1 through 5 determine whether
there is a word in the language that can be generated in two
substantially different ways. By "substantially," we mean that if
two steps are interchangeable and it does not matter which comes
first, then the different derivations they give are considered "sub-
stantially the same" otherwise they are "substantially different."
(ii) For those CFG's that do have two ways of generating the same word,
show how the productions can be changed so that the language gen-
erated stays the same but all words are now generated by substantially
only one possible derivation.
Consider the CFG:
Sxbaax|ax
xxa|xb|
What is the language this generates? Find a word in this language that can
be generated in two substantially different ways.
(i) Consider the CFG for "some English" given in this chapter. Show
how these productions can generate the sentence:
Itchy the bear hugs jumpy the dog.
(ii) Change the productions so that an article cannot come between an
adjective and its noun.
(i) Show how in the CFG for "some English" we can generate the
sentence:
The the the cat follows cat.
(ii) Change the productions so that the same noun cannot have more than
one article. Do this for the modification in Problem 8 also.
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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

=+ Do you see any potential problems with the analysis?

Answered: 1 week ago