GATE 2021 CS (Set 1) PYQ: question paper PDF and answer key

The official GATE 2021 Computer Science & Information Technology (Set 1) paper, organised by IIT Bombay: 65 questions for 100 marks in 3 hours. Download the official question paper and answer key as PDFs. Below is how the marks were split by topic, the complete official answer key and 5 questions solved step by step.

Source: the official paper and answer key published by IIT Bombay for GATE 2021 (official GATE site). Spotted a mistake? Email team@lemyte.com.

General Aptitude
10 · 15 marks
Computer Science & Information Technology
55 · 85 marks
MCQ / MSQ / NAT
34 / 13 / 18
Marks to all
None

Not in 2027 1 question (Q 13) is on topics removed from the GATE 2027 syllabus. They are marked in the answer key below. What changed for CS

Where the marks were

GATE 2021 CS (Set 1) topic-wise marks

Computer Science & Information Technology questions only; General Aptitude adds 15 marks on top. The top three topics carried 29 of the 85 subject marks. To compare with every CS paper since 2014, see GATE CS subject-wise weightage, 2014 to 2026.

TopicQuestionsMarks
Algorithms710
Databases610
Discrete Mathematics69
Theory of Computation58
Compiler Design58
Computer Networks47
Digital Logic47
Programming and Data Structures46
Operating System56
Computer Organization and Architecture46
Probability and Statistics35
Linear Algebra12
Calculus11

Official answer key

GATE 2021 CS (Set 1) answer key

All 65 answers from the official key. Numerical answers are ranges; “or” means the key accepts either answer.

Download the official GATE 2021 CS (Set 1) answer key (PDF)
QTopicTypeMarksAnswer
1Quantitative AptitudeMCQ1C
2Verbal AptitudeMCQ1C
3Spatial AptitudeMCQ1A
4Verbal AptitudeMCQ1C
5Spatial AptitudeMCQ1A
6Quantitative AptitudeMCQ2C
7Quantitative AptitudeMCQ2C
8Verbal AptitudeMCQ2D
9Quantitative AptitudeMCQ2C
10Analytical AptitudeMCQ2C
11Programming and Data StructuresMCQ1D
12AlgorithmsMCQ1C
13Computer NetworksNot in GATE 2027 syllabus: ARP, DHCP and ICMPMCQ1C
14Discrete MathematicsMCQ1B
15AlgorithmsMCQ1D
16Theory of ComputationMCQ1C
17Digital LogicMCQ1A
18Compiler DesignMCQ1C
19AlgorithmsMCQ1C
20Compiler DesignMCQ1C
21Operating SystemMSQ1A, C
22Theory of ComputationMSQ1D
23Operating SystemMSQ1A, C
24Operating SystemMSQ1A, C
25DatabasesMSQ1A
26AlgorithmsNumerical13
27Operating SystemNumerical112
28Probability and StatisticsNumerical10.35 to 0.39
29Discrete MathematicsNumerical165
30Programming and Data StructuresNumerical186
31Discrete MathematicsNumerical111
32Computer Organization and ArchitectureNumerical1-7.75
33Computer Organization and ArchitectureNumerical117
34CalculusNumerical10.25
35DatabasesNumerical1819 to 820 or 205
36Compiler DesignMCQ2A
37DatabasesMCQ2C
38AlgorithmsMCQ2C
39Compiler DesignMCQ2B
40Theory of ComputationMCQ2A
41DatabasesMCQ2A
42Programming and Data StructuresMCQ2B
43Discrete MathematicsMCQ2B
44Theory of ComputationMCQ2D
45Probability and StatisticsMCQ2D
46Discrete MathematicsMCQ2A
47DatabasesMCQ2B
48Digital LogicMCQ2A
49Digital LogicMCQ2A
50AlgorithmsMSQ2B
51Digital LogicMSQ2B, C, D
52Computer NetworksMSQ2A, B, C
53Computer NetworksMSQ2A, C
54DatabasesMSQ2C
55Discrete MathematicsMSQ2C
56Operating SystemMSQ2A, B, D
57AlgorithmsMSQ2A, C
58Computer NetworksNumerical250 to 52
59Computer Organization and ArchitectureNumerical217160
60Probability and StatisticsNumerical20.04
61Linear AlgebraNumerical23
62Programming and Data StructuresNumerical21023
63Compiler DesignNumerical26
64Theory of ComputationNumerical250
65Computer Organization and ArchitectureNumerical250

Free solved questions

5 solved questions from GATE 2021 CS (Set 1)

Question text and figures as in the official paper, the answer from the official key, and a worked solution. The other 60 solutions are in your report after you take the paper.

Q7 · General Aptitude · MCQ · 2 marks

We have 2 rectangular sheets of paper, M and N, of dimensions 6 cm × 1 cm each. Sheet M is rolled to form an open cylinder by bringing the short edges of the sheet together. Sheet N is cut into equal square patches and assembled to form the largest possible closed cube. Assuming the ends of the cylinder are closed, the ratio of the volume of the cylinder to that of the cube is __________

  • (A)
    π2\frac{\pi}{2}
  • (B)
    3π\frac{3}{\pi}
  • (C)
    9π\frac{9}{\pi}
  • (D)
    3π3\pi

Answer (official key): C

Show the worked solution

Bringing the short edges together means the cylinder has:

  • circumference = 6 cm
  • height = 1 cm

So

2πr=6⇒r=3π.2\pi r = 6 \Rightarrow r = \frac{3}{\pi}.

Hence cylinder volume is

Vc=πr2h=π(3π)2(1)=9π.V_c = \pi r^2 h = \pi\left(\frac{3}{\pi}\right)^2(1)=\frac{9}{\pi}.

