Use app×
QUIZARD
QUIZARD
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
246 views
in Computer by (67.9k points)
closed by

Consider the following two sets of LR(1) items of an LR(1) grammar

x → c.x, c/d    x → c.x, $ 

x → .cx, c/d   x → .cx, $

x→ .d, c/d   x → .d, $

Which of the following statements related to merging of the two sets in the corresponding LALR parser is/are FALSE?

1. Cannot be merged since look a heads are different

2. Can be merged but will result in S–R conflict

3. Can be merged but will result in R–R conflict

4. Cannot be merged since go to on c will lead to two different sets

(A) 1 only

(B) 2 only

(C) 1 and 4 only

(D) 1, 2, 3 and 4

1 Answer

+1 vote
by (69.0k points)
selected by
 
Best answer

Correct option is (D) 1, 2, 3 and 4

1. Merging of two states depends on core part (production rule with dot operator), not on look a heads. 

2. The two states are not containing Reduce item ,So after merging, the merged state can not contain any S-R conflict 

3. As there is no Reduce item in any of the state, so can’t have R-R conflict. 

4. Merging of stats does not depend on further go to on any terminal. So all statements are false.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...