GATE Computer Science & IT 2020 — GATE 2020 · 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 Q2855

Consider the functions

I.    e−xe^{-x}

II.   x2−sin⁡xx^{2}-\sin x

III.    x3+1\sqrt{x^{3}+1}

Which of the above functions is/are increasing everywhere in [0, 1] ?

  1. A.

    Ⅲ only

  2. B.

    Ⅱ only

  3. C.

    Ⅱ and Ⅲ only

  4. D.

    Ⅰ and Ⅲ only

Official answer key

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

Solutions and video are in the course

Question 2 · 1 mark Q2856

For parameters aa and bb, both of which are ω(1)ω(1), T(n)=T(n1/a)+1T(n) = T(n^{1/a})+1, and T(b)=1T(b)=1.

Then T(n)T(n) is

  1. A.

    Θ(log⁡alog⁡bn)\Theta (\log_a \log _b n)

  2. B.

    Θ(log⁡abn)\Theta (\log_{ab} n)

  3. C.

    Θ(log⁡blog⁡a n)\Theta (\log_{b} \log_{a} \: n)

  4. D.

    Θ(log⁡2log⁡2n)\Theta (\log_{2} \log_{2} n)

Official answer key

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

Solutions and video are in the course

Question 3 · 1 mark Q2857

Consider the following statements.

I. Daisy chaining is used to assign priorities in attending interrupts.

II. When a device raises a vectored interrupt, the CPU does polling to identify the source of interrupt.

III. In polling,the CPU periodically checks the status bits to know if any device needs its attention.

IV. During DMA, both the CPU and DMA controller can be bus masters at the same time.

Which of the above statements is/are TRUE ?

  1. A.

    Ⅰ and Ⅱ only

  2. B.

    Ⅰ and Ⅳ only

  3. C.

    Ⅰ and Ⅲ only

  4. D.

    Ⅲ only

Official answer key

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

Solutions and video are in the course

Question 4 · 1 mark Q2858

Consider the following data path diagram.

Consider an instruction: R0←R1+R2R0 ← R1 + R2 The following steps are used to execute it over the given data path. Assume that PC is incremented appropriately. The subscripts r and w indicate read and write operations, respectively.

1.    R2r, TEMP1r,ALUadd, TEMP2wR2_{r},\text{ TEMP1}_{r},ALU_{\text{add}}, \text{ TEMP2}_{w}

2.    R1r, TEMP1wR1_{r},\text{ TEMP1}_{w}

3.    PCr, MARw, MEMrPC_{r}, \text{ MAR}_{w}, \text{ MEM}_{r}

4.     TEMP2r, R0w\text{ TEMP2}_{r}, \text{ R0}_{w}

5.     MDRr, IRw\text{ MDR}_{r}, \text{ IR}_{w}

Which one of the following is the correct order of execution of the above steps ?

  1. A.

    2, 1, 4, 5, 3

  2. B.

    1, 2, 4, 3, 5

  3. C.

    3, 5, 2, 1, 4

  4. D.

    3, 5, 1, 2, 4

Official answer key

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

Solutions and video are in the course

Question 5 · 1 mark Q2859

The preorder traversal of a binary search tree is 15, 10, 12, 11, 20, 18, 16, 19.

Which one of the following is the postorder traversal of the tree ?

  1. A.

    10, 11, 12, 15, 16, 18, 19, 20

  2. B.

    11, 12, 10, 16, 19, 18, 20, 15

  3. C.

    20, 19, 18, 16, 15, 12, 11, 10

  4. D.

    19, 16, 18, 20, 11, 12, 10, 15

Official answer key

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

Solutions and video are in the course

Question 6 · 1 mark Q2860

What is the worst case time complexity of inserting n2n^2 elements into an AVL-tree with nn elements initially ?

  1. A.

    Θ(n4)\Theta (n^{4})

  2. B.

    Θ(n2)\Theta (n^{2})

  3. C.

    Θ(n2 log n)\Theta (n^{2} \ log \ n)

  4. D.

    Θ(n3)\Theta (n^{3})

Official answer key

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

Solutions and video are in the course

Question 7 · 1 mark Q2861

Which one of the following regular expressions represents the set of all binary strings with an odd number of 1′s ?

  1. A.

    ((0+1)∗1(0+1)∗1)∗10∗((0+1)^*1(0+1)^*1)^*10^*

  2. B.

    (0∗10∗10∗)∗0∗1(0^*10^*10^*)^*0^*1

  3. C.

    10∗(0∗10∗10∗)∗10^*(0^*10^*10^*)^*

  4. D.

    (0∗10∗10∗)∗0∗10∗(0^*10^*10^*)^*0^*10^*

