GATE Computer Science & IT 2015 — GATE 2015 · CS · Set 1

CS Set 1 · 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 11 · 1 mark Q3310

If g(x)=1−xg(x) = 1 - x and h(x)=xx−1h(x) = \frac{x}{x-1} , then g(h(x))h(g(x))\frac{g(h(x))}{h(g(x))} is:

  1. A.

    h(x)g(x)\frac{h(x)}{g(x)}

  2. B.

    −1x\frac{-1}{x}

  3. C.

    g(x)h(x)\frac{g(x)}{h(x)}

  4. D.

    x(1−x)2\frac{x}{(1-x)^{2}}

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 12 · 1 mark Q3311

limx→∞ x1/x

  1. A.

    ∞

  2. B.

    0

  3. C.

    1

  4. D.

    Not defined

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): C

Solutions and video are in the course

Question 13 · 1 mark Q3312

Match the following:

(P) Prim’s algorithm for minimum spanning tree

(i) Backtracking

(Q) Floyd-Warshall algorithm for all pairs shortest paths

(ii) Greedy method

(R) Mergesort

(iii) Dynamic programming

(S) Hamiltonian circuit

(iv) Divide and conquer

  1. A.

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

  2. B.

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

  3. C.

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

  4. D.

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

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): C

Solutions and video are in the course

Question 14 · 1 mark Q3313

Which one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting nn ( ≥ 2) numbers? In the recurrence equations given in the options below, cc is a constant.

  1. A.

    𝑇(𝑛)=2 𝑇(𝑛/2)+𝑐n𝑇(𝑛) = 2 \ 𝑇(𝑛/2) + 𝑐n

  2. B.

    𝑇(𝑛)=𝑇(𝑛−1)+𝑇(1)+𝑐n𝑇(𝑛) = 𝑇(𝑛 − 1) + 𝑇(1) + 𝑐n

  3. C.

    𝑇(𝑛)=2𝑇(𝑛−1)+cn 𝑇(𝑛) = 2𝑇(𝑛 − 1) + cn

  4. D.

    𝑇(𝑛)=𝑇(𝑛/2)+𝑐n𝑇(𝑛) = 𝑇(𝑛/2) + 𝑐n

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): B

Solutions and video are in the course

Question 15 · 1 mark Q3314

The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 are

  1. A.

    63 and 6, respectively

  2. B.

    64 and 5, respectively

  3. C.

    32 and 6, respectively

  4. D.

    31 and 5, respectively

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 16 · 1 mark Q3315

Match the following:

(P) Condition coverage

(Q) Equivalence class partitioning

(R) Volume testing

(S) Alpha testing

(i) Black-box testing

(ii) System testing

(iii) White-box testing

(iv) Performance testing

  1. A.

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

  2. B.

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

  3. C.

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

  4. D.

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

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): C

Solutions and video are in the course

Question 17 · 1 mark Q3316

Which of the following is/are correct inorder traversal sequence(s) of binary search tree(s)?

I.   3, 5, 7, 8, 15, 19, 25

II.  5, 8, 9, 12, 10, 15, 25

III. 2, 7, 10, 8, 14, 16, 20

IV. 4, 6, 7, 9 18, 20, 25

  1. A.

    I and IV only

  2. B.

    II and III only

  3. C.

    II and IV only

  4. D.

    II only

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 18 · 1 mark Q3317

Which one of the following is TRUE at any valid state in shift-reduce parsing?

  1. A.

    Viable prefixes appear only at the bottom of the stack and not inside

  2. B.

    Viable prefixes appear only at the top of the stack and not inside

  3. C.

    The stack contains only a set of viable prefixes

  4. D.

    The stack never contains viable prefixes

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): C

Solutions and video are in the course

Question 19 · 1 mark Q3318

Which one of the following is NOT equivalent to p↔qp ↔ q?

  1. A.

    (¬p∨q)∧(p∨¬q)(\neg p \lor q) \land (p \lor \neg q)

  2. B.

    (¬p∨q)∧(q→p)(\neg p \lor q) \land (q \rightarrow p)

  3. C.

    (¬p∧q)∨(p∧¬q)(\neg p \land q) \lor (p \land \neg q)

  4. D.

    (¬p∧¬q)∨(p∧q)(\neg p \land \neg q) \lor (p \land q)

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): C

