GATE 2014 CS (Set 3)

All 65 questions of GATE 2014 CS (Set 3)

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

Choose the word that is opposite in meaning to the word coherent.

  • (A)
    sticky
  • (B)
    well-connected
  • (C)
    rambling
  • (D)
    friendly

Answer (official key): C

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

Q2 · General Aptitude · MCQ · 1 mark

The table below has question-wise data on the performance of students in an examination. The marks for each question are also listed. There is no negative or partial marking in the examination.

Q No.MarksAnswered CorrectlyAnswered WronglyNot Attempted
1221176
2315272
3223183

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

  • (A)
    1.34
  • (B)
    1.74
  • (C)
    3.02
  • (D)
    3.91

Answer (official key): C

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

Q3 · General Aptitude · MCQ · 1 mark

While trying to collect an envelope from under the table, Mr. X fell down and was losing consciousness.

Which one of the following parts of the sentence is NOT appropriate?

  • (A)
    trying to collect
  • (B)
    from under the table
  • (C)
    fell down
  • (D)
    was losing consciousness

Answer (official key): D

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

Q4 · General Aptitude · MCQ · 1 mark

If she _______________ how to calibrate the instrument, she _______________ done the experiment.

  • (A)
    knows, will have
  • (B)
    knew, had
  • (C)
    had known, could have
  • (D)
    should have known, would have

Answer (official key): C

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

Q5 · General Aptitude · MCQ · 1 mark

Which number does not belong in the series below?

2, 5, 10, 17, 26, 37, 50, 642,\ 5,\ 10,\ 17,\ 26,\ 37,\ 50,\ 64
  • (A)
    17
  • (B)
    37
  • (C)
    64
  • (D)
    26

Answer (official key): C

Read the worked solution

Q6 · General Aptitude · MCQ · 2 marks

By the beginning of the 20th century, several hypotheses were being proposed, suggesting a paradigm shift in our understanding of the universe. However, the clinching evidence was provided by experimental measurements of the position of a star which was directly behind our sun.

Which of the following inference(s) may be drawn from the above passage?

(i) Our understanding of the universe changes based on the positions of stars.
(ii) Paradigm shifts usually occur at the beginning of centuries.
(iii) Stars are important objects in the universe.
(iv) Experimental evidence was important in confirming this paradigm shift.

  • (A)
    (i), (ii) and (iv)
  • (B)
    (iii) only
  • (C)
    (i) and (iv)
  • (D)
    (iv) only

Answer (official key): D

Read the worked solution

Q7 · General Aptitude · MCQ · 2 marks

The Gross Domestic Product (GDP) in Rupees grew at 7% during 2012–2013. For international comparison, the GDP is compared in US Dollars (USD) after conversion based on the market exchange rate. During the period 2012–2013, the exchange rate for the USD increased from Rs. 50/USD to Rs. 60/USD.

India's GDP in USD during the period 2012–2013

  • (A)
    increased by 5%
  • (B)
    decreased by 13%
  • (C)
    decreased by 20%
  • (D)
    decreased by 11%

Answer (official key): D

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

Q8 · General Aptitude · MCQ · 2 marks

The ratio of male to female students in a college for five years is plotted in the following line graph.

Ratio graph for GA Q9

If the number of female students in 2011 and 2012 is equal, what is the ratio of male students in 2012 to male students in 2011?

  • (A)
    1:1
  • (B)
    2:1
  • (C)
    1.5:1
  • (D)
    2.5:1

Answer (official key): C

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

Q9 · General Aptitude · MCQ · 2 marks

A dance programme is scheduled for 10.00 a.m. Some students are participating in the programme and they need to come an hour earlier than the start of the event. These students should be accompanied by a parent. Other students and parents should come in time for the programme.

The instruction you think that is appropriate for this is:

  • (A)
    Students should come at 9.00 a.m. and parents should come at 10.00 a.m.
  • (B)
    Participating students should come at 9.00 a.m. accompanied by a parent, and other parents and students should come by 10.00 a.m.
  • (C)
    Students who are not participating should come by 10.00 a.m. and they should not bring their parents. Participating students should come at 9.00 a.m.
  • (D)
    Participating students should come before 9.00 a.m. Parents who accompany them should come at 9.00 a.m. All others should come at 10.00 a.m.

Answer (official key): B

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

Q10 · General Aptitude · MCQ · 2 marks

Consider the equation:

(7526)8−(Y)8=(4364)8(7526)_8 - (Y)_8 = (4364)_8