Official answer key

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

Solutions and video are in the course

Question 8 · 1 mark Q2862

Consider the following statements. 

I. If L1 ∪ L2 is regular, then both L1 and L2 must be regular. 

II. The class of regular languages is closed under infinite union.

Which of the above statements is/are TRUE ?

  1. A.

    Ⅰ only

  2. B.

    Ⅱ only

  3. C.

    Both Ⅰ and Ⅱ

  4. D.

    Neither Ⅰ nor Ⅱ

Official answer key

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

Solutions and video are in the course

Question 9 · 1 mark Q2863

Consider the following statements.

I. Symbol table is accessed only during lexical analysis and syntax analysis.

II. Compilers for programming languages that support recursion necessarily need heap storage for memory allocation in the run-time environment.

III. Errors violating the condition ‘any variable must be declared before its use’ are detected during syntax analysis.

Which of the above statements is/are TRUE ?

  1. A.

    I only

  2. B.

    I and III only

  3. C.

    Ⅱ only

  4. D.

    None of Ⅰ, Ⅱ and Ⅲ

Official answer key

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

Solutions and video are in the course

Question 10 · 1 mark Q2864

Consider the language L={an∣n≥0}∪{anbn∣n≥0}L = \{a^{n}\mid n \geq 0\} \cup \{a^{n}b^{n}\mid n \geq 0\} and the following statements.

I. LL is deterministic context-free.

II. LL is context-free but not deterministic context-free.

III. LL is not LL(k)LL(k) for any kk.

Which of the above statements is/are TRUE ?

  1. A.

    Ⅰ only

  2. B.

    Ⅱ only

  3. C.

    Ⅰ and Ⅲ only

  4. D.

    Ⅲ only

Official answer key

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

Solutions and video are in the course

Question 11 · 1 mark Q2865

Consider allocation of memory to a new process. Assume that none of the existing holes in the memory will exactly fit the process’s memory requirement. Hence, a new hole of smaller size will be created if allocation is made in any of the existing holes. Which one of the following statement is TRUE ?

  1. A.

    The hole created by first fit is always larger than the hole created by next fit.

  2. B.

    The hole created by worst fit is always larger than the hole created by first fit.

  3. C.

    The hole created by best fit is never larger than the hole created by first fit.

  4. D.

    The hole created by next fit is never larger than the hole created by best fit.

Official answer key

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

Solutions and video are in the course

Question 12 · 1 mark Q2866

Consider the following statements about process state transitions for a system using preemptive scheduling.

I. A running process can move to ready state.

II. A ready process can move to running state.

III. A blocked process can move to running state.

IV. A blocked process can move to ready state.

Which of the above statements are TRUE ?

  1. A.

    I, II, and III only

  2. B.

    II and III only

  3. C.

    I, II, and IV only

  4. D.

    I, II, III and IV only

Official answer key

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

Solutions and video are in the course

Question 13 · 1 mark Q2867

Consider a relational database containing the following schemas.

The primary key of each table is indicated by underlining the constituent fields.

SELECT s.sno, s.sname FROM Suppliers s, Catalogue c WHERE s.sno=c.sno AND cost > (SELECT AVG (cost) FROM Catalogue WHERE pno = ‘P4’ GROUP BY pno) ;

The number of rows returned by the above SQL query is

  1. A.

    4

  2. B.

    5

  3. C.

    0

  4. D.

    2

Official answer key

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

Solutions and video are in the course

Question 14 · 1 mark Q2868

Which one of the following is used to represent the supporting many-one relationships of a weak entity set in an entity-relationship diagram ?

  1. A.

    Diamonds with double/bold border

  2. B.

    Rectangles with double/bold border

  3. C.

    Ovals with double/bold border

  4. D.

    Ovals that contain underlined identifiers

Official answer key

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

Solutions and video are in the course

Question 15 · 1 mark Q2869

Consider the following statements about the functionality of an IP based router.

I. A router does not modify the IP packets during forwarding.

II. It is not necessary for a router to implement any routing protocol.

III. A router should reassemble IP fragments if the MTU of the outgoing link is larger than the size of the incoming IP packet.

Which of the above statements is/are TRUE ?

  1. A.

    I and II only

  2. B.

    I only

  3. C.

    II and III only

  4. D.

    II only

Official answer key

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

Solutions and video are in the course

