Question
Given: S -> a S b | epsilon L(G) = { a^n b^n | n >= 0 } S => a S b => a
Given: S -> a S b | epsilon L(G) = { a^n b^n | n >= 0 }
S => a S b => a a S b b => a a a S b b b => a a a b b b
Q1. L(G) = { a^n c b^n | n >= 1 }
a. Describe the language in English without referring to n. Also state the shortest string(s). **
b. Change the above grammar to generate this language. (a very minor change) **
Q2. L(G) = { a^n b^n c a^m b^m | n >=0 m>=0}
a. Describe the language in English without referring to n. Also state the shortest string(s).**
b. Change the grammar to generate this language. (This is NOT S -> a S b a S b ) **
Q3. What is L(G)of the following grammar?
Give a set former description as done above. **
S -> a B b HINT:At least how many bs???
B -> b B
B -> b
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