Why 'A' is wrong???

The Gateway to Computer Science Excellence

+5 votes

Which of the below relations does hold TRUE regarding GRAMMARS?

- $LL(1) \subset SLR(1) \subset LR(1)$

- $SLR(1) \subset \epsilon-\text{free}\; LL(1) \subset LR(1)$

- $\epsilon-\text{free}\;LL(1) \subset SLR(1) \subset LR(1)$

- $LL(1) \subset SLR(1) = LR(1)$

+3

Every $\epsilon$-free LL(1) is SLR(1) - you can see this in any Compiler text or even Wikipedia.

@sripo B is not true

+2

every $\epsilon$-free LL(1) grammar is SLR(1) grammar means the set of $\epsilon$-free LL(1) grammars is within the set of SLR(1) grammars.

To prove 2 sets A and B are equal , we have to prove that $A\subseteq B$ and $B\subseteq A$. So, if we consider $\epsilon$-free LL(1) = SLR(1) is true then all the SLR(1) grammars should also be the subset of set of $\epsilon$-free LL(1) grammars which is not true.

To prove 2 sets A and B are equal , we have to prove that $A\subseteq B$ and $B\subseteq A$. So, if we consider $\epsilon$-free LL(1) = SLR(1) is true then all the SLR(1) grammars should also be the subset of set of $\epsilon$-free LL(1) grammars which is not true.

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.4k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,737 questions

57,395 answers

198,595 comments

105,446 users