Question 16 · 1 mark Q2870

What is the worst case time complexity of inserting nn elements into an empty linked list, if the linked list needs to be maintained in sorted order ?

  1. A.

    θ(n)\theta (n)

  2. B.

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

  3. C.

    θ(n2)\theta (n^2)

  4. D.

    θ(1)\theta (1)

Official answer key

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

Solutions and video are in the course

Question 17 · 1 mark Q2871

Let R\mathcal{R} be the set of all binary relations on the set {1,2,3}\{1,2,3\} . Suppose a relation is chosen from R at random. The probability that the chosen relation is reflexive (round off to 3 decimal places) is ________ . 

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 0.125

Solutions and video are in the course

Question 18 · 1 mark Q2872

Let GG be a group of 35 elements. Then the largest possible size of a subgroup of GG other than GG itself is ________ . 

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 7 elements

Solutions and video are in the course

Question 19 · 1 mark Q2873

A multiplexer is placed between a group of 32 registers and an accumulator to regulate data movement such that at any given point in time the content of only one register will move to the accumulator. The minimum number of select lines needed for the multiplexer is _________ .

Official answer key

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

Solutions and video are in the course

Question 20 · 1 mark Q2874

If there are mm input lines nn output lines for a decoder that is used to uniquely address a byte addressable 1 KB RAM, then the minimum value of m+nm+n  is ________ .

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 1034

Solutions and video are in the course

Question 21 · 1 mark Q2875

A direct mapped cache memory of 1 MB has a block size of 256 bytes. The cache has an access time of 3 ns and a hit rate of 94%. During a cache miss, it takes 20 ns to bring the first word of a block from the main memory, while each subsequent word takes 5 ns. The word size is 64 bits. The average memory access time in ns (round off to 1 decimal place) is ________ .

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 13.3 to 13.5

Solutions and video are in the course

Question 22 · 1 mark Q2876

Consider the following C program.

#include <stdio.h>

int main ()  {

int  a[4] [5] = {{1, 2, 3, 4, 5},

                    {6, 7,8, 9, 10},

                    {11, 12, 13, 14, 15},

                    {16, 17,18, 19, 20}};

printf(“%d\n”, *(*(a+**a+2)+3));

    return(0);

}

The output of the program is _______.

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 19

Solutions and video are in the course

Question 23 · 1 mark Q2877

Consider a double hashing scheme in which the primary hash function is h1(k)=k mod 23h_1(k) = k\ mod \ 23, and the secondary hash function is h2(k)=1+(k mod 19)h_2(k) = 1+(k \ mod \ 19). Assume that the table size is 23. Then the address returned by probe 1 in the probe sequence (assume that the probe sequence begins at probe 0) for key value k=90k = 90 is ________ . 

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 13

Solutions and video are in the course

Question 24 · 1 mark Q2878

Consider the following grammar.

S→aSB∣dS \rightarrow aSB \mid d

B→bB \rightarrow b

The number of reduction steps taken by a bottom-up parser while accepting the string aaadbbbaaadbbb is ________ .

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 7

Solutions and video are in the course

Question 25 · 1 mark Q2879

Assume that you have made a request for a web page through your web browser to a web server. Initially the browser cache is empty. Further, the browser is configured to send HTTP requests in non-persistent mode. The web page contains text and five very small images. The minimum number of TCP connections required to display the web page completely in your browser is ________ .

Official answer key

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

Solutions and video are in the course

Question 26 · 2 marks Q2880

Which of the following languages are undecidable? Note that ⟨M⟩⟨M⟩ indicates encoding of the Turing machine MM.

L1={⟨M⟩∣L(M)=∅}L_1 = \{\left \langle M \right \rangle \mid L(M) = \varnothing \}

L2={⟨M,w,q⟩∣M on input w reaches state q in exactly 100 steps}L_2= \{\left \langle M,w,q \right \rangle \mid M \text{ on input } w \text{ reaches state } q \text{ in exactly } 100 \text{ steps}\}

L3={⟨M⟩∣L(M) is not recursive}L_3= \{\left \langle M \right \rangle \mid L (M) \text{ is not recursive}\}

\(L_4= \{\left \langle M \right \rangle \mid L(M) \text{contains at least \(21\) members}\}\)

  1. A.

    L1L_1, L3L_3, and L4L_4 only

  2. B.

    L1L_1 and L3L_3 only

  3. C.

    L2L_2 and L3L_3 only

  4. D.

    L2L_2, L3L_3, and L4L_4 only

Official answer key

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

