Question 1 of 65
The ratio of boys to girls in a class is 7 to 3.
Among the options below, an acceptable value for the total number of students in the class is:
Mock test · GATE marking
You have submitted this test.See your result
This browser is not letting the page save anything. The test will work, but a refresh would lose your answers, and the result cannot be shown after you submit.
The clock starts when you press Start and does not stop. An answer counts only after Save & Next or Mark for Review & Next.
The ratio of boys to girls in a class is 7 to 3.
Among the options below, an acceptable value for the total number of students in the class is:
A polygon is convex if, for every pair of points, and belonging to the polygon, the line segment lies completely inside or on the polygon.
Which one of the following is NOT a convex polygon?
Consider the following sentences:
(i) Everybody in the class is prepared for the exam.
(ii) Babu invited Danish to his home because he enjoys playing chess.
Which of the following is the CORRECT observation about the above two sentences?
__________ is to surgery as writer is to __________
Which one of the following options maintains a similar logical relation in the above sentence?
We have 2 rectangular sheets of paper, and , of dimensions each. Sheet is rolled to form an open cylinder by bringing the short edges of the sheet together. Sheet is cut into equal square patches and assembled to form the largest possible closed cube. Assuming the ends of the cylinder are closed, the ratio of the volume of the cylinder to that of the cube is
| Items | Cost (₹) | Profit % | Marked Price (₹) |
|---|---|---|---|
| P | 5,400 | --- | 5,860 |
| Q | --- | 25 | 10,000 |
Details of prices of two items P and Q are presented in the above table. The ratio of cost of item P to cost of item Q is . Discount is calculated as the difference between the marked price and the selling price. The profit percentage is calculated as the ratio of the difference between selling price and cost, to the cost .
The discount on item Q, as a percentage of its marked price, is
There are five bags each containing identical sets of ten distinct chocolates. One chocolate is picked from each bag.
The probability that at least two chocolates are identical is
Given below are two statements 1 and 2, and two conclusions I and II.
Statement 1: All bacteria are microorganisms.
Statement 2: All pathogens are microorganisms.
Conclusion I: Some pathogens are bacteria.
Conclusion II: All pathogens are not bacteria.
Based on the above statements and conclusions, which one of the following options is logically CORRECT?
Some people suggest anti-obesity measures (AOM) such as displaying calorie information in restaurant menus. Such measures sidestep addressing the core problems that cause obesity: poverty and income inequality.
Which one of the following statements summarizes the passage?
Suppose that is a regular language and is a context-free language. Which one of the following languages is NOT necessarily context-free?
Let be an array containing integers. Let be the lowest upper bound on the number of comparisons of the array elements, required to find the minimum and maximum values in an arbitrary array of elements. Which one of the following choices is correct?
Consider the following three functions.
Which one of the following options arranges the functions in the increasing order of asymptotic growth rate?
Consider the following statements.
: The sequence of procedure calls corresponds to a preorder traversal of the activation tree.
: The sequence of procedure returns corresponds to a postorder traversal of the activation tree.
Which one of the following options is correct?
Consider the following statements.
: Every SLR(1) grammar is unambiguous but there are certain unambiguous grammars that are not SLR(1).
: For any context-free grammar, there is a parser that takes at most time to parse a string of length .
Which one of the following options is correct?
Let the representation of a number in base 3 be 210. What is the hexadecimal representation of the number?
Let and be two propositions. Consider the following two formulae in propositional logic.
Which one of the following choices is correct?
Consider the following two statements.
: Destination MAC address of an ARP reply is a broadcast address.
: Destination MAC address of an ARP request is a broadcast address.
Which one of the following choices is correct?
Consider the following array.
| 23 | 32 | 45 | 69 | 72 | 73 | 89 | 97 |
|---|---|---|---|---|---|---|---|
Which algorithm out of the following options uses the least number of comparisons (among the array elements) to sort the above array in ascending order?
A binary search tree contains distinct elements. What is the time complexity of picking an element in that is smaller than the maximum element in ?
In the context of operating systems, which of the following statements is/are correct with respect to paging?
Let denote an encoding of an automaton . Suppose that . Which of the following languages is/are NOT recursive?
Suppose a database system crashes again while recovering from a previous crash. Assume checkpointing is not done by the database either during the transactions or during recovery.
Which of the following statements is/are correct?
Which of the following standard C library functions will always invoke a system call when executed from a single-threaded process in a UNIX/Linux operating system?
Consider a linear list based directory implementation in a file system. Each directory is a list of nodes, where each node contains the file name along with the file metadata, such as the list of pointers to the data blocks. Consider a given directory foo.
Which of the following operations will necessarily require a full scan of foo for successful completion?
In an undirected connected planar graph , there are eight vertices and five faces. The number of edges in is __________
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following undirected graph with edge weights as shown:
The number of minimum-weight spanning trees of the graph is __________
A number: digits, one decimal point and an optional minus sign at the start.
The lifetime of a component of a certain type is a random variable whose probability density function is exponentially distributed with parameter . For a randomly picked component of this type, the probability that its lifetime exceeds the expected lifetime (rounded to 2 decimal places) is __________
A number: digits, one decimal point and an optional minus sign at the start.
There are 6 jobs with distinct difficulty levels, and 3 computers with distinct processing speeds. Each job is assigned to a computer such that:
The number of ways in which this can be done is __________
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following expression.
The value of the above expression (rounded to 2 decimal places) is __________
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following sequence of operations on an empty stack.
push(54); push(52); pop(); push(55); push(62); s = pop();
Consider the following sequence of operations on an empty queue.
enqueue(21); enqueue(24); dequeue(); enqueue(28); enqueue(32); q = dequeue();
The value of is __________
A number: digits, one decimal point and an optional minus sign at the start.
Consider a computer system with a byte-addressable primary memory of size bytes. Assume the computer system has a direct-mapped cache of size (), and each cache block is of size .
The size of the tag field is ___________ bits.
A number: digits, one decimal point and an optional minus sign at the start.
A relation in a relational database has 1200 tuples. The attribute has integer values ranging from 6 to 20, and the attribute has integer values ranging from 1 to 20. Assume that the attributes and are independently distributed.
The estimated number of tuples in the output of is __________
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following representation of a number in IEEE 754 single-precision floating point format with a bias of 127.
S: 1 E: 10000001 F: 11110000000000000000000
Here S, E and F denote the sign, exponent and fraction components of the floating point representation.
The decimal value corresponding to the above representation (rounded to 2 decimal places) is __________
A number: digits, one decimal point and an optional minus sign at the start.
Three processes arrive at time zero with CPU bursts of 16, 20 and 10 milliseconds. If the scheduler has prior knowledge about the length of the CPU bursts, the minimum achievable average waiting time for these three processes in a non-preemptive scheduler (rounded to nearest integer) is __________ milliseconds.
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following grammar (that admits a series of declarations, followed by expressions) and the associated syntax directed translation (SDT) actions, given as pseudo-code:
With respect to the above grammar, which one of the following choices is correct?
The following relation records the age of 500 employees of a company, where empNo (indicating the employee number) is the key:
Consider the following relational algebra expression:
What does the above expression generate?
Assume that a 12-bit Hamming codeword consisting of 8-bit data and 4 check bits is , where the data bits and the check bits are given in the following tables:
| d8 | d7 | d6 | d5 | d4 | d3 | d2 | d1 |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 0 | x | 0 | 1 | 0 | 1 |
| c8 | c4 | c2 | c1 |
|---|---|---|---|
| y | 0 | 1 | 0 |
Which one of the following choices gives the correct values of and ?
Consider the following recurrence relation.
Which one of the following options is correct?
Consider the following context-free grammar where the set of terminals is .
The following is a partially-filled LL(1) parsing table.
| a | b | c | d | f | $ | |
|---|---|---|---|---|---|---|
| S | (1) | S -> daT | (2) | |||
| T | T -> aS | T -> baT | (3) | T -> eps | (4) | |
| R | R -> caTR | R -> eps |
Which one of the following choices represents the correct combination for the numbered cells in the parsing table ("blank" denotes that the corresponding cell is empty)?
Let and denote read and write operations respectively on a data item by a transaction . Consider the following two schedules.
Which one of the following options is correct?
Consider the relation with the following functional dependencies.
Consider the decomposition of the relation into the constituent relations according to the following two decomposition schemes.
Which one of the following options is correct?
Let be a group of order 6, and be a subgroup of such that .
Which one of the following options is correct?
Consider the two statements.
Which one of the following choices is correct?
Let be an undirected unweighted connected graph. The diameter of is defined as:
Let be the adjacency matrix of .
Define graph on the same set of vertices with adjacency matrix , where
Which one of the following statements is true?
Consider the following ANSI C program.
#include <stdio.h>
int main()
{
int i, j, count;
count = 0;
i = 0;
for (j = -3; j <= 3; j++)
{
if ((j >= 0) && (i++))
count = count + j;
}
count = count + i;
printf("%d", count);
return 0;
}
Which one of the following options is correct?
Consider the following language.
Which one of the following deterministic finite automata accepts ?
For a Turing machine , denotes an encoding of . Consider the following two languages.
Which one of the following options is correct?
Define to be the maximum amount earned by cutting a rod of length meters into one or more pieces of integer length and selling them. For , let denote the selling price of a rod whose length is meters. Consider the array of prices:
Which of the following statements is/are correct about ?
An articulation point in a connected graph is a vertex such that removing the vertex and its incident edges disconnects the graph into two or more connected components.
Let be a DFS tree obtained by doing DFS in a connected undirected graph .
Which of the following options is/are correct?
Consider the following Boolean expression.
Which of the following Boolean expressions is/are equivalent to (complement of )?
A relation is said to be circular if and together imply .
Which of the following options is/are correct?
A TCP server application is programmed to listen on port number on host . A TCP client is connected to the TCP server over the network.
Consider that while the TCP connection was active, the server machine crashed and rebooted. Assume that the client does not use the TCP keepalive timer.
Which of the following behaviors is/are possible?
Consider two hosts and connected through a router . The maximum transfer unit (MTU) value of the link between and is 1500 bytes, and between and is 820 bytes.
A TCP segment of size 1400 bytes was transferred from to through , with IP identification value as 0x1234. Assume that the IP header size is 20 bytes. Further, the packet is allowed to be fragmented, i.e., Don't Fragment (DF) flag in the IP header is not set by .
Which of the following statements is/are correct?
Consider the following pseudocode, where is a semaphore initialized to 5 in line#2 and counter is a shared variable initialized to 0 in line#1. Assume that the increment operation in line#7 is not atomic.
1. int counter = 0;
2. Semaphore S = init(5);
3. void parop(void)
4. {
5. wait(S);
6. wait(S);
7. counter++;
8. signal(S);
9. signal(S);
10. }
If five threads execute the function parop concurrently, which of the following program behavior(s) is/are possible?
Consider a dynamic hashing approach for 4-bit integer keys:
Consider the following state of the hash table.
Which of the following sequences of key insertions can cause the above state of the hash table (assume the keys are in decimal notation)?
Consider the following ANSI C function:
int SimpleFunction(int Y[], int n, int x)
{
int total = Y[0], loopIndex;
for (loopIndex = 1; loopIndex <= n - 1; loopIndex++)
total = x * total + Y[loopIndex];
return total;
}
Let be an array of 10 elements with , for all such that . The value returned by SimpleFunction(Z, 10, 2) is __________
A number: digits, one decimal point and an optional minus sign at the start.
Consider the sliding window flow-control protocol operating between a sender and a receiver over a full-duplex error-free link. Assume the following:
The minimum value of the sender's window size in terms of the number of frames, (rounded to the nearest integer) needed to achieve a link utilization of 50% is __________
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following C code segment:
a = b + c;
e = a + 1;
d = b + c;
f = d + 1;
g = e + f;
In a compiler, this code segment is represented internally as a directed acyclic graph (DAG). The number of nodes in the DAG is __________
A number: digits, one decimal point and an optional minus sign at the start.
In a pushdown automaton , a transition of the form,
where , , and , represents transitioning from state to on input by popping and pushing .
Consider the following pushdown automaton over the input alphabet and stack alphabet .
The number of strings of length 100 accepted by the above pushdown automaton is __________
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following matrix.
The largest eigenvalue of the above matrix is __________
A number: digits, one decimal point and an optional minus sign at the start.
A five-stage pipeline has stage delays of 150, 120, 150, 160 and 140 nanoseconds. The registers that are used between the pipeline stages have a delay of 5 nanoseconds each.
The total time to execute 100 independent instructions on this pipeline, assuming there are no pipeline stalls, is _____________ nanoseconds.
A number: digits, one decimal point and an optional minus sign at the start.
A sender (S) transmits a signal, which can be one of the two kinds: H and L with probabilities 0.1 and 0.9 respectively, to a receiver (R).
In the graph below, the weight of edge is the probability of receiving when is transmitted, where . For example, the probability that the received signal is L given the transmitted signal was H, is 0.7.
If the received signal is H, the probability that the transmitted signal was H (rounded to 2 decimal places) is __________
A number: digits, one decimal point and an optional minus sign at the start.
Consider the following instruction sequence where registers R1, R2 and R3 are general purpose and denotes the content at the memory location .
| Instruction | Semantics | Instruction Size (bytes) |
|---|---|---|
| MOV R1, (5000) | R1 <- MEMORY[5000] | 4 |
| MOV R2, (R3) | R2 <- MEMORY[R3] | 4 |
| ADD R2, R1 | R2 <- R1 + R2 | 2 |
| MOV (R3), R2 | MEMORY[R3] <- R2 | 4 |
| INC R3 | R3 <- R3 + 1 | 2 |
| DEC R1 | R1 <- R1 - 1 | 2 |
| BNZ 1004 | Branch if not zero to the given absolute address | 2 |
| HALT | Stop | 1 |
Assume that the content of the memory location 5000 is 10, and the content of the register R3 is 3000. The content of each of the memory locations from 3000 to 3010 is 50. The instruction sequence starts from the memory location 1000. All the numbers are in decimal format. Assume that the memory is byte addressable.
After the execution of the program, the content of memory location 3010 is __________
A number: digits, one decimal point and an optional minus sign at the start.
Not saved yet. Press Save & Next (or Mark for Review & Next) to record this selection.
M
Your answers are being marked.
The result page did not open. Your answers are saved in this browser.Open the result