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

GATE 2014 (Session 2)

65 questions

MCQ 42 · NAT 231-mark 30 · 2-mark 35

Questions 21–25 of 65

Q21Arithmetic Operation1 markMCQ−0.33 if wrong
Suppose n and p are unsigned int variables in a C program. We wish to set p to nC3^nC_3. If n is large, which one of the following statements is most likely to set p correctly?

Q22Heap Tree1 markMCQ−0.33 if wrong
A priority queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is: 10, 8, 5, 3, 2. Two new elements 1 and 7 are inserted into the heap in that order. The level-order traversal of the heap after the insertion of the elements is:

Q23Recurrence Relation1 markMCQ−0.33 if wrong
Which one of the following correctly determines the solution of the recurrence relation with T(1) = 1?
T(n)=2T(n2)+lognT(n)=2T(\frac{n}{2})+logn

Q24Shortest Path1 markMCQ−0.33 if wrong
Consider the tree arcs of a BFS traversal from a source node W in an unweighted, connected, undirected graph. The tree T formed by the tree arcs is a data structure for computing

Q25Regular Language1 markMCQ−0.33 if wrong
If L1={an∣n≥0}L_{1}=\{a^{n}|n\geq 0\} and L2={bn∣n≥0}L_{2}=\{b^{n}|n\geq 0 \}, Consider
(I) L1⋅L2L_{1}\cdot L_{2} is a regular language
(II) L1⋅L2={anbn∣n≥0}L_{1} \cdot L_{2}= \{a^{n}b^{n}|n \geq 0\}
Which one of the following is CORRECT?