GATE Computer Science & IT 2016 — GATE 2016 · CS · Set 2

CS Set 2 · 65 of 65 questions publicly available

Sections: General Aptitude, Computer Science & IT

Subject marks
Subject1 mark questions2 mark questionsTotal marks
General Aptitude5515
Computer Science253085

Question 1 · 1 mark Q3245

Consider the following expressions:

(i) falsefalse

(ii) QQ

(iii) truetrue

(iv) P∨QP∨Q

(v) ¬Q∨P¬Q∨P

The number of expressions given above that are logically implied by P∧(P⇒Q)P ∧ (P ⇒ Q) is .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 4

Solutions and video are in the course

Question 2 · 1 mark Q3246

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 ________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 9

Solutions and video are in the course

Question 3 · 1 mark Q3247

The minimum number of colours that is sufficient to vertex-colour any planar graph is _____________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 4

Solutions and video are in the course

Question 4 · 1 mark Q3248

Consider the systems, each consisting of m linear equations in n 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?

  1. A.

    I, II and III are true

  2. B.

    Only II and III are true

  3. C.

    Only III is true

  4. D.

    None of them is true

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): C

Solutions and video are in the course

Question 5 · 1 mark Q3249

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 ____________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 0.55

Solutions and video are in the course

Question 6 · 1 mark Q3250

Suppose that the eigenvalues of matrix A are 1, 2, 4. The determinant of (A−1)T(A^{-1})^{T} is __________.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 0.124 to 0.126

Solutions and video are in the course

Question 7 · 1 mark Q3251

Consider an eight-bit ripple-carry adder for computing the sum of A and B, where A and B are integers represented in 2’s complement form. If the decimal value of A is one, the decimal value of B that leads to the longest latency for the sum to stabilize is _________________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): -1

Solutions and video are in the course

Question 8 · 1 mark Q3252

Let, x1⊕x2⊕x3⊕x4=0x_1⊕x_2⊕x_3⊕x_4 = 0 where  x1,x2,x3,x4x_1, x_2, x_3, x_4 are Boolean variables, and ⊕ is the XOR operator. Which one of the following must always be TRUE?

  1. A.

    x1x2x3x4=0x_1x_2x_3x_4 = 0

  2. B.

    x1x3+x2=0x_1x_3 +x_2 = 0

  3. C.

    x‾1⊕x‾3=x‾2⊕x‾4\overline x_1 ⊕ \overline x_3 = \overline x_2 ⊕ \overline x_4

  4. D.

    x1+x2+x3+x4=0x_1 +x_2 +x_3 +x_4 = 0

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): C

Solutions and video are in the course

Question 9 · 1 mark Q3253

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 ____________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 1

Solutions and video are in the course

Question 10 · 1 mark Q3254

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 __________________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 16 bits

Solutions and video are in the course

Question 11 · 1 mark Q3255

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 t is the nn-th vertex in this BFS traversal, then the maximum possible value of nn is _____________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 31

Solutions and video are in the course

Question 12 · 1 mark Q3256

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);
}
Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 30

Solutions and video are in the course

Question 13 · 1 mark Q3257

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)Θ(n^2) time

II. Bubblesort runs in Θ(n2)Θ(n^2) time

III. Mergesort runs in Θ(n)Θ(n) time

IV. Insertion sort runs in Θ(n)Θ(n) time

  1. A.

    I and II only

  2. B.

    I and III only

  3. C.

    II and IV only

  4. D.

    I and IV only

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): D

Solutions and video are in the course

Question 14 · 1 mark Q3258

The Floyd-Warshall algorithm for all-pair shortest paths computation is based on

  1. A.

    Greedy paradigm.

  2. B.

    Divide-and-Conquer paradigm.

  3. C.

    Dynamic Programming paradigm.

  4. D.

    neither Greedy nor Divide-and-Conquer nor Dynamic Programming paradigm.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): C

Solutions and video are in the course

Question 15 · 1 mark Q3259

NN items are stored in a sorted doubly linked list. For a deletedelete operation, a pointer is provided to the record to be deleted. For a decrease−keydecrease-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)Θ(N)deletedelete, O(logN)O(logN)insertinsert, O(logN)O(logN)findfind, and Θ(N)Θ(N)decrease−keydecrease-key. What is the time complexity of all these operations put together?

  1. A.

    O(log2N)O(log^2N)

  2. B.

    O(N)O(N)

  3. C.

    O(N2)O(N^2)

  4. D.

    Θ(N2logN)Θ(N^2logN)

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): C

