GATE 2016 CS (Set 2)

All 65 questions of GATE 2016 CS (Set 2)

Question text and figures as in the official paper, with the answer from the official key. Worked solutions for every question are in your report after you take the paper as a 3-hour test.

Q1 · General Aptitude · MCQ · 1 mark

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

Find the value of

αn+βnα−n+β−n.\frac{\alpha^n+\beta^n}{\alpha^{-n}+\beta^{-n}}.
  • (A)
    n4n^4
  • (B)
    4n4^n
  • (C)
    22n−12^{2n-1}
  • (D)
    4n−14^{n-1}

Answer (official key): B

Worked solution: in your report after you take this paper.

Q2 · General Aptitude · MCQ · 1 mark

The man who is now Municipal Commissioner worked as ____________________.

  • (A)
    the security guard at a university
  • (B)
    a security guard at the university
  • (C)
    a security guard at university
  • (D)
    the security guard at the university

Answer (official key): B

Worked solution: in your report after you take this paper.

Q3 · General Aptitude · MCQ · 1 mark

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 cope with in the above sentence.

  • (A)
    put up with
  • (B)
    put in with
  • (C)
    put down to
  • (D)
    put up against

Answer (official key): A

Worked solution: in your report after you take this paper.

Q4 · General Aptitude · MCQ · 1 mark

Find the odd one in the following group of words.

mock, deride, praise, jeer

  • (A)
    mock
  • (B)
    deride
  • (C)
    praise
  • (D)
    jeer

Answer (official key): C

Worked solution: in your report after you take this paper.

Q5 · General Aptitude · MCQ · 1 mark

Pick the odd one from the following options.

  • (A)
    CADBE
  • (B)
    JHKIL
  • (C)
    XVYWZ
  • (D)
    ONPMQ

Answer (official key): D

Worked solution: in your report after you take this paper.

Q6 · General Aptitude · MCQ · 2 marks

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

  • (A)
    35
  • (B)
    45
  • (C)
    65
  • (D)
    90

Answer (official key): A

Read the worked solution

Q7 · General Aptitude · MCQ · 2 marks

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.

  • (A)
    (i) only
  • (B)
    (ii) only
  • (C)
    both (i) and (ii)
  • (D)
    neither (i) nor (ii)

Answer (official key): D

Read the worked solution

Q8 · General Aptitude · MCQ · 2 marks

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

2 by 4 rectangle grid for Q9

  • (A)
    21
  • (B)
    27
  • (C)
    30
  • (D)
    36

Answer (official key): C

Worked solution: in your report after you take this paper.

Q9 · General Aptitude · MCQ · 2 marks

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

Graph for Q10

  • (A)
    f(x)=1−∣x−1∣f(x)=1-|x-1|
  • (B)
    f(x)=1+∣x−1∣f(x)=1+|x-1|
  • (C)
    f(x)=2−∣x−1∣f(x)=2-|x-1|
  • (D)
    f(x)=2+∣x−1∣f(x)=2+|x-1|

Answer (official key): C

Worked solution: in your report after you take this paper.

Q10 · General Aptitude · MCQ · 2 marks

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.

  • (A)
    (i) only
  • (B)
    (ii) only
  • (C)
    both (i) and (ii)
  • (D)
    neither (i) nor (ii)

Answer (official key): D

Worked solution: in your report after you take this paper.

Q11 · Theory of Computation · MCQ · 1 mark

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.

  • (A)
    I only
  • (B)
    I and III only
  • (C)
    I and IV only
  • (D)
    I, II and III only

Answer (official key): D

Worked solution: in your report after you take this paper.

Q12 · Linear Algebra · Numerical · 1 mark

Suppose that the eigenvalues of matrix AA are 1, 2, and 4.

The determinant of

(A−1)T(A^{-1})^T

is __________.

Answer (official key): 0.124 to 0.126

Worked solution: in your report after you take this paper.

Q13 · Computer Networks · MCQ · 1 mark

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.

  • (A)
    HTTP GET request, DNS query, TCP SYN
  • (B)
    DNS query, HTTP GET request, TCP SYN
  • (C)
    DNS query, TCP SYN, HTTP GET request
  • (D)
    TCP SYN, DNS query, HTTP GET request

Answer (official key): C

Worked solution: in your report after you take this paper.

Q14 · Databases · MCQ · 1 mark

Suppose a database schedule SS involves transactions T1,…,TnT_1,\ldots,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?

  • (A)
    Topological order
  • (B)
    Depth-first order
  • (C)
    Breadth-first order
  • (D)
    Ascending order of transaction indices

Answer (official key): A