Solutions and video are in the course

Question 27 · 2 marks Q2881

Let AA and BB  be two n×nn×n matrices over real numbers. Let rank(MM) and det(MM) denote the rank and determinant of a matrix MM, respectively. Consider the following statements.

<strong>I.</strong> rank(<span class="mathjax-latex">ABAB</span>) = rank(<span class="mathjax-latex">AA</span>)*rank (<span class="mathjax-latex">BB</span>) <strong>II.</strong> det(<span class="mathjax-latex">ABAB</span>) = det(<span class="mathjax-latex">AA</span>)*det(<span class="mathjax-latex">BB</span>) <strong>III.</strong> rank(<span class="mathjax-latex">A+BA+B</span>) ≤ rank(<span class="mathjax-latex">AA</span>) + rank(<span class="mathjax-latex">BB</span>) <strong>IV.</strong> det(<span class="mathjax-latex">A+BA+B</span>) ≤ det(<span class="mathjax-latex">AA</span>) + det(<span class="mathjax-latex">BB</span>)

Which of the above statements are TRUE ?

  1. A.

    I and II only

  2. B.

    I and IV only

  3. C.

    II and III only

  4. D.

    III and IV only

Official answer key

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

Solutions and video are in the course

Question 28 · 2 marks Q2882

Consider the Boolean function z(a,b,c)z(a,b,c).

Which one of the following minterm lists represents the circuit given above ?

  1. A.

    z=∑(0,1,3,7)z=\sum (0,1,3,7)

  2. B.

    z=∑(1,4,5,6,7)z=\sum (1,4,5,6,7)

  3. C.

    z=∑(2,4,5,6,7)z=\sum (2,4,5,6,7)

  4. D.

    z=∑(2,3,5)z=\sum (2,3,5)

Official answer key

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

Solutions and video are in the course

Question 29 · 2 marks Q2883

Consider three registers R1,R2R1, R2, and R3R3 that store numbers in IEEE−754 single precision floating point format. Assume that R1R1 and R2R2 contain the values (in hexadecimal notation) 0x42200000 and 0xC1200000, respectively.

If R3=R1R2R3 = \frac {R1} {R2}, what is the value stored in R3R3 ?

  1. A.

    0x40800000

  2. B.

    0xC0800000

  3. C.

    0x83400000

  4. D.

    0xC8500000

Official answer key

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

Solutions and video are in the course

Question 30 · 2 marks Q2884

A computer system with a word length of 32 bits has a 16 MB byte- addressable main memory and a 64 KB, 4-way set associative cache memory with a block size of 256 bytes. Consider the following four physical addresses represented in hexadecimal notation.

A1=0x42C8A4,        A2=0x546888,        A3=0x6A289C,        A4=0x5E4880A1 = 0x42C8A4, \ \ \ \ \ \ \ \ A2 = 0x546888, \ \ \ \ \ \ \ \ A3 = 0x6A289C, \ \ \ \ \ \ \ \ A4 = 0x5E4880

Which one of the following is TRUE ?

  1. A.

    A1A1 and A4A4 are mapped to different cache sets.

  2. B.

    A2A2 and A3A3 are mapped to the same cache set.

  3. C.

    A3A3 and A4A4 are mapped to the same cache set.

  4. D.

    A1A1 and A3A3 are mapped to the same cache set.

Official answer key

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

Solutions and video are in the course

Question 31 · 2 marks Q2885

Let G=(V,E)G = (V, E) be a weighted undirected graph and let TT  be a Minimum Spanning Tree (MSTMST) of GG maintained using adjacency lists. Suppose a new weighed edge (u,v)∈V×V(u, v) ∈ V×V is added to GG. The worst case time complexity of determining if TT is still an MSTMST of the resultant graph is

  1. A.

    Θ(∣E∣+∣V∣)\Theta (\mid E \mid + \mid V \mid) \\

  2. B.

    Θ(∣E∣∣V∣)\Theta (\mid E \mid \mid V \mid) \\

  3. C.

    Θ(E∣log⁡∣V∣)\Theta(E \mid \log \mid V \mid) \\

  4. D.

    Θ(∣V∣)\Theta( \mid V \mid)

Official answer key

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

Solutions and video are in the course

Question 32 · 2 marks Q2886

Consider the following languages.

L1={wxyx∣w,x,y∈(0+1)+}L2={xy∣x,y∈(a+b)∗,∣x∣=∣y∣,x≠y}\begin{array}{ll} L_1= \{ wxyx \mid w,x,y \in (0+1)^{+} \} \\ L_2= \{xy \mid x,y \in (a+b)^{*}, \mid x \mid=\mid y \mid, x \neq y \} \end{array}

