1
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
In the correct grammar of the previous question, what is the length of the derivation (number of steps starring from S) to generate the string $${a^l}{b^m}$$ with $$l \ne m$$?
A
$$\max (l,m) + 2$$
B
$$l + m + 2$$
C
$$l + m + 3$$
D
$$\max (l,m) + 3$$
2
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6

Consider the following grammar:

$$\eqalign{ & S \to FR \cr & R \to *S\,|\,\varepsilon \cr & F \to id \cr} $$

In the predictive parser table, M, of the grammar the entries $$M\left[ {S,id} \right]$$ and $$M\left[ {R,\$ } \right]$$ respectively.

A
$$\left\{ {S \to FR} \right\}$$ and $$\left\{ {R \to \varepsilon } \right\}$$
B
$$\left\{ {S \to FR} \right\}$$ and $$\left\{ {\,\,} \right\}$$
C
$$\left\{ {S \to FR} \right\}$$ and $$\left\{ {R \to * S} \right\}$$
D
$$\left\{ {F \to id} \right\}$$ and $$\left\{ {R \to \varepsilon } \right\}$$
3
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6

Consider the grammar

$$S \to \left( S \right)\,|\,a$$

Let the number of states in SLR(1), LR(1) and LALR(1) parsers for the grammar be n1, n2 and n3 respectively.

The following relationship holds good
A
n1 < n2 < n3
B
n1 = n3 < n2
C
n1 = n2 = n3
D
n1 ≥ n3 ≥ n2
4
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6

Consider the grammar

$$E \to E + n\,|\,E \times n\,|\,n$$

For a sentence n + n × n, the handles in the right-sentential form of the reduction are

A
n, E + n and E + n × n
B
n, E + n and E + E × n
C
n, n + n and n + n × n
D
n, E + n and E × n
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12