Worked solution: in your report after you take this paper.

Q15 · Programming and Data Structures · MCQ · 1 mark

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
  • Θ(N)\Theta(N) decrease-key

What is the time complexity of all these operations put together?

  • (A)
    O(log⁡2N)O(\log^2 N)
  • (B)
    O(N)O(N)
  • (C)
    O(N2)O(N^2)
  • (D)
    Θ(N2log⁡N)\Theta(N^2\log N)

Answer (official key): C

Worked solution: in your report after you take this paper.

Q16 · Computer Organization and Architecture · Numerical · 1 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 __________.

Answer (official key): -1

Worked solution: in your report after you take this paper.

Q17 · Computer Networks · MCQ · 1 mark

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

  • (A)
    A station stops to sense the channel once it starts transmitting a frame.
  • (B)
    The purpose of the jamming signal is to pad the frames that are smaller than the minimum frame size.
  • (C)
    A station continues to transmit the packet even after the collision is detected.
  • (D)
    The exponential backoff mechanism reduces the probability of collision on retransmissions.

Answer (official key): D

Worked solution: in your report after you take this paper.

Q18 · Calculus · Numerical · 1 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 __________.

Answer (official key): 9

Worked solution: in your report after you take this paper.

Q19 · Algorithms · Numerical · 1 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 __________.

Answer (official key): 31

Worked solution: in your report after you take this paper.

Q20 · Digital Logic · MCQ · 1 mark

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?

  • (A)
    x1x2x3x4=0x_1x_2x_3x_4=0
  • (B)
    x1x3+x2=0x_1x_3+x_2=0
  • (C)
    x1‾⊕x3‾=x2‾⊕x4‾\overline{x_1}\oplus\overline{x_3}=\overline{x_2}\oplus\overline{x_4}
  • (D)
    x1+x2+x3+x4=0x_1+x_2+x_3+x_4=0

Answer (official key): C

Worked solution: in your report after you take this paper.

Q21 · Theory of Computation · MCQ · 1 mark

Language L1L_1 is defined by the grammar:

S1→aS1b∣ϵS_1 \to aS_1b \mid \epsilon

Language L2L_2 is defined by the grammar:

S2→abS2∣ϵS_2 \to abS_2 \mid \epsilon

Consider the following statements:

P: L1L_1 is regular.

Q: L2L_2 is regular.

Which one of the following is TRUE?

  • (A)
    Both P and Q are true
  • (B)
    P is true and Q is false
  • (C)
    P is false and Q is true
  • (D)
    Both P and Q are false

Answer (official key): C

Worked solution: in your report after you take this paper.

Q22 · Algorithms · MCQ · 1 mark

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

  • (A)
    Greedy paradigm
  • (B)
    Divide-and-Conquer paradigm
  • (C)
    Dynamic Programming paradigm
  • (D)
    neither Greedy nor Divide-and-Conquer nor Dynamic Programming paradigm

Answer (official key): C

Worked solution: in your report after you take this paper.

Q23 · Computer Organization and Architecture · Numerical · 1 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 __________.

Answer (official key): 16

Worked solution: in your report after you take this paper.

Q24 · Computer Networks · MCQ · 1 mark

Anarkali digitally signs a message and sends it to Salim.

Verification of the signature by Salim requires:

  • (A)
    Anarkali's public key
  • (B)
    Salim's public key
  • (C)
    Salim's private key
  • (D)
    Anarkali's private key

Answer (official key): A

Worked solution: in your report after you take this paper.

Q25 · Databases · MCQ · 1 mark

B+ Trees are considered balanced because:

  • (A)
    the lengths of the paths from the root to all leaf nodes are all equal.
  • (B)
    the lengths of the paths from the root to all leaf nodes differ from each other by at most 1.
  • (C)
    the number of children of any two non-leaf sibling nodes differ by at most 1.
  • (D)
    the number of records in any two leaf nodes differ by at most 1.

Answer (official key): A

Worked solution: in your report after you take this paper.

Q26 · Computer Organization and Architecture · Numerical · 1 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 __________.

Answer (official key): 1

Worked solution: in your report after you take this paper.

Q27 · Linear Algebra · MCQ · 1 mark

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?

  • (A)
    I, II and III are true
  • (B)
    Only II and III are true
  • (C)
    Only III is true
  • (D)
    None of them is true

Answer (official key): C

Worked solution: in your report after you take this paper.

Q28 · Discrete Mathematics · Numerical · 1 mark

Consider the following expressions:

(i) false

(ii) QQ

(iii) true

(iv) P∨QP \vee Q

(v) ¬Q∨P\neg Q \vee P

