Subjects in this paper

GATE CS 2016 CS-2 questions

Q1

Verbal AptitudeMCQ1 mark−1/3 if wrong
The man who is now Municipal Commissioner worked as ____________________.
Show answer without attempting

Answer: B

Q2

Verbal AptitudeMCQ1 mark−1/3 if wrong
Nobody knows how the Indian cricket team is going to cope with‾\underline{\text{cope with}} the difficult and seamer-friendly wickets in Australia.

Choose the option which is closest in meaning to the underlined phrase in the above sentence.
Show answer without attempting

Answer: A

Q3

Verbal AptitudeMCQ1 mark−1/3 if wrong
Find the odd one in the following group of words.

mock, deride, praise, jeer
Show answer without attempting

Answer: C

Q4

Analytical AptitudeMCQ1 mark−1/3 if wrong
Pick the odd one from the following options.
Show answer without attempting

Answer: D

Q5

Quantitative AptitudeMCQ1 mark−1/3 if wrong
In a quadratic function, the value of the product of the roots (α,β\alpha, \beta) is 44. Find the value of
αn+βnα−n+β−n\frac{\alpha^n + \beta^n}{\alpha^{-n} + \beta^{-n}}
Show answer without attempting

Answer: B

Q6

Quantitative AptitudeMCQ2 marks−2/3 if wrong
Among 150 faculty members in an institute, 55 are connected with each other through Facebook® and 85 are connected through WhatsApp®. 30 faculty members do not have Facebook® or WhatsApp® accounts. The number of faculty members connected only through Facebook® accounts is ______________.
Show answer without attempting

Answer: A

Q7

Verbal AptitudeMCQ2 marks−2/3 if wrong
Computers were invented for performing only high-end useful computations. However, it is no understatement that they have taken over our world today. The internet, for example, is ubiquitous. Many believe that the internet itself is an unintended consequence of the original invention. With the advent of mobile computing on our phones, a whole new dimension is now enabled. One is left wondering if all these developments are good or, more importantly, required.

Which of the statement(s) below is/are logically valid and can be inferred from the above paragraph?

(i) The author believes that computers are not good for us.
(ii) Mobile computers and the internet are both intended inventions
Show answer without attempting

Answer: D

Q8

Analytical AptitudeMCQ2 marks−2/3 if wrong
All hill-stations have a lake. Ooty has two lakes.

Which of the statement(s) below is/are logically valid and can be inferred from the above sentences?

(i) Ooty is not a hill-station.
(ii) No hill-station can have more than one lake.
Show answer without attempting

Answer: D

Q9

Quantitative AptitudeMCQ2 marks−2/3 if wrong
In a 2×42 \times 4 rectangle grid shown below, each cell is a rectangle. How many rectangles can be observed in the grid?
Question figure
Show answer without attempting

Answer: C

Q10

Quantitative AptitudeMCQ2 marks−2/3 if wrong
Choose the correct expression for f(x)f(x) given in the graph.
Question figure
Show answer without attempting

Answer: C

Q1

Discrete MathematicsNAT1 mark
Consider the following expressions:
(i) false
(ii) QQ
(iii) true
(iv) P∨QP \lor Q
(v) ¬Q∨P\neg Q \lor P

The number of expressions given above that are logically implied by P∧(P⇒Q)P \land (P \Rightarrow Q) is _________.
Show answer without attempting

Answer: 4.0

Q2

CalculusNAT1 mark
Let f(x)f(x) be a polynomial and g(x)=f′(x)g(x) = f'(x) be its derivative. If the degree of (f(x)+f(−x))(f(x) + f(-x)) is 10, then the degree of (g(x)−g(−x))(g(x) - g(-x)) is _________.
Show answer without attempting

Answer: 9.0

Q3

Discrete MathematicsNAT1 mark
The minimum number of colours that is sufficient to vertex-colour any planar graph is _________.
Show answer without attempting

Answer: 4.0

Q4

