GATE Computer Science & IT 2014 — GATE 2014 · CS · Set 3

CS Set 3 · 65 of 65 questions publicly available

Sections: General Aptitude, Computer Science & IT

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

Question 1 · 1 mark Q3635

Consider the following statements:

P: Good mobile phones are not cheap

Q: Cheap mobile phones are not good

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?

  1. A.

    Only L is TRUE.

  2. B.

    Only M is TRUE.

  3. C.

    Only N is TRUE.

  4. D.

    L, M and N are TRUE.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): D

Solutions and video are in the course

Question 2 · 1 mark Q3636

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

  1. A.

    For any subsets AA and BB of XX: ∣f(A∪B)∣=∣f(A)∣+∣f(B)∣|f(A \cup B)| = |f(A)| + |f(B)|

  2. 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)

  3. 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)|\}

  4. 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)

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): D

Solutions and video are in the course

Question 3 · 1 mark Q3637

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

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 5

Solutions and video are in the course

Question 4 · 1 mark Q3638

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

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

  2. B.

    If the trace of the matrix is positive, all its eigenvalues are positive.

  3. C.

    If the determinant of the matrix is positive, all its eigenvalues are positive.

  4. D.

    If the product of the trace and determinant of the matrix is positive, all its eigenvalues are positive.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): A

Solutions and video are in the course

Question 5 · 1 mark Q3639

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 ∩ V_2 is ______.

Official answer key

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

Solutions and video are in the course

Question 6 · 1 mark Q3640

If ∫02π∣x sin⁡x∣dx=kπ\int \limits_0^{2 \pi} |x \: \sin x| dx=k\pi then the value of kk is equal to ______ .

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 4

Solutions and video are in the course

Question 7 · 1 mark Q3641

Consider the following minterm expression for

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

The minterms 2, 7, 8 and 13 are ‘do not care’ terms. The minimal sum-of-products form for FF is

  1. A.

    QSˉ+QˉSQ \bar S+ \bar QS

  2. B.

    QˉSˉ+QS\bar Q \bar S+ QS

  3. C.

    QˉRˉSˉ+QˉRSˉ+QRˉS+QRS\bar Q \bar R \bar S+ \bar QR \bar S+Q \bar R S+QRS

  4. D.

    PˉQˉSˉ+PˉQS+PQS+PQˉSˉ\bar P \bar Q \bar S+ \bar P QS+PQS+P \bar Q \bar S

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): B

Solutions and video are in the course

Question 8 · 1 mark Q3642

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?

  1. A.

    Full adder

  2. B.

    Priority encoder

  3. C.

    Multiplexer

  4. D.

    Flip-flop

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): C

Solutions and video are in the course

Question 9 · 1 mark Q3643

Consider the following processors (ns stands for nanoseconds). 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?

  1. A.

    P1

  2. B.

    P2

  3. C.

    P3

  4. D.

    P4

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): C

Solutions and video are in the course

Question 10 · 1 mark Q3644

Let AA be the square matrix of size n×nn \times n. Consider the following pseudocode. What is the expected output?

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]);
  1. A.

    The matrix AA itself

  2. B.

    Transpose of the matrix AA

  3. C.

    Adding 100 to the upper diagonal elements and subtracting 100 from lower diagonal elements of AA

  4. D.

    None of the above

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): A

Solutions and video are in the course

Question 11 · 1 mark Q3645

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

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 7

Solutions and video are in the course

Question 12 · 1 mark Q3646

Consider the following rooted tree with the vertex labeled P as the root:

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

  1. A.

    SQPTRWUV

  2. B.

    SQPTUWRV

  3. C.

    SQPTWUVR

  4. D.

    SQPTRUWV

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): A

Solutions and video are in the course

Question 13 · 1 mark Q3647

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. Then the maximum possible recursion depth (including the initial call) is _________.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 19

Solutions and video are in the course

Question 14 · 1 mark Q3648

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

  1. A.

    O(n2)O (n^2)

  2. B.

    O(nlog⁡n)O(n \log n)

  3. C.

    θ(n log n)\theta (n \ log \ n)

  4. D.

    O(n3)O (n^3)

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): A

Solutions and video are in the course

