GATE Computer Science & IT 2019 — GATE 2019 · CS

CS · 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 Q2920

A certain processor uses a fully associative cache of size 16 kB. The cache block size is 16 bytes. Assume that the main memory is byte addressable and uses a 32-bit address. How many bits are required for the Tag and the Index fields respectively in the addresses generated by the processor?

  1. A.

    24 bits and 0 bits

  2. B.

    28 bits and 4 bits

  3. C.

    24 bits and 4 bits

  4. D.

    28 bits and 0 bits

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): D

Solutions and video are in the course

Question 2 · 1 mark Q73213

The chip select logic for a certain DRAM chip in a memory system design is shown below. Assume that the memory system has 16 address lines denoted by A15 to A0. What is the range of addresses (in hexadecimal) of the memory system that can get enabled by the chip select (CS) signal?

image.png

  1. A.

    C800 to CFFF

  2. B.

    CA00 to CAFF

  3. C.

    C800 to C8FF

  4. D.

    DA00 to DFFF

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): A

Solutions and video are in the course

Question 3 · 1 mark Q2922

Which one of the following kinds of derivation is used by LR parsers?

  1. A.

    Leftmost

  2. B.

    Leftmost in reverse

  3. C.

    Rightmost

  4. D.

    Rightmost in reverse

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): D

Solutions and video are in the course

Question 4 · 1 mark Q2923

In 16-bit 2’s complement representation, the decimal number −28 is:

  1. A.

    1111 1111 0001 1100

  2. B.

    0000 0000 1110 0100

  3. C.

    1111 1111 1110 0100

  4. D.

    1000 0000 1110 0100

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 5 · 1 mark Q2924

Let 𝑈 = {1,2, … , 𝑛}. Let 𝐴 = {(𝑥, 𝑋)|𝑥 ∈ 𝑋, 𝑋 ⊆ 𝑈}. Consider the following two statements on |𝐴|.

I.     ∣A∣=n2n−1\mid A \mid = n2^{n-1}

II.    ∣A∣=Σk=1nk(nk)\mid A \mid = \Sigma_{k=1}^{n} k \begin{pmatrix} n \\ k \end{pmatrix}

Which of the above statements is/are TRUE?

  1. A.

    Only I

  2. B.

    Only II

  3. C.

    Both I and II

  4. D.

    Neither I nor II

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 6 · 1 mark Q2925

Which one of the following is NOT a valid identity?

  1. A.

    (x⊕y)⊕z=x⊕(y⊕z)(x \oplus y) \oplus z = x \oplus (y \oplus z)

  2. B.

    (x+y)⊕z=x⊕(y+z)(x + y) \oplus z = x \oplus (y+z)

  3. C.

    x⊕y=x+y, if xy=0x \oplus y = x+y, \text{ if } xy=0

  4. D.

    x⊕y=(xy+x’y’)’x \oplus y = (xy+x’y’)’

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): B

Solutions and video are in the course

Question 7 · 1 mark Q2926

If 𝐿 is a regular language over Σ = {𝑎, 𝑏}, which one of the following languages is NOT regular ?

  1. A.

    L.LR={xy∣x∈L,yR∈L}L.L^R = \{xy \mid x \in L , y^R \in L\}

  2. B.

    {wwR∣w∈L}\{ww^R \mid w \in L \}

  3. C.

    Prefix (L)={x∈Σ∗∣∃y∈Σ∗\text{Prefix } (L) = \{x \in \Sigma^* \mid \exists y \in \Sigma^*  such that 𝑥𝑦∈𝐿}𝑥𝑦 ∈ 𝐿 \}

  4. D.

    Suffix (L)={y∈Σ∗∣∃x∈Σ∗\text{Suffix }(L) = \{y \in \Sigma^* \mid \exists x \in \Sigma^* such that 𝑥𝑦∈𝐿}𝑥𝑦 ∈ 𝐿 \}

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): B

Solutions and video are in the course

Question 8 · 1 mark Q2927