Which one of the following is TRUE ?

  1. A.

    L1L_1 is regular and L2L_2 is context- free.

  2. B.

    L1L_1 context- free but not regular and L2L_2 is context-free

  3. C.

    Neither L1L_1 nor L2L_2 is context- free

  4. D.

    L1L_1 context- free but L2L_2 is not context-free

Official answer key

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

Solutions and video are in the course

Question 33 · 2 marks Q2887

Consider the productions A→PQA → PQ and A→XYA → XY. Each of the five non-terminals A,P,Q,XA,P,Q,X, and YY has two attributes: ss is a synthesized attribute, and ii is an inherited attribute. Consider the following rules.

Rule 1 : P.i=A.i+2, Q.i=P.i+A.i, P . i = A.i + 2, \: Q.i = P. i + A.i, and A.s=P.s+Q.sA.s = P.s +Q. s

Rule 2 : X.i=A.i+Y.s X.i = A.i + Y.s, and Y.i=X.s+A.iY. i = X. s +A .i

Which one of the following is TRUE ?

  1. A.

    Both Rule 1 and Rule 2 are L−attributedL - attributed

  2. B.

    Only Rule 1 is L−attributedL - attributed

  3. C.

    Only Rule 2 is L−attributedL - attributed

  4. D.

    Neither Rule 1 nor Rule 2 is L−attributedL - attributed

Official answer key

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

Solutions and video are in the course

Question 34 · 2 marks Q2888

Each of a set of n processes executes the following code using two semaphores a and b initialized to 1 and 0, respectively. Assume that count is a shared variable initialized to 0 and not used in CODE SECTION P.

CODE SECTION P

Each process executes its own CODE SECTION P before the synchronization code below.

wait(a);
count = count + 1;
if (count == n) signal(b);
signal(a);
wait(b);
signal(b);

CODE SECTION Q

Each process begins its own CODE SECTION Q only after completing the synchronization code above.

What does the code achieve?

  1. A.

    It ensures that no process executes CODE SECTION Q before every process has finished CODE SECTION P.

  2. B.

    It ensures that at most two processes are in CODE SECTION Q at any time.

  3. C.

    It ensures that all processes execute CODE SECTION P mutually exclusively.

  4. D.

    It ensures that at most n−1 processes are in CODE SECTION P at any time.

Official answer key

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

Solutions and video are in the course

Question 35 · 2 marks Q2889

Consider the following five disk access requests of the form (request id, cylinder number) that are present in the disk scheduler queue at a given time.

(P, 155), (Q, 85), (R, 110), (S, 30), (T, 115) 

Assume the head is positioned at cylinder 100. The scheduler follows Shortest Seek Time First scheduling to service the requests.

Which one of the following statements is FALSE ?

  1. A.

    T is serviced before P

  2. B.

    Q is serviced after S, but before T

  3. C.

    The head reverses its direction of movement between servicing of Q and P

  4. D.

    R is serviced before P

Official answer key

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

Solutions and video are in the course

Question 36 · 2 marks Q2890

Consider a relational table R that is in 3NF, but not in BCNF. Which one of the following statements is TRUE ?

  1. A.

    R has a nontrivial functional dependency X→A, where X is not a superkey and A is a prime attribute.

  2. B.

    R has a nontrivial functional dependency X→A, where X is not a superkey and A is a non-prime attribute and X is not a proper subset of any key.

  3. C.

    R has a nontrivial functional dependency X→A, where X is not a superkey and A is a non-prime attribute and X is a proper subset of some key.

  4. D.

    A cell in R holds a set instead of an atomic value.

Official answer key

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

Solutions and video are in the course

Question 37 · 2 marks Q2891

Consider a schedule of transactions T1T_1 and T2T_2:

T1RARCWDWBCommitT2RBWBRDWCCommit\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|} \hline T_1 & RA & & & RC & & WD & & WB & \text{Commit} & \\ \hline T_2 & & RB & WB & & RD & & WC & & & \text{Commit} \\ \hline \end{array}

Here, RX stands for “Read(X)” and WX stands for “Write(X)”. Which one of the following schedules is conflict equivalent to the above schedule ?

  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 2020 GATE 2020 · CS): A

Solutions and video are in the course

Question 38 · 2 marks Q2892