Solutions and video are in the course

Question 16 · 1 mark Q3260

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 ___________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 2

Solutions and video are in the course

Question 17 · 1 mark Q3261

Language L1L_1 is defined by the grammar: S1→aS1b∣εS_1 → aS_1b|ε

Language L2L_2 is defined by the grammar: S2→abS2∣εS_2 → abS_2|ε

Consider the following statements:

PP: L1L_1 is regular

QQ: L2L_2 is regular

Which one of the following is TRUE?

  1. A.

    Both PP and QQ are true

  2. B.

    PP is true and QQ is false

  3. C.

    PP is false and QQ is true

  4. D.

    Both PP and QQ are false

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): C

Solutions and video are in the course

Question 18 · 1 mark Q3262

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. L‾3∪L4\overline L_3 \cup L_4 is recursively enumerable

II. L‾2∪L3\overline L_2 \cup L_3 is recursive

III. L1∗∩L2L_1^* \cap L_2 is context-free

IV. L1∪L‾2L_1 \cup \overline L_2 is context-free

  1. A.

    I only

  2. B.

    I and III only

  3. C.

    I and IV only

  4. D.

    I, II and III only

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): D

Solutions and video are in the course

Question 19 · 1 mark Q3263

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

  1. A.

    P ↔ i, Q ↔ ii, R ↔ iv, S ↔ iii

  2. B.

    P ↔ iii, Q ↔ i, R ↔ ii, S ↔ iv

  3. C.

    P ↔ ii, Q ↔ iii, R ↔ i, S ↔ iv

  4. D.

    P ↔ iv, Q ↔ i, R ↔ ii, S ↔ iii

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): B

Solutions and video are in the course

Question 20 · 1 mark Q1922

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?

  1. A.

    LRU (Least Recently Used)

  2. B.

    OPT (Optimal Page Replacement)

  3. C.

    MRU (Most Recently Used)

  4. D.

    FIFO (First In First Out)

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): D

Solutions and video are in the course

Question 21 · 1 mark Q3265

B+ Trees are considered BALANCED because

  1. A.

    the lengths of the paths from the root to all leaf nodes are all equal.

  2. B.

    the lengths of the paths from the root to all leaf nodes differ from each other by at most 1.

  3. C.

    the number of children of any two non-leaf sibling nodes differ by at most 1.

  4. D.

    the number of records in any two leaf nodes differ by at most 1.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): A

Solutions and video are in the course

Question 22 · 1 mark Q3266

Suppose a database schedule S involves transactions T1,...,TnT_1, ..., 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?

  1. A.

    Topological order

  2. B.

    Depth-first order

  3. C.

    Breadth-first order

  4. D.

    Ascending order of transaction indices

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): A

Solutions and video are in the course

Question 23 · 1 mark Q3267

Anarkali digitally signs a message and sends it to Salim. Verification of the signature by Salim requires

  1. A.

    Anarkali’s public key.

  2. B.

    Salim’s public key.

  3. C.

    Salim’s private key

  4. D.

    Anarkali’s private key.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): A

Solutions and video are in the course

Question 24 · 1 mark Q3268

In an Ethernet local area network, which one of the following statements is TRUE?

  1. A.

    A station stops to sense the channel once it starts transmitting a frame.

  2. B.

    The purpose of the jamming signal is to pad the frames that are smaller than the minimum frame size.

  3. C.

    A station continues to transmit the packet even after the collision is detected.

  4. D.

    The exponential backoff mechanism reduces the probability of collision on retransmissions.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): D

Solutions and video are in the course

Question 25 · 1 mark Q3269

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.

  1. A.

    HTTP GET request, DNS query, TCP SYN

  2. B.

    DNS query, HTTP GET request, TCP SYN

  3. C.

    DNS query, TCP SYN, HTTP GET request

  4. D.

    TCP SYN, DNS query, HTTP GET request

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): C

Solutions and video are in the course

Question 26 · 2 marks Q3270

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 \leq c or b≤db \leq d. Consider the following propositions:

P: RR is reflexive

Q: RR is transitive

