GATE 2016 (Session 2) CS Mock Test
General Instructions
- The test lasts 180 minutes. The timer above the question shows the time left, and the test is submitted automatically when it reaches zero.
- The question palette shows the status of each question:
1 You have not visited the question yet. 2 You have not answered the question. 3 You have answered the question. It will be evaluated. 4 You have not answered the question but marked it for review. 5 You have answered the question and marked it for review. It will also be evaluated. - Save & Next saves your answer and moves to the next question. Mark for Review & Next saves it, marks it for review and moves on. Clicking a number in the palette moves to that question without saving the current answer.
- MCQ: one correct option; a wrong answer costs 1/3 of the marks for a 1-mark question and 2/3 for a 2-mark one. MSQ: one or more correct options, all of them needed; no negative marks. NAT: type a number with the on-screen keypad; no negative marks.
- A scientific calculator, like the one in GATE, opens from the calculator icon next to the timer.
- Your answers are kept in this browser only. If you close the page, you can resume until the time runs out.
ⓘ Tick the box above to start.
Question No. 1
The man who is now Municipal Commissioner worked as _____________
Nobody knows how the Indian cricket team is going to cope with the difficult and seamer-friendly wickets in Australia.
Choose the option which is closest in meaning to the underlined phrase in the above sentence.
Choose the option which is closest in meaning to the underlined phrase in the above sentence.
Find the odd one in the following group of words.
mock, deride, praise, jeer
mock, deride, praise, jeer
Pick the odd one from the following options.
In a quadratic function, the value of the product of the roots is 4. Find the value of
Among 150 faculty members in an institute, 55 are connected with each other through Facebook® and 85 are connected through WhatsApp®. 30 faculty members do not have Facebook® or WhatsApp® accounts. The number of faculty members connected only through Facebook® accounts is ________.
Computers were invented for performing only high-end useful computations. However, it is no understatement that they have taken over our world today. The internet, for example, is ubiquitous. Many believe that the internet itself is an unintended consequence of the original invention. With the advent of mobile computing on our phones, a whole new dimension is now enabled. One is left wondering if all these developments are good or, more importantly, required.
Which of the statement(s) below is/are logically valid and can be inferred from the above paragraph?
(i) The author believes that computers are not good for us.
(ii) Mobile computers and the internet are both intended inventions.
Which of the statement(s) below is/are logically valid and can be inferred from the above paragraph?
(i) The author believes that computers are not good for us.
(ii) Mobile computers and the internet are both intended inventions.
All hill-stations have a lake. Ooty has two lakes.
Which of the statement(s) below is/are logically valid and can be inferred from the above sentences?
(i). Ooty is not a hill-station.
(ii). No hill-station can have more than one lake.
Which of the statement(s) below is/are logically valid and can be inferred from the above sentences?
(i). Ooty is not a hill-station.
(ii). No hill-station can have more than one lake.
In a 2x4 rectangle grid shown below, each cell is rectangle. How many rectangles can be observed in the grid?
Choose the correct expression for f(x) given in the graph.
Consider the following expressions:
(i) false
(ii) Q
(iii) true
(iv)
(v)
The number of expressions given above that are logically implied by is ________.
(i) false
(ii) Q
(iii) true
(iv)
(v)
The number of expressions given above that are logically implied by is ________.
Let f(x) be a polynomial and g(x) = f'(x) be its derivative. If the degree of (f(x)+ f(-x)) is 10, then the degree of (g(x)-g(-x)) is ________.
The minimum number of colours that is sufficient to vertex-colour any planar graph is _________.
Consider the systems,each consisting of m linear equations in n variables.
I. If m n, then all such systems have a solution
II. If m n, then none of these systems has a solution
III. If m = n, then there exists a system which has a solution
Which one of the following is CORRECT?
I. If m n, then all such systems have a solution
II. If m n, then none of these systems has a solution
III. If m = n, then there exists a system which has a solution
Which one of the following is CORRECT?
Suppose that a shop has an equal number of LED bulbs of two different types. The probability of an LED bulb lasting more than 100 hours given that it is of Type 1 is 0.7, and given that it is of Type 2 is 0.4. The probability that an LED bulb chosen uniformly at random lasts more than 100 hours is _________.
Suppose that the eigen values of matrix A are 1, 2, 4. The determinant of is _________.
Consider an eight-bit ripple-carry adder for computing the sum of A and B, where A and B are integers represented in 2's complement form. If the decimal value of A is one, the decimal value of B that leads to the longest latency for the sum to stabilize is ________.
Let, where are Boolean variables, and is the XOR operator. Which one of the following must always be TRUE?
Let X be the number of distinct 16-bit integers in 2's complement representation. Let Y be the number of distinct 16 bit integers in sign magnitude representation. Then X-Y is ________.
A processor has 40 distinct instructions and 24 general purpose registers. A 32-bit instruction word has an opcode, two register operands and an immediate operand. The number of bits available for the immediate operand field is _______ .
Breadth First Search(BFS) is started on a binary tree beginning from the root vertex. There is a vertex t at a distance four from the root. If t is the n-th vertex in this BFS traversal, then the maximum possible value of n is______ .
The value printed by the following program is .
void f(int*p, int m){
m =m+5;
*p =*p+m;
return;
}
void main(){
int i=5, j=10;
f(&i, j);
printf("%d", i+j);
}Assume that the algorithms considered here sort the input sequences in ascending order. If the input is already in ascending order, which of the following are TRUE?
I. Quicksort runs in time
II. Bubblesort runs in time
III. Merge sort runs in time
IV. Insertion sort runs in time
I. Quicksort runs in time
II. Bubblesort runs in time
III. Merge sort runs in time
IV. Insertion sort runs in time
The Floyd-Warshall algorithm for all-pair shortest paths computation is based on
N items are stored in a sorted doubly linked list. For a delete operation, a pointer is provided to the record to be deleted. For a decrease-key operation, a pointer is provided to the record on which the operation is to be performed.
An algorithm performs the following operations on the list in this order: , , , and . What is the time complexity of all these operations put together?
An algorithm performs the following operations on the list in this order: , , , and . What is the time complexity of all these operations put together?
The number of states in the minimum sized DFA that accepts the language defined by the regular expression
(0+1)* (0+1)(0+1)*
is _______.
(0+1)* (0+1)(0+1)*
is _______.
Language L1 is defined by the grammar:
Language L2 is defined by the grammar:
Consider the following statements:
P: L1 is regular
Q: L2 is regular
Which one of the following is TRUE?
Language L2 is defined by the grammar:
Consider the following statements:
P: L1 is regular
Q: L2 is regular
Which one of the following is TRUE?
Consider the following types of languages: :Regular, :Context-free, :Recursive, :Recursively enumerable.
Which of the following is/are TRUE?
I. is recursivelyenumerable
II. is recursive
III. is context-free
IV. is context-free
Which of the following is/are TRUE?
I. is recursivelyenumerable
II. is recursive
III. is context-free
IV. is context-free
Match thefollowing:
In which one of the following page replacement algorithms it is possible for the page fault rate to increase even when the number of allocated frames increases?
B+ Trees are considered BALANCED because
Suppose a database schedule S involves transactions T1,...,Tn. Construct the precedence graph of S with vertices representing the transactions and edges representing the conflicts. If S is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?
Anarkali digitally signs a message and sends it to Salim. Verification of the signature by Salim requires
In an Ethernet local area network,which one of the following statements is TRUE?
Identify the correct sequence in which the following packets are transmitted on the network by a host when a browser requests a webpage from a remote server,assuming that the host has just been restarted.
A binary relation R on is defined as follows: (a,b)R(c,d) if or . Consider the following propositions:
P: R is reflexive
Q: R is transitive
Which one of the following statements is TRUE?
P: R is reflexive
Q: R is transitive
Which one of the following statements is TRUE?
Which one of the following well-formed formulae in predicate calculus is NOT valid?
Consider a set U of 23 different compounds in a Chemistry lab. There is a subset S of U of 9 compounds, each of which reacts with exactly 3 compounds of U. Consider the following statements:
I. Each compound in U \ S reacts with an odd number of compounds.
II. At least one compound in U \ S reacts with an odd number of compounds.
III. Each compound in U n S reacts with an even number of compounds.
Which one of the above statements is ALWAYS TRUE?
I. Each compound in U \ S reacts with an odd number of compounds.
II. At least one compound in U \ S reacts with an odd number of compounds.
III. Each compound in U n S reacts with an even number of compounds.
Which one of the above statements is ALWAYS TRUE?
The value of the expression (mod 17), in the range 0 to 16, is _________.
Suppose the functions F and G can be computed in 5 and 3 nano seconds by functional units and , respectively. Given two instances of and two instances of , it is required to implement the computation for . Ignoring all other delays, the minimum time required to complete this computation is ________ nanoseconds.
Consider a processor with 64 registers and an instruction set of size twelve. Each instruction has five distinct fields, namely, opcode, two source register identifiers, one destination register identifier, and a twelve-bit immediate value. Each instruction must be stored in memory in byte-aligned fashion. If a program has 100 instructions, the amount of memory(in bytes) consumed by the program text is _____ .
The width of the physical address on a machine is 40 bits. The width of the tag field in a 512KB 8-way set associative cache is ________ bits.
Consider a 3GHz (gigahertz) processor with a three-stage pipeline and stage latencies , , and such that . If the longest pipeline stage is split into two pipeline stages of equal latency, the new frequency is _____GHz, ignoring delays in the pipeline registers.
A complete binary min-heap is made by including each integer in [1,1023] exactly once. The depth of a node in the heap is the length of the path from the root of the heap to that node. Thus, the root is at depth 0. The maximum depth at which integer 9 can appear is_____. .
The following function computes for positive integers X and Y.
int exp(int X,int Y){
int res=1, a=X, b=Y;
while (b!=0){
if(b%2==0){a=a*a; b=b/2;}
else {res=res*a; b=b-1;}
}
return res;
} Which one of the following conditions is TRUE before every iteration of the loop?Consider the following New-order strategy for traversing a binary tree:
Visit the root;
Visit the right sub tree using New-order;
Visit the left sub tree using New-order;
The New-order traversal of the expression tree corresponding to the reverse polish expression
3 4 * 5 - 2 ^ 6 7 * 1 + - is given by:
Visit the root;
Visit the right sub tree using New-order;
Visit the left sub tree using New-order;
The New-order traversal of the expression tree corresponding to the reverse polish expression
3 4 * 5 - 2 ^ 6 7 * 1 + - is given by:
Consider thefollowingprogram:
int f(int*p, int n)
{
if (n<=1)return 0;
else return max(f(p+1,n-1),p[0]-p[1]);
}
int main()
{
int a[]={3,5,2,6,4};
printf("%d", f(a,5));
} Note: max(x,y) returns the maxi mumof x and y. The value printed by this program is____________ .Let A1,A2,A3, and A4 be four matrices of dimensions 10x5, 5x20, 20x10, and 10x5, respectively. The minimum number of scalar multiplications required to find the product A1A2A3A4 using the basic matrix multiplication method is __________.
The given diagram shows the flowchart for a recursive function A(n). Assume that all statements, except for the recursive calls, have O(1) time complexity. If the worst case time complexity of this function is , then the least possible value (accurate upto two decimal positions) of is .
The number of ways in which the numbers 1,2,3,4,5,6,7 can be inserted in an empty binary search tree, such that the resulting tree has height 6, is _____.
Note: The height of a tree with a single node is 0.
Note: The height of a tree with a single node is 0.
In an adjacency list representation of an undirected simple graph G = (V,E), each edge (u,v) has two adjacency list entries: [v] in the adjacency list of u, and [u] in the adjacency list of v. These are called twins of each other. A twin pointer is a pointer from an adjacency list entry to its twin. If |E|=m and |V|=n, and the memory size is not a constraint, what is the time complexity of the most efficient algorithm to set the twin pointer in each entry in each adjacency list?
Consider the following two statements:
I. If all states of an NFA are accepting states then the language accepted by the NFA is .
II. There exists a regular language A such that for all languages B, AB is regular.
Which one of the following is CORRECT?
I. If all states of an NFA are accepting states then the language accepted by the NFA is .
II. There exists a regular language A such that for all languages B, AB is regular.
Which one of the following is CORRECT?
Consider the following languages:
Which one of the following is TRUE?
Which one of the following is TRUE?
Consider the following languages.
L1 = {M |M takes at least 2016 steps on some input},
L2 = {M| M takes at least 2016 steps on all inputs} and
L3 = {M|M accepts },
where for each Turing machine M, M denotes a specific encoding of M. Which one of the following is TRUE?
L1 = {M |M takes at least 2016 steps on some input},
L2 = {M| M takes at least 2016 steps on all inputs} and
L3 = {M|M accepts },
where for each Turing machine M, M denotes a specific encoding of M. Which one of the following is TRUE?
Which one of the following grammars is free from left recursion?
A student wrote two context-free grammars G1 and G2 for generating a single C-like array declaration. The dimension of the array is at least one. For example,
int a[10][3];
The grammars use D as the start symbol,and use six terminal symbols int ;id[]num.
Which of the grammars correctly generate the declaration mentioned above?
int a[10][3];
The grammars use D as the start symbol,and use six terminal symbols int ;id[]num.
Grammar G1 Grammar G2
D → int L; D → int L;
L → id [E L → id E
E → num] E → E[num]
E → num] [E E → [num] Which of the grammars correctly generate the declaration mentioned above?
Consider the following processes, with the arrival time and the length of the CPU burst given in milli seconds.The scheduling algorithm used is preemptive shortest remaining-time first.
The average turn around time of these processes is milliseconds.
The average turn around time of these processes is milliseconds.
Consider the following two-process synchronization solution.
The shared variable turn is initialized to zero.Which one of the following is TRUE?
Process 0 Process 1
--------- ----------
Entry: loop while (turn == 1); Entry: loop while (turn == 0);
(critical section) (critical section)
Exit: turn = 1; Exit: turn = 0;The shared variable turn is initialized to zero.Which one of the following is TRUE?
Consider a non-negative counting semaphore S. The operation P(S) decrements S, and V(S) increments S. During an execution, 20 P(S) operations and 12V(S) operations are issued in some order. The largest initial value of S for which at least one P(S) operation will remain blocked is ________.
A file system uses an in-memory cache to cache disk blocks.The miss rate of the cache is shown in the figure. The latency to read a block from the cache is 1 ms and to read a block from the disk is 10ms. Assume that the cost of checking whether a block exists in the cache is negligible. Available cache sizes are in multiples of 10MB.
The smallest cache size required to ensure an average read latency of less than 6ms is_________ MB.
The smallest cache size required to ensure an average read latency of less than 6ms is_________ MB.
Consider the following databases chedule with two transactions, T1 and T2.
where denotes a read operation by transaction on avariable Z, denotes a write operation by on avariable Z and denotes an abort by transaction .
Which one of the following statements about the above schedule is TRUE?
where denotes a read operation by transaction on avariable Z, denotes a write operation by on avariable Z and denotes an abort by transaction .
Which one of the following statements about the above schedule is TRUE?
Consider the following database table named water_schemes :
The number of tuples returned by the following SQL query is __________.
The number of tuples returned by the following SQL query is __________.
with total(name, capacity) as
select district_name, sum(capacity)
from water_schemes
group by district_name
with total_avg(capacity) as
select avg(capacity)
from total
select name
from total, total_avg
where total.capacity ≥ total_avg.capacityA network has a data transmission bandwidth of bits per second. It uses CSMA/CD in the MAClayer. The maximum signal propagation time from one node to another node is 40 microseconds. The minimum size of a frame in the network is ______ bytes.
For the IEEE802.11 MAC protocol for wireless communication,which of the following statements is/are TRUE?
I. At least three non-overlapping channels are available for transmissions.
II. The RTS-CTS mechan is misused for collision detection.
III. Unicast frames are ACKed.
I. At least three non-overlapping channels are available for transmissions.
II. The RTS-CTS mechan is misused for collision detection.
III. Unicast frames are ACKed.
Consider a bits/second satellite communication link with one way propagation delay of 150 milliseconds. Selective retransmission(repeat) protocol is used on this link to send data with a frame size of 1 kilobyte. Neglect the transmission time of acknowledgement. The minimum number of bits required for the sequence number field to achieve 100% utilization is ________.
GATE 2016 (Session 2) CS Mock Test: your result
Question-wise review
The timer is still running. Close this window to return to the questions.
The timer is still running while you read the paper.
Submit the test?
You cannot change your answers after submitting.