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 PYQ2015Compiler DesignIntermediate Code GenerationNAT · 1 mark
The least number of temporary variables required to create a three-address code in static single assignment form for the expression q+r/3+s−t∗5+u∗v/wq + r / 3 + s - t * 5 + u * v/w is__________________.
Official PYQ2015Engineering MathematicsGraphs: Connectivity, Matching, ColouringNAT · 1 mark
Let G be a connected planar graph with 10 vertices. If the number of edges on each face is three, then the number of edges in G is_______________.
Official PYQ2015Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsNAT · 1 mark
Suppose that the stop-and-wait protocol is used on a link with a bit rate of 6464 kilobits\text{kilobits} per second and 2020 milliseconds\text{milliseconds} propagation delay. Assume that the transmission time for the acknowledgment and the processing time at nodes are negligible. Then the minimum frame size in bytes to achieve a link utilization of at least 5050 …
Official PYQ2015Theory of ComputationRegular Expressions and Finite AutomataNAT · 1 mark
Consider the DFAs MM and NN given above. The number of states in a minimal DFA that accept the language L(M)∩L(N)L(M) \cap L(N) is_____________.
Official PYQ2015Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Consider the NPDA ⟨Q={q0,q1,q2},Σ={0,1},Γ={0,1,⊥},δ,q0,⊥,F={q2}⟩\left \langle Q= \left \{ q_{0}, q_{1}, q_{2} \right \},\Sigma = \left \{ 0, 1 \right \}, \Gamma = \left \{ 0, 1, \perp \right \}, \delta, q_{0}, \perp, F =\left \{ q_{2} \right \} \right \rangle, where (as per usual convention) QQ is the set of states, Σ\Sigma is the input alphabet, Γ\Gamma is the stack alphabet, δ\delta is …
Official PYQ2015Compiler DesignData Flow Analyses: Constant Propagation, Liveness, CSEMCQ · 1 mark
A variable xx is said to be live at a statement sis_{i} in a program if the following three conditions hold simultaneously: There exists a statement SjS_{j} that uses xx There is a path from SiS_{i} to SjS_{j} in the flow graph corresponding to the program The path has no intervening assignment to xx including at SiS_{i} and SjS_{j} The …
Official PYQ2015AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Let an_{n} represent the number of bit strings of length n containing two consecutive 11s. What is the recurrence relation for ana_{n}?
Official PYQ2015Operating SystemI/O SchedulingNAT · 1 mark
Consider a disk pack with a seek time of 44 milliseconds and rotational speed of 1000010000 rotations per minute (RPM). It has 600600 sectors per track and each sector can store 512512 bytes of data. Consider a file stored in the disk. The file contains 20002000 sectors. Assume that every sector access necessitates a seek, and the average rotational …
Official PYQ2015Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
Consider a main memory with five-page frames and the following sequence of page references: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3\text{3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3}. Which one of the following is true with respect to page replacement policies First In First Out (FIFO) and Least Recently Used (LRU)?
Official PYQ2015AlgorithmsGraph Traversals (BFS, DFS)MCQ · 1 mark
Let G=(V,E)G = (V, E) be a simple undirected graph, and ss be a particular vertex in it called the source. For x∈Vx \in V, let d(x)d(x) denote the shortest distance in GG from ss to xx. A breadth first search (BFS) is performed starting at ss. Let TT be the resultant BFS tree. If (u,v)(u, v) is an edge of GG that is not in TT, then which …
Official PYQ2015Operating SystemCPU SchedulingNAT · 1 mark
Consider a uniprocessor system executing three tasks T1,T2T_{1}, T_{2} and T3T_{3} each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at intervals of 3,73, 7 and 2020 milliseconds, respectively. The priority of each task is the inverse of its period, and the available tasks are scheduled in order of …
Official PYQ2015Engineering MathematicsMaxima and Minima, Mean Value Theorem, IntegrationNAT · 1 mark
Compute the value of: ∫1π2πcos⁡(1/x)x2dx\large \int \limits_{\frac{1}{\pi}}^{\frac{2}{\pi}}\frac{\cos(1/x)}{x^{2}}dx
Official PYQ2015DatabasesER-modelNAT · 1 mark
Consider an Entity-Relationship (ER)(\text{ER}) model in which entity sets E1E_{1} and E2E_{2} are connected by an m:nm:n relationship R12R_{12}. E1E_{1} and E3E_{3} are connected by a 1:n1 : n (11 on the side of E1E_{1} and nn on the side of E3E_{3}) relationship R13R_{13}. E1E_{1} has two-singled attributes a11a_{11} and a12a_{12} …
Official PYQ2015AlgorithmsMinimum Spanning TreesNAT · 1 mark
The graph shown below has 88 edges with distinct integer edge weights. The minimum spanning tree (MST) is of weight 3636 and contains the edges: {(A,C),(B,C),(B,E),(E,F),(D,F)}\{(A, C), (B, C), (B, E), (E, F), (D, F)\}. The edge weights of only those edges which are in the MST are given in the figure shown below. The minimum possible sum of weights of all 88 edges of this …
Official PYQ2015Software Engineering (Historical)NAT · 1 mark
Consider the following C program segment. while (first <= last) { if (array[middle] < search) first = middle + 1; else if (array[middle] == search) found = TRUE; else last = middle - 1; middle = (first + last)/2; } if (first > last) notpresent = TRUE; The cyclomatic complexity of the program segment is_______________.
Official PYQ2015AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
An algorithm performs (log⁡N)12(\log N)^{\frac{1}{2}} find operations , NN insert operations, (log⁡N)12(\log N)^{\frac{1}{2}} delete operations, and (log⁡N)12(\log N)^{\frac{1}{2}} decrease-key operations on a set of data items with keys drawn from a linearly ordered set . For a delete operation, a pointer is provided to the record that must be deleted . For the …
Official PYQ2015Digital LogicBoolean AlgebraMCQ · 1 mark
Consider the operations f (X, Y, Z) = X’YZ + XY’ + Y’Z’\textit{f (X, Y, Z) = X'YZ + XY' + Y'Z'} and g (X, Y, Z) = X’YZ + X’YZ’ + XY\textit{g (X, Y, Z) = X'YZ + X'YZ' + XY} Which one of the following is correct?
Official PYQ2015Computer Organization and ArchitectureInstruction PipeliningNAT · 1 mark
Consider a non-pipelined processor with a clock rate of 2.52.5 gigahertz and average cycles per instruction of four. The same processor is upgraded to a pipelined processor with five stages; but due to the internal pipeline delay, the clock speed is reduced to 22 gigahertz. Assume that there are no stalls in the pipeline. The speedup achieved in this …
Official PYQ2015Digital LogicSequential CircuitsMCQ · 1 mark
A positive edge-triggered DD flip-flop is connected to a positive edge-triggered JKJK flip-flop as follows. The QQ output of the DD flip-flop is connected to both the JJ and KK inputs of the JKJK flip-flop, while the QQ output of the JKJK flip-flop is connected to the input of the DD flip-flop. Initially, the output of the DD …
Official PYQ2015Engineering MathematicsEigenvalues and Eigenvectors, LU DecompositionMCQ · 1 mark
Consider the following 2×22 \times 2 matrix AA where two elements are unknown and are marked by aa and bb. The eigenvalues of this matrix are −1-1 and 7.7. What are the values of aa and bb? A=(14ba)\qquad A = \begin{pmatrix}1 & 4\\ b&a \end{pmatrix}