0 votes 0 votes Which of the regular expressions corresponds to this grammar ? $S → AB/AS, A → a/aA, B → b$ $aa^*b^+$ $aa^*b$ $(ab)^*$ $a(ab)^*$ Theory of Computation ugcnetcse-dec2006-paper2 + – go_editor asked Mar 27, 2020 • edited Jun 11, 2020 by soujanyareddy13 go_editor 1.5k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes S->AB|AS, A->a/aA, B->b (b will appear exactly once so option A,C, D are out) S->AB->ab (smallest string ) or S->AB->aAb->aaAb... and so on aa*b or S->AS->AAS->AAAS.... so on aa*b option B is the ans Sanjay Sharma answered Mar 27, 2020 Sanjay Sharma comment Share Follow See all 2 Comments See all 2 2 Comments reply jyotiB commented Nov 28, 2023 reply Follow Share why not A? 0 votes 0 votes Sanjay Sharma commented Nov 28, 2023 reply Follow Share as mentioned option A will contain any number of b (1,2,3,.) , while given grammar can produce only one b 0 votes 0 votes Please log in or register to add a comment.