GATE CSE 2022 Q29: Number of LR(0) items in goto on +
- Compiler Design
- 1 mark
- NAT
- No negative marking
Question
Consider the augmented grammar with as the set of terminals.
If is the set of two items , then contains exactly __________ items.
Try it: numerical answer: type the value
Numerical answer. No negative marking.
Show answer and explanation
Answer: 5 (official GATE 2022 final answer key)
Concept used: goto moves the dot over the symbol, then takes the closure of the resulting items.
First step: Only moves on , giving ; now add the closure items for and .
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2022 CS question paper and final answer key, organised by IIT Kharagpur. Question paper · Answer key
More Compiler Design PYQs
- 2026 Session 1 · Q27Classify errors in three C string declarations
- 2026 Session 1 · Q28True statements about LL(1) parsing
- 2026 Session 1 · Q42Redundant (common) subexpressions in blocks B4 and B5 of a CFG
- 2026 Session 1 · Q53Compare two SDDs for type declarations
- 2026 Session 2 · Q35Count tokens produced by a lexer for a given string
- 2026 Session 2 · Q41Shift-reduce conflicts in the LR(0) table of a grammar