Solutions and video are in the course

Question 20 · 1 mark Q3319

For a set AA, the power set of AA is denoted by 2A2^A. If A={5,{6},{7}}A = \{5,\{6\},\{7\}\}, which of the following options are TRUE?

I. ∅∈2A\emptyset \in 2^A

II. ∅⊆2A\emptyset \subseteq 2^A

III. {5,{6}}∈2A\{5,\{6\}\} \in 2^A

IV. {5,{6}}⊆2A\{5,\{6\}\} \subseteq 2^A

  1. A.

    I and III only

  2. B.

    II and III only

  3. C.

    I, II and III only

  4. D.

    I, II and IV only

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): C

Solutions and video are in the course

Question 21 · 1 mark Q3320

Consider a 4-bit Johnson counter with an initial value of 0000. The counting sequence of this counter is

  1. A.

    0, 1, 3, 7, 15, 14, 12, 8, 0

  2. B.

    0, 1, 3, 5, 7, 9, 11, 13, 15, 0

  3. C.

    0, 2, 4, 6, 8, 10, 12, 14, 0

  4. D.

    0, 8, 12, 14, 15, 7, 3, 1, 0

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): D

Solutions and video are in the course

Question 22 · 1 mark Q3321

For computers based on three-address instruction formats, each address field can be used to specify which of the following:

(S1) A memory operand

(S2) A processor register

(S3) An implied accumulator register

  1. A.

    Either S1 or S2

  2. B.

    Either S2 or S3

  3. C.

    Only S2 and S3

  4. D.

    All of S1, S2 and S3

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 23 · 1 mark Q3322

Suppose two hosts use a TCP connection to transfer a large file. Which of the following statements is/are FALSE with respect to the TCP connection?

I. If the sequence number of a segment is mm, then the sequence number of the subsequent segment is always m+1m+1.

II. If the estimated round trip time at any given point of time is tt sec, the value of the retransmission timeout is always set to greater than or equal to tt sec.

III. The size of the advertised window never changes during the course of the TCP connection.

IV. The number of unacknowledged bytes at the sender is always less than or equal to the advertised window.

  1. A.

    III only

  2. B.

    I and III only

  3. C.

    I and IV only

  4. D.

    II and IV only

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): B

Solutions and video are in the course

Question 24 · 1 mark Q3323

Suppose that everyone in a group of NN people wants to communicate secretly with the N−1N - 1 others using symmetric key cryptographic system. The communication between any two persons should not be decodable by the others in the group. The number of keys required in the system as a whole to satisfy the confidentiality requirement is

  1. A.

    2N2N

  2. B.

    N(N−1)N(N-1)

  3. C.

    N(N−1)/2N(N-1)/2

  4. D.

    (N−1)2 (N-1)^2

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): C

Solutions and video are in the course

Question 25 · 1 mark Q3324

Which of the following statements is/are FALSE?

I. XML overcomes the limitations in HTML to support a structured way of organizing content.

II. XML specification is not case sensitive while HTML specification is case sensitive.

III. XML supports user defined tags while HTML uses pre-defined tags.

IV. XML tags need not be closed while HTML tags must be closed.

  1. A.

    II only

  2. B.

    I only

  3. C.

    II and IV only

  4. D.

    III and IV only

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): C

Solutions and video are in the course

Question 26 · 1 mark Q3325

Which one of the following fields of an IP header is NOT modified by a typical IP router?

  1. A.

    Checksum

  2. B.

    Source address

  3. C.

    Time to Live (TTL)

  4. D.

    Length

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): B

Solutions and video are in the course

Question 27 · 1 mark Q3326

In one of the pairs of protocols given below, both the protocols can use multiple TCP connections between the same client and the server. Which one is that?

  1. A.

    HTTP, FTP

  2. B.

    HTTP, TELNET

  3. C.

    FTP, SMTP

  4. D.

    HTTP, SMTP

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 28 · 1 mark Q3327

For any two languages L1L_1 and L2L_2 such that L1L_1 is context-free and L2L_2 is recursively enumerable but not recursive, which of the following is/are necessarily true?