Question 15 · 1 mark Q3649

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

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

Official answer key

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

Solutions and video are in the course

Question 16 · 1 mark Q3650

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

  1. A.

    Both 2Σ∗2^{Σ^∗} and Σ∗Σ^* are countable

  2. B.

    2Σ∗2^{Σ^∗} is countable and Σ∗Σ^* is uncountable

  3. C.

    2Σ∗2^{Σ^∗} is uncountable and Σ∗Σ^* is countable

  4. D.

    Both 2Σ∗2^{Σ^∗} and Σ∗Σ^* are uncountable

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): C

Solutions and video are in the course

Question 17 · 1 mark Q9847

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

  1. A.

    make parsing and semantic analysis simpler.

  2. B.

    improve error recovery and error reporting.

  3. C.

    increase the chances of reusing the machine-independent code optimizer in other compilers.

  4. D.

    improve the register allocation.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): C

Solutions and video are in the course

Question 18 · 1 mark Q3652

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.

  1. A.

    1 and 2 only

  2. B.

    2 and 3 only

  3. C.

    3 and 4 only

  4. D.

    1 and 3 only

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): D

Solutions and video are in the course

Question 19 · 1 mark Q3653

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

  1. A.

    High cohesion and high coupling

  2. B.

    High cohesion and low coupling

  3. C.

    Low cohesion and high coupling

  4. D.

    Low cohesion and low coupling

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): B

Solutions and video are in the course

Question 20 · 1 mark Q3654

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, 2

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 6

Solutions and video are in the course

Question 21 · 1 mark Q3655

What is the optimized version of the relation 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 ?

  1. A.

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

  2. B.

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

  3. C.

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

  4. D.

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

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): A

Solutions and video are in the course

Question 22 · 1 mark Q3656

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

  1. A.

    in all candidate keys of RR.

  2. B.

    in some candidate key of RR.

  3. C.

    in a foreign key of RR.

  4. D.

    only in the primary key of RR.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): B

Solutions and video are in the course

Question 23 · 1 mark Q3657

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

  1. A.

    Network layer and Routing

  2. B.

    Data Link Layer and Bit synchronization

  3. C.

    Transport layer and End-to-end process communication

  4. D.

    Medium Access Control sub-layer and Channel sharing

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): B

Solutions and video are in the course

Question 24 · 1 mark Q3658

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

  1. A.

    0111110100

  2. B.

    0111110101

  3. C.

    0111111101

  4. D.

    0111111111

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): B

Solutions and video are in the course

Question 25 · 1 mark Q3659

Host A (on TCP/IP v4 network A) sends an IP datagram D to host B (also on TCP/IP v4 network B). Assume that no error occurred during the transmission of D. When D reaches B, which of the following IP header field(s) may be different from that of the original datagram D?

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

  1. A.

    (i) only

  2. B.

    (i) and (ii) only

  3. C.

    (ii) and (iii) only

  4. D.

    (i), (ii) and (iii)

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): D

Solutions and video are in the course

Question 26 · 2 marks Q3660

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 Identifier131.16.0.0/123 131.28.0.0/145131.19.0.0/162131.22.0.0/151\begin{array}{|c|c|} \hline \textbf {Prefix} & \textbf {Output Interface Identifier} \\\hline \text {131.16.0.0/12} & \text{3 } \\\hline \text{131.28.0.0/14} & \text{5} \\\hline \text{131.19.0.0/16} & \text{2} \\\hline \text{131.22.0.0/15} & \text{1} \\\hline \end{array}

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

Official answer key

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

Solutions and video are in the course

Question 27 · 2 marks Q3661

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?

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 256 seconds

Solutions and video are in the course

Question 28 · 2 marks Q3662

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

  1. A.

    MF bit: 0, Datagram Length: 1444; Offset: 370

  2. B.

    MF bit: 1, Datagram Length: 1424; Offset: 185

  3. C.

    MF bit: 1, Datagram Length: 1500; Offset: 370

  4. D.

    MF bit: 0, Datagram Length: 1424; Offset: 2960

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): A

Solutions and video are in the course

Question 29 · 2 marks Q3663

