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 PYQ2006Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsMCQ · 1 mark
FF is an n×nn\times n real matrix. bb is an n×1n\times 1 real vector. Suppose there are two n×1n\times 1 vectors, uu and vv such that, u≠vu ≠ v and Fu=b,Fv=bFu = b, Fv = b. Which one of the following statements is false?
Official PYQ2006Engineering MathematicsSets, Relations and FunctionsMCQ · 1 mark
Let E,FE, F and GG be finite sets. Let X=(E∩F)−(F∩G)X = (E ∩ F) - (F ∩ G) and Y=(E−(E∩G))−(E−F)Y = (E - (E ∩ G)) - (E - F). Which one of the following is true?
Official PYQ2006Engineering MathematicsProbability: Random Variables and DistributionsMCQ · 1 mark
For each element in a set of size 2n2n, an unbiased coin is tossed. The 2n2n coin tosses are independent. An element is chosen if the corresponding coin toss was a head. The probability that exactly nn elements are chosen is
Official PYQ2006DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider the following log sequence of two transactions on a bank account, with initial balance 12000,12000, that transfer 20002000 to a mortgage payment and then apply a 5%5\% interest. T1 start T1 B old =12000=12000 new =10000=10000 T1 M old =0=0 new =2000=2000 T1 commit T2 start T2 B old =10000=10000 new =10500=10500 T2 commit Suppose the database system crashes …
Official PYQ2006Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Let L1={0n+m1n0m∣n,m≥0}L_1=\{0^{n+m}1^n0^m\mid n,m\geq 0 \}, L2={0n+m1n+m0m∣n,m≥0}L_2=\{0^{n+m}1^{n+m}0^m\mid n,m\geq 0\} and L3={0n+m1n+m0n+m∣n,m≥0}L_3=\{0^{n+m}1^{n+m}0^{n+m}\mid n,m\geq 0\}. Which of these languages are NOT context free?
Official PYQ2006Engineering MathematicsProbability: Random Variables and DistributionsMCQ · 1 mark
We are given a set X={X1,…,Xn}X = \{X_1,\ldots,X_n\} where Xi=2iX_i=2^i. A sample S⊆XS\subseteq X is drawn by selecting each XiX_i independently with probability Pi=12P_i = \frac{1}{2} . The expected value of the smallest number in sample SS is:
Official PYQ2006AlgorithmsAlgorithm Design: Greedy TechniquesMCQ · 1 mark
An element in an array XX is called a leader if it is greater than all elements to the right of it in XX. The best algorithm to find all leaders in an array
Official PYQ2006AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Let S be an NP-complete problem and Q and R be two other problems not known to be in NP. Q is polynomial time reducible to S and S is polynomial-time reducible to R. Which one of the following statements is true?
Official PYQ2006AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Consider the following C-program fragment in which ii, jj and nn are integer variables. for( i = n, j = 0; i > 0; i /= 2, j +=i ); Let val(j)val(j) denote the value stored in the variable jj after termination of the for loop. Which one of the following is true?
Official PYQ2006AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
Which one of the following in place sorting algorithms needs the minimum number of swaps?
Official PYQ2006Programming and Data StructuresTreesMCQ · 1 mark
A scheme for storing binary trees in an array XX is as follows. Indexing of XX starts at 11 instead of 00. the root is stored at X[1]X[1]. For a node stored at X[i]X[i], the left child, if any, is stored in X[2i]X[2i] and the right child, if any, in X[2i+1]X[2i+1]. To be able to store any binary tree on n vertices the minimum size of XX should be
Official PYQ2006AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 1 mark
To implement Dijkstra’s shortest path algorithm on unweighted graphs so that it runs in linear time, the data structure to be used is:
Official PYQ2006AlgorithmsMinimum Spanning TreesMCQ · 1 mark
Consider a weighted complete graph GG on the vertex set {v1,v2,.....vn}\{v_1,v_2,.....v_n\} such that the weight of the edge (vi,vj)(v_i, v_j) is 2∣i−j∣2|i-j|. The weight of a minimum spanning tree of GG is:
Official PYQ2006Programming and Data StructuresBinary HeapsMCQ · 1 mark
In a binary max heap containing nn numbers, the smallest element can be found in time
Official PYQ2006Computer Organization and ArchitectureMachine Instructions and Addressing ModesMCQ · 1 mark
A CPU has 2424-bitbit instructions. A program starts at address 300300 (in decimal). Which one of the following is a legal program counter (all values in decimal)?
Official PYQ2006Digital LogicCombinational CircuitsMCQ · 1 mark
You are given a free running clock with a duty cycle of 50%50\% and a digital waveform ff which changes only at the negative edge of the clock. Which one of the following circuits (using clocked D flip-flops) will delay the phase of ff by 180°180°?
Official PYQ2006Compiler DesignParsing (LL, LR)MCQ · 1 mark
Consider the following grammar S→S∗ES \rightarrow S * E S→ES \rightarrow E E→F+EE \rightarrow F + E E→FE \rightarrow F F→idF \rightarrow id Consider the following LR(0) items corresponding to the grammar above S→S∗.ES \rightarrow S *.E E→F.+EE \rightarrow F. + E E→F+.EE \rightarrow F + .E Given the items above, which two of them will appear in the same set in the …
Official PYQ2006Operating SystemCPU SchedulingMCQ · 1 mark
Consider three CPU-intensive processes, which require 1010, 2020 and 3030 time units and arrive at times 00, 22 and 66, respectively. How many context switches are needed if the operating system implements a shortest remaining time first scheduling algorithm? Do not count the context switches at time zero and at the end.
Official PYQ2006Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMCQ · 1 mark
For which one of the following reasons does internet protocol(IP) use the time-to-live(TTL) field in IP datagram header?
Official PYQ2006Engineering MathematicsSets, Relations and FunctionsMCQ · 1 mark
A relation RR is defined on ordered pairs of integers as follows: (x,y)R(u,v) if x<u and y>v(x,y)R(u,v) \text{ if } x<u \text{ and } y>v Then RR is: