253 views
0 votes
0 votes

I think answer given is wrong pls correct me if i m wrong. I think its 

option c

Solution provided is given below:-

1 Answer

2 votes
2 votes
Given Answer is Correct. Do not see the solution But solve it yourself and you will find where you are mistaking. In the Solution, They have not provided complete solution, Hence you must be confusing.

Your answer is $C$, And The Correct answer is $D$. So, It means  that you are not getting $+$ as one look-ahead in your answer/diagram.

Let me tell you from where you'll get it... In the Solution Diagram, When you see $a$ on the Second state(Second column, first state) then you will get a new state as ($S \rightarrow a. , a/+$) and Since this state differs in only look-aheads from the Third state..Both will be merged into One in LALR(1) table construction algo.

Hence, We will have ($S \rightarrow a. , a/+/$ $)

Try it. Make complete diagram and see.

Related questions

2 votes
2 votes
4 answers
3
0 votes
0 votes
1 answer
4
Hirak asked Jun 1, 2019
2,089 views
S → aSbS /bSaS / ϵS → aABb A→ c/ ϵ B → d/ ϵWhich of the following is LL1. Explain in details.