Linear AlgebraMCQ1 mark−1/3 if wrong
Consider the systems, each consisting of mm linear equations in nn variables.

I. If m<nm < n, then all such systems have a solution
II. If m>nm > n, then none of these systems has a solution
III. If m=nm = n, then there exists a system which has a solution

Which one of the following is CORRECT?
Show answer without attempting

Answer: C

Q5

Probability and StatisticsNAT1 mark
Suppose that a shop has an equal number of LED bulbs of two different types. The probability of an LED bulb lasting more than 100 hours given that it is of Type 1 is 0.7, and given that it is of Type 2 is 0.4. The probability that an LED bulb chosen uniformly at random lasts more than 100 hours is _________.
Show answer without attempting

Answer: 0.55

Q6

Linear AlgebraNAT1 mark
Suppose that the eigenvalues of matrix AA are 1,2,41, 2, 4. The determinant of (A−1)T(A^{-1})^T is _________.
Show answer without attempting

Answer: 0.124 to 0.126

Q7

Number Representation and ArithmeticNAT1 mark
Consider an eight-bit ripple-carry adder for computing the sum of AA and BB, where AA and BB are integers represented in 2's complement form. If the decimal value of AA is one, the decimal value of BB that leads to the longest latency for the sum to stabilize is _________.
Show answer without attempting

Answer: -1.0

Q8

Boolean Algebra and MinimizationMCQ1 mark−1/3 if wrong
Let x1⊕x2⊕x3⊕x4=0x_1 \oplus x_2 \oplus x_3 \oplus x_4 = 0 where x1,x2,x3,x4x_1, x_2, x_3, x_4 are Boolean variables, and ⊕\oplus is the XOR operator. Which one of the following must always be TRUE?
Show answer without attempting

Answer: C

Q9

Number Representation and ArithmeticNAT1 mark
Let XX be the number of distinct 16-bit integers in 2's complement representation. Let YY be the number of distinct 16-bit integers in sign magnitude representation. Then X−YX - Y is _________.
Show answer without attempting

Answer: 1.0

Q10

Instruction Set and AddressingNAT1 mark
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 _________.
Show answer without attempting

Answer: 16.0

Q11

Tree Data StructuresNAT1 mark
Breadth First Search (BFS) is started on a binary tree beginning from the root vertex. There is a vertex tt at a distance four from the root. If tt is the nn-th vertex in this BFS traversal, then the maximum possible value of nn is _________.
Show answer without attempting

Answer: 31.0

Q12

C ProgrammingNAT1 mark
The value printed by the following program is _________.
void f(int* p, int m){
    m = m + 5;
    *p = *p + m;
    return;
}

void main(){
    int i=5, j=10;
    f(&i, j);
    printf("%d", i+j);
}
Show answer without attempting

Answer: 30.0

Q13

Searching Sorting and HashingMCQ1 mark−1/3 if wrong
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 are TRUE?

I. Quicksort runs in Θ(n2)\Theta(n^2) time
II. Bubblesort runs in Θ(n2)\Theta(n^2) time
III. Mergesort runs in Θ(n)\Theta(n) time
IV. Insertion sort runs in Θ(n)\Theta(n) time
Show answer without attempting

Answer: D

Q14

Graph AlgorithmsMCQ1 mark−1/3 if wrong
The Floyd-Warshall algorithm for all-pair shortest paths computation is based on
Show answer without attempting

Answer: C

Q15

Linear Data StructuresMCQ1 mark−1/3 if wrong
NN 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)\Theta(N) delete, O(log⁡N)O(\log N) insert, O(log⁡N)O(\log N) find, and Θ(N)\Theta(N) decrease-key. What is the time complexity of all these operations put together?
Show answer without attempting

Answer: C

Q16

Regular LanguagesNAT1 mark
The number of states in the minimum sized DFA that accepts the language defined by the regular expression
(0+1)∗(0+1)(0+1)∗(0+1)^*(0+1)(0+1)^*
is _________.
Show answer without attempting

Answer: 2.0

Q17