I. L‾1\overline L_1 (complement of L1L_1) is recursive

II. L‾2\overline L_2 (complement of L2L_2) is recursive

III. L‾1\overline L_1 is context-free

IV. ​​L‾1∪L2​​\overline L_1 \cup L_2 is recursively enumerable

  1. A.

    I only

  2. B.

    III only

  3. C.

    III and IV only

  4. D.

    I and IV only

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): D

Solutions and video are in the course

Question 29 · 1 mark Q1949

Consider a system with byte-addressable memory, 32-bit logical addresses, 4 kilobyte page size and page table entries of 4 bytes each. The size of the page table in the system in megabytes is ___________

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 4 MB

Solutions and video are in the course

Question 30 · 1 mark Q2021

The following two functions P1 and P2 that share a variable B with an initial value of 2 execute concurrently.

image.png

The number of distinct values that B can possibly take after the execution is

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 3

Solutions and video are in the course

Question 31 · 1 mark Q3330

SELECT operation in SQL is equivalent to

  1. A.

    the selection operation in relational algebra

  2. B.

    the selection operation in relational algebra, except that SELECT in SQL retains duplicates

  3. C.

    the projection operation in relational algebra

  4. D.

    the projection operation in relational algebra, except that SELECT in SQL retains duplicates

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): D

Solutions and video are in the course

Question 32 · 1 mark Q3331

A file is organized so that the ordering of data records is the same as or close to the ordering of data entries in some index. Then that index is called

  1. A.

    Dense

  2. B.

    Sparse

  3. C.

    Clustered

  4. D.

    Unclustered

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): C

Solutions and video are in the course

Question 33 · 1 mark Q3332

In the LU decomposition of the matrix  [2249]\begin{bmatrix}2 & 2 \\ 4 & 9\end{bmatrix}, if the diagonal elements of UU are both 1, then the lower diagonal entry l22l_{22} of LL is________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 5

Solutions and video are in the course

Question 34 · 1 mark Q3333

The output of the following C program is__________.

void f1(int a, int b) {
    int c;
    c=a; a=b; b=c;
}
void f2(int *a, int *b) {
    int c;
    c=*a; *a=*b; *b=c;
}
int main(){
    int a=4, b=5, c=6;
    f1(a,b);
    f2(&b, &c);
    printf("%d",c-a-b);
}
Official answer key

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

Solutions and video are in the course

Question 35 · 1 mark Q3334

What are the worst-case complexities of insertion and deletion of a key in a binary search tree?

  1. A.

    θ(log n)θ (log \ n) for both insertion and deletion

  2. B.

    θ(n)θ(n) for both insertion and deletion

  3. C.

    θ(n)θ(n) for insertion and θ(log n)θ (log \ n) for deletion

  4. D.

    θ(log n)θ (log \ n) for insertion and θ(n)θ(n) for deletion

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): B

Solutions and video are in the course

Question 36 · 2 marks Q3335

Suppose that the stop-and-wait protocol is used on a link with a bit rate of 64 kilobits per second and 20 milliseconds propagation delay. Assume that the transmission time for the acknowledgement and the processing time at nodes are negligible. Then the minimum frame size in bytes to achieve a link utilization of at least 50% is______________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 160 bytes

Solutions and video are in the course

Question 37 · 2 marks Q3336

Consider a max heap, represented by the array: 40, 30, 20, 10, 15, 16, 17, 8, 4.

Array Index

1

2

3

4

5

6

7

8

9

Value

40

30

20

10

15

16

17

8

4

Now consider that a value 35 is inserted into this heap. After insertion, the new heap is

  1. A.

    40, 30, 20, 10, 15, 16, 17, 8, 4, 35

  2. B.

    40, 35, 20, 10, 30, 16, 17, 8, 4, 15

  3. C.

    40, 30, 20, 10, 35, 16, 17, 8, 4, 15

  4. D.

    40, 35, 20, 10, 15, 16, 17, 8, 4, 30

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): B

Solutions and video are in the course

Question 38 · 2 marks Q3337

Consider the following C program segment.