Consider the transactions T1, T2, and T3 and the schedules S1 and S2 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?

  1. A.

    Only S1 is conflict-serializable.

  2. B.

    Only S2 is conflict-serializable.

  3. C.

    Both S1 and S2 are conflict-serializable.

  4. D.

    Neither S1 nor S2 is conflict-serializable.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): A

Solutions and video are in the course

Question 30 · 2 marks Q3664

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}\:(employee \bowtie_{(empId=eID) \wedge (empAge \leq depAge)} dependent)

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

  1. A.

    some dependent.

  2. B.

    all dependents.

  3. C.

    some of his/her dependents.

  4. D.

    all of his/her dependents.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): D

Solutions and video are in the course

Question 31 · 2 marks Q3665

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

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 7

Solutions and video are in the course

Question 32 · 2 marks Q3666

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 TimeP1012P224P336P485\small \begin{array}{|c|c|c|} \hline \textbf{Process} & \textbf{Arrival Time} & \textbf{Burst Time}\\\hline \text{P1} & 0 & 12 \\ \text{P2} & 2 & 4 \\ \text{P3} & 3 & 6 \\ \text{P4} & 8 & 5 \\\hline \end{array}

The average waiting time (in milliseconds) of the processes is _________.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 5.5 ms

Solutions and video are in the course

Question 33 · 2 marks Q1943

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

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 122 milliseconds

Solutions and video are in the course

Question 34 · 2 marks Q3668

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

  1. A.

    6 and 6

  2. B.

    8 and 10

  3. C.

    9 and 12

  4. D.

    4 and 4

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): A

Solutions and video are in the course

Question 35 · 2 marks Q3669

Which one of the following problems is undecidable?

  1. A.

    Deciding if a given context-free grammar is ambiguous.

  2. B.

    Deciding if a given string is generated by a given context-free grammar.

  3. C.

    Deciding if the language generated by a given context-free grammar is empty.

  4. D.

    Deciding if the language generated by a given context-free grammar is finite.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): A

Solutions and video are in the course

Question 36 · 2 marks Q3670

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

L1={0n1n∣n≥0}L_1 = \left\{0^n1^n\mid n \geq 0\right\}

L2={wcwr∣w∈{0,1}∗}L_2 = \left\{wcw^r \mid w \in \{0,1\}^*\right\}

L3={wwr∣w∈{0,1}∗}L_3 = \left\{ww^r \mid w \in \{0,1\}^*\right\}

Here, wrw^r is the reverse of the string ww. Which of these languages are deterministic Context-free languages?

  1. A.

    None of the languages

  2. B.

    Only L1L_1

  3. C.

    Only L1L_1 and L2L_2

  4. D.

    All the three languages

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): C

Solutions and video are in the course

Question 37 · 2 marks Q3671

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,j)(i,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 1 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 _____.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 150

Solutions and video are in the course

Question 38 · 2 marks Q3672

Consider the decision problem 2CNFSAT2CNFSAT defined as follows:

{ϕ∣ϕ is a satisfiable propositional formula in CNF with at most two literals per clause}\left\{ \phi \mid \phi \text{ is a satisfiable propositional formula in CNF with at most two literals per clause}\right\}

For example, ϕ=(x1∨x2)∧(x1∨x3ˉ)∧(x2∨x4)\phi = (x1 \vee x2) \wedge (x1 \vee \bar{x3}) \wedge (x2 \vee x4) is a Boolean formula and it is in 2CNFSAT2CNFSAT.

The decision problem 2CNFSAT2CNFSAT is

  1. A.

    NP-Complete.

  2. B.

    solvable in polynomial time by reduction to directed graph reachability.

  3. C.

    solvable in constant time since any input instance is satisfiable.

  4. D.

    NP-hard, but not NP-complete.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): B

Solutions and video are in the course

Question 39 · 2 marks Q3673

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^bn+m^c\log^dn), the value of a+10b+100c+1000da+10b+100c+1000d is ______.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 110

Solutions and video are in the course

Question 40 · 2 marks Q3674

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?

  1. A.

    (97×97×97)/1003(97 × 97 × 97)/100^3

  2. B.

    (99×98×97)/1003(99 × 98 × 97)/100^3

  3. C.

    (97×96×95)/1003(97 × 96 × 95)/100^3

  4. D.

    (97×96×95)/(3!×1003)(97 × 96 × 95)/(3! × 100^3)

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): A

