Skip to content

GATE CS question library

Practise GATE CS Computer Science previous year questions free. Browse by subject, syllabus topic, year and question type, with answers and available solutions.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

20 on this page
Official PYQ2003Programming and Data StructuresProgramming in CMCQ · 1 mark
Which of the following statements is FALSE?
Official PYQ2003AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
The usual Θ(n2)\Theta(n^2) implementation of Insertion Sort to sort an array uses linear search to identify the position where an element is to be inserted into the already sorted part of the array. If, instead, we use binary search to identify the position, the worst case running time will
Official PYQ2003AlgorithmsGraph Traversals (BFS, DFS)MCQ · 1 mark
Consider the following graph: Among the following sequences: abeghf abfehg abfhge afghbe Which are the depth-first traversals of the above graph?
Official PYQ2003AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Consider the following three claims: (n+k)m=Θ(nm)(n+k)^m = \Theta(n^m) where kk and mm are constants 2n+1=O(2n)2^{n+1} = O(2^n) 22n+1=O(2n)2^{2n+1} = O(2^n) Which of the following claims are correct?
Official PYQ2003Programming and Data StructuresBinary Search TreesMCQ · 1 mark
Suppose the numbers 7,5,1,8,3,6,0,9,4,27, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in that order into an initially empty binary search tree. The binary search tree uses the usual ordering on natural numbers. What is the in-order traversal sequence of the resultant tree?
Official PYQ2003Compiler DesignParsing (LL, LR)MCQ · 1 mark
Assume that the SLR parser for a grammar G has n1n_1 states and the LALR parser for G has n2n_2 states. The relationship between n1n_1 and n2n_2 is
Official PYQ2003Compiler DesignSyntax-directed TranslationMCQ · 1 mark
In a bottom-up evaluation of a syntax directed definition, inherited attributes can
Official PYQ2003Compiler DesignParsing (LL, LR)MCQ · 1 mark
Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar?
Official PYQ2003Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
The regular expression 0∗(10∗)∗0^*(10^*)^* denotes the same set as
Official PYQ2003Theory of ComputationUndecidabilityMCQ · 1 mark
Nobody knows yet if P=NPP=NP. Consider the language LL defined as follows.L={(0+1)∗ if P=NPϕotherwiseL = \begin{cases} (0+1)^* & \text{ if } P = NP \\ \phi & otherwise \end{cases}Which of the following statements is true?
Official PYQ2003AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Ram and Shyam have been asked to show that a certain problem Π\Pi is NP-complete.\text{NP-complete}. Ram shows a polynomial time reduction from the 3-SAT\text{3-SAT} problem to Π\Pi, and Shyam shows a polynomial time reduction from Π\Pi to 3-SAT.\text{3-SAT.} Which of the following can be inferred from these reductions?
Official PYQ2003Digital LogicComputer ArithmeticMCQ · 1 mark
Consider an array multiplier for multiplying two nn bit numbers. If each gate in the circuit has a unit delay, the total delay of the multiplier is
Official PYQ2003Computer Organization and ArchitectureInstruction PipeliningMCQ · 1 mark
For a pipelined CPU with a single ALU, consider the following situations The j+1st{j+1}^{st} instruction uses the result of the jthj^{th} instruction as an operand The execution of a conditional jump instruction The jthj^{th} and j+1st{j+1}^{st} instructions require the ALU at the same time. Which of the above can cause a hazard
Official PYQ2003Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
Assuming all numbers are in 2’s2’s complement representation, which of the following numbers is divisible by 1111101111111011?
Official PYQ2003Engineering MathematicsGraphs: Connectivity, Matching, ColouringMCQ · 1 mark
Let G\text{G} be an arbitrary graph with nn nodes and kk components. If a vertex is removed from G\text{G}, the number of components in the resultant graph must necessarily lie down between
Official PYQ2003Engineering MathematicsMonoids and GroupsMCQ · 1 mark
Consider the set Σ∗\Sigma^* of all strings over the alphabet Σ={0,1}\Sigma = \{0, 1\}. Σ∗\Sigma^* with the concatenation operator for strings
Official PYQ2003Programming and Data StructuresBinary Search TreesMCQ · 1 mark
Let T(n)T(n) be the number of different binary search trees on nn distinct elements. Then T(n)=∑k=1nT(k−1)T(x)T(n) = \sum_{k=1}^{n} T(k-1)T(x), where xx is
Official PYQ2003Engineering MathematicsCombinatorics: Counting, Recurrence Relations, Generating FunctionsMCQ · 1 mark
nn couples are invited to a party with the condition that every husband should be accompanied by his wife. However, a wife need not be accompanied by her husband. The number of different gatherings possible at the party is
Official PYQ2003Engineering MathematicsCombinatorics: Counting, Recurrence Relations, Generating FunctionsMCQ · 1 mark
Let AA be a sequence of 88 distinct integers sorted in ascending order. How many distinct pairs of sequences, BB and CC are there such that each is sorted in ascending order, BB has 55 and CC has 33 elements, and the result of merging BB and CC gives AA
Official PYQ2003Engineering MathematicsConditional Probability and Bayes TheoremMCQ · 1 mark
Let P(E)P(E) denote the probability of the event EE. Given P(A)=1P(A) = 1, P(B)=12P(B) =\dfrac{1}{2}, the values of P(A∣B)P(A\mid B) and P(B∣A)P(B\mid A) respectively are