1
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
Let SHAM3 be the problem of finding a Hamiltonian cycle in a graph G = (V, E) with |V| divisible by 3 and DHAM3 be the problem of determining if a Hamiltonian cycle exists in such graphs. Which one of the following is true?
A
Both DHAM3 and SHAM3 are NP-hard
B
SHAM3 is NP-hard, but DHAM3 is not
C
DHAM3 is NP-hard, but SHAM3 is not
D
Neither DHAM3 nor SHAM3 is NP-hard
2
GATE CSE 2006
MCQ (Single Correct Answer)
+1
-0.3

Consider the following grammar.

$$\eqalign{ & S \to S*E \cr & S \to E \cr & E \to F + E \cr & E \to F \cr & F \to id \cr} $$

Consider the following LR(0) items corresponding to the grammar above.

$$\eqalign{ & (i)\,S \to S*.E \cr & (ii)\,E \to F. + E \cr & (iii)\,E \to F + .E \cr} $$

Given the items above, which two of them will appear in the same set in the canonical sets-of-items for the grammar?

A
(i) and (ii)
B
(ii) and (iii)
C
(i) and (iii)
D
None of the above
3
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6

Which one of the following grammars generates the following language?

$$L = \left( {{a^i}{b^j}|i \ne j} \right)$$
A
$$\eqalign{ & S \to AC\,|\,CB \cr & C \to aCb\,|\,a\,|\,b \cr & A \to aA\,|\, \in \cr & B \to Bb\,|\, \in \cr} $$
B
$$S \to aS\,|\,Sb\,|\,a\,|\,b$$
C
$$\eqalign{ & S \to AC\,|\,CB \cr & C \to aCb\,|\, \in \cr & A \to aA\,|\, \in \cr & B \to Bb\,|\, \in \cr} $$
D
$$\eqalign{ & S \to AC\,|\,CB \cr & C \to aCb\,|\, \in \cr & A \to aA\,|\,a \cr & B \to Bb\,|\,b \cr} $$
4
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$$
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12