GATE 2014 (Session 3) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2014 (Session 3)

65 questions

MCQ 47 · NAT 181-mark 30 · 2-mark 35

Questions 46–50 of 65

Q46Context Free Language2 marksMCQ−0.67 if wrong
Consider the following languages over the alphabet Σ={0,1,c}\Sigma =\{0,1,c\}:
L1={0n1n∣n≥0}L_{1}=\{0^{n}1^{n}\mid n\geq 0\}
L2={wcwr∣w∈{0,1}∗}L_{2}=\{wcw^{r}|w\in \{0,1\}^{*}\}
L3={wwr∣w∈{0,1}∗}L_{3}=\{ww^{r}|w\in \{0,1\}^{*}\}
Here wrw^{r} is the reverse of the string w. Which of these languages are deterministic Context-free languages?

Q47Recurrence Relation2 marksNAT
Suppose you want to move from 0 to 100 on the number line. In each step, you either move right by a unit distance or you take a shortcut. A shortcut is simply a pre-specified pair of integers i,j with i<ji \lt j. Given a shortcut i, j if you are at position i on the number line, you may directly move to j. Suppose T(k) denotes the smallest number of steps needed to move from k to 100. suppose further that there is at most 1 shortcut involving any number, and in particular from 9 there is a shortcut to 15. Let y and z be such that T(9) = 1 + min(T(y), T(z)). Then the value of the product yz is_______.

Q48Undecidability2 marksMCQ−0.67 if wrong
Consider the decision problem 2CNFSAT defined as follows:
{Φ∣Φ is a satisfiable propositional formula in CNF with at most two literals per clause}\{\Phi \mid \Phi \text{ is a satisfiable propositional formula in CNF with at most two literals per clause}\}
For example, Φ=(x1∨x2)∧(x1∨x3‾)∧(x2∨x4)\Phi = (x_1 \vee x_2) \wedge (x_1 \vee \overline{x_3}) \wedge (x_2 \vee x_4) is a Boolean formula and it is in 2CNFSAT.
The decision problem 2CNFSAT is

Q49AVL Tree2 marksNAT
Suppose we have a balanced binary search tree T holding n numbers. We are given two numbers L and H and wish to sum up all the numbers in T that lie between L and H. Suppose there are m such numbers in T. If the tightest upper bound on the time to compute the sum is O(nalogbn+mclogdn)O(n^{a}log^{b}n+m^{c}log^{d}n), the value of a + 10b + 100c + 1000d is _______.

Q50Hashing2 marksMCQ−0.67 if wrong
Consider a hash table with 100 slots. Collisions are resolved using chaining. Assuming simple uniform hashing, what is the probability that the first 3 slots are unfilled after the first 3 insertions?