Consider Z = X – Y, where X, Y and Z are all in sign-magnitude form. X and Y are each represented in 𝑛 bits. To avoid overflow, the representation of Z would require a minimum of:

  1. A.

    𝑛 bits

  2. B.

    𝑛 − 1 bits

  3. C.

    𝑛 + 1 bits

  4. D.

    𝑛 + 2 bits

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 9 · 1 mark Q2928

Let 𝑋 be a square matrix. Consider the following two statements on 𝑋.

I. 𝑋 is invertible.

II. Determinant of 𝑋 is non-zero.

Which one of the following is TRUE?

  1. A.

    I implies II; II does not imply I.

  2. B.

    II implies I; I does not imply II.

  3. C.

    I does not imply II; II does not imply I.

  4. D.

    I and II are equivalent statements.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): D

Solutions and video are in the course

Question 10 · 1 mark Q2929

Let 𝐺 be an arbitrary group. Consider the following relations on 𝐺:

𝑅1: ∀𝑎, 𝑏 ∈ 𝐺, 𝑎 𝑅1𝑏 if and only if ∃𝑔 ∈ 𝐺 such that 𝑎 = 𝑔-1𝑏𝑔

𝑅2: ∀𝑎, 𝑏 ∈ 𝐺, 𝑎 𝑅2𝑏 if and only if 𝑎 = 𝑏-1

Which of the above is/are equivalence relation/relations?

  1. A.

    𝑅1 and 𝑅2

  2. B.

    𝑅1 only

  3. C.

    𝑅2 only

  4. D.

    Neither 𝑅1 nor 𝑅2

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): B

Solutions and video are in the course

Question 11 · 1 mark Q2930

Consider the following two statements about database transaction schedules:

I. Strict two-phase locking protocol generates conflict serializable schedules that are also recoverable.

II. Timestamp-ordering concurrency control protocol with Thomas’ Write Rule can generate view serializable schedules that are not conflict serializable.

Which of the above statements is/are TRUE?

  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 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 12 · 1 mark Q2931

Let 𝐺 be an undirected complete graph on 𝑛 vertices, where 𝑛 > 2. Then, the number of different Hamiltonian cycles in 𝐺 is equal to

  1. A.

    𝑛!

  2. B.

    (𝑛 − 1)!

  3. C.

    1

  4. D.

    (𝑛−1)!2\frac {(𝑛−1)!} {2}

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): D

Solutions and video are in the course

Question 13 · 1 mark Q2932

Compute  lim⁡x→3x4−812x2−5x−3\displaystyle \lim_{x \rightarrow 3} \frac{x^4-81}{2x^2-5x-3}

  1. A.

    1

  2. B.

    53/12

  3. C.

    108/7

  4. D.

    Limit does not exist

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 14 · 1 mark Q2933

Which one of the following statements is NOT correct about the B+ tree data structure used for creating an index of a relational database table?

  1. A.

    B+ Tree is a height-balanced tree

  2. B.

    Non-leaf nodes have pointers to data records

  3. C.

    Key values in each node are kept in sorted order

  4. D.

    Each leaf node has a pointer to the next leaf node

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): B

Solutions and video are in the course

Question 15 · 1 mark Q2934

For Σ = {𝑎, 𝑏}, let us consider the regular language 𝐿 = { 𝑥 |𝑥 = 𝑎2+3𝑘 or 𝑥 = 𝑏10+12𝑘 , 𝑘 ≥ 0}. Which one of the following can be a pumping length (the constant guaranteed by the pumping lemma) for 𝐿 ?

  1. A.

    3

  2. B.

    5

  3. C.

    9

  4. D.

    24

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): D

Solutions and video are in the course

Question 16 · 1 mark Q2935

Which of the following protocol pairs can be used to send and retrieve e-mails (in that order)?

  1. A.

    IMAP, POP3

  2. B.

    SMTP, POP3

  3. C.

    SMTP, MIME

  4. D.

    IMAP, SMTP

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): B

Solutions and video are in the course

Question 17 · 1 mark Q2936

The following C program is executed on a Unix/Linux system:

#include <unistd.h>

