Question : 1
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:
21
37
50
73
Correct Answer : C
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 2
A polygon is convex if, for every pair of points, P and Q belonging to the polygon, the line segment PQ lies completely inside or on the polygon.
Which one of the following is NOT a convex polygon?
Correct Answer : A
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 3
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?
(i) is grammatically correct and (ii) is unambiguous
(i) is grammatically incorrect and (ii) is unambiguous
(i) is grammatically correct and (ii) is ambiguous
(i) is grammatically incorrect and (ii) is ambiguous
Correct Answer : C
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 4
A circular sheet of paper is folded along the lines in the directions shown. The paper, after being punched in the final folded state as shown and unfolded in the reverse order of folding, will look like _______.
Correct Answer : A
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 5
_____ is to surgery as writer is to ________
Which one of the following options maintains a similar logical relation in the above sentence?
Plan, outline
Hospital, library
Doctor, book
Medicine, grammar
Correct Answer : C
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 6
We have 2 rectangular sheets of paper, M and N, of dimensions 6 cm x 1 cm each. Sheet M is rolled to form an open cylinder by bringing the short edges of the sheet together. Sheet N 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 __________
\(\frac{\pi}{2} \)
\(\frac{3}{\pi} \)
\(\frac{9}{\pi} \)
\(3\pi\)
Correct Answer : C
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 7
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 3:4. 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
\(\text({Profit \%} = \frac{\text{Selling price} - \text{Cost}}{\text{Cost}} \times 100) \)
The discount on item Q, as a percentage of its marked price, is ______
25
12.5
10
5
Correct Answer : C
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 8
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 ___________
0.3024
0.4235
0.6976
0.8125
Correct Answer : C
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 9
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?
Only conclusion I is correct
Only conclusion II is correct
Either conclusion I or II is correct.
Neither conclusion I nor II is correct.
Correct Answer : C or D
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 10
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?
The proposed AOM addresses the core problems that cause obesity.
If obesity reduces, poverty will naturally reduce, since obesity causes poverty.
AOM are addressing the core problems and are likely to succeed.
AOM are addressing the problem superficially.
Correct Answer : D
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 11
Suppose that \( L_1\) is a regular language and \( L_2\) is a context-free language. Which one of the following languages is NOT necessarily context-free?
\(L_1 ∩ L_2\)
\(L_1 \cdot L_2\)
\(L_1 - L_2\)
\(L_1 ∪ L_2\)
Correct Answer : C
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 12
Let P be an array containing \(n\) integers. Let \(t\) 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 \(n\) elements. Which one of the following choices is correct?
\(t > 2n - 2\)
\(t > 3 \lceil{\frac {n} {2} \rceil} and \ t \leq 2n - 2\)
\(t > n \ \ and \ t \leq 3\lceil {\frac {n}{2}} \rceil\)
\(t > \lceil {log_2 (n)} \rceil and \ t \leq n\)
Correct Answer : C
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 13
Consider the following three functions.
\(f_1 = 10^n\) \(f_2 = n^{log \ n}\) \(f_3 = n^{\sqrt n}\)
Which one of the following options arranges the functions in the increasing order of asymptotic growth rate?
\(f_3\ \ f_2 \ \ f_1\)
\(f_2\ \ f_1 \ \ f_3\)
\(f_1\ \ f_2 \ \ f_3\)
\(f_2\ \ f_3 \ \ f_1\)
Correct Answer : D
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 14
Consider the following statements.
S1: The sequence of procedure calls corresponds to a preorder traversal of the activation tree.
S2: The sequence of procedure returns corresponds to a postorder traversal of the activation tree.
Which one of the following options is correct?
S1 is true and S2 is false
S1 is false and S2 is true
S1 is true and S2 is true
S1 is false and S2 is false
Correct Answer : C
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 15
Consider the following statements.
S1: Every SLR(1) grammar is unambiguous but there are certain unambiguous grammars that are not SLR(1).
S2: For any context-free grammar, there is a parser that takes at most \(O(n^3)\) time to parse a string of length \(n\).
Which one of the following options is correct?
S1 is true and S2 is false
S1 is false and S2 is true
S1 is true and S2 is true
S1 is false and S2 is false
Correct Answer : C
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 16
Let the representation of a number in base 3 be 210. What is the hexadecimal representation of the number?
15
21
D2
528
Correct Answer : A
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 17
Let p and q be two propositions. Consider the following two formulae in propositional logic.
\(S1: (\neg p \land (p \lor q)) \to q \)
\(S2: q \to (\neg p \land (p \lor q))\)
Which one of the following choices is correct?
Both S1 and S2 are tautologies.
S1 is a tautology but S2 is not a tautology
S1 is not a tautology but S2 is a tautology
Neither S1 nor S2 is a tautology
Correct Answer : B
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 18
Consider the following two statements.
S1: Destination MAC address of an ARP reply is a broadcast address.
S2: Destination MAC address of an ARP request is a broadcast address.
Which one of the following choices is correct?
Both S1 and S2 are true
S1 is true and S2 is false
S1 is false and S2 is true
Both S1 and S2 are false
Correct Answer : C
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 19
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?
Selection sort
Mergesort
Insertion sort
Quicksort using the last element as pivot
Correct Answer : C
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 20
A binary search tree \(T\) contains \( n\) distinct elements. What is the time complexity of picking an element in \(T\) that is smaller than the maximum element in \(T\) ?
\(\theta (n \ log \ n)\)
\(\theta (n)\)
\(\theta ( log \ n)\)
\(\theta (1)\)
Correct Answer : D
Question Type : MCQ
Max Marks : 1
Negative Marks : 0.33
Question : 21
In the context of operating systems, which of the following statements is/are correct with respect to paging?
Paging helps solve the issue of external fragmentation
Page size has no impact on internal fragmentation
Paging incurs memory overheads
Multi-level paging is necessary to support pages of different sizes
Correct Answer : AC
Question Type : MSQ
Max Marks : 1
Negative Marks : 0
Question : 22
Let \(⟨M⟩\) denote an encoding of an automaton \(M\). Suppose that Σ={0,1}. Which of the following languages is/are NOT recursive?
\(L = \{⟨M⟩\) \(∣ M\) \(is \ a \ DFA \ such \ that\) \( L(M)=∅\}\)
\(L = \{{⟨M⟩ ∣ M \ is\ a\ DFA\ such\ that \ L(M)=Σ^*}\}\)
\(L = \{{⟨M⟩ ∣ M\ is\ a\ PDA\ such\ that\ L(M)=∅}\}\)
\(L = \{{⟨M⟩ ∣ M\ is\ a\ PDA\ such\ that\ L(M)=Σ^*}\}\)
Correct Answer : D
Question Type : MSQ
Max Marks : 1
Negative Marks : 0
Question : 23
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?
The same undo and redo list will be used while recovering again.
The system cannot recover any further.
All the transactions that are already undone and redone will not be recovered again.
The database will become inconsistent.
Correct Answer : A
Question Type : MSQ
Max Marks : 1
Negative Marks : 0
Question : 24
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?
exit
malloc
sleep
strlen
Correct Answer : AC
Question Type : MSQ
Max Marks : 1
Negative Marks : 0
Question : 25
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?
Creation of a new file in foo
Deletion of an existing file from foo
Renaming of an existing file in foo
Opening of an existing file in foo
Correct Answer : AC
Question Type : MSQ
Max Marks : 1
Negative Marks : 0
Question : 26
In an undirected connected planar graph G, there are eight vertices and five faces. The number of edges in G is _________.
Correct Answer : 11
Question Type : NAT
Max Marks : 1
Negative Marks : 0
Question : 27
Consider the following undirected graph with edge weights as shown:
The number of minimum-weight spanning trees of the graph is ___________.
Correct Answer : 3
Question Type : NAT
Max Marks : 1
Negative Marks : 0
Question : 28
The lifetime of a component of a certain type is a random variable whose probability density function is exponentially distributed with parameter 2. For a randomly picked component of this type, the probability that its lifetime exceeds the expected lifetime (rounded to 2 decimal places) is ____________.
Correct Answer : 0.35 to 0.39
Question Type : NAT
Max Marks : 1
Negative Marks : 0
Question : 29
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 fastest computer gets the toughest job and the slowest computer gets the easiest job.
- Every computer gets at least one job.
The number of ways in which this can be done is ___________.
Correct Answer : 65
Question Type : NAT
Max Marks : 1
Negative Marks : 0
Question : 30
Consider the following expression.
\(\displaystyle \lim_{x\rightarrow-3}\frac{\sqrt{2x+22}-4}{x+3}\)
he value of the above expression (rounded to 2 decimal places) is ___________.
Correct Answer : 0.25
Question Type : NAT
Max Marks : 1
Negative Marks : 0
Question : 31
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 s + q is ________.
Correct Answer : 86
Question Type : NAT
Max Marks : 1
Negative Marks : 0
Question : 32
Consider a computer system with a byte-addressable primary memory of size 232 bytes. Assume the computer system has a direct-mapped cache of size 32 KB (1 KB = 210 bytes), and each cache block is of size 64 bytes.
The size of the tag field is ________ bits.
Correct Answer : 17
Question Type : NAT
Max Marks : 1
Negative Marks : 0
Question : 33
A relation r(A,B) in a relational database has 1200 tuples. The attribute A has integer values ranging from 6 to 20, and the attribute B has integer values ranging from 1 to 20. Assume that the attributes A and B are independently distributed.
The estimated number of tuples in the output of σ(A>10)∨(B=18)(r) is ____________.
Correct Answer : 819 to 820 205 to 205
Question Type : NAT
Max Marks : 1
Negative Marks : 0
Question : 34
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 ____________.
Correct Answer : -7.75 to -.7.75
Question Type : NAT
Max Marks : 1
Negative Marks : 0
Question : 35
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.
Correct Answer : 12
Question Type : NAT
Max Marks : 1
Negative Marks : 0
Question : 36
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
\(\begin{array}{lll} P & \rightarrow & D^* E^* \\ D & \rightarrow & \textsf{int ID} \{ \text{record that } \textsf{ID.} \text{lexeme is of type} \textsf{ int\}} \\ D & \rightarrow & \textsf{bool ID} \{ \text{record that } \textsf{ID.} \text{lexeme is of type} \textsf{ bool\}} \\ E& \rightarrow & E_1 +E_2 \{ \text{check that } E_1. \text{type}=E_2. \text{type} = \textsf{int}; \text{set } E.\text{type }:= \textsf{int} \} \\ E & \rightarrow & !E_1 \{ \text{check that } E_1. \text{type} = \textsf{bool}; \text{ set } E.\text{type} := \textsf{bool} \} \\ E & \rightarrow & \textsf{ID} \{ \text{set } E. \text{type } := \textsf{int} \} \end{array}\)
With respect to the above grammar, which one of the following choices is correct?
The actions can be used to correctly type-check any syntactically correct program.
The actions can be used to type-check syntactically correct integer variable declarations and integer expressions.
The actions can be used to type-check syntactically correct boolean variable declarations and boolean expressions.
The actions will lead to an infinite loop.
Correct Answer : B
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 37
The following relation records the age of 500 employees of a company, where empNo ( indicating the employee number) is the key:
\(empAge(\underline{empNo},age)\)
Consider the following relational algebra expression:
\(\Pi_{empNo}(empAge \Join_{(age>age1)} \rho_{empNo1,age1}(empAge))\)
What does the above expression generate?
Employee numbers of only those employees whose age is the maximum
Employee numbers of only those employees whose age is more than the age of exactly one other employee
Employee numbers of all employees whose age is not the minimum
Employee numbers of all employees whose age is the minimum
Correct Answer : C
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 38
Consider a 3-bit counter, designed using T flip-flops, as shown below:
Assuming the initial state of the counter given by PQR as 000, what are the next three states?
011,101,000
001,010,111
011,101,111
001,010,000
Correct Answer : A
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 39
Assume that a 12-bit Hamming codeword consisting of 8-bit data and 4 check bits is \(d_8 d_7 d_6 d_5 c_8 d_4 d_4 d_3 d_2 c_4 d_1 c_2 c_1\),where the data bits and the check bits are given in the following tables:
\(\overset{\textbf{Data bits}}{\begin{array}{|c|c|c|c|} \hline d_{8} & d_{7} & d_{6} & d_{5} & d_{4} & d_{3} & d_{2} & d_{1} \\\hline 1 & 1 & 0 & x & 0 & 1 & 0 & 1 \\\hline \end{array}}\qquad \overset{\textbf{Check bits}}{\begin{array}{|c|c|c|c|} \hline c_{8} & c_{4} & c_{2} & c_{1} \\\hline y & 0 & 1 & 0 \\\hline \end{array}}\)
Which one of the following choices gives the correct values of \(x\) and \(Y\) ?
\(x\) is 0 and \(y\) is 0
\(x\) is 0 and \(y\) is 1
\(x\) is 1 and \(y\) is 0
\(x\) is 1 and \(y\) is 1
Correct Answer : A
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 40
Consider the following recurrence relation.
\(T\left ( n \right )=\left\{\begin{array} {lcl} T(n ∕ 2)+T(2n∕5)+7n & \text{if} \; n>0\\1 & \text{if}\; n=0 \end{array}\right.\)
Which one of the following options is correct?
\(T(n)=\Theta (n^{5/2})\)
\(T(n)=\Theta (n\log n)\)
\(T(n)=\Theta (n)\)
\(T(n)=\Theta ((\log n)^{5/2})\)
Correct Answer : C
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 41
Consider the following context-free grammar where the set of terminals is {a,b,c,d,f}.
\(\begin{array}{lll} \text{S} & \rightarrow & d \: a \: \text{T} \mid \text{R} \: f \\ \text{T} & \rightarrow & a \: \text{S} \: \mid \: b \: a \: \text{T} \: \mid \epsilon \\ \text{R} & \rightarrow & c \: a \: \text{T} \: \text{R} \: \mid \epsilon \end{array}\)
The following is a partially-filled LL(1) parsing table.
\(\begin{array} {c c c } & a & b & c & d & f & \$ \\\hline \text{S} & & & \boxed{1} & \text{S} \rightarrow da \text{T} & \boxed{2} & \\\hline \text{T} & \text{T} \rightarrow a\text{S} & \text{T} \rightarrow ba\text{T} & \boxed{3} & & \text{T} \rightarrow \varepsilon & \boxed{4}\\\hline \text{R} & & & \text{R} \rightarrow ca\text{T}\text{R} & & \text{R} \rightarrow \varepsilon & \end{array}\)
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)?
\(\boxed{1}\;\text{S} \rightarrow \text{R}f \qquad \boxed{2}\;\text{S} \rightarrow \text{R}f \qquad \boxed{3}\; \text{T} \rightarrow \varepsilon \qquad \boxed{4}\;\text{T} \rightarrow \varepsilon\)
\(\boxed{1}\;\text{blank} \qquad \boxed{2}\;\text{S} \rightarrow \text{R}f \qquad \boxed{3}\; \text{T} \rightarrow \varepsilon \qquad \boxed{4}\;\text{T} \rightarrow \varepsilon\)
\(\boxed{1}\;\text{S} \rightarrow \text{R}f \qquad \boxed{2}\;\text{blank} \qquad \boxed{3}\; \text{blank} \qquad \boxed{4}\;\text{T} \rightarrow \varepsilon\)
\(\boxed{1}\;\text{blank} \qquad \boxed{2}\;\text{S} \rightarrow \text{R}f \qquad \boxed{3}\; \text{blank} \qquad \boxed{4}\;\text{blank}\)
Correct Answer : A
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 42
Let \(r_i(z)\) and \(w_i(z)\) denote read and write operations respectively on a data item \(z\) by a transaction \( T_i \) . Consider the following two schedules.
\(S_1: r_1(x)r_1(y)r_2(x)r_2(y)w_2(y)w_1(x)\)
\(S_2: r_1(x)r_2(x)r_2(y)w_2(y)r_1(y)w_1(x)\)
Which one of the following options is correct?
\(S_1\) is conflict serializable, and \(S_2\) is not conflict serializable.
\(S_1\) is not conflict serializable, and \(S_2\) is conflict serializable
Both \(S_1\) and \(S_2\) are conflict serializable
Neither \(S_1\) nor \(S_2\) is conflict serializable
Correct Answer : B
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 43
Consider the relation \(R(P,Q,S,T,X,Y,Z,W)\) with the following functional dependencies.
\(PQ\rightarrow X;\quad P\rightarrow YX;\quad Q\rightarrow Y; \quad Y\rightarrow ZW\)
Consider the decomposition of the relation R into the constituent relations according to the following two decomposition schemes.
\(D_1:\quad R=[(P,Q,S,T);\;(P,T,X);\;(Q,Y);\;(Y,Z,W)]\)
\(D_2:\quad R=[(P,Q,S);\;(T,X);\;(Q,Y);\;(Y,Z,W)]\)
Which one of the following options is correct?
\(D_1 \) is a lossless decomposition, but \(D_2\) is a lossy decomposition
\(D_1 \) is a lossy decomposition, but \(D_2\) is a lossless decomposition
Both \(D_1 \) and \(D_2\) are lossless decompositions
Both \(D_1 \) and \(D_2\) are lossy decompositions
Correct Answer : A
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 44
Let G be a group of order 6, and H be a subgroup of G such that 1 < |H| < 6. Which one of the following options is correct?
Both G and H are always cyclic.
G may not be cyclic, but H is always cyclic.
G is always cyclic, but H may not be cyclic.
Both G and H may not be cyclic.
Correct Answer : B
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 45
Consider the two statements.
\(S_1 :\) There exist random variables \(X\) and \(Y\) such that
\(\left(\mathbb E[(X-\mathbb E(X))(Y-\mathbb E(Y))]\right)^2>\textsf{Var}[X]\textsf{Var}[Y]\)
\(S_2 :\) For all random variables \(X\) and \(Y\),
\(Y, \textsf{Cov}[X,Y]=\mathbb E \left[|X-\mathbb E[X]|\;|Y-\mathbb E[Y]|\right ]\)
Which one of the following choices is correct?
Both \(S_1\) and \(S_2\) are true.
\(S_1\) is true, but \(S_2\) is false.
\(S_1\) is false, but \(S_2\) is true.
Both \(S_1\) and \(S_2\) are false.
Correct Answer : D
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 46
Let \(G=(V,E)\) be an undirected unweighted connected graph. The diameter of \(G\) is defined as:
\(\text{diam}(G)=\displaystyle \max_{u,v\in V} \{\text{the length of shortest path between $u$ and $v$}\}\)
Let \(M\) be the adjacency matrix of \(G\).
Define graph \(G_2\) on the same set of vertices with adjacency matrix \(N\), where
\(N_{ij}=\left\{\begin{array} {lll} 1 &\text{if}\; M_{ij}>0 \text{ or } P_{ij}>0, \text{ where }P=M^2\\0 &\text{otherwise} \end{array}\right.\)
Which one of the following statements is true?
\(\text{diam}(G_2)\leq\lceil \text{diam}(G)/2\rceil\)
\(\lceil \text{diam}(G)/2\rceil<\text{diam}(G_2)< \text{diam}(G)\)
\(\text{diam}(G_2) = \text{diam}(G)\)
\(\text{diam}(G)< \text{diam}(G_2)\leq 2\; \text{diam}(G)\)
Correct Answer : A
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 47
Consider the following 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;
}
The program will not compile successfully.
The program will compile successfully and output 10 when executed.
The program will compile successfully and output 8 when executed.
The program will compile successfully and output 13 when executed.
Correct Answer : B
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 48
Consider the following language:
\(L= \{ w \in \{0,1\}^* \mid w \text{ ends with the substring } 011 \}\)
Which one of the following deterministic finite automata accepts \(L\) ?
Correct Answer : D
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 49
For a Turing machine \(M, ⟨M⟩\) denotes an encoding of \(M\). Consider the following two languages.
\(\begin{array}{ll} L_1 = \{ \langle M \rangle \mid M \text{ takes more than } 2021 \text{ steps on all inputs} \} \\ L_2 = \{ \langle M \rangle \mid M\text{ takes more than } 2021 \text{ steps on some input} \} \end{array}\)
Which one of the following options is correct?
Both \(L_1\) and \(L_2\) are decidable.
\(L_1\) is decidable and \(L_2\) is undecidable
\(L_1\) is undecidable and \(L_2\) is decidable
Both \(L_1\) and \(L_2\) are undecidable
Correct Answer : A
Question Type : MCQ
Max Marks : 2
Negative Marks : 0.67
Question : 50
Define \(R_n\) to be the maximum amount earned by cutting a rod of length n meters into one or more pieces of integer length and selling them. For \( i > 0\) , let \(p[i]\) denote the selling price of a rod whose length is i meters. Consider the array of prices:
\(\text{p}[1]=1,\text{p}[2]=5,\text{p}[3]=8,\text{p}[4]=9,\text{p}[5]=10,\text{p}[6]=17,\text{p}[7]=18\)
Which of the following statements is/are correct about \(R_7\) ?
\(R_7\) = 18
\(R_7\) = 19
\(R_7\) is achieved by three different solutions.
\(R_7\) cannot be achieved by a solution consisting of three pieces.
Correct Answer : AC
Question Type : MSQ
Max Marks : 2
Negative Marks : 0
Question : 51
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 T be a DFS tree obtained by doing DFS in a connected undirected graph G. Which of the following options is/are correct?
Root of T can never be an articulation point in G.
Root of T is an articulation point in G if and only if it has 2 or more children.
A leaf of T can be an articulation point in G.
If u is an articulation point in G such that x is an ancestor of u in T and y is a descendent of u in T, then all paths from x to y in G must pass through u.
Correct Answer : B
Question Type : MSQ
Max Marks : 2
Negative Marks : 0
Question : 52
Consider the following Boolean expression.
\(F=(X+Y+Z)(\overline X +Y)(\overline Y +Z)\)
Which of the following Boolean expressions is/are equivalent to \(\overline F\) (complement of \(F\))?
\((\overline X +\overline Y +\overline Z)(X+\overline Y)(Y+\overline Z)\)
\(X\overline Y + \overline Z\)
\((X+\overline Z)(\overline Y +\overline Z)\)
\(X\overline Y +Y\overline Z + \overline X\; \overline Y \;\overline Z\)
Correct Answer : BCD
Question Type : MSQ
Max Marks : 2
Negative Marks : 0
Question : 53
A relation \(R\) is said to be circular if \(aRb\) and bRc together imply \(cRa\). Which of the following options is/are correct?
If a relation \(S\) is reflexive and symmetric, then \(S\) is an equivalence relation.
If a relation \(S\) is circular and symmetric, then \(S\) is an equivalence relation.
If a relation \(S\) is reflexive and circular, then \(S\) is an equivalence relation.
If a relation \(S\) is transitive and circular, then \(S\) is an equivalence relation.
Correct Answer : C
Question Type : MSQ
Max Marks : 2
Negative Marks : 0
Question : 54
A TCP server application is programmed to listen on port number P on host S. A TCP client is connected to the TCP server over the network. Consider that while the TCP connection was active, the server machine S crashed and rebooted. Assume that the client does not use the TCP keepalive timer. Which of the following behaviors is/are possible?
If the client was waiting to receive a packet, it may wait indefinitely.
The TCP server application on S can listen on P after reboot.
If the client sends a packet after the server reboot, it will receive a RST segment.
If the client sends a packet after the server reboot, it will receive a FIN segment.
Correct Answer : ABC
Question Type : MSQ
Max Marks : 2
Negative Marks : 0
Question : 55
Consider two hosts P and Q connected through a router R. The maximum transfer unit (MTU) value of the link between P and R is 1500 bytes, and between R and Q is 820 bytes.
A TCP segment of size 1400 bytes was transferred from P to Q through R, with IP identification value as 0×1234. 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 P.
Which of the following statements is/are correct?
Two fragments are created at R and the IP datagram size carrying the second fragment is 620 bytes.
If the second fragment is lost, R will resend the fragment with the IP identification value 0×1234.
If the second fragment is lost, P is required to resend the whole TCP segment.
TCP destination port can be determined by analysing only the second fragment.
Correct Answer : AC
Question Type : MSQ
Max Marks : 2
Negative Marks : 0
Question : 56
Consider the following pseudocode, where S 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?
The value of counter is 5 after all the threads successfully complete the execution of parop.
The value of counter is 1 after all the threads successfully complete the execution of parop.
The value of counter is 0 after all the threads successfully complete the execution of parop
There is a deadlock involving all the threads
Correct Answer : ABD
Question Type : MSQ
Max Marks : 2
Negative Marks : 0
Question : 57
Consider a dynamic hashing approach for 4-bit integer keys:
Which of the following sequences of key insertions can cause the above state of the hash table (assume the keys are in decimal notation)?
5,9,4,13,10,7
9,5,10,6,7,1
10,9,6,7,5,13
9,5,13,6,10,14
Correct Answer : C
Question Type : MSQ
Max Marks : 2
Negative Marks : 0
Question : 58
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 Z be an array of 10 elements with Z[i]=1, for all i such that 0≤i≤9. The value returned by SimpleFunction(Z,10,2) is __________ .
Correct Answer : 1023
Question Type : NAT
Max Marks : 2
Negative Marks : 0
Question : 59
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_____________.
Correct Answer : 50 to 52
Question Type : NAT
Max Marks : 2
Negative Marks : 0
Question : 60
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 _____________ .
Correct Answer : 6
Question Type : NAT
Max Marks : 2
Negative Marks : 0
Question : 61
In a pushdown automaton P=(Q,Σ,Γ,δ,q0,F), a transition of the form,
where \(p,q \in Q\) \(a \in \Sigma \cup \{ \epsilon \}\), and \(X,Y \in \Gamma \cup \{ \epsilon \}\) represents
\((q,Y) \in \delta(p,a,X).\)
Consider the following pushdown automaton over the input alphabet \(\Sigma = \{a,b\}\) and stack alphabet \(\Gamma = \{ \#, A\}\).
The number of strings of length 100 accepted by the above pushdown automaton is ___________ .
Correct Answer : 50
Question Type : NAT
Max Marks : 2
Negative Marks : 0
Question : 62
Consider the following matrix.
\(\begin{pmatrix} 0 & 1 & 1 & 1\\ 1& 0& 1 & 1\\ 1& 1 & 0 & 1 \\1 & 1 & 1 & 0 \end{pmatrix}\)
The largest eigenvalue of the above matrix is __________.
Correct Answer : 3
Question Type : NAT
Max Marks : 2
Negative Marks : 0
Question : 63
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.
Correct Answer : 17160
Question Type : NAT
Max Marks : 2
Negative Marks : 0
Question : 64
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 (u,v) is the probability of receiving v when u is transmitted, where u,v∈{H,L}. For example, the probability that the received signal is L
If the received signal is H, the probability that the transmitted signal was H (rounded to 2 decimal places) is __________.
Correct Answer : 0.04
Question Type : NAT
Max Marks : 2
Negative Marks : 0
Question : 65
Consider the following instruction sequence where registers \(R1,R2\) and \(R3\) are general purpose and \(MEMORY[X]\) denotes the content at the memory location \(X\).
\(\begin{array}{llc} \textbf{Instruction} & \textbf{Semantics} & \textbf{Instruction Size} \text{ (bytes)} \\ \hline \text{MOV } \text{R1}, (5000) & \text{R1} \leftarrow \text{MEMORY}[5000] & 4 \\ \hline \text{MOV } \text{R2}, (\text{R3}) & \text{R2} \leftarrow \text{MEMORY[R3]} & 4 \\ \hline \text{ADD} \text{R2}, \text{R1} & \text{R2} \leftarrow \text{R1} + \text{R2} & 2 \\ \hline \text{MOV } (\text{R3}), \text{R2} & \text{MEMORY[R3]} \leftarrow \text{R2} & 4 \\ \hline \text{INC } \text{R3} & \text{R3} \leftarrow \text{R3}+1 & 2 \\ \hline \text{DEC } \text{R1} & \text{R1} \leftarrow \text{R1}-1 & 2 \\ \hline \text{BNZ } 1004 & \text{Branch if not zero to the} & 2 \\ & \text{given absolute address}& \\ \hline \text{HALT} & \text{Stop} & 1 \\ \hline \end{array}\)
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 ____________ .
Correct Answer : 50
Question Type : NAT
Max Marks : 2
Negative Marks : 0