retagged by
1,051 views
3 votes
3 votes

Given answer is (D), how?

retagged by

2 Answers

Best answer
2 votes
2 votes

look at my assumption ,

we know that every  BOTTOM  PARSER is an DCFL ,that means STACK can be used.

now, push the non terminals into stack  WHICH ARE ONLY derivable from the given grammer  llike we do in PUSH DOWN AUTOMETA.

1) SINGLE  "a" cannot be derived from the G, eliminate it .

2)cannot  END with "a" and more over  starting symbol doesnt have  EPSILON production ,SO eliminate it

3) TWO "b"s cannot be derived from the grammer ,so eliminate it

4)  THIS can be derived,now push the string into the  STACK , this string can be satisfied by PDA by popping up of any number of  a's  when b is on the top of the stack

              push aas into the stack by taking 

              S ->aS/b

 but , SINGLE   'b' can also be derivable and accepted by PDA ,it can also be an ANSWER if it is in the given in options

selected by

Related questions

1 votes
1 votes
1 answer
1
Pawan Kumar 7 asked Jun 16, 2018
4,403 views
"A bottom up parser tries to find the right most deviation of the given input in the reverse order " what does this line mean Please Explain
0 votes
0 votes
2 answers
2
Rajesh R asked Nov 6, 2017
1,466 views
0 votes
0 votes
0 answers
3
Riddhankur Sarkar asked Aug 27, 2023
183 views
Answer the Question with Proper Explanation….S → Aa / bAc / dc / bdaA → ε The Above Grammar is –Neither LR(0) nor SLR(1).LR(0) but not SLR(1).SLR(1) but not LR(0...
0 votes
0 votes
2 answers
4
dhruba asked Jun 5, 2023
325 views