2 votes 2 votes If a is a terminal and S, A, B are three non-terminals, then which of the following are regular grammars? (a) S → ε, A → aS|b (b) A → aB|a, B → bA|b (c) A → Ba|Bab (d) A → abB|aB Compiler Design compiler-design regular-grammar + – vkm07 asked Jul 23, 2016 retagged Jun 17, 2022 by Lakshman Bhaiya vkm07 3.7k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes Regular grammar either left linear or right linear. But not both. All r satisfying that property. Now we r checking by DFA (c),(d) could not make any DFA For (A) if we think S as a starting symbol , we could not reach to A from S But for (b) we can draw DFA. So, answer is (B) srestha answered Jul 24, 2016 srestha comment Share Follow See all 3 Comments See all 3 3 Comments reply Prateek kumar commented Sep 1, 2016 reply Follow Share yeah, the answer is (B) it is a regular expression which is starting with a and ending with either a or b 0 votes 0 votes vijaycs commented Sep 1, 2016 reply Follow Share @Srestha, If start symbol of (a) is S then can we say that is accepts only one string, that is epsilon. ?? 0 votes 0 votes srestha commented Sep 2, 2016 reply Follow Share yes, then A production is invalid 0 votes 0 votes Please log in or register to add a comment.