The number of expressions given above that are logically implied by

P∧(P⇒Q)P \wedge (P \Rightarrow Q)

is __________.

Answer (official key): 4

Worked solution: in your report after you take this paper.

Q29 · Discrete Mathematics · Numerical · 1 mark

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

Answer (official key): 4

Worked solution: in your report after you take this paper.

Q30 · Programming and Data Structures · Numerical · 1 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);
}

Answer (official key): 30

Worked solution: in your report after you take this paper.

Q31 · Theory of Computation · Numerical · 1 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 __________.

Answer (official key): 2

Worked solution: in your report after you take this paper.

Q32 · Algorithms · MCQ · 1 mark

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.

  • (A)
    I and II only
  • (B)
    I and III only
  • (C)
    II and IV only
  • (D)
    I and IV only

Answer (official key): D

Worked solution: in your report after you take this paper.

Q33 · Probability and Statistics · Numerical · 1 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 __________.

Answer (official key): 0.55

Worked solution: in your report after you take this paper.

Q34 · Operating System · MCQ · 1 mark

In which one of the following page replacement algorithms is it possible for the page fault rate to increase even when the number of allocated frames increases?

  • (A)
    LRU (Least Recently Used)
  • (B)
    OPT (Optimal Page Replacement)
  • (C)
    MRU (Most Recently Used)
  • (D)
    FIFO (First In First Out)

Answer (official key): D

Worked solution: in your report after you take this paper.

Q35 · Compiler Design · MCQ · 1 mark

Match the following:

