• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE-CS-2016 (Set 2)

Question 21

A processor has 40 distinct instructions and 24 general purpose registers. A 32-bit instruction word has an opcode, two register operands and an immediate operand. The number of bits available for the immediate operand field is ____________ [This Question was originally a Fill-in-the-blanks Question]
  • 16
  • 8
  • 4
  • 32

Question 22

Breadth First Search (BFS) is started on a binary tree beginning from the root vertex. There is a vertex t at a distance four from the root. If t is the n-th vertex in this BFS traversal, then the maximum possible value of n is ________ [This Question was originally a Fill-in-the-blanks Question]
  • 15
  • 16
  • 31
  • 32

Question 23

Assume that the algorithms considered here sort the input sequences in ascending order. If the input is already in ascending order, which of the following is TRUE?

I.   Quicksort runs in Θ(n2) time

II.  Bubblesort runs in Θ(n2) time

III. Mergesort runs in  Θ(n) time

IV.  Insertion sort runs in  Θ(n) time 

  • I and II only

  • I and III only

  • II and IV only

  • I and IV only

Question 24

The Floyd-Warshall algorithm for all-pair shortest paths computation is based on:
  • Greedy paradigm.
  • Divide-and-Conquer paradigm.
  • Dynamic Programming paradigm.
  • neither Greedy nor Divide-and-Conquer nor Dynamic Programming paradigm.

Question 25

N items are stored in a sorted doubly linked list. For a delete operation, a pointer is provided to the record to be deleted. For a decrease-key operation, a pointer is provided to the record on which the operation is to be performed. An algorithm performs the following operations on the list in this order: Θ(N) delete, O(log N) insert, O(log N) find, and Θ(N) decrease-key What is the time complexity of all these operations put together?

  • O(Log2N)

  • O(N)

  • O(N Log N)

  • Θ(N2 Log N)

Question 26

The number of states in the minimum sized DFA that accepts the language defined by the regular expression (0+1)*(0+1)(0+1)* is __________________ [Note that this question was originally asked as Fill-in-the-Blanks type]

  • 2

  • 3

  • 4

  • 5

Question 27

Language L1 is defined by the grammar: S1 -> aS1b | ε
Language L2 is defined by the grammar: S2 -> abS2 | ε
Consider the following statements:
P: L1 is regular
Q: L2 is regular
Which one of the following is TRUE?
  • Both P and Q are true
  • P is true and Q is false
  • P is false and Q is true
  • Both P and Q are false

Question 28

Consider the following types of languages:
L1 Regular,
L2: Context-free,
L3: Recursive,
L4: Recursively enumerable. 
Which of the following is/are TRUE?
I.   L3\' U L4 is recursively enumerable
II.  L2  U L3 is recursive
III. L1* U L2 is context-free
IV.  L1 U L2\' is context-free 
  • I only
  • I and III only
  • I and IV only
  • I, II and III only

Question 29

In which one of the following page replacement algorithms it is possible for the page fault rate to increase even when the number of allocated frames increases?
  • LRU (Least Recently Used)
  • OPT (Optimal Page Replacement)
  • MRU (Most Recently Used)
  • FIFO (First In First Out)

Question 30

Suppose a database schedule S involves transactions T1, ....Tn. Construct the precedence graph of S with vertices representing the transactions and edges representing the conflicts. If S is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?
  • Topological order
  • Depth-first order
  • Breadth-first order
  • Ascending order of transaction indices

There are 65 questions to complete.

Last Updated :
Take a part in the ongoing discussion