while(first <= last)
{
    if (array[middle] < search)
        first = middle + 1;
    else if (array[middle] == search)
        found = TRUE;
    else last = middle - 1;
    middle = (first + last)/2;
}
if (first > last) notPresent = TRUE;

The cyclomatic complexity of the program segment is ________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 5

Solutions and video are in the course

Question 39 · 2 marks Q3338

Consider a LAN with four nodes 𝑆1, 𝑆2, 𝑆3 and 𝑆4. Time is divided into fixed-size slots, and a node can begin its transmission only at the beginning of a slot. A collision is said to have occurred if more than one node transmit in the same slot. The probabilities of generation of a frame in a time slot by 𝑆1, 𝑆2, 𝑆3 and 𝑆4 are 0.1, 0.2, 0.3 and 0.4, respectively. The probability of sending a frame in the first slot without any collision by any of these four stations is _____________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 0.4404

Solutions and video are in the course

Question 40 · 2 marks Q3339

The binary operator ≠ is defined by the following truth table.

pqp≠q000011101110\begin{array}{|l|l|l|} \hline \textbf{p} & \textbf{q}& \textbf{p} \neq \textbf{q}\\\hline \text{0} & \text{0}& \text{0}\\\hline \text{0} & \text{1}& \text{1}\\\hline \text{1} & \text{0}& \text{1}\\\hline \text{1} & \text{1}& \text{0}\\\hline \end{array}

Which one of the following is true about the binary operator ≠?

  1. A.

    Both commutative and associative

  2. B.

    Commutative but not associative

  3. C.

    Not commutative but associative

  4. D.

    Neither commutative nor associative

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 41 · 2 marks Q3340

∑x=1991x(x+1)\sum\limits_{x=1}^{99}\frac{1}{x(x+1)}  = ____________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 0.99

Solutions and video are in the course

Question 42 · 2 marks Q3341

Suppose L={p,q,r,s,t}L = \left\{ p, q, r, s, t\right\} is a lattice represented by the following Hasse diagram:

For any x,y∈Lx, y \in L, not necessarily distinct , x∨yx \vee y and x∧yx \wedge y are join and meet of x,yx,y, respectively. Let L3={(x,y,z):x,y,z∈L}L^3 = \left\{\left(x, y, z\right): x, y, z \in L\right\} be the set of all ordered triplets of the elements of LL. Let prp_{r} be the probability that an element (x,y,z)∈L3\left(x, y,z\right) \in L^3 chosen equiprobably satisfies x∨(y∧z)=(x∨y)∧(x∨z)x \vee (y \wedge z) = (x \vee y) \wedge (x \vee z). Then

  1. A.

    pr=0p_r = 0

  2. B.

    pr=1p_r = 1

  3. C.

    0<pr≤150 < p_r ≤ \frac{1}{5}

  4. D.

    15<pr<1\frac{1}{5} < p_r < 1

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): D

Solutions and video are in the course

Question 43 · 2 marks Q3342

Consider the operations

f (X, Y, Z) = X’YZ + XY’ + Y’Z’\textit{f (X, Y, Z) = X'YZ + XY' + Y'Z'} and 

g (X, Y, Z) = X’YZ + X’YZ’ + XY\textit{g (X, Y, Z) = X'YZ + X'YZ' + XY}

Which one of the following is correct?

  1. A.

    Both {𝑓} and {𝑔} are functionally complete

  2. B.

    Only {𝑓} is functionally complete

  3. C.

    Only {𝑔} is functionally complete

  4. D.

    Neither {𝑓} nor {𝑔} is functionally complete

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): B

Solutions and video are in the course

Question 44 · 2 marks Q3343

Let G be a connected planar graph with 10 vertices. If the number of edges on each face is three, then the number of edges in G is ___________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 24

Solutions and video are in the course

Question 45 · 2 marks Q3344

Let ana_n represent the number of bit strings of length nn containing two consecutive 1s. What is the recurrence relation for ana_n ?

  1. A.

    an−2+an−1+2n−2a_{n - 2} + a_{n - 1} + 2^{n - 2}

  2. B.

    an−2+2an−1+2n−2a_{n - 2} + 2a_{n - 1} + 2^{n - 2}

  3. C.

    2an−2+an−1+2n−22a_{n - 2} + a_{n - 1} + 2^{n - 2}

  4. D.

    2an−2+2an−1+2n−22a_{n - 2} + 2a_{n - 1} + 2^{n - 2}

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 46 · 2 marks Q3345