ItemDescription
(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
  • (A)
    P ↔ i, Q ↔ ii, R ↔ iv, S ↔ iii
  • (B)
    P ↔ iii, Q ↔ i, R ↔ ii, S ↔ iv
  • (C)
    P ↔ ii, Q ↔ iii, R ↔ i, S ↔ iv
  • (D)
    P ↔ iv, Q ↔ i, R ↔ ii, S ↔ iii

Answer (official key): B

Worked solution: in your report after you take this paper.

Q36 · Computer Organization and Architecture · Numerical · 2 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,
  • 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 consumed by the program text is __________ bytes.

Answer (official key): 500

Worked solution: in your report after you take this paper.

Q37 · Discrete Mathematics · MCQ · 2 marks

A binary relation RR on N×N\mathbb{N}\times\mathbb{N} is defined as follows:

(a,b)R(c,d)if a≤c or b≤d.(a,b)R(c,d) \quad \text{if } a \le c \text{ or } b \le d.

Consider the following propositions:

P: RR is reflexive.

Q: RR is transitive.

Which one of the following statements is TRUE?

  • (A)
    Both P and Q are true.
  • (B)
    P is true and Q is false.
  • (C)
    P is false and Q is true.
  • (D)
    Both P and Q are false.

Answer (official key): B

Worked solution: in your report after you take this paper.

Q38 · Algorithms · MCQ · 2 marks

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?

  • (A)
    Θ(n2)\Theta(n^2)
  • (B)
    Θ(n+m)\Theta(n+m)
  • (C)
    Θ(m2)\Theta(m^2)
  • (D)
    Θ(n4)\Theta(n^4)

Answer (official key): B

Worked solution: in your report after you take this paper.

Q39 · Programming and Data Structures · Numerical · 2 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 xx and yy.

The value printed by this program is __________.

Answer (official key): 3

Worked solution: in your report after you take this paper.

Q40 · Programming and Data Structures · MCQ · 2 marks

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:

  • (A)
    + - 1 6 7 * 2 ^ 5 - 3 4 *
  • (B)
    - + 1 * 6 7 ^ 2 - 5 * 3 4
  • (C)
    - + 1 * 7 6 ^ 2 - 5 * 4 3
  • (D)
    1 7 6 * + 2 5 4 3 * - ^ -

Answer (official key): C

Worked solution: in your report after you take this paper.

Q41 · Programming and Data Structures · Numerical · 2 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 __________.

Answer (official key): 8

Worked solution: in your report after you take this paper.

Q42 · Theory of Computation · MCQ · 2 marks

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?

  • (A)
    Only I is true
  • (B)
    Only II is true
  • (C)
    Both I and II are true
  • (D)
    Both I and II are false

Answer (official key): B

Worked solution: in your report after you take this paper.

Q43 · Computer Organization and Architecture · Numerical · 2 marks

Suppose the functions FF and GG can be computed in 5 and 3 nanoseconds by functional units UFUF and UGUG, respectively.

Given two instances of UFUF and two instances of UGUG, it is required to implement the computation

F(G(Xi))for 1≤i≤10.F(G(X_i)) \quad \text{for } 1 \le i \le 10.

Ignoring all other delays, the minimum time required to complete this computation is __________ nanoseconds.

Answer (official key): 28

Worked solution: in your report after you take this paper.

Q44 · Discrete Mathematics · MCQ · 2 marks

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-S reacts with an odd number of compounds.

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

III. Each compound in U−SU-S reacts with an even number of compounds.

Which one of the above statements is ALWAYS TRUE?

  • (A)
    Only I
  • (B)
    Only II
  • (C)
    Only III
  • (D)
    None

Answer (official key): B

Worked solution: in your report after you take this paper.

Q45 · Discrete Mathematics · MCQ · 2 marks

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

  • (A)
    (∀x p(x)⇒∀x q(x))⇒(∃x¬p(x)∨∀x q(x))(\forall x\ p(x) \Rightarrow \forall x\ q(x)) \Rightarrow (\exists x\neg p(x) \vee \forall x\ q(x))
  • (B)
    (∃x p(x)∨∃x q(x))⇒∃x(p(x)∨q(x))(\exists x\ p(x) \vee \exists x\ q(x)) \Rightarrow \exists x(p(x) \vee q(x))
  • (C)
    ∃x(p(x)∧q(x))⇒(∃x p(x)∧∃x q(x))\exists x(p(x)\wedge q(x)) \Rightarrow (\exists x\ p(x)\wedge \exists x\ q(x))
  • (D)
    ∀x(p(x)∨q(x))⇒(∀x p(x)∨∀x q(x))\forall x(p(x)\vee q(x)) \Rightarrow (\forall x\ p(x)\vee \forall x\ q(x))

Answer (official key): D

Worked solution: in your report after you take this paper.

Q46 · Computer Organization and Architecture · Numerical · 2 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.

Answer (official key): 24

Worked solution: in your report after you take this paper.

Q47 · Programming and Data Structures · MCQ · 2 marks

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?

  • (A)
    XY=abX^Y = a^b
  • (B)
    (res×a)Y=(res×X)b(res \times a)^Y = (res \times X)^b
  • (C)
    XY=res×abX^Y = res \times a^b
  • (D)
    XY=(res×a)bX^Y = (res \times a)^b

Answer (official key): C

Worked solution: in your report after you take this paper.

Q48 · Programming and Data Structures · Numerical · 2 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.

Answer (official key): 64

Worked solution: in your report after you take this paper.

Q49 · Algorithms · Numerical · 2 marks

Let A1,A2,A3A_1,A_2,A_3, and A4A_4 be four matrices of dimensions

10×5,5×20,20×10,10×510\times5,\quad 5\times20,\quad 20\times10,\quad 10\times5

respectively.

The minimum number of scalar multiplications required to find the product

A1A2A3A4A_1A_2A_3A_4

using the basic matrix multiplication method is __________.

Answer (official key): 1500

Worked solution: in your report after you take this paper.

Q50 · Algorithms · Numerical · 2 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.

Flowchart for recursive function A(n)

If the worst-case time complexity of this function is O(nα)O(n^\alpha), then the least possible value of α\alpha, accurate up to two decimal places, is __________.

Answer (official key): 2.2 to 2.4

Read the worked solution

Q51 · Discrete Mathematics · Numerical · 2 marks

The value of the expression

1399 mod 1713^{99} \bmod 17

in the range 0 to 16 is __________.

Answer (official key): 4

Worked solution: in your report after you take this paper.

Q52 · Computer Organization and Architecture · Numerical · 2 marks

Consider a 3 GHz processor with a three-stage pipeline and stage latencies τ1,τ2,τ3\tau_1,\tau_2,\tau_3 such that

τ1=3τ24=2τ3.\tau_1=\frac{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.

Answer (official key): 3.9 to 4.1

Worked solution: in your report after you take this paper.

Q53 · Operating System · MCQ · 2 marks

Consider the following two-process synchronization solution.

Process 0:

Entry: loop while (turn == 1);
       critical section
Exit:  turn = 1;

Process 1:

Entry: loop while (turn == 0);
       critical section
Exit:  turn = 0;

The shared variable turn is initialized to zero.

Which one of the following is TRUE?

  • (A)
    This is a correct two-process synchronization solution.
  • (B)
    This solution violates mutual exclusion requirement.
  • (C)
    This solution violates progress requirement.
  • (D)
    This solution violates bounded wait requirement.

Answer (official key): C

Worked solution: in your report after you take this paper.

Q54 · Operating System · Numerical · 2 marks

A file system uses an in-memory cache to cache disk blocks.

The miss rate of the cache is shown in the figure below. 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.

Cache miss rate graph for Q50

The smallest cache size required to ensure an average read latency of less than 6 ms is __________ MB.

Answer (official key): 30

Worked solution: in your report after you take this paper.

Q55 · Computer Networks · Numerical · 2 marks

A network has a data transmission bandwidth of

20×10620\times10^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.

Answer (official key): 200

Worked solution: in your report after you take this paper.

Q56 · Theory of Computation · MCQ · 2 marks

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 } \epsilon\}