int main() {

    int i;

    for (i=0; i<10; i++)

        if (i%2 == 0) fork();

    return 0;

}

The total number of child processes created is ________.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 31

Solutions and video are in the course

Question 18 · 1 mark Q2937

Consider the following C program:

#include<stdio.h>

int jumble(int x, int y){

    x = 2*x+y;

    return x;

}

int main(){

    int x=2, y=5;

    y=jumble(y,x);

    x=jumble(y,x);

    printf("%d \n",x);

    return 0;

}

The value printed by the program is ________.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 26

Solutions and video are in the course

Question 19 · 1 mark Q2938

Consider the grammar given below:

S → Aa

A → BD

B → b | ϵ

D → d | ϵ

Let a, b, d, and $ be indexed as follows:

abd$3210\begin{array}{|l|l|l|l|} \hline a & b & d & \$ \\ \hline 3 & 2 & 1 & 0 \\ \hline \end{array}

Compute the FOLLOW set of the non-terminal B and write the index values for the symbols in the FOLLOW set in the descending order. (For example, if the FOLLOW set is {a, b, d, $}, then the answer should be 3210) 

Answer: ________.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 31

Solutions and video are in the course

Question 20 · 1 mark Q2939

An array of 25 distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability that the pivot element gets placed in the worst possible location in the first round of partitioning (rounded off to 2 decimal places) is ________.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 0.08

Solutions and video are in the course

Question 21 · 1 mark Q2940

The value of 351 mod 5 is ________.

Official answer key

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

Solutions and video are in the course

Question 22 · 1 mark Q2941

Two numbers are chosen independently and uniformly at random from the set {1, 2 , . . . , 13}. The probability (rounded off to 3 decimal places) that their 4-bit (unsigned) binary representations have the same most significant bit is ___________.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 0.502 to 0.504

Solutions and video are in the course

Question 23 · 1 mark Q2942

Consider three concurrent processes P1, P2 and P3 as shown below, which access a shared variable D that has been initialized to 100.

The processes are executed on a uniprocessor system running a time-shared operating system. If the minimum and maximum possible values of D after the three processes have completed execution are X and Y respectively, then the value of Y – X is _____________.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 80

Solutions and video are in the course

Question 24 · 1 mark Q2943

Consider the following C program:

#include <stdio.h>

int main(){

    int arr[]={1,2,3,4,5,6,7,8,9,0,1,2,5}, *ip=arr+4;

    printf(“%d\n”, ip[1]);

    return 0;

}

The number that will be displayed on execution of the program is ___________ .

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 6

Solutions and video are in the course

Question 25 · 1 mark Q2944

Consider a sequence of 14 elements: A = [−5, −10, 6, 3, −1, −2, 13, 4, −9, −1, 4, 12, −3, 0].

The subsequence sum S(i,j)=Σk=ijA[k]S(i,j) = \Sigma_{k=i}^j A[k] . Determine the maximum of 𝑆(𝑖, 𝑗), where 0 ≤ 𝑖 ≤ 𝑗 < 14. (Divide and conquer approach may be used.)

Answer: ________.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 29

Solutions and video are in the course

Question 26 · 2 marks Q2945

Consider the following C function.

    void convert(int n){

            if(n<0)

                printf(“%d”,n);

            else {

                convert(n/2);

                printf(“%d”,n%2);

            }

    }

Which one of the following will happen when the function convert is called with any positive integer n as argument?

  1. A.

    It will print the binary representation of n and terminate

  2. B.

    It will print the binary representation of n in the reverse order and terminate

  3. C.

    It will print the binary representation of n but will not terminate

  4. D.

    It will not print anything and will not terminate

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): D

Solutions and video are in the course

Question 27 · 2 marks Q2946

Consider the following C program:

#include <stdio.h>
int r(){
    static int num=7;
    return num--;
}

int main(){
    for (r();r();r())
         printf(“%d”,r());
    return 0;
}

Which one of the following values will be displayed on execution of the programs?

  1. A.

    41

  2. B.

    52

  3. C.

    63

  4. D.

    630

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): B