A variable xx is said to be live at a statement SiS_i in a program if the following three conditions hold simultaneously:

i. There exists a statement SjS_j that uses xx

ii. There is a path from SiS_i to SjS_j in the flow graph corresponding to the program

iii. The path has no intervening assignment to xx including at SiS_i and SjS_j

The variables which are live both at the statement in basic block 2 and at the statement in basic block 3 of the above control flow graph are

  1. A.

    p,s,up, s, u

  2. B.

    r,s,u r, s, u

  3. C.

    r,ur, u

  4. D.

    q,vq, v

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): C

Solutions and video are in the course

Question 47 · 2 marks Q3346

The least number of temporary variables required to create a three-address code in static single assignment form for the expression q+r/3+s–t∗5+u∗v/wq + r / 3 + s – t * 5 + u * v /w  is _______________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 8

Solutions and video are in the course

Question 48 · 2 marks Q3347

Consider an Entity-Relationship (ER) model in which entity sets E1E_1 and E2E_2 are connected by an m:nm : n relationship R12R_{12}. E1E_1 and E3E_3 are connected by a 1:n1 : n (1 on the side of E1E_1 and nn on the side of E3E_3) relationship R13R_{13}.

E1E_1 has two single-valued attributes a11a_{11} and ​​a12​​a_{12} of which a11a_{11} is the key attribute. ​​​​E2​​​​E_2 has two singlevalued attributes a21a_{21} and a22a_{22} of which a21a_{21} is the key attribute. E3E_3 has two single-valued attributes a31a_{31} and a32a_{32} of which a31a_{31} is the key attribute. The relationships do not have any attributes.

If a relational model is derived from the above ER model, then the minimum number of relations that would be generated if all the relations are in 3NF is _______.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 4

Solutions and video are in the course

Question 49 · 2 marks Q3348

Consider the DFAs M and N given above. The number of states in a minimal DFA that accepts the language L(M) ∩ L(N) is____________________

Official answer key

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

Solutions and video are in the course

Question 50 · 2 marks Q3349

Consider the NPDA ⟨Q={q0,q1,q2},Σ={0,1},Γ={0,1,⊥},δ,q0,⊥,F={q2}⟩\left \langle Q= \left \{ q_{0}, q_{1}, q_{2} \right \},\Sigma = \left \{ 0, 1 \right \}, \Gamma = \left \{ 0, 1, \perp \right \}, \delta, q_{0}, \perp, F =\left \{ q_{2} \right \} \right \rangle, where (as per usual convention) QQ is the set of states, ∑∑ is the input alphabet, ΓΓ is the stack alphabet, 𝛿𝛿 is the state transition function, q0q_0 is the initial state, ⊥⊥ is the initial stack symbol, and FF is the set of accepting states. The state transition is as follows:

Which one of the following sequences must follow the string 101100 so that the overall string is accepted by the automaton?

  1. A.

    10110

  2. B.

    10010

  3. C.

    01010

  4. D.

    01001

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): B

Solutions and video are in the course

Question 51 · 2 marks Q3350

Let G=(V,E)G = (V, E) be a simple undirected graph, and ss be a particular vertex in it called the source. For x∈Vx ∈ V , let d(x)d(x) denote the shortest distance in GG from s to xx . A breadth first search (BFS) is performed starting at ss. Let TT be the resultant BFS tree. If (u,v)(u,v) is an edge of GG that is not in TT , then which one of the following CANNOT be the value of d(u)−d(v)d(u) - d(v) ?

  1. A.

    -1    

  2. B.

    0

  3. C.

    1

  4. D.

    2

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): D

Solutions and video are in the course

Question 52 · 2 marks Q1903