Regular LanguagesMCQ1 mark−1/3 if wrong
Language L1L_1 is defined by the grammar: S1→aS1b∣εS_1 \to aS_1b \mid \varepsilon
Language L2L_2 is defined by the grammar: S2→abS2∣εS_2 \to abS_2 \mid \varepsilon

Consider the following statements:
PP: L1L_1 is regular
QQ: L2L_2 is regular

Which one of the following is TRUE?
Show answer without attempting

Answer: C

Q18

Context Free LanguagesMCQ1 mark−1/3 if wrong
Consider the following types of languages: L1L_1 : Regular, L2L_2 : Context-free, L3L_3 : Recursive, L4L_4 : Recursively enumerable. Which of the following is/are TRUE?

I. L3‾∪L4\overline{L_3} \cup L_4 is recursively enumerable
II. L2‾∪L3\overline{L_2} \cup L_3 is recursive
III. L1∗∩L2L_1^* \cap L_2 is context-free
IV. L1∪L2‾L_1 \cup \overline{L_2} is context-free
Show answer without attempting

Answer: D

Q19

Lexical AnalysisMCQ1 mark−1/3 if wrong
Match the following:

(P) Lexical analysis --- (i) Leftmost derivation
(Q) Top down parsing --- (ii) Type checking
(R) Semantic analysis --- (iii) Regular expressions
(S) Runtime environments --- (iv) Activation records
Show answer without attempting

Answer: B

Q20

Memory ManagementMCQ1 mark−1/3 if wrong
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?
Show answer without attempting

Answer: D

Q21

Storage and IndexingMCQ1 mark−1/3 if wrong
B+ Trees are considered BALANCED because
Show answer without attempting

Answer: A

Q22

TransactionsMCQ1 mark−1/3 if wrong
Suppose a database schedule SS involves transactions T1,…,TnT_1, \dots, T_n. Construct the precedence graph of SS with vertices representing the transactions and edges representing the conflicts. If SS is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?
Show answer without attempting

Answer: A

Q23

Layering and SwitchingMCQ1 mark−1/3 if wrong
Anarkali digitally signs a message and sends it to Salim. Verification of the signature by Salim requires
Show answer without attempting

Answer: A

Q24

Data Link LayerMCQ1 mark−1/3 if wrong
In an Ethernet local area network, which one of the following statements is TRUE?
Show answer without attempting

Answer: D

Q25

Application LayerMCQ1 mark−1/3 if wrong
Identify the correct sequence in which the following packets are transmitted on the network by a host when a browser requests a webpage from a remote server, assuming that the host has just been restarted.
Show answer without attempting

Answer: C

Q26

Discrete MathematicsMCQ2 marks−2/3 if wrong
A binary relation RR on N×N\mathbb{N} \times \mathbb{N} is defined as follows: (a,b)R(c,d)(a,b)R(c,d) if a≤ca \le c or b≤db \le d. Consider the following propositions:

PP: RR is reflexive
QQ: RR is transitive

Which one of the following statements is TRUE?
Show answer without attempting

Answer: B

Q27

Discrete MathematicsMCQ2 marks−2/3 if wrong
Which one of the following well-formed formulae in predicate calculus is NOT valid?
Show answer without attempting

Answer: D

Q28

Discrete MathematicsMCQ2 marks−2/3 if wrong
Consider a set UU of 23 different compounds in a Chemistry lab. There is a subset SS of UU of 9 compounds, each of which reacts with exactly 3 compounds of UU. Consider the following statements:

I. Each compound in U∖SU \setminus S reacts with an odd number of compounds.
II. At least one compound in U∖SU \setminus S reacts with an odd number of compounds.
III. Each compound in U∖SU \setminus S reacts with an even number of compounds.

Which one of the above statements is ALWAYS TRUE?
Show answer without attempting

Answer: B

Q29

Discrete MathematicsNAT2 marks
The value of the expression 1399(mod17)13^{99} \pmod{17}, in the range 0 to 16, is _________.
Show answer without attempting

Answer: 4.0