where (X)N(X)_N stands for XX to the base NN.

Find YY.

  • (A)
    1634
  • (B)
    1737
  • (C)
    3142
  • (D)
    3162

Answer (official key): C

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

Q11 · Programming and Data Structures · Numerical · 1 mark

The minimum number of arithmetic operations required to evaluate the polynomial

P(X)=X5+4X3+6X+5P(X)=X^5+4X^3+6X+5

for a given value of XX, using only one temporary variable is __________.

Answer (official key): 7

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

Q12 · Algorithms · Numerical · 1 mark

Suppose depth first search is executed on the graph below starting at some unknown vertex. Assume that a recursive call to visit a vertex is made only after first checking that the vertex has not been visited earlier.

DFS graph for CS Q13

Then the maximum possible recursion depth, including the initial call, is __________.

Answer (official key): 19

Read the worked solution

Q13 · Compiler Design · MCQ · 1 mark

Which of the following statements are CORRECT?

  1. Static allocation of all data areas by a compiler makes it impossible to implement recursion.
  2. Automatic garbage collection is essential to implement recursion.
  3. Dynamic allocation of activation records is essential to implement recursion.
  4. Both heap and stack are essential to implement recursion.
  • (A)
    1 and 2 only
  • (B)
    2 and 3 only
  • (C)
    3 and 4 only
  • (D)
    1 and 3 only

Answer (official key): D

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

Q14 · Computer Networks · MCQ · 1 mark

Host A, on TCP/IP v4 network A, sends an IP datagram DD to host B, also on TCP/IP v4 network B. Assume that no error occurred during the transmission of DD.

When DD reaches B, which of the following IP header field(s) may be different from that of the original datagram DD?

(i) TTL
(ii) Checksum
(iii) Fragment Offset

  • (A)
    (i) only
  • (B)
    (i) and (ii) only
  • (C)
    (ii) and (iii) only
  • (D)
    (i), (ii) and (iii)

Answer (official key): D

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

Q15 · Databases · MCQ · 1 mark

What is the optimized version of the relational algebra expression:

πA1(πA2(σF1(σF2(r))))\pi_{A1}(\pi_{A2}(\sigma_{F1}(\sigma_{F2}(r))))

where A1,A2A1,A2 are sets of attributes in rr with A1⊂A2A1\subset A2 and F1,F2F1,F2 are Boolean expressions based on the attributes in rr?

  • (A)
    πA1(σF1∧F2(r))\pi_{A1}(\sigma_{F1\land F2}(r))
  • (B)
    πA1(σF1∨F2(r))\pi_{A1}(\sigma_{F1\lor F2}(r))
  • (C)
    πA2(σF1∧F2(r))\pi_{A2}(\sigma_{F1\land F2}(r))
  • (D)
    πA2(σF1∨F2(r))\pi_{A2}(\sigma_{F1\lor F2}(r))

Answer (official key): A

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

Q16 · Theory of Computation · Numerical · 1 mark

The length of the shortest string NOT in the language over Σ={a,b}\Sigma=\{a,b\} of the following regular expression is __________.

a∗b∗(ba)∗a∗a^*b^*(ba)^*a^*

Answer (official key): 3

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

Q17 · Theory of Computation · MCQ · 1 mark

Let Σ\Sigma be a finite non-empty alphabet and let 2Σ∗2^{\Sigma^*} be the power set of Σ∗\Sigma^*. Which one of the following is TRUE?

  • (A)
    Both 2Σ∗2^{\Sigma^*} and Σ∗\Sigma^* are countable
  • (B)
    2Σ∗2^{\Sigma^*} is countable and Σ∗\Sigma^* is uncountable
  • (C)
    2Σ∗2^{\Sigma^*} is uncountable and Σ∗\Sigma^* is countable
  • (D)
    Both 2Σ∗2^{\Sigma^*} and Σ∗\Sigma^* are uncountable

Answer (official key): C

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

Q18 · Computer Networks · MCQ · 1 mark

Not in GATE 2027 syllabus: Framing (data link layer)

A bit-stuffing based framing protocol uses an 8-bit delimiter pattern of 01111110. If the output bit-string after stuffing is:

01111100101

then the input bit-string is:

  • (A)
    0111110100
  • (B)
    0111110101
  • (C)
    0111111101
  • (D)
    0111111111

Answer (official key): B

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

Q19 · Compiler Design · MCQ · 1 mark