Solutions and video are in the course

Question 28 · 2 marks Q2947

Consider three machines M, N, and P with IP addresses 100.10.5.2, 100.10.5.5, and 100.10.5.6 respectively. The subnet mask is set to 255.255.255.252 for all the three machines. Which one of the following is true? 

  1. A.

    M, N, and P all belong to the same subnet

  2. B.

    Only M and N belong to the same subnet

  3. C.

    Only N and P belong to the same subnet

  4. D.

    M, N, and P belong to three different subnets

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 29 · 2 marks Q2948

Suppose that in an IP-over-Ethernet network, a machine X wishes to find the MAC address of another machine Y in its subnet. Which one of the following techniques can be used for this?

  1. A.

    X sends an ARP request packet to the local gateway’s IP address which then finds the MAC address of Y and sends to X

  2. B.

    X sends an ARP request packet to the local gateway’s MAC address which then finds the MAC address of Y and sends to X

  3. C.

    X sends an ARP request packet with broadcast MAC address in its local subnet

  4. D.

    X sends an ARP request packet with broadcast IP address in its local subnet

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 30 · 2 marks Q2949

Consider three 4-variable functions f1, f2, and f3, which are expressed in sum-of-minterms as

f1=Σ(0,2,5,8,14),f_1=\Sigma(0,2,5,8,14),

f2=Σ(2,3,6,8,14,15),f_2=\Sigma(2,3,6,8,14,15),

f3=Σ(2,7,11,14)f_3=\Sigma (2,7,11,14)

For the following circuit with one AND gate and one XOR gate, the output function ff can be expressed as:

  1. A.

    ​​Σ(7,8,11)​​\Sigma(7,8,11)

  2. B.

    ​​Σ(2,7,8,11,14)​​\Sigma(2,7,8,11,14)

  3. C.

    ​​Σ(2,14)​​\Sigma(2, 14)

  4. D.

    Σ(0,2,3,5,6,7,8,11,14,15)\Sigma (0,2,3,5,6,7,8,11,14,15)

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): A

Solutions and video are in the course

Question 31 · 2 marks Q2950

Which one of the following languages over Σ = {𝑎, 𝑏} is NOT context-free?

  1. A.

    {wwR∣w∈{a,b}∗}\{ww^R \mid w \in \{a, b\}^*\}

  2. B.

    {wanbnwR∣w∈{a,b}∗,n≥0}\{wa^nb^nw^R \mid w \in \{a,b\}^*, n \geq 0\}

  3. C.

    {wanwRbn∣w∈{a,b}∗,n≥0}\{wa^nw^Rb^n \mid w \in \{a,b\}^* , n \geq 0\}

  4. D.

    {anbi∣i∈{n,3n,5n},n≥0}\{ a^nb^i \mid i \in \{n, 3n, 5n\}, n \geq 0\}

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 32 · 2 marks Q2071

Let the set of functional dependencies F = {QR → S, R → P, S → Q} hold on a relation schema X = (PQRS). X is not in BCNF. Suppose X is decomposed into two schemas Y and Z, where Y = (PR) and Z = (QRS).
Consider the two statements given below.
I. Both Y and Z are in BCNF
II. Decomposition of X into Y and Z is dependency preserving and lossless
Which of the above statements is/are correct?

  1. A.

     I only

  2. B.

    Neither I nor II

  3. C.

    II only

  4. D.

    Both I and II

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 33 · 2 marks Q1945

Assume that in a certain computer, the virtual addresses are 64 bits long and the physical addresses are 48 bits long. The memory is word addressable. The page size is 8kB and the word size is 4 bytes. The Translation Look-aside Buffer (TLB) in the address translation path has 128 valid entries. At most how many distinct virtual addresses can be translated without any TLB miss?

  1. A.

    16 x 210

  2. B.

    256 x 210

  3. C.

    4 x 220

  4. D.

    8 x 220

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): B

Solutions and video are in the course

Question 34 · 2 marks Q2953

Consider the following sets:

S1. Set of all recursively enumerable languages over the alphabet {0,1}

S2. Set of all syntactically valid C programs

S3. Set of all languages over the alphabet {0,1}

S4. Set of all non-regular languages over the alphabet {0,1}

Which of the above sets are uncountable?

  1. A.

    S1 and S2

  2. B.

    S3 and S4

  3. C.

    S2 and S3

  4. D.

    S1 and S4

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): B

Solutions and video are in the course

Question 35 · 2 marks Q2954

Consider the first order predicate formula 𝜑:

∀𝑥 [(∀𝑧 𝑧|𝑥 ⇒ ((𝑧 = 𝑥) ∨ (𝑧 = 1))) ⇒ ∃𝑤 (𝑤 > 𝑥) ∧ (∀𝑧 𝑧|𝑤 ⇒ ((𝑤 = 𝑧) ∨ (𝑧 = 1)))]

Here ‘a|b’ denotes that ‘a divides b’, where a and b are integers. In this question, count only positive divisors a; x, z, and w range over the stated set.

S1. {1,2,3, … , 100}

S2. Set of all positive integers

S3. Set of all integers

Which of the above sets satisfy 𝜑?

  1. A.

    S1 and S2

  2. B.

    S1 and S3

  3. C.

    S2 and S3

  4. D.

    S1, S2 and S3

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 36 · 2 marks Q2955

Consider the following grammar and the semantic actions to support the inherited type declaration attributes. Let 𝑋1, 𝑋2, 𝑋3, 𝑋4, 𝑋5, and 𝑋6 be the placeholders for the non-terminals D, T, L or L1 in the following table:

Which one of the following are the appropriate choices for 𝑋1, 𝑋2, 𝑋3 and 𝑋4?

  1. A.

    𝑋1 = 𝐿 , 𝑋2 = 𝑇, 𝑋3 = 𝐿1, 𝑋4 = 𝐿

  2. B.

    𝑋1 = 𝑇 , 𝑋2 = 𝐿, 𝑋3 = 𝐿1, 𝑋4 = 𝑇

  3. C.

    𝑋1 = 𝐿 , 𝑋2 = 𝐿, 𝑋3 = 𝐿1, 𝑋4 = 𝑇

  4. D.

    𝑋1 = 𝑇 , 𝑋2 = 𝐿, 𝑋3 = 𝑇, 𝑋4 = 𝐿1

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): A

Solutions and video are in the course

Question 37 · 2 marks Q2956

There are nn unsorted arrays: A1,A2,…,AnA_1, A_2, …, A_n. Assume that nn  is odd. Each of A1,A2,…,AnA_1, A_2, …, A_n contains nn distinct elements. There are no common elements between any two arrays. The worst-case time complexity of computing the median of the medians of A1,A2,…,AnA_1, A_2, …, A_n is

  1. A.

    O(n)O(n)

  2. B.

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

  3. C.

    O(n2)O(n^2)

  4. D.

    Ω(n2log⁡n)\Omega(n^2 \log n)

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 38 · 2 marks Q2957

Let 𝐺 be any connected, weighted, undirected graph.

I. 𝐺 has a unique minimum spanning tree, if no two edges of 𝐺 have the same weight.

II. 𝐺 has a unique minimum spanning tree, if, for every cut of 𝐺, there is a unique minimum-weight edge crossing the cut.

Which of the above two statements is/are TRUE?

  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 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 39 · 2 marks Q2958