Q30

Instruction PipeliningNAT2 marks
Suppose the functions FF and GG can be computed in 5 and 3 nanoseconds by functional units UFU_F and UGU_G, respectively. Given two instances of UFU_F and two instances of UGU_G, it is required to implement the computation F(G(Xi))F(G(X_i)) for 1≤i≤101 \le i \le 10. Ignoring all other delays, the minimum time required to complete this computation is _________ nanoseconds.
Show answer without attempting

Answer: 28.0

Q31

Instruction Set and AddressingNAT2 marks
Consider a processor with 64 registers and an instruction set of size twelve. Each instruction has five distinct fields, namely, opcode, two source register identifiers, one destination register identifier, and a twelve-bit immediate value. Each instruction must be stored in memory in a byte-aligned fashion. If a program has 100 instructions, the amount of memory (in bytes) consumed by the program text is _________.
Show answer without attempting

Answer: 500.0

Q32

Memory HierarchyNAT2 marks
The width of the physical address on a machine is 40 bits. The width of the tag field in a 512 KB 8-way set associative cache is _________ bits.
Show answer without attempting

Answer: 24.0

Q33

Instruction PipeliningNAT2 marks
Consider a 3 GHz (gigahertz) processor with a three-stage pipeline and stage latencies τ1\tau_1, τ2\tau_2, and τ3\tau_3 such that τ1=3τ2/4=2τ3\tau_1 = 3\tau_2 / 4 = 2\tau_3. If the longest pipeline stage is split into two pipeline stages of equal latency, the new frequency is _________ GHz, ignoring delays in the pipeline registers.
Show answer without attempting

Answer: 3.9 to 4.1

Q34

Tree Data StructuresNAT2 marks
A complete binary min-heap is made by including each integer in [1,1023][1, 1023] exactly once. The depth of a node in the heap is the length of the path from the root of the heap to that node. Thus, the root is at depth 0. The maximum depth at which integer 9 can appear is _________.
Show answer without attempting

Answer: 8.0

Q35

C ProgrammingMCQ2 marks−2/3 if wrong
The following function computes XYX^Y for positive integers XX and YY.
int exp(int X, int Y) {
    int res = 1, a = X, b = Y;
    while ( b != 0 ){
        if ( b%2 == 0) { a = a*a; b = b/2; }
        else { res = res*a; b = b-1; }
    }
    return res;
}
Which one of the following conditions is TRUE before every iteration of the loop?
Show answer without attempting

Answer: C

Q36

Tree Data StructuresMCQ2 marks−2/3 if wrong
Consider the following New-order strategy for traversing a binary tree:
- Visit the root;
- Visit the right subtree using New-order;
- Visit the left subtree using New-order;

The New-order traversal of the expression tree corresponding to the reverse polish expression
3 4 * 5 - 2 ^ 6 7 * 1 + -
is given by:
Show answer without attempting

Answer: C

Q37

RecursionNAT2 marks
Consider the following program:
int f(int *p, int n)
{
    if (n <= 1) return 0;
    else return max(f(p+1,n-1),p[0]-p[1]);
}

int main()
{
    int a[] = {3,5,2,6,4};
    printf("%d", f(a,5));
}
Note: max(x,y) returns the maximum of x and y.

The value printed by this program is _________.
Show answer without attempting

Answer: 3.0

Q38

Algorithm DesignNAT2 marks
Let A1,A2,A3A_1, A_2, A_3, and A4A_4 be four matrices of dimensions 10×510 \times 5, 5×205 \times 20, 20×1020 \times 10, and 10×510 \times 5, respectively. The minimum number of scalar multiplications required to find the product A1A2A3A4A_1 A_2 A_3 A_4 using the basic matrix multiplication method is _________.
Show answer without attempting

Answer: 1500.0

Q39

RecursionNAT2 marks
The given diagram shows the flowchart for a recursive function A(n)A(n). Assume that all statements, except for the recursive calls, have O(1)O(1) time complexity. If the worst case time complexity of this function is O(nα)O(n^\alpha), then the least possible value (accurate up to two decimal positions) of α\alpha is _________.
Question figure
Show answer without attempting

