Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here are eight simple grammars, each of which generates an infinite language of strings. These strings tend to look like alternating a's and b's, although

Here are eight simple grammars, each of which generates an infinite language of strings. These strings tend to look like alternating a's and b's, although there are some exceptions, and not all grammars generate all such strings.

1. S abS | ab

2. S SS | ab

3. S aB; B bS | a

4. S aB; B bS | b

5. S aB; B bS | ab

6. S aB | b; B bS

7. S aB | a; B bS

8. S aB | ab; B bS

The initial symbol is S in all cases. Determine the language of each of these grammars. Then, find, in the list below, the pair of grammars that define the same language.

a) G1: S aB, B bS, B b

G2: S aB, B bS, S a

b) G1: S aB, B bS, B a

G2: S aB, B bS, B b

c) G1: S aB, B bS, B b

G2: S aB, B bS, S b

d) G1: S abS, S ab

G2: S aB, B bS, B b

I am very confused .Please explain me step by step to learn

Thanks!!!!!!!!!!

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 Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

LO6 Describe how individual pay rates are set.

Answered: 1 week ago