One of the purposes of using intermediate code in compilers is to:

  • (A)
    make parsing and semantic analysis simpler.
  • (B)
    improve error recovery and error reporting.
  • (C)
    increase the chances of reusing the machine-independent code optimizer in other compilers.
  • (D)
    improve the register allocation.

Answer (official key): C

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

Q20 · Computer Organization and Architecture · MCQ · 1 mark

Consider the following processors. Assume that the pipeline registers have zero latency.

  • P1: Four-stage pipeline with stage latencies 1 ns, 2 ns, 2 ns, 1 ns.
  • P2: Four-stage pipeline with stage latencies 1 ns, 1.5 ns, 1.5 ns, 1.5 ns.
  • P3: Five-stage pipeline with stage latencies 0.5 ns, 1 ns, 1 ns, 0.6 ns, 1 ns.
  • P4: Five-stage pipeline with stage latencies 0.5 ns, 0.5 ns, 1 ns, 1 ns, 1.1 ns.

Which processor has the highest peak clock frequency?

  • (A)
    P1
  • (B)
    P2
  • (C)
    P3
  • (D)
    P4

Answer (official key): C

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

Q21 · Discrete Mathematics · MCQ · 1 mark

Let XX and YY be finite sets and let f:X→Yf:X\to Y be a function. Which one of the following statements is TRUE?

  • (A)
    For any subsets AA and BB of XX, ∣f(A∪B)∣=∣f(A)∣+∣f(B)∣|f(A\cup B)|=|f(A)|+|f(B)|
  • (B)
    For any subsets AA and BB of XX, f(A∩B)=f(A)∩f(B)f(A\cap B)=f(A)\cap f(B)
  • (C)
    For any subsets AA and BB of XX, ∣f(A∩B)∣=min⁡{∣f(A)∣,∣f(B)∣}|f(A\cap B)|=\min\{|f(A)|,|f(B)|\}
  • (D)
    For any subsets SS and TT of YY, f−1(S∩T)=f−1(S)∩f−1(T)f^{-1}(S\cap T)=f^{-1}(S)\cap f^{-1}(T)

Answer (official key): D

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

Q22 · Discrete Mathematics · MCQ · 1 mark

Consider the following statements:

  • P: Good mobile phones are not cheap.
  • Q: Cheap mobile phones are not good.

Let:

  • L: P implies Q
  • M: Q implies P
  • N: P is equivalent to Q

Which one of the following about L, M, and N is CORRECT?

  • (A)
    Only L is TRUE.
  • (B)
    Only M is TRUE.
  • (C)
    Only N is TRUE.
  • (D)
    L, M and N are TRUE.

Answer (official key): D

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

Q23 · Computer Networks · MCQ · 1 mark

In the following pairs of OSI protocol layer/sub-layer and its functionality, the INCORRECT pair is:

  • (A)
    Network layer and Routing
  • (B)
    Data Link Layer and Bit synchronization
  • (C)
    Transport layer and End-to-end process communication
  • (D)
    Medium Access Control sub-layer and Channel sharing

Answer (official key): B

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

Q24 · Calculus · Numerical · 1 mark

If V1V_1 and V2V_2 are 4-dimensional subspaces of a 6-dimensional vector space VV, then the smallest possible dimension of V1∩V2V_1\cap V_2 is __________.

Answer (official key): 2

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

Q25 · Operating System · Numerical · 1 mark

A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty.

What is the total number of page faults that will occur while processing the page reference string given below?

4, 7, 6, 1, 7, 6, 1, 2, 7, 24,\ 7,\ 6,\ 1,\ 7,\ 6,\ 1,\ 2,\ 7,\ 2

Answer (official key): 6

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

Q26 · Databases · MCQ · 1 mark

A prime attribute of a relation scheme RR is an attribute that appears:

  • (A)
    in all candidate keys of RR
  • (B)
    in some candidate key of RR
  • (C)
    in a foreign key of RR
  • (D)
    only in the primary key of RR

Answer (official key): B

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

Q27 · Digital Logic · MCQ · 1 mark

Consider the following combinational function block involving four Boolean variables x,y,a,bx,y,a,b, where x,a,bx,a,b are inputs and yy is the output.

f(x, y, a, b)
{
    if (x is 1) y = a;
    else y = b;
}

Which one of the following digital logic blocks is the most suitable for implementing this function?

  • (A)
    Full adder
  • (B)
    Priority encoder
  • (C)
    Multiplexer
  • (D)
    Flip-flop

Answer (official key): C

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

Q28 · Programming and Data Structures · MCQ · 1 mark