Which one of the following statements is TRUE?

  1. A.

    Both P and Q are true.

  2. B.

    P is true and Q is false.

  3. C.

    P is false and Q is true.

  4. D.

    Both P and Q are false.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): B

Solutions and video are in the course

Question 27 · 2 marks Q3271

Which one of the following well-formed formulae in predicate calculus is NOT valid?

  1. A.

    (∀xp(x)⇒∀xq(x))⇒(∃x¬p(x)∨∀xq(x))(∀x p(x) ⇒ ∀x q(x)) ⇒ (∃x¬p(x) ∨ ∀x q(x))

  2. B.

    (∃xp(x)∨∃xq(x))⇒∃x(p(x)∨q(x))(∃x p(x) ∨ ∃x q(x)) ⇒ ∃x (p(x) ∨ q(x))

  3. C.

    ∃x(p(x)∧q(x))⇒(∃xp(x)∧∃xq(x))∃x (p(x) ∧ q(x)) ⇒ (∃x p(x) ∧ ∃x q(x))

  4. D.

    ∀x(p(x)∨q(x))⇒(∀xp(x)∨∀xq(x))∀x (p(x) ∨ q(x)) ⇒ (∀x p(x) ∨ ∀x q(x))

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): D

Solutions and video are in the course

Question 28 · 2 marks Q3272

Consider a set U of 23 different compounds in a Chemistry lab. There is a subset S of U of 9 compounds, each of which reacts with exactly 3 compounds of U. Consider the following statements:

I. Each compound in U \ S reacts with an odd number of compounds.

II. At least one compound in U \ S reacts with an odd number of compounds.

III. Each compound in U \ S reacts with an even number of compounds.

Which one of the above statements is ALWAYS TRUE?

  1. A.

    Only I

  2. B.

    Only II

  3. C.

    Only III

  4. D.

    None

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): B

Solutions and video are in the course

Question 29 · 2 marks Q3273

The value of the expression 1399 (mod 17), in the range 0 to 16, is __________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 4

Solutions and video are in the course

Question 30 · 2 marks Q3274

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 ≤ i ≤ 10. Ignoring all other delays, the minimum time required to complete this computation is _____________ nanoseconds.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 28

Solutions and video are in the course

Question 31 · 2 marks Q3275

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 __________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 500 bytes

Solutions and video are in the course

Question 32 · 2 marks Q3276

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.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 24 bits

Solutions and video are in the course

Question 33 · 2 marks Q3277

Consider a 3 GHz (gigahertz) processor with a three-stage pipeline and stage latencies τ1,τ2τ_1, τ_2, and τ3τ_3 such that τ1=3τ2/4=2τ3τ_1 = 3τ_2/4 = 2τ_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.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 4

Solutions and video are in the course

Question 34 · 2 marks Q3278

A complete binary min-heap is made by including each integer in [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 _________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 8

Solutions and video are in the course

Question 35 · 2 marks Q3279

The following function computes X^Y for positive integers X and Y.

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?

  1. A.

    X^Y = a^b

  2. B.

    (res ∗ a)^Y = (res ∗ X)^b

  3. C.

    X^Y = res ∗ a^b

  4. D.

    X^Y = (res ∗ a)^b

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): C

Solutions and video are in the course

Question 36 · 2 marks Q3280

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:

  1. A.

    + - 1 6 7 * 2 ˆ 5 - 3 4 *

  2. B.

    - + 1 * 6 7 ˆ 2 - 5 * 3 4

  3. C.

    - + 1 * 7 6 ˆ 2 - 5 * 4 3

  4. D.

    1 7 6 * + 2 5 4 3 * - ˆ -

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): C

Solutions and video are in the course

Question 37 · 2 marks Q3281

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 __________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 3

Solutions and video are in the course

Question 38 · 2 marks Q3282

Let A1,A2,A3A_1,A_2,A_3, and A4 be four matrices of dimensions 10 × 5,5 × 20,20 × 10, and 10 × 5, respectively. The minimum number of scalar multiplications required to find the product A1A2A3A4A_1A_2A_3A_4 using the basic matrix multiplication method is .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 1500

Solutions and video are in the course

Question 39 · 2 marks Q3283

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^α ), then the least possible value (accurate up to two decimal positions) of αα is ____________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 2.32

Solutions and video are in the course

Question 40 · 2 marks Q3284

