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
Consider three IP networks and . Host in network sends messages each containing of application data to a host in network . The TCP layer prefixes byte header to the message. This passes through an intermediate network . The maximum packet size, including byte IP header, in each …
Consider the grammar rule for arithmetic expressions. The code generated is targeted to a CPU having a single user register. The subtraction operation requires the first operand to be in the register. If and do not have any common sub expression, in order to get the shortest possible code
Choose the best matching between the programming styles in Group 1 and their characteristics in Group 2. …
Consider the following program segment for a hypothetical CPU having three user registers and \begin{array}{|l|l|c|} \hline \text {Instruction} & \text{Operation }& \text{Instruction size (in Words)} \\\hline \text{MOV } & \text{} \leftarrow \text{Memory}& \text{} \\\hline\text{MOV …
is a recursively enumerable language over . An algorithm effectively enumerates its words as Define another language over as . Here # is new symbol. Consider the following …
Consider the following grammar G: Let and denote the number of a’s and b’s in a string respectively. The language over generated by is
The following finite state machine accepts all those binary strings in which the number of ’s and ’s are respectively:
The language is
A program takes as input a balanced binary search tree with leaf nodes and computes the value of a function for each node . If the cost of computing is: …
The recurrence equation evaluates to
Let be an array storing a bit ( or ) at each location, and is a function whose time complexity is . 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 …
The time complexity of the following C function is (assume ) int recursive (int n) { if(n == 1) return (1); else return (recursive (n-1) + recursive (n-1)); }
Let and be connected graphs on the same vertex set with more than two vertices. If is not a connected graph, then the graph
A point is randomly selected with uniform probability in the plane within the rectangle with corners at and If is the length of the position vector of the point, the expected value of is
How many graphs on labeled vertices exist which have at least edges ?
Two bit binary strings, and are chosen randomly with uniform probability. The probability that the Hamming distance between these strings (the number of bit positions where the two strings differ) is equal to is
The minimum number of colours required to colour the following graph, such that no two adjacent vertices are assigned the same color, is
In an matrix all non-zero entries are covered in rows and columns. Then the maximum number of non-zero entries, such that no two are on the same row or column, is
Mala has the colouring book in which each English letter is drawn two times. She wants to paint each of these prints with one of colours, such that the colour pairs used to colour any two letters are different. Both prints of a letter can also be coloured with the same colour. What is the minimum value of that satisfies this requirement?
An examination paper has multiple choice questions of one mark each, with each question having four choices. Each incorrect answer fetches marks. Suppose students choose all their answers randomly with uniform probability. The sum total of the expected marks obtained by all these students is