Let AA be a square matrix of size n×nn\times n. Consider the following pseudocode.

C = 100;
for i = 1 to n do
  for j = 1 to n do
  {
    Temp = A[i][j] + C;
    A[i][j] = A[j][i];
    A[j][i] = Temp - C;
  }

for i = 1 to n do
  for j = 1 to n do
    output(A[i][j]);

What is the expected output?

  • (A)
    The matrix AA itself
  • (B)
    Transpose of the matrix AA
  • (C)
    Adding 100 to the upper diagonal elements and subtracting 100 from lower diagonal elements of AA
  • (D)
    None of the above

Answer (official key): A

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

Q29 · Linear Algebra · MCQ · 1 mark

Which one of the following statements is TRUE about every n×nn\times n matrix with only real eigenvalues?

  • (A)
    If the trace of the matrix is positive and the determinant of the matrix is negative, at least one of its eigenvalues is negative.
  • (B)
    If the trace of the matrix is positive, all its eigenvalues are positive.
  • (C)
    If the determinant of the matrix is positive, all its eigenvalues are positive.
  • (D)
    If the product of the trace and determinant of the matrix is positive, all its eigenvalues are positive.

Answer (official key): A

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

Q30 · Programming and Data Structures · MCQ · 1 mark

Consider the following rooted tree with the vertex labeled PP as the root.

Rooted tree for CS Q12

The order in which the nodes are visited during an in-order traversal of the tree is:

  • (A)
    SQPTRWUV
  • (B)
    SQPTUWRV
  • (C)
    SQPTWUVR
  • (D)
    SQPTRUWV

Answer (official key): A

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

Q31 · Discrete Mathematics · Numerical · 1 mark

Let GG be a group with 15 elements. Let LL be a subgroup of GG. It is known that L≠GL\ne G and that the size of LL is at least 4.

The size of LL is __________.

Answer (official key): 5

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

Q32 · Calculus · Numerical · 1 mark

If

∫02π∣xsin⁡x∣ dx=kπ,\int_0^{2\pi} |x\sin x|\,dx = k\pi,

then the value of kk is equal to __________.

Answer (official key): 4

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

Q33 · Algorithms · MCQ · 1 mark

You have an array of nn elements. Suppose you implement quicksort by always choosing the central element of the array as the pivot. Then the tightest upper bound for the worst-case performance is:

  • (A)
    O(n2)O(n^2)
  • (B)
    O(nlog⁡n)O(n\log n)
  • (C)
    Θ(nlog⁡n)\Theta(n\log n)
  • (D)
    O(n3)O(n^3)

Answer (official key): A

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

Q34 · Programming and Data Structures · MCQ · 1 mark

In the context of modular software design, which one of the following combinations is desirable?

  • (A)
    High cohesion and high coupling
  • (B)
    High cohesion and low coupling
  • (C)
    Low cohesion and high coupling
  • (D)
    Low cohesion and low coupling

Answer (official key): B

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

Q35 · Digital Logic · MCQ · 1 mark

Consider the following minterm expression for FF:

F(P,Q,R,S)=Σ(0,2,5,7,8,10,13,15)F(P,Q,R,S)=\Sigma(0,2,5,7,8,10,13,15)

The minterms 2,7,82,7,8 and 1313 are do-not-care terms. The minimal sum-of-products form for FF is:

  • (A)
    QS′+Q′SQS' + Q'S
  • (B)
    Q′S′+QSQ'S' + QS
  • (C)
    Q′R′S′+Q′RS′+QR′S+QRSQ'R'S' + Q'RS' + QR'S + QRS
  • (D)
    P′Q′S′+P′QS+PQS+PQ′S′P'Q'S' + P'QS + PQS + PQ'S'

Answer (official key): B

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

Q36 · Databases · MCQ · 2 marks

Consider the relational schema given below, where eId of the relation dependent is a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation.

employee(empId, empName, empAge)

dependent(depId, eId, depName, depAge)

Consider the following relational algebra query:

πempId(employee)−πempId(employee⋈(empId=eId)∧(empAge≤depAge)dependent)\pi_{empId}(employee) - \pi_{empId} \left( employee \bowtie_{(empId=eId)\land(empAge \le depAge)} dependent \right)

The above query evaluates to the set of empIds of employees whose age is greater than that of:

  • (A)
    some dependent.
  • (B)
    all dependents.
  • (C)
    some of his/her dependents.
  • (D)
    all of his/her dependents.

Answer (official key): D

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

