Question: EXAMPLE 2 . 3 Consider grammar G 3 = ( { S } , { a , b } , R , S ) .

EXAMPLE 2.3
Consider grammar G3=({S},{a, b}, R, S). The set of rules, R, is
S -> aSb | SS |\epsi .
This grammar generates strings such as abab, aaabbb, and aababb. You can see more easily what this language is if you think of a as a left parenthesis ( and b as a right parenthesis ). Viewed in this way, L(G3) is the language of all strings of properly nested parentheses. Observe that the right-hand side of a rule may be the empty string \epsi .

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!