The GATE Grind

GATE 2016 CS (CS2) – Previous Year Questions with Solutions

All 65 questions of GATE 2016 CS (CS2) with answers and explanations. Read each question, then practise it by topic or as a full paper.

Practise this paper in The GATE Grind →

  1. Question 1 (1 mark, Multiple choice) – The man who is now Municipal Commissioner worked as .
  2. Question 2 (1 mark, Multiple choice) – Nobody knows how the Indian cricket team is going to cope with the difficult and seamer-friendly wickets in Australia. Choose the closest meaning of…
  3. Question 3 (1 mark, Multiple choice) – Find the odd word: mock, deride, praise, jeer.
  4. Question 4 (1 mark, Multiple choice) – Pick the odd sequence.
  5. Question 5 (1 mark, Multiple choice) – In a quadratic function, roots α and β satisfy αβ = 4. Find (n+n)/(-n+-n).
  6. Question 6 (2 marks, Multiple choice) – Among 150 faculty members, 55 are connected through Facebook and 85 through WhatsApp. Thirty have neither account. How many are connected only through…
  7. Question 7 (2 marks, Multiple choice) – Computers were invented for performing only high-end useful computations. However, it is no understatement that they have taken over our world today.…
  8. Question 8 (2 marks, Multiple choice) – All hill-stations have a lake. Ooty has two lakes. Which can be inferred? (i) Ooty is not a hill-station. (ii) No hill-station can have more than one…
  9. Question 9 (2 marks, Multiple choice) – Each cell in the shown 2 × 4 rectangular grid is a rectangle. How many rectangles are present?
  10. Question 10 (2 marks, Multiple choice) – Choose the expression for f(x) in the graph.
  11. Question 11 (1 mark, Numerical answer) – Consider (i) false, (ii) Q, (iii) true, (iv) P Q, (v) Q P. How many are logically implied by P(P Q)?
  12. Question 12 (1 mark, Numerical answer) – Let f(x) be a polynomial and g(x)=f(x). If f(x)+f(−x) has degree 10, find the degree of g(x)−g(−x).
  13. Question 13 (1 mark, Numerical answer) – Find the minimum number of colours sufficient to vertex-colour every planar graph.
  14. Question 14 (1 mark, Multiple choice) – Consider systems of m linear equations in n variables. I: If m < n, all such systems have a solution. II: If m > n, none has a solution. III: If m =…
  15. Question 15 (1 mark, Numerical answer) – A shop has equal numbers of two LED bulb types. The probabilities of lasting more than 100 hours are 0.7 for type 1 and 0.4 for type 2. Find the…
  16. Question 16 (1 mark, Numerical answer) – A has eigenvalues 1, 2 and 4. Find ((A-1)T).
  17. Question 17 (1 mark, Numerical answer) – An eight-bit ripple-carry adder computes A + B for two’s-complement integers. A = 1. Find the decimal B that causes the longest sum-settling latency.
  18. Question 18 (1 mark, Multiple choice) – Boolean variables satisfy x 1 x 2 x 3 x 4=0. Which must hold?
  19. Question 19 (1 mark, Numerical answer) – X is the number of distinct 16-bit two’s-complement integers; Y is the number of distinct 16-bit sign-magnitude integers. Find X − Y.
  20. Question 20 (1 mark, Numerical answer) – A processor has 40 instructions, 24 general-purpose registers and a 32-bit instruction with an opcode, two register operands and one immediate…
  21. Question 21 (1 mark, Numerical answer) – BFS starts at the root of a binary tree. A vertex t is at distance four. If t is the n-th vertex visited, find the maximum n.
  22. Question 22 (1 mark, Numerical answer) – What does this C program print?
  23. Question 23 (1 mark, Multiple choice) – Algorithms sort in ascending order. On an already ascending input, which are true? I: Quicksort takes (n2). II: Bubblesort takes (n2). III: Mergesort…
  24. Question 24 (1 mark, Multiple choice) – Which paradigm underlies Floyd–Warshall all-pairs shortest paths?
  25. Question 25 (1 mark, Multiple choice) – N records are in a sorted doubly linked list. Node pointers are supplied for delete and decrease-key. An algorithm performs, in order, (N) deletes, O(…
  26. Question 26 (1 mark, Numerical answer) – How many states are in a smallest DFA for (0+1)*(0+1)(0+1)*?
  27. Question 27 (1 mark, Multiple choice) – S 1 aS 1b generates L₁ and S 2 abS 2 generates L₂. P says L₁ is regular; Q says L₂ is regular. Which is true?
  28. Question 28 (1 mark, Multiple choice) – L₁ is regular, L₂ context-free, L₃ recursive and L₄ recursively enumerable. Which hold? I: L 3 L 4 is recursively enumerable. II: L 2 L 3 is…
  29. Question 29 (1 mark, Multiple choice) – Match P: lexical analysis; Q: top-down parsing; R: semantic analysis; S: runtime environments, with (i) leftmost derivation, (ii) type checking, (iii)…
  30. Question 30 (1 mark, Multiple choice) – Which page replacement algorithm can have an increased fault rate when more frames are allocated?
  31. Question 31 (1 mark, Multiple choice) – B+ trees are considered balanced because
  32. Question 32 (1 mark, Multiple choice) – For a serializable schedule, precedence-graph vertices represent transactions and directed edges represent conflicts. Which vertex ordering yields an…
  33. Question 33 (1 mark, Multiple choice) – Anarkali digitally signs a message and sends it to Salim. What does Salim need to verify the signature?
  34. Question 34 (1 mark, Multiple choice) – Which Ethernet LAN statement is true?
  35. Question 35 (1 mark, Multiple choice) – A host has just restarted and its browser requests a remote webpage. Order the listed packets.
  36. Question 36 (2 marks, Multiple choice) – On N N, (a,b)R(c,d) iff a ≤ c or b ≤ d. P: R is reflexive. Q: R is transitive. Which is true?
  37. Question 37 (2 marks, Multiple choice) – Which predicate-calculus formula is NOT valid?
  38. Question 38 (2 marks, Multiple choice) – There are 23 distinct compounds U. Each of nine compounds in S reacts with exactly three compounds of U. Which always holds? I: Every compound in U∖S…
  39. Question 39 (2 marks, Numerical answer) – Evaluate 1399 17 as an integer from 0 through 16.
  40. Question 40 (2 marks, Numerical answer) – F takes 5 ns and G takes 3 ns on their functional units. Two instances of each unit are available. Ignoring other delays, find the minimum time for…
  41. Question 41 (2 marks, Numerical answer) – A processor has 64 registers and 12 instructions. Each instruction contains opcode, two source-register fields, one destination-register field and a…
  42. Question 42 (2 marks, Numerical answer) – Physical addresses are 40 bits. A 512 KB cache is eight-way set-associative. Find tag width in bits.
  43. Question 43 (2 marks, Numerical answer) – A 3 GHz three-stage pipeline has latencies 1=3 2/4=2 3. The longest stage is split into two equal stages. Ignoring register delay, find the new…
  44. Question 44 (2 marks, Numerical answer) – A complete binary min-heap contains each integer 1 through 1023 once. Root depth is zero. Find the greatest depth of integer 9.
  45. Question 45 (2 marks, Multiple choice) – This function computes XY for positive integers. Which invariant holds before every loop iteration?
  46. Question 46 (2 marks, Multiple choice) – New-order traversal visits root, then right subtree in New-order, then left subtree in New-order. Find it for the tree of postfix expression “3 4 * 5…
  47. Question 47 (2 marks, Numerical answer) – What does this program print? max returns the larger argument.
  48. Question 48 (2 marks, Numerical answer) – Matrices A₁,A₂,A₃,A₄ have dimensions 10×5, 5×20, 20×10 and 10×5. Find the minimum scalar-multiplication count for A₁A₂A₃A₄ using ordinary matrix…
  49. Question 49 (2 marks, Numerical answer) – The flowchart defines recursive function A(n). Other statements cost O(1). If worst-case time is O(n), find the least α to two decimal places.
  50. Question 50 (2 marks, Numerical answer) – How many insertion orders of 1,2,3,4,5,6,7 give a binary search tree of height six? A single-node tree has height zero.
  51. Question 51 (2 marks, Multiple choice) – Each edge of a simple undirected graph has two adjacency-list entries, one at each endpoint. A twin pointer connects these entries. With n vertices, m…
  52. Question 52 (2 marks, Multiple choice) – I: If every NFA state is accepting, the accepted language is Σ*. II: There exists a regular language A such that A∩B is regular for every language B.…
  53. Question 53 (2 marks, Multiple choice) – L 1=\anbmcn+m:m,n1\ and L 2=\anbnc2n:n1\. Which holds?
  54. Question 54 (2 marks, Multiple choice) – Let L₁=⟨M⟩: M takes at least 2016 steps on some input, L₂=⟨M⟩: M takes at least 2016 steps on all inputs, L₃=⟨M⟩: M accepts ε, with ⟨M⟩ encoding a…
  55. Question 55 (2 marks, Multiple choice) – Which grammar has no left recursion?
  56. Question 56 (2 marks, Multiple choice) – Start symbol D and terminals int, ;, id, [, ], num generate one C-like array declaration with at least one dimension, such as int a[10][3];. G₁: D →…
  57. Question 57 (2 marks, Numerical answer) – Preemptive shortest-remaining-time-first schedules P₁:(arrival 0, burst 10), P₂:(3,6), P₃:(7,1), P₄:(8,3), all in ms. Find mean turnaround time.
  58. Question 58 (2 marks, Multiple choice) – Shared turn starts at zero. Process 0 waits while turn == 1, enters its critical section, then sets turn = 1. Process 1 waits while turn == 0, enters…
  59. Question 59 (2 marks, Numerical answer) – A nonnegative counting semaphore S uses P (decrement, blocking if unavailable) and V (increment). During execution twenty P and twelve V operations…
  60. Question 60 (2 marks, Numerical answer) – A disk-block cache has the plotted miss rates. Cache read latency is 1 ms and disk read latency 10 ms. Checking presence is negligible. Available…
  61. Question 61 (2 marks, Multiple choice) – S = r₂(X); r₁(X); r₂(Y); w₁(X); r₁(Y); w₂(X); a₁; a₂, where r,w mean read/write and a means abort. Which statement is true?
  62. Question 62 (2 marks, Numerical answer) – Table water schemes has (scheme no,district name,capacity): (1,Ajmer,20), (1,Bikaner,10), (2,Bikaner,10), (3,Bikaner,20), (1,Churu,10), (2,Churu,20),…
  63. Question 63 (2 marks, Numerical answer) – A 20×10⁶ bit/s CSMA/CD network has maximum one-way propagation 40 μs. Find the minimum frame size in bytes.
  64. Question 64 (2 marks, Multiple choice) – For IEEE 802.11 wireless MAC: I: At least three nonoverlapping channels are available. II: RTS–CTS is used for collision detection. III: Unicast…
  65. Question 65 (2 marks, Numerical answer) – A 128×10³ bit/s satellite link has one-way propagation 150 ms. Selective-repeat ARQ sends 1 KB frames. Ignore ACK transmission time. Find the smallest…