GATE 2018 CS question paper PDF and answer key

The official GATE 2018 Computer Science & Information Technology paper, organised by IIT Guwahati: 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 Guwahati for GATE 2018. Spotted a mistake? Email team@lemyte.com.

General Aptitude
10 · 15 marks
Computer Science & Information Technology
55 · 85 marks
MCQ / MSQ / NAT
41 / 0 / 24
Marks to all
None

Not in 2027 1 question (Q 25) 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 2018 CS topic-wise marks

Computer Science & Information Technology questions only; General Aptitude adds 15 marks on top. The top three topics carried 32 of the 85 subject marks.

TopicQuestionsMarks
Programming and Data Structures812
Computer Organization and Architecture711
Discrete Mathematics69
Theory of Computation58
Operating System58
Algorithms48
Computer Networks57
Databases46
Compiler Design35
Digital Logic34
Linear Algebra23
Probability and Statistics23
Calculus11

Free solved questions

5 solved questions from GATE 2018 CS

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.

Q6 · General Aptitude · MCQ · 2 marks

A six sided unbiased die with four green faces and two red faces is rolled seven times. Which of the following combinations is the most likely outcome of the experiment?

  • (A)
    Three green faces and four red faces.
  • (B)
    Four green faces and three red faces.
  • (C)
    Five green faces and two red faces.
  • (D)
    Six green faces and one red face.

Answer (official key): C

Solution

Probability of getting a green face is:

p=46=23.p=\frac{4}{6}=\frac{2}{3}.

The number of green outcomes in 7 rolls follows a binomial distribution:

X∼Binomial⁡(7,23).X\sim \operatorname{Binomial}\left(7,\frac{2}{3}\right).

The most likely number of green outcomes is the mode:

⌊(n+1)p⌋=⌊8⋅23⌋=5.\left\lfloor (n+1)p \right\rfloor = \left\lfloor 8\cdot\frac{2}{3} \right\rfloor = 5.

So the most likely outcome is five green faces and two red faces.

Therefore, the correct answer is Option C.

Q7 · General Aptitude · MCQ · 2 marks

In the figure below, ∠DEC+∠BFC\angle DEC + \angle BFC is equal to ____________.

Geometry figure for Q9

  • (A)
    ∠BCD − ∠BAD
  • (B)
    ∠BAD + ∠BCF
  • (C)
    ∠BAD + ∠BCD
  • (D)
    ∠CBA + ∠ADC

Answer (official key): A

Solution

From the figure:

  • A,D,EA, D, E lie on one straight line.
  • E,C,BE, C, B lie on one straight line.
  • D,C,FD, C, F lie on one straight line.
  • A,B,FA, B, F lie on one straight line.

Using angle chasing on the two intersecting transversals, the angle between CDCD and CBCB, namely ∠BCD\angle BCD, can be decomposed as:

∠BCD=∠BAD+∠DEC+∠BFC.\angle BCD = \angle BAD + \angle DEC + \angle BFC.

Therefore,

∠DEC+∠BFC=∠BCD−∠BAD.\angle DEC + \angle BFC = \angle BCD - \angle BAD.

Hence, the correct answer is Option A.

Q45 · Discrete Mathematics · MCQ · 2 marks

Consider the first-order logic sentence

φ≡∃s∃t∃u∀v∀w∀x∀y ψ(s,t,u,v,w,x,y)\varphi \equiv \exists s\exists t\exists u\forall v\forall w\forall x\forall y\ \psi(s,t,u,v,w,x,y)

where ψ(s,t,u,v,w,x,y)\psi(s,t,u,v,w,x,y) is a quantifier-free first-order logic formula using only predicate symbols, and possibly equality, but no function symbols. Suppose φ\varphi has a model with a universe containing 7 elements.

Which one of the following statements is necessarily true?

  • (A)
    There exists at least one model of φ\varphi with universe of size less than or equal to 3.
  • (B)
    There exists no model of φ\varphi with universe of size less than or equal to 3.
  • (C)
    There exists no model of φ\varphi with universe of size greater than 7.
  • (D)
    Every model of φ\varphi has a universe of size equal to 7.

Answer (official key): A

Solution

The formula has three existentially quantified variables:

∃s∃t∃u\exists s\exists t\exists u

followed by universal quantifiers. Since there are no function symbols, if the formula has a model, it has a submodel generated by the witnesses assigned to s,t,us,t,u.

At most three distinct elements are needed for these witnesses. The predicate interpretations can be restricted to this smaller universe.

Therefore, if φ\varphi has a model of size 7, then it has a model of size at most 3.

The correct answer is Option A.

Q51 · Theory of Computation · Numerical · 2 marks

Given a language LL, define LiL^i as follows:

L0={ϵ}L^0=\{\epsilon\} Li=Li−1⋅Lfor all i>0.L^i = L^{i-1}\cdot L \quad \text{for all } i>0.

The order of a language LL is defined as the smallest kk such that

Lk=Lk+1.L^k=L^{k+1}.

Consider the language L1L_1 over alphabet {0}\{0\} accepted by the following automaton.

Automaton for Q52

The order of L1L_1 is __________.

Answer (official key): 2

Solution

From the automaton, the accepted language is:

L1={ϵ}∪{02k+1∣k≥0}.L_1=\{\epsilon\}\cup\{0^{2k+1}\mid k\ge0\}.

