Question: Question 2: For the grammar: SABI A B - ACC C AB OD AG d D --- 1. Find the generating symbols. Recall, a grammar

 Question 2: For the grammar: SABI A B - ACC C

AB OD AG d D --- 1. Find the generating symbols. Recall,

Question 2: For the grammar: SABI A B - ACC C AB OD AG d D --- 1. Find the generating symbols. Recall, a grammar symbol is generating if there is a deriviation of at least one terminal string, starting with that symbol. 2. Eliminate all useless productions those that contain at least one symbol that is not a generating symbol. 3. In the resulting grammar, eliminate all symbols that are not reachable --- they appear in no string derived from S. in the list below, you will find several statements about which symbols are generating, which are reachable, and which productions are useless. Select the one that is FALSE. C-CD is useless. a is not reachable. C C is not generating. B is reachable. Question 3: Here is a grammar, whose variables and terminals are NOT named using the usual convention. Any of R through Z could be either a variable or terminal; it is your job to figure out which is which, and which could be the start symbol. RST I UV TUV 1 W V XY | Z XYZ T We do have an important clue: There are no useless productions in this grammar; that is, each production is used in some derivation of some terminal string from the start symbol. Your job is to figure out which letters definitely represent variables, which definitely represent terminals, which could represent either a terminal or a nonterminal, and which could be the start symbol. Remember that the usual convention, which might imply that all these letters stand for either terminals or variables, does not apply here. Y could be a variable or a terminal. S must be a terminal. T could be a variable or a terminal. V must be a terminal. Question 2: For the grammar: SABI A B - ACC C AB OD AG d D --- 1. Find the generating symbols. Recall, a grammar symbol is generating if there is a deriviation of at least one terminal string, starting with that symbol. 2. Eliminate all useless productions those that contain at least one symbol that is not a generating symbol. 3. In the resulting grammar, eliminate all symbols that are not reachable --- they appear in no string derived from S. in the list below, you will find several statements about which symbols are generating, which are reachable, and which productions are useless. Select the one that is FALSE. C-CD is useless. a is not reachable. C C is not generating. B is reachable. Question 3: Here is a grammar, whose variables and terminals are NOT named using the usual convention. Any of R through Z could be either a variable or terminal; it is your job to figure out which is which, and which could be the start symbol. RST I UV TUV 1 W V XY | Z XYZ T We do have an important clue: There are no useless productions in this grammar; that is, each production is used in some derivation of some terminal string from the start symbol. Your job is to figure out which letters definitely represent variables, which definitely represent terminals, which could represent either a terminal or a nonterminal, and which could be the start symbol. Remember that the usual convention, which might imply that all these letters stand for either terminals or variables, does not apply here. Y could be a variable or a terminal. S must be a terminal. T could be a variable or a terminal. V must be a terminal

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!