The number of ways in which the numbers 1, 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.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 64

Solutions and video are in the course

Question 41 · 2 marks Q3285

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: [vv] in the adjacency list of uu, and [uu] 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 |EE| = mm and |VV| = nn, 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?

  1. A.

    Θ(n2)Θ(n^2)

  2. B.

    Θ(n+m)Θ(n+m)

  3. C.

    Θ(m2)Θ(m^2)

  4. D.

    Θ(n4)Θ(n^4)

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): B

Solutions and video are in the course

Question 42 · 2 marks Q3286

Consider the following two statements:

I. If all states of an NFA are accepting states then the language accepted by the NFA is Σ∗Σ^∗ .

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?

  1. A.

    Only I is true

  2. B.

    Only II is true

  3. C.

    Both I and II are true

  4. D.

    Both I and II are false

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): B

Solutions and video are in the course

Question 43 · 2 marks Q3287

Consider the following languages:

L1=anbmcn+m:m,n≥1L_1 = {a^n b^m c^{n+m} : m,n ≥ 1}

L2=anbnc2n:n≥1L_2 = {a^n b^n c^{2n} : n ≥ 1}

Which one of the following is TRUE?

  1. A.

    Both L1L_1 and L2L_2 are context-free.

  2. B.

    L1L_1 is context-free while L2L_2 is not context-free.

  3. C.

    L2L_2 is context-free while L1L_1 is not context-free.

  4. D.

    Neither L1L_1 nor L2L_2 is context-free.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): B

Solutions and video are in the course

Question 44 · 2 marks Q3288

Consider the following languages.

L1={⟨M⟩∣M takes at least 2016 steps on some input}L_{1} = \left\{\left\langle M \right\rangle \mid M \text{ takes at least 2016 steps on some input} \right\}

L2={⟨M⟩∣M takes at least 2016 steps on all inputs}L_{2} = \left\{\left\langle M \right\rangle \mid M \text { takes at least 2016 steps on all inputs} \right\}

L3={⟨M⟩∣M accepts ϵ}L_{3} = \left\{\left\langle M \right\rangle \mid M \ \text {accepts }\epsilon\right\}

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

  1. A.

    L1L_1 is recursive and L2,L3L_2,L_3 are not recursive

  2. B.

    L2L_2 is recursive and L1,L3L_1,L_3 are not recursive

  3. C.

    L1,L2L_1,L_2 are recursive and L3L_3 is not recursive

  4. D.

    L1,L2,L3L_1,L_2,L_3 are recursive

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): C

Solutions and video are in the course

Question 45 · 2 marks Q3289

Which one of the following grammars is free from left recursion?

  1. A.
    S → AB
    A → Aa | b
    B → c
  2. B.
    S → Ab | Bb | c
    A → Bd | ε
    B → e
  3. C.
    S → Aa | B
    A → Bb | Sc | ε
    B → d
  4. D.
    S → Aa | Bb | c
    A → Bd | ε
    B → Ae | ε
Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): B

Solutions and video are in the course

Question 46 · 2 marks Q3290

A student wrote two context-free grammars G1 and G2 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 D as the start symbol, and use six terminal symbols int ; id [ ] num.

Grammar G1

Grammar G2

D → int L;

D → int L;

L → id [E

L → id E

E → num]

E → E[num]

E → num][E

E → [num]

Which of the grammars correctly generate the declaration mentioned above?

  1. A.

    Both G1 and G2

  2. B.

    Only G1

  3. C.

    Only G2

  4. D.

    Neither G1 nor G2

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): A

Solutions and video are in the course

Question 47 · 2 marks Q3291

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.

image.png

The average turn around time of these processes is __________ milliseconds.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 8.25 milliseconds

Solutions and video are in the course

Question 48 · 2 marks Q3292

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?

  1. A.

    This is a correct two-process synchronization solution.

  2. B.

    This solution violates mutual exclusion requirement.

  3. C.

    This solution violates progress requirement.

  4. D.

    This solution violates bounded wait requirement.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): C

Solutions and video are in the course

Question 49 · 2 marks Q3293

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)P(S) operations and 12 V(S)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 __________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 7

Solutions and video are in the course

Question 50 · 2 marks Q3294

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.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 30

Solutions and video are in the course