Q37 · Theory of Computation · MCQ · 2 marks

Which one of the following problems is undecidable?

  • (A)
    Deciding if a given context-free grammar is ambiguous.
  • (B)
    Deciding if a given string is generated by a given context-free grammar.
  • (C)
    Deciding if the language generated by a given context-free grammar is empty.
  • (D)
    Deciding if the language generated by a given context-free grammar is finite.

Answer (official key): A

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

Q38 · Computer Networks · Numerical · 2 marks

An IP router implementing Classless Inter-Domain Routing (CIDR) receives a packet with address 131.23.151.76. The router's routing table has the following entries:

PrefixOutput Interface Identifier
131.16.0.0/123
131.28.0.0/145
131.19.0.0/162
131.22.0.0/151

The identifier of the output interface on which this packet will be forwarded is __________.

(Answer in integer)

Answer (official key): 1

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

Q39 · Discrete Mathematics · MCQ · 2 marks

Let δ\delta denote the minimum degree of a vertex in a graph. For all planar graphs on nn vertices with δ≥3\delta \ge 3, which one of the following is TRUE?

  • (A)
    In any planar embedding, the number of faces is at least n2+2\frac{n}{2}+2.
  • (B)
    In any planar embedding, the number of faces is less than n2+2\frac{n}{2}+2.
  • (C)
    There is a planar embedding in which the number of faces is less than n2+2\frac{n}{2}+2.
  • (D)
    There is a planar embedding in which the number of faces is at most nδ+1\frac{n}{\delta+1}.

Answer (official key): A

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

Q40 · Operating System · Numerical · 2 marks

Consider a paging hardware with a TLB. Assume that the entire page table and all the pages are in the physical memory. It takes 10 milliseconds to search the TLB and 80 milliseconds to access the physical memory. If the TLB hit ratio is 0.6, the effective memory access time, in milliseconds, is __________.

(Answer in integer)

Answer (official key): 122

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

Q41 · Computer Organization and Architecture · Numerical · 2 marks

The memory access time is 1 nanosecond for a read operation with a hit in cache, 5 nanoseconds for a read operation with a miss in cache, 2 nanoseconds for a write operation with a hit in cache, and 10 nanoseconds for a write operation with a miss in cache.

Execution of a sequence of instructions involves:

  • 100 instruction fetch operations
  • 60 memory operand read operations
  • 40 memory operand write operations

The cache hit ratio is 0.9. The average memory access time, in nanoseconds, in executing the sequence of instructions is __________.

(Round off to two decimal places)

Answer (official key): 1.68

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

Q42 · Programming and Data Structures · MCQ · 2 marks

Consider a hash table with 100 slots. Collisions are resolved using chaining. Assuming simple uniform hashing, what is the probability that the first 3 slots are unfilled after the first 3 insertions?

  • (A)
    97×97×971003\frac{97\times97\times97}{100^3}
  • (B)
    99×98×971003\frac{99\times98\times97}{100^3}
  • (C)
    97×96×951003\frac{97\times96\times95}{100^3}
  • (D)
    97×96×953!×1003\frac{97\times96\times95}{3!\times100^3}

Answer (official key): A

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

Q43 · Programming and Data Structures · Numerical · 2 marks

Suppose we have a balanced binary search tree TT holding nn numbers. We are given two numbers LL and HH and wish to sum up all the numbers in TT that lie between LL and HH.

Suppose there are mm such numbers in TT. If the tightest upper bound on the time to compute the sum is

O(nalog⁡bn+mclog⁡dn),O(n^a\log^b n + m^c\log^d n),

the value of

a+10b+100c+1000da+10b+100c+1000d

is __________.

(Answer in integer)

Answer (official key): 110

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

Q44 · Databases · MCQ · 2 marks

Consider the transactions T1T_1, T2T_2, and T3T_3 and the schedules S1S_1 and S2S_2 given below.

T1: r1(X); r1(Z); w1(X); w1(Z)
T2: r2(Y); r2(Z); w2(Z)
T3: r3(Y); r3(X); w3(Y)
S1: r1(X); r3(Y); r3(X); r2(Y); r2(Z); w3(Y); w2(Z); r1(Z); w1(X); w1(Z)

S2: r1(X); r3(Y); r2(Y); r3(X); r1(Z); r2(Z); w3(Y); w1(X); w2(Z); w1(Z)

