Question
Q1. Consider the following grammar: a b b | b a | a Which of the following sentences are in the language generated by this
Q1. Consider the following grammar:
Which of the following sentences are in the language generated by this grammar? a. baab b. bbbab c. bbaaaaa
d. bbaab
Which of the following sentences are in the language generated by this grammar? a. baab b. bbbab c. bbaaaaa
d. bbaab
Q2. Consider the following grammar:
a c | | b c| c d|
Which of the following sentences are in the language generated by this grammar? a. abcd b. acccbd c. acccbcc
d. acd e. accc
Q3. The expression Z - (X + Y)*X with this simplified version of the grammar:
Q4. Using the following grammar:
= A | B | C + | * | ( ) |
show the derivation for each of the following statements:
a. A = A * (B + (C * A)) b. B = C * (A * C + B) c. A = A * (B + (C))
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started