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 PYQ2005Engineering MathematicsMonoids and GroupsMCQ · 1 mark
The set {1,2,4,7,8,11,13,14}\{1, 2, 4, 7, 8, 11, 13, 14\} is a group under multiplication modulo 1515. The inverses of 44 and 77 are respectively:
Official PYQ2005Engineering MathematicsGraphs: Connectivity, Matching, ColouringMCQ · 1 mark
Let GG be a simple graph with 2020 vertices and 100100 edges. The size of the minimum vertex cover of G is 88. Then, the size of the maximum independent set of GG is:
Official PYQ2005Engineering MathematicsProbability: Random Variables and DistributionsMCQ · 1 mark
Let f(x)f(x) be the continuous probability density function of a random variable xx, the probability that a<x≤ba < x \leq b, is :
Official PYQ2005Engineering MathematicsGraphs: Connectivity, Matching, ColouringMCQ · 1 mark
Let GG be a simple connected planar graph with 1313 vertices and 1919 edges. Then, the number of faces in the planar embedding of the graph is:
Official PYQ2005Engineering MathematicsSets, Relations and FunctionsMCQ · 1 mark
Let A,BA, B and CC be non-empty sets and let X=(A−B)−CX = ( A - B ) - C and Y=(A−C)−(B−C).Y = ( A - C ) - ( B - C ). Which one of the following is TRUE?
Official PYQ2005Engineering MathematicsPartial Orders and LatticesMCQ · 1 mark
The following is the Hasse diagram of the poset [{a,b,c,d,e},≺]\left[\{a,b,c,d,e\},≺\right] The poset is :
Official PYQ2005AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
Suppose there are ⌈log⁡n⌉\lceil \log n \rceil sorted lists of ⌊n/log⁡n⌋\lfloor n /\log n \rfloor elements each. The time complexity of producing a sorted list of all these elements is: (Hint:Use a heap data structure)
Official PYQ2005Digital LogicCombinational CircuitsMCQ · 1 mark
Consider the following circuit involving a positive edge triggered D FF. Consider the following timing diagram. Let AiA_{i} represents the logic level on the line AA in the ii-th clock period. Let A′A' represent the complement of AA. The correct output sequence on YY over the clock periods 11 through 55 is:
Official PYQ2005Operating SystemSystem CallsMCQ · 1 mark
Consider the following code fragment: if (fork() == 0) { a = a + 5; printf("%d, %p n", a, &a); } else { a = a - 5; printf ("%d, %p n", a,& a); } Let u,vu,v be the values printed by the parent process and x,yx,y be the values printed by the child process. Which one of the following is TRUE?
Official PYQ2004Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMCQ · 1 mark
Consider three IP networks A,BA, B and CC. Host HAH_A in network AA sends messages each containing 180180 bytesbytes of application data to a host HCH_C in network CC. The TCP layer prefixes 2020 byte header to the message. This passes through an intermediate network BB. The maximum packet size, including 2020 byte IP header, in each …
Official PYQ2004Compiler DesignLocal OptimizationMCQ · 1 mark
Consider the grammar rule E→E1–E2E \rightarrow E1 – E2 for arith­metic expressions. The code generated is targeted to a CPU having a single user register. The sub­traction operation requires the first operand to be in the register. If E1E1 and E2E2 do not have any com­mon sub expression, in order to get the shortest possible code
Official PYQ2004Programming and Data StructuresProgramming in CMCQ · 1 mark
Choose the best matching between the programming styles in Group 1 and their characteristics in Group 2. …
Official PYQ2004Computer Organization and ArchitectureMachine Instructions and Addressing ModesMCQ · 1 mark
Consider the following program segment for a hypothetical CPU having three user registers R1,R2R_1, R_2 and R3.R_3. \begin{array}{|l|l|c|} \hline \text {Instruction} & \text{Operation }& \text{Instruction size (in Words)} \\\hline \text{MOV R1,5000R_1,5000} & \text{R1R1} \leftarrow \text{Memory[5000][5000]}& \text{22} \\\hline\text{MOV …
Official PYQ2004Theory of ComputationUndecidabilityMCQ · 1 mark
L1L_1 is a recursively enumerable language over Σ\Sigma. An algorithm AA effectively enumerates its words as ω1,ω2,ω3,… .\omega_1, \omega_2, \omega_3, \dots . Define another language L2L_2 over Σ∪{#}\Sigma \cup \left\{\text{\#}\right\} as {wi#wj∣wi,wj∈L1,i<j}\left\{w_i \text{\#} w_j \mid w_i, w_j \in L_1, i < j \right\}. Here # is new symbol. Consider the following …
Official PYQ2004Compiler DesignParsing (LL, LR)MCQ · 1 mark
Consider the following grammar G: S→bS∣aA∣bS \rightarrow bS \mid aA \mid b A→bA∣aBA \rightarrow bA \mid aB B→bB∣aS∣aB \rightarrow bB \mid aS \mid a Let Na(w)N_a(w) and Nb(w)N_b(w) denote the number of a’s and b’s in a string ω\omega respectively. The language L(G)L(G) over {a,b}+\left\{a, b\right\}^+ generated by GG is
Official PYQ2004Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
The following finite state machine accepts all those binary strings in which the number of 11’s and 00’s are respectively:
Official PYQ2004Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
The language {ambncm+n∣m,n≥1}\left\{a^mb^nc^{m+n} \mid m, n \geq1\right\} is
Official PYQ2004Programming and Data StructuresBinary Search TreesMCQ · 1 mark
A program takes as input a balanced binary search tree with nn leaf nodes and computes the value of a function g(x)g(x) for each node xx. If the cost of computing g(x)g(x) is: min⁡(number of leaf-nodesin left-subtree of x  ,  number of leaf-nodesin right-subtree of x)\Large \min \left ( \substack{\text{number of leaf-nodes}\\\text{in left-subtree of $x$}}\;,\; \substack{\text{number of leaf-nodes}\\\text{in right-subtree of $x$}}\right ) …
Official PYQ2004AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
The recurrence equation T(1)=1T(1) = 1 T(n)=2T(n−1)+n,n≥2T(n) = 2T(n-1) + n, n \geq 2 evaluates to
Official PYQ2004AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Let A[1,…,n]A[1,\ldots,n] be an array storing a bit (11 or 00) at each location, and f(m)f(m) is a function whose time complexity is Θ(m)\Theta(m). Consider the following program fragment written in a C like language: counter = 0; for (i=1; i<=n; i++) { if (a[i] == 1) counter++; else {f (counter); counter = 0;} } The complexity of this program fragment …