Which one of the following statements about the schedules is TRUE?

  • (A)
    Only S1S_1 is conflict-serializable.
  • (B)
    Only S2S_2 is conflict-serializable.
  • (C)
    Both S1S_1 and S2S_2 are conflict-serializable.
  • (D)
    Neither S1S_1 nor S2S_2 is conflict-serializable.

Answer (official key): A

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

Q45 · Digital Logic · MCQ · 2 marks

Let ⊕\oplus denote the Exclusive OR (XOR) operation. Let 1 and 0 denote the binary constants.

Consider the following Boolean expression for FF over two variables PP and QQ:

F(P,Q)=(((1⊕P)⊕(P⊕Q))⊕((P⊕Q)⊕(Q⊕0)))F(P,Q)= \left(((1\oplus P)\oplus(P\oplus Q))\oplus((P\oplus Q)\oplus(Q\oplus0))\right)

The equivalent expression for FF is:

  • (A)
    P+QP+Q
  • (B)
    P+Q‾\overline{P+Q}
  • (C)
    P⊕QP\oplus Q
  • (D)
    P⊕Q‾\overline{P\oplus Q}

Answer (official key): D

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

Q46 · Discrete Mathematics · MCQ · 2 marks

If GG is a forest with nn vertices and kk connected components, how many edges does GG have?

  • (A)
    ⌊n/k⌋\lfloor n/k \rfloor
  • (B)
    ⌈n/k⌉\lceil n/k \rceil
  • (C)
    n−kn-k
  • (D)
    n−k+1n-k+1

Answer (official key): C

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

Q47 · Digital Logic · MCQ · 2 marks

The synchronous sequential circuit built using JK flip-flops is shown below.

Sequential circuit for CS Q45

The circuit is initialized with Q2Q1Q0=000Q_2Q_1Q_0=000. The state sequence for this circuit for the next 3 clock cycles is:

  • (A)
    001, 010, 011
  • (B)
    111, 110, 101
  • (C)
    100, 110, 111
  • (D)
    100, 011, 001

Answer (official key): C

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

Q48 · Operating System · Numerical · 2 marks

An operating system uses shortest remaining time first scheduling algorithm for pre-emptive scheduling of processes. Consider the following set of processes with their arrival times and CPU burst times, in milliseconds.

ProcessArrival TimeBurst Time
P1012
P224
P336
P485

The average waiting time, in milliseconds, of the processes is __________.

(Round off to one decimal place)

Answer (official key): 5.5

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

Q49 · Programming and Data Structures · MCQ · 2 marks

Consider the C function given below. Assume that the array listA contains n>0n>0 elements, sorted in ascending order.

int ProcessArray(int *listA, int x, int n)
{
  int i, j, k;
  i = 0;
  j = n - 1;

  do {
    k = (i + j) / 2;

    if (x <= listA[k])
      j = k - 1;

    if (listA[k] <= x)
      i = k + 1;

  } while (i <= j);

  if (listA[k] == x)
    return k;
  else
    return -1;
}

Which one of the following statements about the function ProcessArray is CORRECT?

  • (A)
    It will run into an infinite loop when x is not in listA.
  • (B)
    It is an implementation of binary search.
  • (C)
    It will always find the maximum element in listA.
  • (D)
    It will return -1 even when x is present in listA.

Answer (official key): B

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

Q50 · Theory of Computation · MCQ · 2 marks

Consider the following languages over the alphabet Σ={0,1,c}\Sigma=\{0,1,c\}:

L1={0n1n∣n≥0}L_1=\{0^n1^n\mid n\ge0\} L2={wcwR∣w∈{0,1}∗}L_2=\{wcw^R\mid w\in\{0,1\}^*\} L3={wwR∣w∈{0,1}∗}L_3=\{ww^R\mid w\in\{0,1\}^*\}

Here, wRw^R is the reverse of the string ww. Which of these languages are deterministic context-free languages?

  • (A)
    None of the languages
  • (B)
    Only L1L_1
  • (C)
    Only L1L_1 and L2L_2
  • (D)
    All the three languages

Answer (official key): C

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

Q51 · Computer Networks · MCQ · 2 marks

An IP router with a Maximum Transmission Unit (MTU) of 1500 bytes has received an IP packet of size 4404 bytes with an IP header of length 20 bytes. The values of the relevant fields in the header of the third IP fragment generated by the router for this packet are:

  • (A)
    MF bit: 0, Datagram Length: 1444; Offset: 370
  • (B)
    MF bit: 1, Datagram Length: 1424; Offset: 185
  • (C)
    MF bit: 1, Datagram Length: 1500; Offset: 370
  • (D)
    MF bit: 0, Datagram Length: 1424; Offset: 2960