An organization requires a range of IP address to assign one to each of its 1500 computers. The organization has approached an Internet Service Provider (ISP) for this task. The ISP uses CIDR and serves the requests from the available IP address space 202.61.0.0/17. The ISP wants to assign an address space to the organization which will minimize the number of routing entries in the ISP’s router using route aggregation. Which of the following address spaces are potential candidates from which the ISP can allot any one of the organization ?

I. 202.61.84.0 / 21
II. 202.61.104.0 / 21
III. 202.61.64.0 / 21
IV. 202.61.144.0 / 21 

  1. A.

    I and II only

  2. B.

    II and III onlY

  3. C.

    III and IV only

  4. D.

    I and IV only

Official answer key

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

Solutions and video are in the course

Question 39 · 2 marks Q2893

Which one of the following predicate formulae is NOT logically valid ?

Note that WW is a predicate formula without any free occurrence of xx.

  1. A.

    ∀x(p(x)∨W)≡∀x (px)∨W\forall x (p(x) \vee W) \equiv \forall x \: ( px) \vee W

  2. B.

    ∃x(p(x)∧W)≡∃x p(x)∧W\exists x(p(x) \wedge W) \equiv \exists x \: p(x) \wedge W

  3. C.

    ∀x(p(x)→W)≡∀x p(x)→W\forall x(p(x) \rightarrow W) \equiv \forall x \: p(x) \rightarrow W

  4. D.

    ∃x(p(x)→W)≡∀x p(x)→W\exists x(p(x) \rightarrow W) \equiv \forall x \: p(x) \rightarrow W

Official answer key

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

Solutions and video are in the course

Question 40 · 2 marks Q2894

Let G=(V,E)G = (V,E) be a directed, weighted graph with weight function w:E→Rw: E \rightarrow \mathbb{R}. For some function f:V→Rf: V \rightarrow \mathbb{R}, for each edge (u,v)∈E (u,v)∈E, define w′(u,v)w′(u,v) as w(u,v)+f(u)−f(v)w(u,v)+f(u)−f(v).

Which one of the options completes the following sentence so that it is TRUE ?

“The shortest paths in GG under w are shortest paths under w′w′ too, _________”.

  1. A.

    for every f:V→Rf: V \rightarrow \mathbb{R}

  2. B.

    if and only if ∀u∈V, f(u)\forall u \in V, \: f(u) is positive

  3. C.

    if and only if ∀u∈V, f(u)\forall u \in V, \: f(u) is negative

  4. D.

    if and only if f(u)f(u) is the distance from ss to uu in the graph obtained by adding a new vertex ss  to GG and edges of zero weight from ss to every vertex of GG

Official answer key

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

Solutions and video are in the course

Question 41 · 2 marks Q2895

In a balanced binary search tree with nn elements, what is the worst-case time complexity of reporting all elements in the range [a,b][a,b]? Assume that the number of reported elements is kk.

  1. A.

    Θ(log⁡n)\Theta (\log n)

  2. B.

    Θ(log⁡n+k)\Theta (\log n +k)

  3. C.

    Θ(klog⁡n)\Theta (k \log n)

  4. D.

    Θ(nlog⁡k)\Theta ( n \log k)

Official answer key

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

Solutions and video are in the course

Question 42 · 2 marks Q2896

The number of permutations of the characters in LILAC so that no character appears in its original position, if the two L’s are indistinguishable, is ________ . 

Official answer key

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

Solutions and video are in the course

Question 43 · 2 marks Q2897

Consider a non-pipelined processor operating at 2.5 GHz. It takes 5 clock cycles to complete an instruction. A 5-stage pipeline is made from this processor. Pipelining overhead forces the pipelined processor to operate at 2 GHz. In a given program, 30% of the instructions are memory instructions, 60% are ALU instructions, and the remaining instructions are branch instructions. Cache misses cause 5% of the memory instructions to stall for 50 clock cycles each, and 50% of the branch instructions stall for 2 cycles each. Assume that ALU instructions cause no stalls. For this program, the speedup achieved by the pipelined processor over the non-pipelined processor (round off to 2 decimal places) is __________.

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 2.15 to 2.18

Solutions and video are in the course

Question 44 · 2 marks Q2898

A processor has 64 registers and uses 16-bit instruction format. It has two types of instructions: I-type and R-type. Each I-type instruction contains an opcode, a register name, and a 4-bit immediate value. Each R-type instruction contains an opcode and two register names. If there are 8 distinct I-type opcodes, then the maximum number of distinct R-type opcodes is _______ .

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 14

Solutions and video are in the course