Answer: 2.2 to 2.4

Q40

Tree Data StructuresNAT2 marks
The number of ways in which the numbers 1,2,3,4,5,6,71, 2, 3, 4, 5, 6, 7 can be inserted in an empty binary search tree, such that the resulting tree has height 6, is _________.

Note: The height of a tree with a single node is 0.
Show answer without attempting

Answer: 64.0

Q41

Graph AlgorithmsMCQ2 marks−2/3 if wrong
In an adjacency list representation of an undirected simple graph G=(V,E)G = (V,E), each edge (u,v)(u, v) has two adjacency list entries: [v][v] in the adjacency list of uu, and [u][u] in the adjacency list of vv. These are called twins of each other. A twin pointer is a pointer from an adjacency list entry to its twin. If ∣E∣=m|E| = m and ∣V∣=n|V| = n, and the memory size is not a constraint, what is the time complexity of the most efficient algorithm to set the twin pointer in each entry in each adjacency list?
Show answer without attempting

Answer: B

Q42

Regular LanguagesMCQ2 marks−2/3 if wrong
Consider the following two statements:

I. If all states of an NFA are accepting states then the language accepted by the NFA is Σ∗\Sigma^*.
II. There exists a regular language AA such that for all languages BB, A∩BA \cap B is regular.

Which one of the following is CORRECT?
Show answer without attempting

Answer: B

Q43

Context Free LanguagesMCQ2 marks−2/3 if wrong
Consider the following languages:
L1={anbmcn+m:m,n≥1}L_1 = \{a^n b^m c^{n+m} : m,n \ge 1\}
L2={anbnc2n:n≥1}L_2 = \{a^n b^n c^{2n} : n \ge 1\}

Which one of the following is TRUE?
Show answer without attempting

Answer: B

Q44

ComputabilityMCQ2 marks−2/3 if wrong
Consider the following languages.
L1={⟨M⟩∣M takes at least 2016 steps on some input}L_1 = \{\langle M \rangle \mid M \text{ takes at least 2016 steps on some input}\}
L2={⟨M⟩∣M takes at least 2016 steps on all inputs}L_2 = \{\langle M \rangle \mid M \text{ takes at least 2016 steps on all inputs}\}
L3={⟨M⟩∣M accepts ε}L_3 = \{\langle M \rangle \mid M \text{ accepts } \varepsilon\}

where for each Turing machine MM, ⟨M⟩\langle M \rangle denotes a specific encoding of MM. Which one of the following is TRUE?
Show answer without attempting

Answer: C

Q45

ParsingMCQ2 marks−2/3 if wrong
Which one of the following grammars is free from left recursion?
Show answer without attempting

Answer: B

Q46

Context Free LanguagesMCQ2 marks−2/3 if wrong
A student wrote two context-free grammars G1\mathbf{G_1} and G2\mathbf{G_2} for generating a single C-like array declaration. The dimension of the array is at least one. For example,
int a[10][3];
The grammars use DD as the start symbol, and use six terminal symbols int ; id [ ] num.
Grammar G1\mathbf{G_1}Grammar G2\mathbf{G_2}
D→int L;D \to \textbf{int}\, L;D→int L;D \to \textbf{int}\, L;
L→id [EL \to \textbf{id}\, [EL→id EL \to \textbf{id}\, E
E→num ]E \to \textbf{num}\, ]E→E[num]E \to E[\textbf{num}]
E→num ][EE \to \textbf{num}\, ][EE→[num]E \to [\textbf{num}]
Which of the grammars correctly generate the declaration mentioned above?
Show answer without attempting

Answer: A

Q47

SchedulingNAT2 marks
Consider the following processes, with the arrival time and the length of the CPU burst given in milliseconds. The scheduling algorithm used is preemptive shortest remaining-time first.
ProcessArrival TimeBurst Time
P1P_1010
P2P_236
P3P_371
P4P_483
The average turn around time of these processes is _________ milliseconds.
Show answer without attempting

Answer: 8.2 to 8.3

Q48

Concurrency and SynchronizationMCQ2 marks−2/3 if wrong
Consider the following two-process synchronization solution.
Process 0                         Process 1
---------                         ---------
Entry: loop while (turn == 1);    Entry: loop while (turn == 0);
  (critical section)                (critical section)
Exit:  turn = 1;                  Exit:  turn = 0;
The shared variable turn is initialized to zero. Which one of the following is TRUE?
Show answer without attempting

Answer: C

Q49

Concurrency and SynchronizationNAT2 marks
Consider a non-negative counting semaphore SS. The operation P(S)P(S) decrements SS, and V(S)V(S) increments SS. During an execution, 20 P(S)20\, P(S) operations and 12 V(S)12\, V(S) operations are issued in some order. The largest initial value of SS for which at least one P(S)P(S) operation will remain blocked is _________.
Show answer without attempting

Answer: 7.0

Q50

File SystemsNAT2 marks
A file system uses an in-memory cache to cache disk blocks. The miss rate of the cache is shown in the figure. The latency to read a block from the cache is 1 ms and to read a block from the disk is 10 ms. Assume that the cost of checking whether a block exists in the cache is negligible. Available cache sizes are in multiples of 10 MB.

The smallest cache size required to ensure an average read latency of less than 6 ms is _________ MB.
Question figure
Show answer without attempting

Answer: 30.0

Q51

TransactionsMCQ2 marks−2/3 if wrong
Consider the following database schedule with two transactions, T1T_1 and T2T_2.
S=r2(X);r1(X);r2(Y);w1(X);r1(Y);w2(X);a1;a2S = r_2(X); r_1(X); r_2(Y); w_1(X); r_1(Y); w_2(X); a_1; a_2

where ri(Z)r_i(Z) denotes a read operation by transaction TiT_i on a variable ZZ, wi(Z)w_i(Z) denotes a write operation by TiT_i on a variable ZZ and aia_i denotes an abort by transaction TiT_i.

Which one of the following statements about the above schedule is TRUE?
Show answer without attempting

Answer: C

Q52

Relational QueriesNAT2 marks
Consider the following database table named water_schemes :
scheme_nodistrict_namecapacity
1Ajmer20
1Bikaner10
2Bikaner10
3Bikaner20
1Churu10
2Churu20
1Dungargarh10
The number of tuples returned by the following SQL query is _________.
with total(name, capacity) as
    select district_name, sum(capacity)
    from water_schemes
    group by district_name
with total_avg(capacity) as
    select avg(capacity)
    from total
select name
    from total, total_avg
    where total.capacity ≥ total_avg.capacity
Show answer without attempting

Answer: 2.0

Q53

Data Link LayerNAT2 marks
A network has a data transmission bandwidth of 20×10620 \times 10^6 bits per second. It uses CSMA/CD in the MAC layer. The maximum signal propagation time from one node to another node is 40 microseconds. The minimum size of a frame in the network is _________ bytes.
Show answer without attempting

Answer: 200.0

Q54

Data Link LayerMCQ2 marks−2/3 if wrong
For the IEEE 802.11 MAC protocol for wireless communication, which of the following statements is/are TRUE?

I. At least three non-overlapping channels are available for transmissions.
II. The RTS-CTS mechanism is used for collision detection.
III. Unicast frames are ACKed.
Show answer without attempting

Answer: B

Q55

Layering and SwitchingNAT2 marks
Consider a 128×103128 \times 10^3 bits/second satellite communication link with one way propagation delay of 150 milliseconds. Selective retransmission (repeat) protocol is used on this link to send data with a frame size of 1 kilobyte. Neglect the transmission time of acknowledgement. The minimum number of bits required for the sequence number field to achieve 100% utilization is _________.
Show answer without attempting

Answer: 4.0

0/650 correct0 marks

More GATE CS papers