Answer (official key): A

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

Q52 · Calculus · Numerical · 2 marks

Let SS be a sample space and two mutually exclusive events AA and BB be such that

A∪B=S.A\cup B=S.

If P(⋅)P(\cdot) denotes the probability of the event, the maximum value of

P(A)P(B)P(A)P(B)

is __________.

(Round off to two decimal places)

Answer (official key): 0.25

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

Q53 · Discrete Mathematics · MCQ · 2 marks

The CORRECT formula for the sentence, “not all rainy days are cold” is:

  • (A)
    ∀d (Rainy(d)∧¬Cold(d))\forall d\ (Rainy(d)\land \neg Cold(d))
  • (B)
    ∀d (¬Rainy(d)→Cold(d))\forall d\ (\neg Rainy(d)\to Cold(d))
  • (C)
    ∃d (¬Rainy(d)→Cold(d))\exists d\ (\neg Rainy(d)\to Cold(d))
  • (D)
    ∃d (Rainy(d)∧¬Cold(d))\exists d\ (Rainy(d)\land \neg Cold(d))

Answer (official key): D

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

Q54 · Compiler Design · MCQ · 2 marks

Consider the basic block given below.

a = b + c
c = a + d
d = b + c
e = d - b
a = e + b

The minimum number of nodes and edges present in the DAG representation of the above basic block respectively are:

  • (A)
    6 and 6
  • (B)
    8 and 10
  • (C)
    9 and 12
  • (D)
    4 and 4

Answer (official key): A

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

Q55 · Computer Organization and Architecture · Numerical · 2 marks

An instruction pipeline has five stages, namely instruction fetch (IF), instruction decode and register fetch (ID/RF), instruction execution (EX), memory access (MEM), and register writeback (WB), with stage latencies 1 ns, 2.2 ns, 2 ns, 1 ns, and 0.75 ns, respectively.

To gain in terms of frequency, the designers have decided to split the ID/RF stage into three stages (ID, RF1, RF2), each of latency 2.2/32.2/3 ns. Also, the EX stage is split into two stages (EX1, EX2), each of latency 1 ns. The new design has a total of eight pipeline stages.

A program has 20% branch instructions which execute in the EX stage and produce the next instruction pointer at the end of the EX stage in the old design and at the end of the EX2 stage in the new design. The IF stage stalls after fetching a branch instruction until the next instruction pointer is computed. All instructions other than the branch instruction have an average CPI of one in both designs.

The execution times of this program on the old and the new design are PP and QQ nanoseconds, respectively. The value of P/QP/Q is __________.

(Round off to two decimal places)

Answer (official key): 1.5 to 1.6

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

Q56 · Calculus · MCQ · 2 marks

The value of the integral given below is:

∫0πx2cos⁡x dx\int_0^\pi x^2\cos x\,dx
  • (A)
    −2π-2\pi
  • (B)
    π\pi
  • (C)
    −π-\pi
  • (D)
    2π2\pi

Answer (official key): A

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

Q57 · Discrete Mathematics · Numerical · 2 marks

There are two elements x,yx,y in a group (G,∗)(G,*) such that every element in the group can be written as a product of some number of xx's and yy's in some order. It is known that

x∗x=y∗y=x∗y∗x∗y=y∗x∗y∗x=e,x*x = y*y = x*y*x*y = y*x*y*x = e,

where ee is the identity element. The maximum number of elements in such a group is __________.

(Answer in integer)

Answer (official key): 4

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

Q58 · Computer Networks · Numerical · 2 marks

Every host in an IPv4 network has a 1-second resolution real-time clock with battery backup. Each host needs to generate up to 1000 unique identifiers per second. Assume that each host has a globally unique IPv4 address.

Design a 50-bit globally unique ID for this purpose. After what period, in seconds, will the identifiers generated by a host wrap around?

(Answer in integer)

Answer (official key): 256

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

Q59 · Algorithms · MCQ · 2 marks

Consider the decision problem 2CNFSAT defined as follows:

{Φ∣Φ is a satisfiable propositional formula in CNF with at most two literals per clause}\{\Phi \mid \Phi \text{ is a satisfiable propositional formula in CNF with at most two literals per clause}\}

For example,

Φ=(x1∨x2)∧(x1∨x3‾)∧(x2∨x4)\Phi=(x_1\lor x_2)\land(x_1\lor \overline{x_3})\land(x_2\lor x_4)

is a Boolean formula and it is in 2CNFSAT.