Consider a uniprocessor system executing three tasks T1, T2 and T3, each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at intervals of 3, 7 and 20 milliseconds, respectively. The priority of each task is the inverse of its period and the available tasks are scheduled in order of priority, with the highest priority task scheduled first. Each instance of T1, T2 and T3 requires an execution time of 1, 2 and 4 milliseconds, respectively. Given that all tasks initially arrive at the beginning of the 1st milliseconds and task preemptions are allowed, the first instance of T3 completes its execution at the end of ______________ milliseconds. 

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 12 milliseconds

Solutions and video are in the course

Question 53 · 2 marks Q3352

A positive edge-triggered D flip-flop is connected to a positive edge-triggered JK flip-flop as follows. The Q output of the D flip-flop is connected to both the J and K inputs of the JK flip-flop, while the Q output of the JK flip-flop is connected to the input of the D flip-flop. Initially, the output of the D flip-flop is set to logic one and the output of the JK flip-flop is cleared. Which one of the following is the bit sequence (including the initial state) generated at the Q output of the JK flip-flop when the flip-flops are connected to a free-running common clock? Assume that J = K = 1 is the toggle mode and J = K = 0 is the state-holding mode of the JK flip-flop. Both the flip-flops have non-zero propagation delays.

  1. A.

    0110110…

  2. B.

    0100100…

  3. C.

    011101110…

  4. D.

    011001100…

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 54 · 2 marks Q3353

Consider a disk pack with a seek time of 4 milliseconds and rotational speed of 10000 rotations per minute (RPM). It has 600 sectors per track and each sector can store 512 bytes of data. Consider a file stored in the disk. The file contains 2000 sectors. Assume that every sector access necessitates a seek, and the average rotational latency for accessing each sector is half of the time for one complete rotation. The total time (in milliseconds) needed to read the entire file is ____________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 14020 milliseconds

Solutions and video are in the course

Question 55 · 2 marks Q3354

Consider a non-pipelined processor with a clock rate of 2.5 gigahertz and average cycles per instruction of four. The same processor is upgraded to a pipelined processor with five stages; but due to the internal pipeline delay, the clock speed is reduced to 2 gigahertz. Assume that there are no stalls in the pipeline. The speed up achieved in this pipelined processor is_________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 3.2 x

Solutions and video are in the course

Question 56 · 2 marks Q1877

Suppose the following disk request sequence (track numbers) for a disk with 100 tracks is given: 45, 20, 90, 10, 50, 60, 80, 25, 70. Assume that the initial position of the R/W head is on track 50. The additional distance that will be traversed by the R/W head when the Shortest Seek Time First (SSTF) algorithm is used compared to the SCAN (Elevator) algorithm (assuming that SCAN algorithm moves towards 100 when it starts execution) is _________ tracks

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 10

Solutions and video are in the course

Question 57 · 2 marks Q3356

Consider a main memory with five page frames and the following sequence of page references: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3. Which one of the following is true with respect to page replacement policies First In First Out (FIFO) and Least Recently Used (LRU)?

  1. A.

    Both incur the same number of page faults

  2. B.

    FIFO incurs 2 more page faults than LRU

  3. C.

    LRU incurs 2 more page faults than FIFO

  4. D.

    FIFO incurs 1 more page faults than LRU

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 58 · 2 marks Q3357

∫1π2πcos⁡(1/x)x2dx\large \int \limits_{\frac{1}{\pi}}^{\frac{2}{\pi}}\frac{\cos(1/x)}{x^{2}}dx  =__________________.

Official answer key

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

Solutions and video are in the course

Question 59 · 2 marks Q3358

Consider the following 2 × 2 matrix AA where two elements are unknown and are marked by aa and bb. The eigenvalues of this matrix are -1 and 7. What are the values of aa and bb?

A=(14ba)\qquad A = \begin{pmatrix}1 & 4\\ b&a \end{pmatrix}

  1. A.

    a=6,b=4a = 6, b = 4

  2. B.

    a=4,b=6a = 4, b = 6

  3. C.

    a=3,b=5a = 3, b = 5

  4. D.

    a=5,b=3a = 5, b =3

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): D

Solutions and video are in the course

Question 60 · 2 marks Q3359