For the cube, the largest possible square patches from a 6 cm × 1 cm strip have side 1 cm, giving 6 faces of a cube of side 1 cm. So cube volume is

Vcube=1.V_{cube}=1.

Therefore,

VcVcube=9π.\frac{V_c}{V_{cube}}=\frac{9}{\pi}.

So the correct answer is Option C.

Q8 · General Aptitude · MCQ · 2 marks

Some people suggest anti-obesity measures (AOM) such as displaying calorie information in restaurant menus. Such measures sidestep addressing the core problems that cause obesity: poverty and income inequality.

Which one of the following statements summarizes the passage?

  • (A)
    The proposed AOM addresses the core problems that cause obesity.
  • (B)
    If obesity reduces, poverty will naturally reduce, since obesity causes poverty.
  • (C)
    AOM are addressing the core problems and are likely to succeed.
  • (D)
    AOM are addressing the problem superficially.

Answer (official key): D

Show the worked solution

The passage says these anti-obesity measures do not address the core causes of obesity, and instead only sidestep them. So the best summary is that they are addressing the problem superficially.

Therefore, the correct answer is Option D.

Q34 · Calculus · Numerical · 1 mark

Consider the following expression:

lim⁡x→−32x+22−4x+3\lim_{x\to -3}\frac{\sqrt{2x+22}-4}{x+3}

The value of the above expression (rounded to 2 decimal places) is __________.

Answer (official key): 0.25

Show the worked solution

Rationalize the numerator:

2x+22−4x+3⋅2x+22+42x+22+4=2x+22−16(x+3)(2x+22+4).\frac{\sqrt{2x+22}-4}{x+3} \cdot \frac{\sqrt{2x+22}+4}{\sqrt{2x+22}+4} = \frac{2x+22-16}{(x+3)(\sqrt{2x+22}+4)}.

So

=2(x+3)(x+3)(2x+22+4)=22x+22+4.= \frac{2(x+3)}{(x+3)(\sqrt{2x+22}+4)} = \frac{2}{\sqrt{2x+22}+4}.

Now substitute x=−3x=-3:

216+4=28=0.25.\frac{2}{\sqrt{16}+4}=\frac{2}{8}=0.25.

Therefore, the answer is 0.25.

Q44 · Theory of Computation · MCQ · 2 marks

Consider the following language.

L={ w∈{0,1}∗∣w ends with the substring 011 }L=\{\,w\in\{0,1\}^* \mid w \text{ ends with the substring } 011\,\}

Which one of the following deterministic finite automata accepts LL?

  • (A)
    GATE 2021 CS (Set 1) question 44 (Theory of Computation), option A
  • (B)
    GATE 2021 CS (Set 1) question 44 (Theory of Computation), option B
  • (C)
    GATE 2021 CS (Set 1) question 44 (Theory of Computation), option C
  • (D)
    GATE 2021 CS (Set 1) question 44 (Theory of Computation), option D

Answer (official key): D

Show the worked solution

This is a DFA construction question for strings ending with the suffix 011. The automaton must remember the longest suffix of the input that is also a prefix of 011.

The official answer key marks Option D as correct.

Therefore, the correct answer is Option D.

Q50 · Algorithms · MSQ · 2 marks

An articulation point in a connected graph is a vertex such that removing the vertex and its incident edges disconnects the graph into two or more connected components.

Let TT be a DFS tree obtained by doing DFS in a connected undirected graph GG.

Which of the following options is/are correct?

  • (A)
    Root of TT can never be an articulation point in GG.
  • (B)
    Root of TT is an articulation point in GG if and only if it has 2 or more children.
  • (C)
    A leaf of TT can be an articulation point in GG.
  • (D)
    If uu is an articulation point in GG such that xx is an ancestor of uu in TT and yy is a descendent of uu in TT, then all paths from xx to yy in GG must pass through uu.

Answer (official key): B

Show the worked solution

In a DFS tree of a connected undirected graph, the root is an articulation point if and only if it has at least two DFS-tree children. A DFS-tree leaf cannot be an articulation point because removing it cannot disconnect any child subtree. Statement D is too strong because alternate back-edge paths may exist.

Therefore, the correct answer is B.

The other 60 questions are solved in your report when you take GATE 2021 CS (Set 1) as a 3-hour test.

Take GATE 2021 CS (Set 1) as a test

Questions about GATE 2021 CS (Set 1)

How many questions are in the GATE 2021 CS (Set 1) paper?

65 questions for 100 marks: 10 General Aptitude questions worth 15 marks and 55 Computer Science & Information Technology questions worth 85 marks. By type, there were 34 MCQs, 13 MSQs, 18 numerical answer (NAT) questions. The paper lasted 3 hours.

Is there negative marking in GATE 2021 CS (Set 1)?

Yes, for MCQs only. A wrong MCQ answer costs one-third of its marks (−⅓ for a 1-mark question, −⅔ for a 2-mark question). MSQ and numerical (NAT) questions have no negative marking, and an MSQ earns marks only when every correct option is chosen.

Which topics carried the most marks in GATE 2021 CS (Set 1)?

Outside General Aptitude, the biggest topics were Algorithms (10 marks), Databases (10 marks), Discrete Mathematics (9 marks). The full topic-wise split is in the table on this page.

Were any GATE 2021 CS (Set 1) questions awarded marks to all?

No. Every question was graded with the answer in the official key.

Where does this GATE 2021 CS (Set 1) answer key come from?

From the official answer key published by IIT Bombay, which organised GATE 2021. Range answers for numerical questions and questions with more than one accepted answer are kept exactly as the key gives them.

More GATE papers