Solutions and video are in the course

Question 41 · 2 marks Q3675

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 

  1. A.

    number of internal nodes in the tree.

  2. B.

    height of the tree.

  3. C.

    number of nodes without a right sibling in the tree.

  4. D.

    number of leaf nodes in the tree.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): D

Solutions and video are in the course

Question 42 · 2 marks Q3676

Consider the C function given below. Assume that the array listA contains n (> 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?

  1. A.

    It will run into an infinite loop when x is not in listA.

  2. B.

    It is an implementation of binary search.

  3. C.

    It will always find the maximum element in listA.

  4. D.

    It will return −1 even when x is present in listA.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): B

Solutions and video are in the course

Question 43 · 2 marks Q3677

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 (ns stands for nanoseconds). 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/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 the 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 __________.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 1.54

Solutions and video are in the course

Question 44 · 2 marks Q3678

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

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 1.68 nanoseconds

Solutions and video are in the course

Question 45 · 2 marks Q3679

The above synchronous sequential circuit built using JK flip-flops is initialized with Q2Q1Q0=000Q_2Q_1Q_0 = 000. The state sequence for this circuit for the next 3 clock cycles is

  1. A.

    001, 010, 011

  2. B.

    111, 110, 101

  3. C.

    100, 110, 111

  4. D.

    100, 011, 001

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): C

Solutions and video are in the course

Question 46 · 2 marks Q3680

With respect to the numerical evaluation of the definite integral, K=∫ab x2 dxK = \int \limits_a^b \:x^2 \:dx, where aa and bb are given, which of the following statements is/are TRUE?

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

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

  1. A.

    I only

  2. B.

    II only

  3. C.

    Both I and II

  4. D.

    Neither I nor II

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): C

Solutions and video are in the course

Question 47 · 2 marks Q3681

The value of the integral given below is 

∫0π x2 cos⁡x dx\int \limits_0^{\pi} \: x^2 \: \cos x\:dx

  1. A.

    −2π-2 \pi

  2. B.

    π\pi

  3. C.

    −π-\pi

  4. D.

    2π2\pi

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): A

Solutions and video are in the course

Question 48 · 2 marks Q3682

Let SS be a sample space and two mutually exclusive events AA and BB be such that A∪B=SA \cup B = S. If P(.)P(.) denotes the probability of the event, the maximum value of P(A)P(B)P(A)P(B) is_____.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 0.25

Solutions and video are in the course

Question 49 · 2 marks Q3683

Consider the set of all functions f:{0,1,…,2014}→{0,1,…,2014}f:\{0,1, \dots,2014\} \to \{0,1,\dots, 2014\} such that f(f(i))=if\left(f\left(i\right)\right)=i, for all  0≤i≤20140 \leq i \leq 2014. Consider the following statements:

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

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

RR. Each function must be onto.

Which one of the following is CORRECT?

  1. A.

    P,QP,Q and RR are true

  2. B.

    Only QQ and RR are true

  3. C.

    Only PP and QQ are true

  4. D.

    Only RR is true

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): B

Solutions and video are in the course

Question 50 · 2 marks Q3684

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

x∗x=y∗y=x∗y∗x∗y=y∗x∗y∗x=ex*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 ____.

​

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): 4

Solutions and video are in the course

Question 51 · 2 marks Q3685

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

  1. A.

    ⌊nk⌋\left\lfloor\frac {n}{k}\right\rfloor

  2. B.

    ⌈nk⌉\left\lceil \frac{n}{k} \right\rceil

  3. C.

    n−kn-k

  4. D.

    n−k+1n-k+1

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): C

Solutions and video are in the course

Question 52 · 2 marks Q3686

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

  1. A.

    In any planar embedding, the number of faces is at least n2+2\frac{n}{2}+2

  2. B.

    In any planar embedding, the number of faces is less than n2+2\frac{n}{2}+2

  3. C.

    There is a planar embedding in which the number of faces is less than n2+2\frac{n}{2}+2

  4. D.

    There is a planar embedding in which the number of faces is at most nδ+1\frac {n}{\delta+1}

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): A

