edited by
2,929 views
7 votes
7 votes

Which variable does not drive a terminal string in grammar?

  • $S \rightarrow AB$
  • $A \rightarrow a$
  • $B \rightarrow b$
  • $B \rightarrow C$
  1. A
  2. B
  3. C
  4. S
edited by

3 Answers

6 votes
6 votes

Here

S -> AB

{A ->a} and {B ->b or C}

if B goes with C then, there is no termination string.

So, answer is 'C' . which is also called useless symbol.

1 votes
1 votes

C is the variable which do not derive any terminal, its also called useless symbol,

after reducing useless variables your remaining grammar is,

S--> AB,  A-->a , B-->b

also see this

edited by
Answer:

Related questions

7 votes
7 votes
3 answers
1
go_editor asked Jun 24, 2016
6,101 views
A symbol table of length $152$ is processing $25$ entries at any instant. What is occupation density?$0.164$$127$$8.06$$6.08$
6 votes
6 votes
5 answers
2
3 votes
3 votes
3 answers
3
Anuanu asked Jun 15, 2016
10,006 views
In compiler terminology reduction in strength meansReplacing run time computation by compile time computationRemoving loop invariant computationRemoving common subexpress...
3 votes
3 votes
2 answers
4
go_editor asked Jun 24, 2016
3,695 views
Logic family popular for low power dissipationCMOSECLTTLDTL