I am using the 9th edition of this textbook... Chapter 3 Problem 12 asks: Consid
ID: 3616687 • Letter: I
Question
I am using the 9th edition of this textbook... Chapter 3 Problem 12 asks: Consider the following grammar: <S> => a <S> c <B> | <A> | b <A> => c <A> | c <B> => d | <A> Which of the following sentences are in the language generatedby this grammar? a. abcd b. acccbd c. acccbcc d. acd e. accc The part that has me confused is the <S> inthe definition of <S>... Could anybody assist me??? I am using the 9th edition of this textbook... Chapter 3 Problem 12 asks: Consider the following grammar: <S> => a <S> c <B> | <A> | b <A> => c <A> | c <B> => d | <A> Which of the following sentences are in the language generatedby this grammar? a. abcd b. acccbd c. acccbcc d. acd e. accc The part that has me confused is the <S> inthe definition of <S>... Could anybody assist me???Explanation / Answer
Dear User, ->abcd can be represented since thestarting statement is determined by a <S> c <B>. b canreplace <S> and d can replace <B>. ->acccbd and acccbcc arenot in the language generated by this grammar because there is noway for a b to follow after a c. The <B> statement canbe a d or a string of “c”s but it can’t be ab. ->acd is not in the language generated bythe grammar because the only sentences that are less than fourletters that can be generated by the grammar are b,c, cc andccc. ->accc can be generated by the grammarsince <S> can be substituted in with a c and so can<B>. Thus only the two answers a)abcd e)accc are in the lanuage generated by the grammer.ITS HELPFUL TO YOU....
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.