An algorithm performs (log⁡N)1/2(\log N)^{1/2} find operations, NN insert operations, (log⁡N)1/2(\log N)^{1/2} delete operations, and (log⁡N)1/2(\log N)^{1/2} decrease-key operations on a set of data items with keys drawn from a linearly ordered set. For a delete operation, a pointer is provided to the record that must be deleted. For the decrease-key operation, a pointer is provided to the record that has its key decreased. Which one of the following data structures is the most suited for the algorithm to use, if the goal is to achieve the best total asymptotic complexity considering all the operations?

  1. A.

    Unsorted array

  2. B.

    Min-heap

  3. C.

    Sorted array

  4. D.

    Sorted doubly linked list

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 61 · 2 marks Q3360

Consider the following relations:

Student Table

Roll_No

Student_Name

1

Raj

2

Rohit

3

Raj

Performance Table

Roll_No

Course

Marks

1

Math

80

1

English

70

2

Math

75

3

English

80

2

Physics

65

3

Math

80

Consider the following SQL query.

SELECT S.Student_Name, sum(P.Marks)
FROM Student S, Performance P
WHERE S.Roll_No = P.Roll_No
GROUP BY S.Student_Name

The number of rows that will be returned by the SQL query is _____________.

Official answer key

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

Solutions and video are in the course

Question 62 · 2 marks Q3361

What is the output of the following C code? Assume that the address of xx is 2000 (in decimal) and an integer requires four bytes of memory.

int main () {
    unsigned int x[4][3] =
        {{1,2,3},{4,5,6},{7,8,9},{10,11,12}};
    printf("%u, %u, %u", x+3, *(x+3), *(x+2)+3);
}
  1. A.

    2036, 2036, 2036

  2. B.

    2012, 4, 2204

  3. C.

    2036, 10, 10

  4. D.

    2012, 4, 6

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 63 · 2 marks Q3362

The graph shown below has 8 edges with distinct integer edge weights. The minimum spanning tree (MST) is of weight 36 and contains the edges: {(A, C), (B, C), (B, E), (E, F), (D, F)}. The edge weights of only those edges which are in the MST are given in the figure shown below. The minimum possible sum of weights of all 8 edges of this graph is ___________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 69

Solutions and video are in the course

Question 64 · 2 marks Q3363

Consider the following C function.

int fun1(int n){
    int i,j,k,p,q=0;
    for (i=1; i<n; ++i) {
        p=0;
        for (j=n; j>1; j=j/2)
            ++p;
        for (k=1; k<p; k=k*2)
            ++q;
    }
    return q;
}

Which one of the following most closely approximates the return value of the function fun1?

  1. A.

    n3n^3

  2. B.

    n(log n)2n (log \ n)^2

  3. C.

    n log nn \ log \ n

  4. D.

    n log(log n)n \ log(log \ n)

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): D

Solutions and video are in the course

Question 65 · 2 marks Q3364

Consider the following pseudo code, where xx and yy are positive integers.

begin
    q := 0
    r := x
    while r ≥ y do
    begin
        r := r - y
        q := q + 1
    end
end

The post condition that needs to be satisfied after the program terminates is

  1. A.

    {r=qx+y∧r<y}\{ r = qx + y \wedge r < y\}

  2. B.

    {x=qy+r∧r<y}\{ x = qy + r \wedge r < y\}

  3. C.

    {y=qx+r∧0<r<y}\{ y = qx + r \wedge 0 < r < y\}

  4. D.

    {q+1<r−y∧y>0}\{ q + 1 < r - y \wedge y > 0\}

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): B

Solutions and video are in the course

Question 1 · 1 mark Q3300

Didn’t you buy _________ when you went shopping?

  1. A.

    any paper

  2. B.

    much paper

  3. C.

    no paper

  4. D.

    a few paper

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 2 · 1 mark Q3301

Which of the following options is the closest in meaning to the sentence below?

She enjoyed herself immensely at the party.
  1. A.

    She had a terrible time at the party

  2. B.

    She had a horrible time at the party

  3. C.

    She had a terrific time at the party

  4. D.

    She had a terrifying time at the party

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): C

Solutions and video are in the course

Question 3 · 1 mark Q3302

Which one of the following combinations is incorrect?

  1. A.

    Acquiescence - Submission

  2. B.

    Wheedle - Roundabout

  3. C.

    Flippancy - Lightness

  4. D.

    Profligate - Extravagant

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): B

