Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Context Free Grammars Consider the following Grammars: Grammar 1 Grammar 2 Grammar 3 Grammar 4 S A B , S ASB | a , S

Context Free Grammars
Consider the following Grammars:
Grammar 1 Grammar 2 Grammar 3 Grammar 4
SAB,SASB|a,SSc|AB,SASB|cScc|c
AaAa|a,AaA|a,AaA|a,AaaA|a
BbBbb|lon,BbbB|c,BbbB|b,BbbB|b
(a) Which grammars (of 1,2, and 3) accept both "aabbbbc" and "aaabbcc"? Select all
that apply. ()
A. Grammar 1
B.Grammar 2
C.Grammar 3
D. None
(b) Ambiguity (9 points)
"aaabbb" is an ambiguous string in Grammar 1
"aaabbc" is an ambiguous string in Grammar 2
"aaabcc" is an ambiguous string in Grammar 3
(c) Which strings are accepted by Grammar 4? Select all that apply. (5 points)
A. aaacbbb
B. aaacbbbb
C. ccaaabbbbcc
D. cacacbbbb
E. None
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 Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

How are technology and innovation interrelated?

Answered: 1 week ago

Question

1. Speak plainly and briefly, and avoid jargon.

Answered: 1 week ago

Question

3 > O Actual direct-labour hours Standard direct-labour hours...

Answered: 1 week ago