Solutions and video are in the course

Question 53 · 2 marks Q3687

The CORRECT formula for the sentence, "not all Rainy days are Cold" is

  1. A. image.png

  2. B. image.png

  3. C. image.png

  4. D. image.png

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): D

Solutions and video are in the course

Question 54 · 2 marks Q3688

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');
  1. A.

    Names of all the employees with at least one of their customers having a ‘GOOD’ rating. 

  2. B.

    Names of all the employees with at most one of their customers having a 'GOOD' rating.

  3. C.

    Names of all the employees with none of their customers having a 'GOOD' rating.

  4. D.

    Names of all the employees with all their customers having a 'GOOD' rating.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): D

Solutions and video are in the course

Question 55 · 2 marks Q3689

Let ⊕ 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( \left(1 \oplus P \right) \oplus \left( P \oplus Q \right )\right ) \oplus \left(\left(P \oplus Q\right) \oplus \left(Q \oplus 0\right)\right)

The equivalent expression for FF is

  1. A.

    P+QP+Q

  2. B.

    P+Q‾\overline{P+Q}

  3. C.

    P⊕QP \oplus Q

  4. D.

    P⊕Q‾\overline {P \oplus Q}

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): D

Solutions and video are in the course

Question 1 · 1 mark Q3625

While trying to collect‾I\underset{\text{I}}{\underline{\text{While trying to collect}}} an envelope from under the table,‾II\underset{\text{II}}{\underline{\text{from under the table,}}}Mr. X fell down‾III\underset{\text{III}}{\underline{\text{Mr. X fell down}}}  and  was losing consciousness.‾IV\underset{\text{IV}}{\underline{\text{was losing consciousness.}}}

Which one of the above underlined parts of the sentence is NOT appropriate?

  1. A.

    I

  2. B.

    II

  3. C.

    III

  4. D.

    IV

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): D

Solutions and video are in the course

Question 2 · 1 mark Q3626

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

  1. A.

    knows, will have

  2. B.

    knew, had

  3. C.

    had known, could have

  4. D.

    should have known, would have

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): C

Solutions and video are in the course

Question 3 · 1 mark Q3627

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

  1. A.

    sticky

  2. B.

    well-connected

  3. C.

    rambling

  4. D.

    friendly

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): C

Solutions and video are in the course

Question 4 · 1 mark Q3628

Which number does not belong in the series below?

2, 5, 10, 17, 26, 37, 50, 64

  1. A.

    17

  2. B.

    37

  3. C.

    64

  4. D.

    26

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): C

Solutions and video are in the course

Question 5 · 1 mark Q3629

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.MarksAnsweredAnsweredNot CorrectlyWronglyAttempted122117623152723223183\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}\\\hline \text{2} & \text{3} &\text{15} & \text{27}& \text{2}\\\hline \text{3} & \text{2} &\text{23} & \text{18} & \text{3}\\\hline \end{array}

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

  1. A.

    1.34    

  2. B.

    1.74

  3. C.

    3.02

  4. D.

    3.91

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): C

Solutions and video are in the course

Question 6 · 2 marks Q3630

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

  1. A.

    Students should come at 9.00 a.m. and parents should come at 10.00 a.m

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

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

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

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): B

Solutions and video are in the course

Question 7 · 2 marks Q3631

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

  1. A.

    (i), (ii) and (iv)

  2. B.

    (iii) only

  3. C.

    (i) and (iv)

  4. D.

    (iv) only

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): D

Solutions and video are in the course

Question 8 · 2 marks Q3632

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

  1. A.

    increased by 5 %

  2. B.

    decreased by 13%

  3. C.

    decreased by 20%

  4. D.

    decreased by 11%

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): D

Solutions and video are in the course

Question 9 · 2 marks Q3633

The ratio of male to female students in a college for five years is plotted in the following line graph. 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?

  1. A.

    1:1 

  2. B.

    2:1

  3. C.

    1.5:1

  4. D.

    2.5:1

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): C

Solutions and video are in the course

Question 10 · 2 marks Q3634

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.

  1. A.

    1634

  2. B.

    1737

  3. C.

    3142

  4. D.

    3162

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 3): C

Solutions and video are in the course