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
The grammar generates the language . In this grammar what is the length of the derivation (number of steps starting from ) to generate the string with
Statement for Linked Answer Questions 76 & 77: A -ary max heap is like a binary max heap, but instead of children, nodes have children. A -ary heap can be represented by an array as follows: The root is stored in the first location, , nodes in the next level, from left to right, is stored from to . The nodes …
Consider the diagram shown below where a number of LANs are connected by (transparent) bridges. In order to avoid packets looping through circuits in the graph, the bridges organize themselves in a spanning tree. First, the root bridge is identified as the bridge with the least serial number. Next, the root sends out (one or more) data units to enable the …
The vertices of a graph corresponds to all subsets of a set of size , for . Two vertices of are adjacent if and only if the corresponding sets intersect in exactly two elements. The number of connected components in is:
Consider two cache organizations. First one is -way set associative with block size, the second is of same size but direct mapped. The size of an address is in both cases . A -to- multiplexer has latency of while a bit comparator has latency of . The hit latency …
The vertices of a graph corresponds to all subsets of a set of size , for . Two vertices of are adjacent if and only if the corresponding sets intersect in exactly two elements. The maximum degree of a vertex in is:
Barrier is a synchronization construct where a set of processes synchronizes globally i.e., each process in the set arrives at the barrier and waits for all others to arrive and then all processes leave the barrier. Let the number of processes in the set be three and be a binary semaphore with the usual and functions. Consider the following …
A CPU has a direct mapped cache with byte-block size. Suppose is two dimensional array of size with elements that occupy each. Consider the following two code segments, and . : for (i=0; i<512; i++) { for (j=0; j<512; j++) { x +=A[i] [j]; } } P2: for (i=0; i<512; i++) …
Which one of the following grammars generates the language ?
Consider the diagram shown below where a number of LANs are connected by (transparent) bridges. In order to avoid packets looping through circuits in the graph, the bridges organize themselves in a spanning tree. First, the root bridge is identified as the bridge with the least serial number. Next, the root sends out (one or more) data units to enable the …
A CPU has a direct mapped cache with byte-block size. Suppose A is two dimensional array of size with elements that occupy -bytes each. Consider the following two C code segments, and . P1: for (i=0; i<512; i++) { for (j=0; j<512; j++) { x +=A[i] [j]; } } P2: for (i=0; i<512; i++) { for (j=0; …
Barrier is a synchronization construct where a set of processes synchronizes globally i.e., each process in the set arrives at the barrier and waits for all others to arrive and then all processes leave the barrier. Let the number of processes in the set be three and be a binary semaphore with the usual and functions. Consider the following …
Statement for Linked Answer Questions 76 & 77: A -ary max heap is like a binary max heap, but instead of children, nodes have children. A -ary heap can be represented by an array as follows: The root is stored in the first location, , nodes in the next level, from left to right, is stored from to . The nodes …
Consider two cache organizations. First one is set associative with block size, the second is of same size but direct mapped. The size of an address is in both cases . A multiplexer has latency of while a comparator has …
The vertices of a graph corresponds to all subsets of a set of size , for . Two vertices of are adjacent if and only if the corresponding sets intersect in exactly two elements. The number of vertices of degree zero in is:
Consider the relation enrolled (student, course) in which (student, course) is the primary key, and the relation paid (student, amount) where student is the primary key. Assume no null values and no foreign keys or integrity constraints. Assume that amounts and were each paid by of the students. Consider these …
Consider the relation enrolled (student, course) in which (student, course) is the primary key, and the relation paid (student, amount) where student is the primary key. Assume no null values and no foreign keys or integrity constraints. Given the following four queries: Query1: select student from enrolled where student in (select student from paid) Query2: …
Consider the relation account (customer, balance) where the customer is a primary key and there are no null values. We would like to rank customers according to decreasing balance. The customer with the largest balance gets rank Ties are not broke but ranks are skipped: if exactly two customers have the largest balance they each get rank and …
Consider the following snapshot of a system running processes. Process is holding instances of a resource , . Currently, all instances of are occupied. Further, for all , process has placed a request for an additional instances while holding the instances it already has. There are …
Consider three processes, all arriving at time zero, with total execution time of , and units, respectively. Each process spends the first of execution time doing I/O, the next of time doing computation, and the last of time doing I/O again. The operating system uses a shortest remaining …
