...
Operating-Systems
October 25, 2023
ISRO-2007
October 25, 2023
Operating-Systems
October 25, 2023
ISRO-2007
October 25, 2023

UGC NET CS 2014 June-paper-2

Question 6
A grammar G is LL(1) if and only if the following conditions hold for two distinct productions

A → α | β

  1. First (α) ∩ First (β) ≠ {a} where a is some terminal symbol of the grammar.
  2. First (α) ∩ First (β) ≠ λ

III. First (α) ∩ Follow (A) = φ if λ ∈ First (β)

A
I and II
B
I and III
C
II and III
D
I, II and III
Question 6 Explanation: 
A grammar G is LL(1) if and only if the following conditions hold for two distinct productions:
A → α | β
1. First (α) and First (β) must be disjoint if none of α and β contains NULL move.
2. At most one of the strings α or β can drive NULL move i.e. α → NULL(since First (α) and First (β) are disjoint). In this case, First (β) and Follow(A) must be disjoint.
Hence the answer is option(D).
Correct Answer: D
Question 6 Explanation: 
A grammar G is LL(1) if and only if the following conditions hold for two distinct productions:
A → α | β
1. First (α) and First (β) must be disjoint if none of α and β contains NULL move.
2. At most one of the strings α or β can drive NULL move i.e. α → NULL(since First (α) and First (β) are disjoint). In this case, First (β) and Follow(A) must be disjoint.
Hence the answer is option(D).
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!