Question 2979 – 2013 December UGC NET Paper 1
February 13, 2024Question 10229 – Theory-of-Computation
February 13, 2024Question 10195 – Theory-of-Computation
Consider a grammar with the following productions
S → a∝b|b∝c| aB S → ∝S|b S → ∝b b|ab S ∝ → bd b|b
The above grammar is:
Correct Answer: D
Question 7 Explanation:
S ∝→ [violates context free]
Because LHS must be single non-terminal symbol.
S ∝→ b [violates CSG]
→ Length of RHS production must be atleast same as that of LHS.
Extra information is added to the state by redefining iteams to include a terminal symbol as second component in this type of grammar.
Ex: [A → αβa]
A → αβ is a production, a is a terminal (or) right end marker $, such an object is called LR(k).
So, answer is (D) i.e., LR(k).
Because LHS must be single non-terminal symbol.
S ∝→ b [violates CSG]
→ Length of RHS production must be atleast same as that of LHS.
Extra information is added to the state by redefining iteams to include a terminal symbol as second component in this type of grammar.
Ex: [A → αβa]
A → αβ is a production, a is a terminal (or) right end marker $, such an object is called LR(k).
So, answer is (D) i.e., LR(k).
Context free
Regular
Context sensitive
LR(k)
Subscribe
Login
0 Comments