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
Let be a simple undirected graph, and be a particular vertex in it called the source. For , let denote the shortest distance in from to . A breadth first search (BFS) is performed starting at . Let be the resultant BFS tree. If is an edge of that is not in , then which …
Consider a uniprocessor system executing three tasks and each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at intervals of and milliseconds, respectively. The priority of each task is the inverse of its period, and the available tasks are scheduled in order of …
Compute the value of:
Consider an Entity-Relationship model in which entity sets and are connected by an relationship . and are connected by a ( on the side of and on the side of ) relationship . has two-singled attributes and …
The graph shown below has edges with distinct integer edge weights. The minimum spanning tree (MST) is of weight and contains the edges: . 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 edges of this …
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_______________.
An algorithm performs find operations , insert operations, delete operations, and 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 …
Consider the operations and Which one of the following is correct?
Consider a non-pipelined processor with a clock rate of 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 gigahertz. Assume that there are no stalls in the pipeline. The speedup achieved in this …
A positive edge-triggered flip-flop is connected to a positive edge-triggered flip-flop as follows. The output of the flip-flop is connected to both the and inputs of the flip-flop, while the output of the flip-flop is connected to the input of the flip-flop. Initially, the output of the …
Consider the following matrix where two elements are unknown and are marked by and . The eigenvalues of this matrix are and What are the values of and ?
What is the output of the following C code? Assume that the address of is (in decimal) and an integer requires four bytes of memory. int main () { unsigned int x [4] [3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}}; printf ("%u, %u, %u", x + 3, *(x + 3), *(x + 2) + 3); }
Consider the following pseudo code, where and are positive integers. begin q := 0 r := x while r ≥ y do begin r := r - y q := q + 1 end end The post condition that needs to be satisfied after the program terminates is
Suppose is a lattice represented by the following Hasse diagram: For any , not necessarily distinct , and are join and meet of , respectively. Let be the set of all ordered triplets of the elements of . Let …
Consider a max heap, represented by the array: . …
Consider the following C function. int fun1 (int n) { int i, j, k, p, q = 0; for (i = 1; i < n; ++i) { p = 0; for (j = n; j > 1; j = j/2) ++p; for (k = 1; k < p; k = k * 2) ++q; } return q; } Which one of the following most closely approximates the return value of the function ?
= ______.
Suppose that everyone in a group on people wants to communicate secretly with the others using symmetric Key cryptographic system. The communication between any two person should not be decodable by the others in the group. The numbers of keys required in the system as a whole to satisfy the confidentiality requirement is
Consider a LAN with four nodes and . Time is divided into fixed-size slots, and a node can begin its transmission only at the beginning of a slot. A collision is said to have occurred if more than one node transmits in the same slot. The probabilities of generation of a frame in a time slot by and are …
In the LU decomposition of the matrix , if the diagonal elements of are both , then the lower diagonal entry of is_________________.
