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
There are two elements in a group such that every element in the group can be written as a product of some number of 's and 's in some order. It is known that where is the identity element. The maximum number of elements in such a group is ____.
Consider the set of all functions such that , for all . Consider the following statements: . For each such function it must be the case that for every . . For each such function it must be the case that for some . …
Let be a sample space and two mutually exclusive events and be such that . If denotes the probability of the event, the maximum value of is_____.
With respect to the numerical evaluation of the definite integral, , where and are given, which of the following statements is/are TRUE? The value of obtained using the trapezoidal rule is always greater than or equal to the exact value of the definite integral. The value of obtained using the …
The value of the integral given below is
The above synchronous sequential circuit built using JK flip-flops is initialized with . The state sequence for this circuit for the next clock cycles is
The memory access time is nanosecond for a read operation with a hit in cache, nanoseconds for a read operation with a miss in cache, nanoseconds for a write operation with a hit in cache and nanoseconds for a write operation with a miss in cache. Execution of a sequence of instructions involves instruction fetch operations, …
An instruction pipeline has five stages, namely, instruction fetch (IF), instruction decode and register fetch (ID/RF), instruction execution (EX), memory access (MEM), and register writeback (WB) with stage latencies ns, ns, ns, ns, and ns, respectively (ns stands for nanoseconds). To gain in terms of frequency, the …
Consider the C function given below. Assume that the array contains elements, sorted in ascending order. int ProcessArray(int *listA, int x, int n) { int i, j, k; i = 0; j = n-1; do { k = (i+j)/2; if (x <= listA[k]) j = k-1; if (listA[k] <= x) i = k+1; } while (i <= j); if (listA[k] == x) return(k); else return -1; } Which …
Consider the pseudocode given below. The function takes as argument a pointer to the root of an arbitrary tree represented by the representation. Each node of the tree is of type . typedef struct treeNode* treeptr; struct treeNode { treeptr leftMostChild, rightSibling; }; int DoSomething (treeptr …
Consider a hash table with slots. Collisions are resolved using chaining. Assuming simple uniform hashing, what is the probability that the first slots are unfilled after the first insertions?
Suppose we have a balanced binary search tree holding numbers. We are given two numbers and and wish to sum up all the numbers in that lie between and . Suppose there are such numbers in . If the tightest upper bound on the time to compute the sum is , the value of …
Consider the decision problem defined as follows: For example, is a Boolean formula and it is in . The decision problem is
Suppose you want to move from to on the number line. In each step, you either move right by a unit distance or you take a shortcut. A shortcut is simply a pre-specified pair of integers . Given a shortcut , if you are at position on the number line, you may directly move to . Suppose …
Consider the following languages over the alphabet Here, is the reverse of the string . Which of these languages are deterministic Context-free languages?
Which one of the following problems is undecidable?
Consider the basic block given below. a = b + c c = a + d d = b + c e = d - b a = e + b The minimum number of nodes and edges present in the DAG representation of the above basic block respectively are
Consider a paging hardware with a . Assume that the entire page table and all the pages are in the physical memory. It takes milliseconds to search the and milliseconds to access the physical memory. If the hit ratio is , the effective memory access time (in milliseconds) is _________.
An operating system uses shortest remaining time first scheduling algorithm for pre-emptive scheduling of processes. Consider the following set of processes with their arrival times and CPU burst times (in milliseconds): …
A system contains three programs and each requires three tape units for its operation. The minimum number of tape units which the system must have such that deadlocks never arise is _________.
