I believe it is a language that starts with an a and ends with a b, but I’m not sure.
G = (V,∑,P,S) where V={A,B,S,T}, ∑={a,b},
P = { S → ε | T | AB, T → aTb | ε, A → aA | Aaa | ε, B → bB | ε }
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Look at the start. For the first substitution, there are three possibilities. If it’s
S -> ε, you’re finished. So the language contains the empty wordε. If the first substitution isS -> T, what can happen withT? Simple,Tcan become eitherεoraTb, no other nonterminals can ever become involved, so that production produces the sublanguage (I’ll leave that for you to work out, it’s homework). Finally, what if the first substitution isS -> AB? Looking at the productions starting withAresp.B, the right hand sides con only ever contain one nonterminal, the one you started with and substitutingAmay add one or twoa, substitutingBeither ends (ε) or adds anotherb. So which combinations ofaandbare reachable? Doesbabelong to the language? Why resp. why not?Hint:
S -> AB -> Aε = A -> aA -> aε = ais valid, so a nonempty word need not end withb.