The decision problem 2CNFSAT is:

  • (A)
    NP-Complete.
  • (B)
    solvable in polynomial time by reduction to directed graph reachability.
  • (C)
    solvable in constant time since any input instance is satisfiable.
  • (D)
    NP-hard, but not NP-complete.

Answer (official key): B

Read the worked solution

Q60 · Databases · MCQ · 2 marks

Consider the following relational schema:

employee(empId, empName, empDept)

customer(custId, custName, salesRepId, rating)

salesRepId is a foreign key referring to empId of the employee relation. Assume that each employee makes a sale to at least one customer. What does the following query return?

SELECT empName
FROM employee E
WHERE NOT EXISTS (
  SELECT custId
  FROM customer C
  WHERE C.salesRepId = E.empId
    AND C.rating <> 'GOOD'
);
  • (A)
    Names of all the employees with at least one of their customers having a GOOD rating.
  • (B)
    Names of all the employees with at most one of their customers having a GOOD rating.
  • (C)
    Names of all the employees with none of their customers having a GOOD rating.
  • (D)
    Names of all the employees with all their customers having a GOOD rating.

Answer (official key): D

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

Q61 · Calculus · MCQ · 2 marks

With respect to the numerical evaluation of the definite integral

K=∫abx2 dx,K=\int_a^b x^2\,dx,

where aa and bb are given, which of the following statements is/are TRUE?

I. The value of KK obtained using the trapezoidal rule is always greater than or equal to the exact value of the definite integral.

II. The value of KK obtained using Simpson's rule is always equal to the exact value of the definite integral.

  • (A)
    I only
  • (B)
    II only
  • (C)
    Both I and II
  • (D)
    Neither I nor II

Answer (official key): C

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

Q62 · Algorithms · Numerical · 2 marks

Suppose you want to move from 0 to 100 on the number line. In each step, you either move right by a unit distance or you take a shortcut. A shortcut is simply a pre-specified pair of integers i,ji,j with i<ji<j. Given a shortcut i,ji,j, if you are at position ii on the number line, you may directly move to jj.

Suppose T(k)T(k) denotes the smallest number of steps needed to move from kk to 100. Suppose further that there is at most one shortcut involving any number, and in particular from 9 there is a shortcut to 15. Let yy and zz be such that

T(9)=1+min⁡(T(y),T(z)).T(9)=1+\min(T(y),T(z)).

Then the value of the product yzyz is __________.

(Answer in integer)

Answer (official key): 150

Read the worked solution

Q63 · Programming and Data Structures · MCQ · 2 marks

Consider the pseudocode given below. The function DoSomething() takes as argument a pointer to the root of an arbitrary tree represented by the leftMostChild-rightSibling representation. Each node of the tree is of type treeNode.

typedef struct treeNode* treeptr;

struct treeNode
{
  treeptr leftMostChild, rightSibling;
};

int DoSomething(treeptr tree)
{
  int value = 0;

  if (tree != NULL) {
    if (tree->leftMostChild == NULL)
      value = 1;
    else
      value = DoSomething(tree->leftMostChild);

    value = value + DoSomething(tree->rightSibling);
  }

  return value;
}

When the pointer to the root of a tree is passed as the argument to DoSomething, the value returned by the function corresponds to the:

  • (A)
    number of internal nodes in the tree.
  • (B)
    height of the tree.
  • (C)
    number of nodes without a right sibling in the tree.
  • (D)
    number of leaf nodes in the tree.

Answer (official key): D

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

Q64 · Discrete Mathematics · MCQ · 2 marks

Consider the set of all functions

f:{0,1,…,2014}→{0,1,…,2014}f:\{0,1,\ldots,2014\}\to\{0,1,\ldots,2014\}

such that

f(f(i))=if(f(i))=i

for all 0≤i≤20140\le i\le 2014.

Consider the following statements:

P. For each such function, it must be the case that for every ii, f(i)=if(i)=i.

Q. For each such function, it must be the case that for some ii, f(i)=if(i)=i.

R. Each such function must be onto.

Which one of the following is CORRECT?

  • (A)
    P, Q and R are true
  • (B)
    Only Q and R are true
  • (C)
    Only P and Q are true
  • (D)
    Only R is true

Answer (official key): B

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

Q65 · Operating System · Numerical · 2 marks

A system contains three programs and each requires three tape units for its operation. The minimum number of tape units which the system must have such that deadlocks never arise is __________.

(Answer in integer)

Answer (official key): 7

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