Consider the following snapshot of a system running 𝑛 concurrent processes. Process 𝑖 is holding 𝑋𝑖 instances of a resource R, 1 ≤ 𝑖 ≤ 𝑛. Assume that all instances of R are currently in use. Further, for all 𝑖, process 𝑖 can place a request for at most 𝑌𝑖 additional instances of R while holding the 𝑋𝑖 instances it already has. Of the 𝑛 processes, there are exactly two processes 𝑝 and 𝑞 such that 𝑌𝑝 = 𝑌𝑞 = 0. Which one of the following conditions guarantees that no other process apart from 𝑝 and 𝑞 can complete execution?

  1. A.

    Xp+Xq<Min{Yk∣1≤k≤n,k≠p,k≠q}X_p + X_q < \text{Min} \{Y_k \mid 1 \leq k \leq n, k \neq p, k \neq q \}

  2. B.

    Xp+Xq<Max{Yk∣1≤k≤n,k≠p,k≠q}X_p + X_q < \text{Max} \{Y_k \mid 1 \leq k \leq n, k \neq p, k \neq q \}

  3. C.

    Min(Xp,Xq)≥Min{Yk∣1≤k≤n,k≠p,k≠q}\text{Min}(X_p,X_q) \geq \text{Min} \{Y_k \mid 1 \leq k \leq n, k \neq p, k \neq q\}

  4. D.

    Min(Xp,Xq)≤Max{Yk∣1≤k≤n,k≠p,k≠q}\text{Min}(X_p,X_q) \leq \text{Max} \{Y_k \mid 1 \leq k \leq n, k \neq p, k \neq q\}

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): A

Solutions and video are in the course

Question 40 · 2 marks Q2959

Consider the following statements:

I. The smallest element in a max-heap is always at a leaf node

II. The second largest element in a max-heap is always a child of the root node

III. A max-heap can be constructed from a binary search tree in Θ(𝑛) time

IV. A binary search tree can be constructed from a max-heap in Θ(𝑛) time

Which of the above statements are TRUE?

  1. A.

    I, II and III

  2. B.

    I, II and IV

  3. C.

    I, III and IV

  4. D.

    II, III and IV

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): A

Solutions and video are in the course

Question 41 · 2 marks Q2960

Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below:

These processes are run on a single processor using preemptive Shortest Remaining Time First scheduling algorithm. If the average waiting time of the processes is 1 millisecond, then the value of Z is________.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 2 ms

Solutions and video are in the course

Question 42 · 2 marks Q2961

The index node (inode) of a Unix-like file system has 12 direct, one single-indirect and one double-indirect pointers. The disk block size is 4 kB, and the disk block address is 32-bits long. The maximum possible file size is (rounded off to 1 decimal place) _________ GB.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 3.7 to 4.1

Solutions and video are in the course

Question 43 · 2 marks Q2962

Consider the augmented grammar given below:

S' → S

S → 〈L〉 | id

L → L,S | S