Question 45 · 2 marks Q2899

For n>2n>2, let a∈{0,1}na ∈ \{0, 1\}^n be a non-zero vector. Suppose that xx is chosen uniformly at random from {0,1}n\{0,1\}^n. Then, the probability that Σi=1naixi\displaystyle{} \Sigma_{i=1}^n a_i x_i is an odd number is _________ .

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 0.5

Solutions and video are in the course

Question 46 · 2 marks Q2900

Consider the following C functions.

The return value of fun2(5) is ________ . 

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 55

Solutions and video are in the course

Question 47 · 2 marks Q2901

Consider the array representation of a binary min-heap containing 1023 elements. The minimum number of comparisons required to find the maximum in the heap is _________ . 

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 511

Solutions and video are in the course

Question 48 · 2 marks Q2902

Consider the following C functions.

The value returned by pp(3,4) is ________ . 

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 81

Solutions and video are in the course

Question 49 · 2 marks Q2903

Consider a graph G=(V,E)G = (V, E), where V={v1,v2,…,v100} V = \{ v_1,v_2,…,v_{100} \}, E={(vi,vj)∣1≤i<j≤100}E = \{ (v_i, v_j) ∣ 1≤ i < j ≤ 100 \} and weight of the edge (vi,vj)(v_i, v_j)  is ∣i–j∣ ∣i–j∣. The weight of minimum spanning tree of GG is ________. 

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 99

Solutions and video are in the course

Question 50 · 2 marks Q2904

Consider the following set of processes, assumed to have arrived at time 0. Consider the CPU scheduling algorithms Shortest Job First (SJF) and Round Robin (RR). For RR, assume that the processes are scheduled in the order P1,P2,P3,P4P_1, P_2, P_3, P_4.

ProcessesP1P2P3P4Burst time (in ms)8724\begin{array}{|l|l|l|l|l|} \hline \text{Processes} & P_1 & P_2 & P_3 & P_4 \\ \hline \text{Burst time (in ms)} &8 & 7 & 2 & 4 \\ \hline \end{array}

If the time quantum for RR is 4 ms, then the absolute value of the difference between the average turnaround times (in ms) of SJF and RR (round off to 2 decimal places) is _________ . 

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 5.25 ms

Solutions and video are in the course

Question 51 · 2 marks Q2905

Consider the following language.