So L1L_1 contains the empty string and all odd-length strings over the single-symbol alphabet {0}\{0\}.

Now,

L11=L1.L_1^1=L_1.

But

L12L_1^2

contains:

  • ϵ\epsilon,
  • all odd lengths, from ϵ\epsilon concatenated with odd strings,
  • all positive even lengths, from odd length concatenated with odd length.

Therefore,

L12={0}∗.L_1^2=\{0\}^*.

Once we reach {0}∗\{0\}^*, multiplying by L1L_1 again does not change the language:

L12=L13.L_1^2=L_1^3.

Hence the smallest such kk is:

2.2.

Therefore, the answer is 2.

Q52 · Digital Logic · Numerical · 2 marks

Consider the minterm list form of a Boolean function FF given below.

F(P,Q,R,S)=∑m(0,2,5,7,9,11)+d(3,8,10,12,14)F(P,Q,R,S)=\sum m(0,2,5,7,9,11)+d(3,8,10,12,14)

Here, mm denotes a minterm and dd denotes a don't care term.

The number of essential prime implicants of the function FF is __________.

Answer (official key): 3

Solution

The ON-set is:

{0,2,5,7,9,11}\{0,2,5,7,9,11\}

and the don't-care set is:

{3,8,10,12,14}.\{3,8,10,12,14\}.

Using a Karnaugh map or prime-implicant table, the prime implicants include groups that uniquely cover the minterms:

  • 0,
  • 5,

These minterms are each covered by only one prime implicant, so their corresponding prime implicants are essential.

Therefore, the number of essential prime implicants is:

3.3.

So the answer is 3.

The other 60 questions are solved in your report when you take GATE 2018 CS as a 3-hour test.

Take GATE 2018 CS as a test

Official answer key

GATE 2018 CS answer key

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

Download the official GATE 2018 CS answer key (PDF)
QTopicTypeMarksAnswer
1Verbal AptitudeMCQ1B
2Quantitative AptitudeMCQ1B
3Verbal AptitudeMCQ1A
4Quantitative AptitudeMCQ1D
5Quantitative AptitudeMCQ1C
6Quantitative AptitudeMCQ2C
7Spatial AptitudeMCQ2A
8Quantitative AptitudeMCQ2B
9Quantitative AptitudeMCQ2B
10Quantitative AptitudeMCQ2C
11Programming and Data StructuresNumerical14
12Linear AlgebraNumerical13
13Theory of ComputationMCQ1B
14Digital LogicMCQ1D
15DatabasesMCQ1A
16Computer NetworksMCQ1C
17Computer Organization and ArchitectureMCQ1A
18Discrete MathematicsMCQ1D
19Programming and Data StructuresNumerical14
20Computer Organization and ArchitectureNumerical159 to 60
21Programming and Data StructuresMCQ1B
22Compiler DesignMCQ1B
23DatabasesMCQ1D
24Theory of ComputationMCQ1D
25Computer NetworksNot in GATE 2027 syllabus: UDPMCQ1C
26Computer NetworksNumerical134 to 35
27Discrete MathematicsNumerical142
28Operating SystemMCQ1B
29Probability and StatisticsNumerical10.021 to 0.024
30Programming and Data StructuresMCQ1A
31Operating SystemNumerical12
32Computer Organization and ArchitectureMCQ1D
33CalculusNumerical10.27 to 0.3
34Digital LogicNumerical12
35Discrete MathematicsNumerical13
36AlgorithmsMCQ2C
37Theory of ComputationMCQ2D
38Compiler DesignMCQ2A
39Programming and Data StructuresMCQ2B
40Compiler DesignMCQ2D
41Theory of ComputationMCQ2B
42Programming and Data StructuresMCQ2A
43Computer Organization and ArchitectureMCQ2C
44Operating SystemMCQ2C
45Discrete MathematicsMCQ2A
46Operating SystemMCQ2A
47Linear AlgebraMCQ2D
48Computer Organization and ArchitectureMCQ2B
49AlgorithmsMCQ2A
50Discrete MathematicsMCQ2D
51Theory of ComputationNumerical22
52Digital LogicNumerical23
53AlgorithmsNumerical216
54Computer NetworksNumerical2144
55Computer Organization and ArchitectureNumerical232
56Computer NetworksNumerical250
57DatabasesMCQ2C
58Discrete MathematicsNumerical2109
59DatabasesMCQ2B
60AlgorithmsNumerical24
61Probability and StatisticsNumerical20.6 to 0.62
62Computer Organization and ArchitectureNumerical2219
63Programming and Data StructuresNumerical210230
64Operating SystemNumerical285
65Programming and Data StructuresNumerical280

Questions about GATE 2018 CS

How many questions are in the GATE 2018 CS 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 41 MCQs, 24 numerical answer (NAT) questions. The paper lasted 3 hours.

Is there negative marking in GATE 2018 CS?

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 2018 CS?

Outside General Aptitude, the biggest topics were Programming and Data Structures (12 marks), Computer Organization and Architecture (11 marks), Discrete Mathematics (9 marks). The full topic-wise split is in the table on this page.

Were any GATE 2018 CS questions awarded marks to all?

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

Where does this GATE 2018 CS answer key come from?

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

More GATE papers