Let I0 = CLOSURE ({[S' → •S]}). The number of items in the set GOTO (I0 , 〈 ) is: ________.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 5

Solutions and video are in the course

Question 44 · 2 marks Q2963

Consider the following matrix:

R=[1248139271416641525125]R = \begin{bmatrix} 1 & 2 & 4 & 8 \\ 1 & 3 & 9 & 27 \\ 1 & 4 & 16 & 64 \\ 1 & 5 & 25 & 125 \end{bmatrix}

The absolute value of the product of Eigen values of 𝑅 is .

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 12

Solutions and video are in the course

Question 45 · 2 marks Q2964

A certain processor deploys a single-level cache. The cache block size is 8 words and the word size is 4 bytes. The memory system uses a 60-MHz clock. To service a cache miss, the memory controller first takes 1 cycle to accept the starting address of the block, it then takes 3 cycles to fetch all the eight words of the block, and finally transmits the words of the requested block at the rate of 1 word per cycle. The maximum bandwidth for the memory system when the program running on the processor issues a series of read operations is __________× 10^6 bytes/sec.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 160 10^6 bytes/sec

Solutions and video are in the course

Question 46 · 2 marks Q2965

Let 𝑇 be a full binary tree with 8 leaves. (A full binary tree has every level full.) Suppose two leaves 𝑎 and 𝑏 of 𝑇 are chosen uniformly and independently at random. The expected value of the distance between 𝑎 and 𝑏 in 𝑇 (i.e., the number of edges in the unique path between 𝑎 and 𝑏) is (rounded off to 2 decimal places) .

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 4.25

Solutions and video are in the course

Question 47 · 2 marks Q2966

Suppose 𝑌 is distributed uniformly in the open interval (1,6). The probability that the polynomial 3𝑥2 + 6𝑥𝑌 + 3𝑌 + 6 has only real roots is (rounded off to 1 decimal place) ________.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 0.8

Solutions and video are in the course

Question 48 · 2 marks Q2967

Let Σ be the set of all bijections from {1, … , 5} to {1, … , 5}, where 𝑖𝑑 denotes the identity function, i.e. 𝑖𝑑(𝑗) = 𝑗, ∀𝑗. Let ∘ denote composition on functions. For a string 𝑥 = 𝑥1 𝑥2 ⋯ 𝑥𝑛 ∈ Σ𝑛 , 𝑛 ≥ 0 , let 𝜋(𝑥) = 𝑥1 ∘ 𝑥2 ∘ ⋯ ∘ 𝑥𝑛. Consider the language 𝐿 = {𝑥 ∈ Σ∗ | 𝜋(𝑥) = 𝑖𝑑 }. The minimum number of states in any DFA accepting 𝐿 is .

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 120 states

Solutions and video are in the course

Question 49 · 2 marks Q2968

Consider that 15 machines need to be connected in a LAN using 8-port Ethernet switches. Assume that these switches do not have any separate uplink ports. The minimum number of switches needed is__________.

Official answer key

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

Solutions and video are in the course

Question 50 · 2 marks Q2969

What is the minimum number of 2-input NOR gates required to implement a 4-variable function expressed in sum-of-minterms form as f =  (0, 2, 5, 7, 8, 10, 13, 15)? Assume that all the inputs and their complements are available.

Answer: _______________.

Official answer key

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

Solutions and video are in the course

Question 51 · 2 marks Q2970

A relational database contains two tables Student and Performance as shown below:

The primary key of the Student table is Roll_no. For the Performance table, the columns Roll_no. and Subject_code together form the primary key. Consider the SQL query given below:

SELECT S.Student_name, sum(P.Marks)

FROM Student S, Performance P

WHERE P.Marks > 84

GROUP BY S.Student_name;

The number of rows returned by the above SQL query is ________.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 5

Solutions and video are in the course

Question 52 · 2 marks Q2971

Consider the following C program:

#include <stdio.h>
int main(){
    float sum = 0.0, j = 1.0, i = 2.0;
    while (i/j > 0.0625){
            j = j + j;
            sum = sum + i/j;
            printf("%f\n", sum);
    }
    return 0;
}

The number of times the variable sum will be printed, when the above program is executed, is _________________.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 5

Solutions and video are in the course

Question 53 · 2 marks Q2972

Consider the following C program:

#include <stdio.h>
int main()
{
     int a[] = {2, 4, 6, 8, 10};
     int i, sum = 0, *b = a + 4;
     for (i = 0; i < 5; i++)
         sum = sum + (*b – i) – *(b – i);
         printf (“%d\n”, sum);
         return 0;
 }


The output of the above C program is __________.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 10

Solutions and video are in the course

Question 54 · 2 marks Q2973

In an RSA cryptosystem, the value of the public modulus parameter 𝑛 is 3007. If it is also known that φ(𝑛) = 2880, where φ() denotes Euler’s Totient Function, then the prime factor of 𝑛 which is greater than 50 is ____________________.

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): 97

Solutions and video are in the course

Question 55 · 2 marks Q2974

Consider the following relations P(X,Y,Z), Q(X,Y,T) and R(Y,V).

How many tuples will be returned by the following relational algebra query?

Πx(σ(P.Y=R.Y∧R.V=V2))(P×R))–Πx(σ(Q.Y=R.Y∧Q.T>2))(Q×R))\Pi_x (\sigma_{(P.Y=R.Y \wedge R.V=V2))} (P \times R)) – \Pi_x (\sigma_{(Q.Y = R.Y \wedge Q.T>2))} (Q \times R))

Answer: ___________.

Official answer key

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

Solutions and video are in the course

Question 1 · 1 mark Q2910

The expenditure on the project _____ as follows: equipment Rs.20 lakhs, salaries Rs.12 lakhs, and contingency Rs.3 lakhs.

  1. A.

    break down

  2. B.

    break

  3. C.

    breaks down

  4. D.

    breaks

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 2 · 1 mark Q2911

The search engine’s business model ___________ around the fulcrum of trust.

  1. A.

    revolves

  2. B.

    plays

  3. C.

    sinks

  4. D.

    bursts

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): A

Solutions and video are in the course

Question 3 · 1 mark Q2912

Two cars start at the same time from the same location and go in the same direction. The speed of the first car is 50 km/h and the speed of the second car is 60 km/h. The number of hours it takes for the distance between the two cars to be 20 km is ___.

  1. A.

    1

  2. B.

    2

  3. C.

    3

  4. D.

    6

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): B

Solutions and video are in the course

Question 4 · 1 mark Q2913

Ten friends planned to share equally the cost of buying a gift for their teacher. When two of them decided not to contribute, each of the other friends had to pay Rs 150 more. The cost of the gift was Rs. ____.

  1. A.

    666

  2. B.

    3000

  3. C.

    6000

  4. D.

    12000

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 5 · 1 mark Q2914

A court is to a judge as _____________ is to a teacher.

  1. A.

    a student

  2. B.

    a punishment

  3. C.

    a syllabus

  4. D.

    a school

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): D

Solutions and video are in the course

Question 6 · 2 marks Q2915

The police arrested four criminals – P, Q, R and S. The criminals knew each other. They made the following statements:

P says “Q committed the crime.”

Q says “S committed the crime.”

R says “I did not do it.”

S says “What Q said about me is false.”

Assume only one of the arrested four committed the crime and only one of the statements made above is true. Who committed the crime?

  1. A.

    P

  2. B.

    R

  3. C.

    S

  4. D.

    Q

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): B

Solutions and video are in the course

Question 7 · 2 marks Q2916

In the given diagram, teachers are represented in the triangle, researchers in the circle and administrators in the rectangle. Out of the total number of the people, the percentage of administrators shall be in the range of ___________.

  1. A.

    0 to 15

  2. B.

    16 to 30

  3. C.

    31 to 45

  4. D.

    46 to 60

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 8 · 2 marks Q2917

“A recent High Court judgement has sought to dispel the idea of begging as a disease — which leads to its stigmatization and criminalization — and to regard it as a symptom. The underlying disease is the failure of the state to protect citizens who fall through the social security net.”

Which one of the following statements can be inferred from the given passage?

  1. A.

    Beggars are lazy people who beg because they are unwilling to work

  2. B.

    Beggars are created because of the lack of social welfare schemes

  3. C.

    Begging is an offence that has to be dealt with firmly

  4. D.

    Begging has to be banned because it adversely affects the welfare of the state

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): B

Solutions and video are in the course

Question 9 · 2 marks Q2918

In a college, there are three student clubs. Sixty students are only in the Drama club, 80 students are only in the Dance club, 30 students are only in the Maths club, 40 students are in both Drama and Dance clubs, 12 students are in both Dance and Maths clubs, 7 students are in both Drama and Maths clubs, and 2 students are in all the clubs. If 75% of the students in the college are not in any of these clubs, then the total number of students in the college is _____.

  1. A.

    1000

  2. B.

    975

  3. C.

    900

  4. D.

    225

Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): C

Solutions and video are in the course

Question 10 · 2 marks Q2919

Three of the five students allocated to a hostel put in special requests to the warden. Given the floor plan of the vacant rooms, select the allocation plan that will accommodate all their requests.

Request by X: Due to pollen allergy, I want to avoid a wing next to the garden.

Request by Y: I want to live as far from the washrooms as possible, since I am very sensitive to smell.

Request by Z: I believe in Vaastu and so want to stay in the South-west wing.

The shaded rooms are already occupied. WR is washroom.

  1. A.
  2. B.
  3. C.
  4. D.
Official answer key

Official answer key (GATE Computer Science & IT 2019 GATE 2019 · CS): D

Solutions and video are in the course