1
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2 is undecidable. Which one of the following is TRUE?
A
P3 is decidable if P1 is reducible to P3
B
P3 is undecidable if P3 is reducible to P2
C
P3 is undecidable if P2 is reducible to P3
D
P3 is decidable if P3 is reducible to P2 's complement
2
GATE CSE 2005
MCQ (Single Correct Answer)
+1
-0.3
The grammar $$A \to AA\,|\,\left( A \right)\,|\,\varepsilon $$
is not suitable for predictive-parsing because the grammar is
A
ambiguous
B
left-recursive
C
right-recursive
D
an operator-grammar
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
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12