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 PYQ2018Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingNAT · 2 marks
Consider a simple communication system where multiple nodes are connected by a shared broadcast medium (like Ethernet or wireless). The nodes in the system use the following carrier-sense based medium access protocol. A node that receives a packet to transmit will carrier-sense the medium for 55 units of time. If the node does not detect any other …
Official PYQ2018Operating SystemI/O SchedulingNAT · 2 marks
Consider a storage disk with 44 platters (numbered as 0,1,20, 1, 2 and 33), 200200 cylinders (numbered as 0,1,…,1990, 1, … , 199), and 256256 sectors per track (numbered as 0,1,…2550, 1, … 255). The following 66 disk requests of the form [sector number, cylinder number, platter number] are received by the disk controller at the same time: …
Official PYQ2018Computer NetworksFragmentation and IP Addressing, IPv4, CIDRNAT · 2 marks
Consider an IP packet with a length of 4,500  bytes4,500\;\text{bytes} that includes a 20-byte  IPv420\text{-byte}\;\textsf{IPv4} header and a 40-byte40\text{-byte} TCP header. The packet is forwarded to an IPv4\textsf{IPv4} router that supports a Maximum Transmission Unit (MTU) of 600  bytes600\;\text{bytes}. Assume that the length of the IP header in all the outgoing fragments of …
Official PYQ2018Theory of ComputationRegular and Context-free LanguagesNAT · 2 marks
Given a language LL, define LiL^i as follows:L0={ε}L^0 = \{ \varepsilon \}Li=Li−1∙L for all I>0L^i = L^{i-1} \bullet L \text{ for all } I >0The order of a language LL is defined as the smallest kk such that Lk=Lk+1L^k = L^{k+1}. Consider the language L1(L_1 (over alphabet 0)0) accepted by the following automaton. The order of L1L_1 is ________.
Official PYQ2018Computer Organization and ArchitectureMachine Instructions and Addressing ModesNAT · 2 marks
A processor has 1616 integer registers (R0, R1,…, R15)\text{(R0, R1}, \ldots ,\text{ R15)} and 6464 floating point registers (F0, F1,…,F63).\text{(F0, F1}, \ldots , \text{F63)}. It uses a 2- byte2\text{- byte} instruction format. There are four categories of instructions: Type-1, Type-2, Type-3,\text{Type-1, Type-2, Type-3}, and Type-4. Type-1\text{Type-4. Type-1} category consists of four instructions, …
Official PYQ2018Digital LogicMinimization (K-Maps etc.)NAT · 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) = \Sigma 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 ___
Official PYQ2018Computer Organization and ArchitectureInstruction PipeliningNAT · 2 marks
The instruction pipeline of a RISC processor has the following stages: Instruction Fetch (IF)(IF), Instruction Decode (ID)(ID), Operand Fetch (OF)(OF), Perform Operation (PO)(PO) and Writeback (WB)(WB), The IFIF, IDID, OFOF and WBWB stages take 11 clock cycle each for every instruction. Consider a sequence of 100100 instructions. In the POPO …
Official PYQ2018AlgorithmsAlgorithm Design: Greedy TechniquesNAT · 2 marks
Consider the weights and values of items listed below. Note that there is only one unit of each item. …
Official PYQ2018AlgorithmsMinimum Spanning TreesNAT · 2 marks
Consider the following undirected graph GG: Choose a value for xx that will maximize the number of minimum weight spanning trees (MWSTs) of GG. The number of MWSTs of GG for this value of xx is ____.
Official PYQ2018Programming and Data StructuresBinary HeapsNAT · 2 marks
The number of possible min-heaps containing each value from {1,2,3,4,5,6,7}\{1,2,3,4,5,6,7\} exactly once is _______
Official PYQ2018AlgorithmsAsymptotic Worst Case Time and Space ComplexityNAT · 2 marks
Consider the following program written in pseudo-code. Assume that xx and yy are integers. Count (x, y) { if (y !=1 ) { if (x !=1) { print("*"); Count (x/2, y); } else { y=y-1; Count (1024, y); } } } The number of times that the printprint statement is executed by the call Count(1024,1024)Count(1024, 1024) is _____
Official PYQ2018Engineering MathematicsConditional Probability and Bayes TheoremNAT · 2 marks
Consider Guwahati, (G)(G) and Delhi (D)(D) whose temperatures can be classified as high (H)(H), medium (M)(M) and low (L)(L). Let P(HG)P(H_G) denote the probability that Guwahati has high temperature. Similarly, P(MG)P(M_G) and P(LG)P(L_G) denotes the probability of Guwahati having medium and low temperatures respectively. Similarly, we use …
Official PYQ2018AlgorithmsGraph Traversals (BFS, DFS)NAT · 2 marks
Let GG be a graph with 100!100! vertices, with each vertex labelled by a distinct permutation of the numbers 1,2,…,100.1, 2,\ldots, 100. There is an edge between vertices uu and vv if and only if the label of uu can be obtained by swapping two adjacent numbers in the label of vv. Let yy denote the degree of a vertex in GG, and zz denote the …
Official PYQ2018Operating SystemDeadlockMCQ · 2 marks
In a system, there are three types of resources: E,FE, F and GG. Four processes P0P_0, P1P_1, P2P_2 and P3P_3 execute concurrently. At the outset, the processes have declared their maximum resource requirements using a matrix named Max as given below. For example, Max[P2,FP_2, F] is the maximum number of instances of FF that P2P_2 would …
Official PYQ2018DatabasesNormal FormsMCQ · 2 marks
Consider the following four relational schemas. For each schema , all non-trivial functional dependencies are listed, The bolded attributes are the respective primary keys. Schema I:\text{Schema I:} Registration(rollno, courses) Field ‘courses’ is a set-valued attribute containing the set of courses a student has registered for. Non-trivial functional dependency …
Official PYQ2018DatabasesRelational Model: Relational AlgebraMCQ · 2 marks
Consider the relations r(A,B)r(A, B) and s(B,C)s(B, C), where s.Bs.B is a primary key and r.Br.B is a foreign key referencing s.Bs.B. Consider the query Q:r⋈(σB<5(s))Q: r \bowtie (\sigma_{B<5} (s)) Let LOJ denote the natural left outer-join operation. Assume that rr and ss contain no null values. Which of the following is NOT equivalent to QQ?
Official PYQ2018Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 2 marks
The size of the physical address space of a processor is 2P2^P bytes. The word length is 2W2^W bytes. The capacity of cache memory is 2N2^N bytes. The size of each cache block is 2M2^M words. For a KK-way set-associative cache memory, the length (in number of bits) of the tag field is
Official PYQ2018Compiler DesignLexical AnalysisMCQ · 2 marks
A lexical analyzer uses the following patterns to recognize three tokens T1,T2T_1, T_2, and T3T_3 over the alphabet {a,b,c}\{a, b, c\}. T1:a?(b∣c)∗aT_1: a?(b \mid c)^\ast a T2:b?(a∣c)∗bT_2: b?(a \mid c)^\ast b T3:c?(b∣a)∗cT_3: c?(b \mid a)^\ast c Note that ‘x?x?’ means 00 or 11 occurrence of the symbol x.x. Note also that the analyzer outputs the token that matches the …
Official PYQ2018Theory of ComputationUndecidabilityMCQ · 2 marks
Consider the following problems. L(G)L(G) denotes the language generated by a grammar GG. L(M) denotes the language accepted by a machine MM. For an unrestricted grammar GG and a string ww, whether w∈L(G)w \in L(G) Given a Turing machine MM, whether L(M)L(M) is regular Given two grammarG1G_1 and G2G_2, whether L(G1)=L(G2)L(G_1) = L(G_2) Given an …
Official PYQ2018Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 2 marks
Consider the following languages: {ambncpdq∣m+p=n+q, where m,n,p,q≥0}\{a^mb^nc^pd^q \mid m+p=n+q, \text{ where } m, n, p, q \geq 0 \} {ambncpdq∣m=n and p=q, where m,n,p,q≥0}\{a^mb^nc^pd^q \mid m=n \text{ and }p=q, \text{ where } m, n, p, q \geq 0 \} {ambncpdq∣m=n=p and p≠q, where m,n,p,q≥0}\{a^mb^nc^pd^q \mid m=n =p \text{ and } p \neq q, \text{ where } m, n, p, q \geq 0 \} {ambncpdq∣mn=p+q, where m,n,p,q≥0}\{a^mb^nc^pd^q \mid mn =p+q, \text{ where } m, n, p, q \geq 0 \} Which of the …