where for each Turing machine MM, ⟨M⟩\langle M\rangle denotes a specific encoding of MM.

Which one of the following is TRUE?

  • (A)
    L1L_1 is recursive and L2,L3L_2,L_3 are not recursive.
  • (B)
    L2L_2 is recursive and L1,L3L_1,L_3 are not recursive.
  • (C)
    L1,L2L_1,L_2 are recursive and L3L_3 is not recursive.
  • (D)
    L1,L2,L3L_1,L_2,L_3 are recursive.

Answer (official key): C

Worked solution: in your report after you take this paper.

Q57 · Computer Networks · Numerical · 2 marks

Consider a

128×103128\times10^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 __________.

Answer (official key): 4

Worked solution: in your report after you take this paper.

Q58 · Compiler Design · MCQ · 2 marks

A student wrote two context-free grammars G1G_1 and G2G_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 G1G_1:

D→int L ;D\to int\ L\ ; L→id[EL\to id[E E→num]E\to num] E→num][EE\to num][E

Grammar G2G_2:

D→int L ;D\to int\ L\ ; L→idEL\to idE E→E[num]E\to E[num] E→[num]E\to [num]

Which of the grammars correctly generate the declaration mentioned above?

  • (A)
    Both G1G_1 and G2G_2
  • (B)
    Only G1G_1
  • (C)
    Only G2G_2
  • (D)
    Neither G1G_1 nor G2G_2

Answer (official key): A

Worked solution: in your report after you take this paper.

Q59 · Computer Networks · MCQ · 2 marks

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.

  • (A)
    All I, II, and III
  • (B)
    I and III only
  • (C)
    II and III only
  • (D)
    II only

Answer (official key): B

Worked solution: in your report after you take this paper.

Q60 · Databases · MCQ · 2 marks

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 transaction 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?

  • (A)
    SS is non-recoverable.
  • (B)
    SS is recoverable, but has a cascading abort.
  • (C)
    SS does not have a cascading abort.
  • (D)
    SS is strict.

Answer (official key): C

Worked solution: in your report after you take this paper.

Q61 · Operating System · Numerical · 2 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)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 __________.

Answer (official key): 7

Read the worked solution

Q62 · Databases · Numerical · 2 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
),
total_avg(capacity) AS (
  SELECT AVG(capacity)
  FROM total
)
SELECT name
FROM total, total_avg
WHERE total.capacity >= total_avg.capacity;

Answer (official key): 2

Read the worked solution

Q63 · Theory of Computation · MCQ · 2 marks

Consider the following languages:

L1={anbmcn+m∣m,n≥1}L_1=\{a^n b^m c^{n+m}\mid m,n\ge1\} L2={anbnc2n∣n≥1}L_2=\{a^n b^n c^{2n}\mid n\ge1\}

Which one of the following is TRUE?

  • (A)
    Both L1L_1 and L2L_2 are context-free.
  • (B)
    L1L_1 is context-free while L2L_2 is not context-free.
  • (C)
    L2L_2 is context-free while L1L_1 is not context-free.
  • (D)
    Neither L1L_1 nor L2L_2 is context-free.

Answer (official key): B

Worked solution: in your report after you take this paper.

Q64 · Operating System · Numerical · 2 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.

Answer (official key): 8.2 to 8.3

Worked solution: in your report after you take this paper.

Q65 · Compiler Design · MCQ · 2 marks

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

  • (A)
    S→ABS\to AB, A→Aa∣bA\to Aa\mid b, B→cB\to c
  • (B)
    S→Ab∣Bb∣cS\to Ab\mid Bb\mid c, A→Bd∣ϵA\to Bd\mid \epsilon, B→eB\to e
  • (C)
    S→Aa∣BS\to Aa\mid B, A→Bb∣Sc∣ϵA\to Bb\mid Sc\mid \epsilon, B→dB\to d
  • (D)
    S→Aa∣Bb∣cS\to Aa\mid Bb\mid c, A→Bd∣ϵA\to Bd\mid \epsilon, B→Ae∣ϵB\to Ae\mid \epsilon

Answer (official key): B

Worked solution: in your report after you take this paper.