Solutions and video are in the course

Question 4 · 1 mark Q3303

Based on the given statements, select the most appropriate option to solve the given question.

If two floors in a certain building are 9 feet apart, how many steps are there in a set of stairs that extends from the first floor to the second floor of the building?  

Statements:
(I) Each step is 3/4 foot high.
(II) Each step is 1 foot wide.

  1. A.

    Statement I alone is sufficient, but statement II alone is not sufficient.

  2. B.

    Statement II alone is sufficient, but statement I alone is not sufficient.

  3. C.

    Both statements together are sufficient, but neither statement alone is sufficient.

  4. D.

    Statement I and II together are not sufficient.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 5 · 1 mark Q3304

Given Set A = {2, 3, 4, 5} and Set B = {11, 12, 13, 14, 15}, two numbers are randomly selected, one from each set. What is the probability that the sum of the two numbers equals 16?

  1. A.

    0.20

  2. B.

    0.25

  3. C.

    0.30

  4. D.

    0.33

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 6 · 2 marks Q3305

Select the alternative meaning of the underlined part of the sentence.

The chain snatchers took to their heels when the police party arrived.

  1. A.

    took shelter in a thick jungle

  2. B.

    open indiscriminate fire

  3. C.

    took to flight

  4. D.

    unconditionally surrendered

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): C

Solutions and video are in the course

Question 7 · 2 marks Q3306

The given statement is followed by some courses of action. Assuming the statement to be true, decide the correct option.

Statement:
There has been a significant drop in the water level in the lakes supplying water to the city.

Courses of action:


(I) The water supply authority should impose a partial cut in supply to tackle the situation.
(II) The government should appeal to all the residents through mass media for minimal use of water.
(III) The government should ban the water supply in lower areas

  1. A.

    Statements I and II follow.

  2. B.

    Statements I and III follow.

  3. C.

    Statements II and III follow.

  4. D.

    All statements follow.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): A

Solutions and video are in the course

Question 8 · 2 marks Q3307

The pie chart below has the breakup of the number of students, from different departments in an engineering college for the year 2012. The proportion of male to female students in each department is 5 : 4. There are 40 males in Electrical Engineering. What is the difference between the numbers of female students in the Civil department and the female students in the Mechanical department?

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): 32

Solutions and video are in the course

Question 9 · 2 marks Q3308

The probabilities that a student passes in Mathematics, Physics and Chemistry are m, p and c respectively. Of these subjects, the student has 75% chance of passing in at least one, a 50% chance of passing in at least two and a 40% chance of passing in exactly two. Following relations are drawn in m, p and c:

(I) p + m + c = 27/20
(II) p + m + c = 13/20
(III) (p) × (m) × (c) = 1/10 

  1. A.

    Only relation 1 is true

  2. B.

    Only relation 2 is true

  3. C.

    Relations 2 and 3 are true

  4. D.

    Relations 1 and 3 are true

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): D

Solutions and video are in the course

Question 10 · 2 marks Q3309

The number of students in a class who have answered correctly, wrongly, or not attempted each question in an exam, are listed in the table below. The marks for each question are also listed. There is no negative or partial marking.

Q No.MarksAnsweredAnsweredNot CorrectlyWronglyAttempted12211762315272311129442231835531121\begin{array}{|c|c|c|c|c|} \hline \textbf{Q No.} & \textbf{Marks} &\textbf{Answered}&\textbf{Answered}&\textbf{Not}\\&&\textbf{ Correctly} &\textbf{Wrongly} & \textbf{Attempted} \\\hline \text{1} & \text{2} &\text{21} &\text{17} &\text{6}\\ \text{2} & \text{3} &\text{15} & \text{27}& \text{2}\\\text{3} & \text{1} &\text{11} & \text{29} & \text{4}\\ \text{4} & \text{2} &\text{23} & \text{18} & \text{3}\\ \text{5} & \text{5} &\text{31} & \text{12} & \text{1} \\\hline \end{array}

What is the average of the marks obtained by the class in the examination?

  1. A.

    2.290

  2. B.

    2.970

  3. C.

    6.795

  4. D.

    8.795

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 1): C

Solutions and video are in the course