Question 51 · 2 marks Q3295

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}\left(X\right); r_{1}\left(X\right); r_{2} \left(Y\right); w_{1} \left(X\right); r_{1} \left(Y\right); w_{2} \left(X\right); 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 ai denotes an abort by transaction TiT_i .

Which one of the following statements about the above schedule is TRUE?

  1. A.

    SS is non-recoverable

  2. B.

    SS is recoverable, but has a cascading abort

  3. C.

    SS does not have a cascading abort

  4. D.

    SS is strict

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): C

Solutions and video are in the course

Question 52 · 2 marks Q3296

Consider the following database table named water_schemes:

image.png

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
Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 2

Solutions and video are in the course

Question 53 · 2 marks Q3297

A network has a data transmission bandwidth of 20×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.

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 200 bytes

Solutions and video are in the course

Question 54 · 2 marks Q3298

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.

  1. A.

    All I, II, and III

  2. B.

    I and III only

  3. C.

    II and III only

  4. D.

    II only

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): B

Solutions and video are in the course

Question 55 · 2 marks Q3299

Consider a 128×103 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 _____________ .

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): 4

Solutions and video are in the course

Question 1 · 1 mark Q3235

The man who is now Municipal Commissioner worked as ____________________.

  1. A.

    the security guard at a university

  2. B.

    a security guard at the university

  3. C.

    a security guard at university

  4. D.

    the security guard at the university

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): B

Solutions and video are in the course

Question 2 · 1 mark Q3236

Nobody knows how the Indian cricket team is going to 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.

  1. A.

    put up with

  2. B.

    put in with

  3. C.

    put down to

  4. D.

    put up against

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): A

Solutions and video are in the course

Question 3 · 1 mark Q3237

Find the odd one in the following group of words.

mock, deride, praise, jeer

  1. A.

    mock

  2. B.

    deride

  3. C.

    praise

  4. D.

    jeer

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): C

Solutions and video are in the course

Question 4 · 1 mark Q3238

Pick the odd one from the following options.

  1. A.

    CADBE

  2. B.

    JHKIL

  3. C.

    XVYWZ

  4. D.

    ONPMQ

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): D

Solutions and video are in the course

Question 5 · 1 mark Q3239

In a quadratic function, the value of the product of the roots (α, β) is 4. Find the value of

αn+βnα−n+β−n\dfrac{\alpha^{n}+\beta^{n}}{\alpha^{-n}+\beta^{-n}}

  1. A.

    n4n^4

  2. B.

    4n4^n

  3. C.

    22n−12^{2n-1}

  4. D.

    4n−14^{n-1}

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): B

Solutions and video are in the course

Question 6 · 2 marks Q3240

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 ______________.

  1. A.

    35

  2. B.

    45

  3. C.

    65

  4. D.

    90

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): A

Solutions and video are in the course

Question 7 · 2 marks Q3241

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

  1. A.

    (i) only

  2. B.

    (ii) only

  3. C.

    both (i) and (ii)

  4. D.

    neither (i) nor (ii)

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): D

Solutions and video are in the course

Question 8 · 2 marks Q3242

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.

  1. A.

    (i) only

  2. B.

    (ii) only

  3. C.

    both (i) and (ii)

  4. D.

    neither (i) nor (ii)

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): D

Solutions and video are in the course

Question 9 · 2 marks Q3243

In a 2 × 4 rectangle grid shown below, each cell is a rectangle. How many rectangles can be observed in the grid?

  1. A.

    21

  2. B.

    27

  3. C.

    30

  4. D.

    36

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): C

Solutions and video are in the course

Question 10 · 2 marks Q3244

Choose the correct expression for f(x)f(x) given in the graph.

  1. A.

    𝑓(𝑥)=1−∣𝑥−1∣𝑓(𝑥) = 1 − |𝑥 − 1|

  2. B.

    𝑓(𝑥)=1+∣𝑥−1∣𝑓(𝑥) = 1 + |𝑥 − 1|

  3. C.

    𝑓(𝑥)=2−∣𝑥−1∣𝑓(𝑥) = 2 − |𝑥 − 1|

  4. D.

    𝑓(𝑥)=2+∣𝑥−1∣𝑓(𝑥) = 2 + |𝑥 − 1|

Official answer key

Official answer key (GATE Computer Science & IT 2016 GATE 2016 · CS · Set 2): C

Solutions and video are in the course