L={x∈{a,b}∗∣L = \{{ x\in \{a,b\}^*\mid}number of a’sa’s in xx divisible by 2 but not divisible by 3 }

The minimum number of states in DFA that accepts LL is _________ . 

Official answer key

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

Solutions and video are in the course

Question 52 · 2 marks Q2906

Graph GG  is obtained by adding vertex s to K3,4K_{3,4} and making ss adjacent to every vertex of K3,4K_{3,4}. The minimum number of colours required to edge-colour GG is _________ . 

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 7

Solutions and video are in the course

Question 53 · 2 marks Q2907

Consider a paging system that uses 1-level page table residing in main memory and a TLB for address translation. Each main memory access takes 100 ns and TLB lookup takes 20 ns. Each page transfer to/from the disk takes 5000 ns. Assume that the TLB hit ratio is 95%, page fault rate is 10%. Assume that for 20% of the total page faults, a dirty page has to be written back to disk before the required page is read from disk. TLB update time is negligible. The average memory access time in ns (round off to 1 decimal places) is ___________ .

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 154.5 to 155.5

Solutions and video are in the course

Question 54 · 2 marks Q2908

Consider a database implemented using B+ tree for file indexing and installed on a disk drive with block size of 4 KB. The size of search key is 12 bytes and the size of tree/disk pointer is 8 bytes. Assume that the database has one million records. Also assume that no node of the B+ tree and no records are present initially in main memory. Consider that each record fits into one disk block. The minimum number of disk accesses required to retrieve any record in the database is ___________ .

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 4

Solutions and video are in the course

Question 55 · 2 marks Q2909

Consider a TCP connection between a client and a server with the following specifications; the round trip time is 6 ms, the size of the receiver advertised window is 50 KB, slow-start threshold at the client is 32 KB, and the maximum segment size is 2 KB. The connection is established at time t=0. Assume that there are no timeouts and errors during transmission. Then the size of the congestion window (in KB) at time t+60 ms after all acknowledgements are processed is _________ . 

Official answer key

Official answer key (GATE Computer Science & IT 2020 GATE 2020 · CS): 44 KB

Solutions and video are in the course

Question 1 · 1 mark Q2845

Raman is confident of speaking English _______ six months as he has been practising regularly _______ the last three weeks.

  1. A.

    during, for

  2. B.

    for, since

  3. C.

    for, in

  4. D.

    within, for

Official answer key

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

Solutions and video are in the course

Question 2 · 1 mark Q2846

His knowledge of the subject was excellent but his classroom performance was _______ .

  1. A.

    extremely poor

  2. B.

    good

  3. C.

    desirable

  4. D.

    praiseworthy

Official answer key

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

Solutions and video are in the course

Question 3 · 1 mark Q2847

Select the word that fits the analogy:

Cook : Cook :: Fly : _______

  1. A.

    Flyer

  2. B.

    Flying

  3. C.

    Flew

  4. D.

    Flighter

Official answer key

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

Solutions and video are in the course

Question 4 · 1 mark Q2848

The dawn of the 21st century witnessed the melting glaciers oscillating between giving too much and too little to billions of people who depend on them for fresh water. The UN climate report estimates that without deep cuts to man-made emissions, at least 30% of the northern hemisphere’s surface permafrost could melt by the end of the century. Given this situation of imminent global exodus of billions of people displaced by rising seas, nation-states need to rethink their carbon footprint for political concerns, if not for environmental ones. 

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

  1. A.

    Nation-states do not have environmental concerns.

  2. B.

    Nation-states are responsible for providing fresh water to billions of people.

  3. C.

    Billions of people are responsible for man-made emissions.

  4. D.

    Billions of people are affected by melting glaciers.

Official answer key

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

Solutions and video are in the course

Question 5 · 1 mark Q2849

There are multiple routes to reach from node 1 to node 2, as shown in the network.

The cost of travel on an edge between two nodes is given in rupees. Nodes ‘a’, ‘b’, ‘c’, ‘d’, ‘e’, and ‘f’ are toll booths. The toll price at toll booths marked ‘a’ and ‘e’ is Rs. 200, and is Rs. 100 for the other toll booths. Which is the cheapest route from node 1 to node 2 ?

  1. A.

    1−a−c−2

  2. B.

    1−f−b−2

  3. C.

    1−b−2

  4. D.

    1−f−e−2

Official answer key

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

Solutions and video are in the course

Question 6 · 2 marks Q2850

Goods and Services Tax (GST) is an indirect tax introduced in India in 2017 that is imposed on the supply of goods and services, and it subsumes all indirect taxes except few. It is a destination-based tax imposed on goods and services used, and it is not imposed at the point of origin from where goods come. GST also has a few components specific to state governments, central government and Union Territories (UTs).


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

  1. A.

    GST is imposed on the production of goods and services.

  2. B.

    GST includes all indirect taxes.

  3. C.

    GST does not have a component specific to UT.

  4. D.

    GST is imposed at the point of usage of goods and services.

Official answer key

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

Solutions and video are in the course

Question 7 · 2 marks Q2851

If values of P=3, R=27, T=243, then find the value of Q+S = ________ .

  1. A.

    40

  2. B.

    80

  3. C.

    90

  4. D.

    110

Official answer key

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

Solutions and video are in the course

Question 8 · 2 marks Q2852

The figure below shows an annular ring with outer and inner as b and a, respectively. The annular space has been painted in the form of blue colour circles touching the outer and inner periphery of annular space. If maximum n number of circles can be painted, then the unpainted area available in annular space is _________ .

  1. A.

    π × [ (b² − a²) − (n/4)(b − a)² ]

  2. B.

    π[(b²−a²)−n(b−a)²]

  3. C.

    π[(b²−a²)+(n/4)(b−a)²]

  4. D.

    π[(b²−a²)+n(b−a)²]

Official answer key

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

Solutions and video are in the course

Question 9 · 2 marks Q2853

Two straight lines are drawn perpendicular to each other in X−Y plane. If α and β are the acute angles the straight lines make with the X- axis, then α+β is ________ .

  1. A.

    60°

  2. B.

    90°

  3. C.

    120°

  4. D.

    180°

Official answer key

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

Solutions and video are in the course

Question 10 · 2 marks Q2854

The total revenue of a company during 2014−2018 is shown in the bar graph. If the total expenditure of the company in each year is 500 million rupees, then the aggregate profit or loss (in percentage) on the total expenditure of the company during 2014−2018 is _________ .

  1. A.

    16.67% profit

  2. B.

    16.67% loss

  3. C.

    20% profit

  4. D.

    20% loss

Official answer key

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

Solutions and video are in the course