Given the sequence of terms, AD CG FK JP, the next term is
- ((a))
OV
- ((b))
OW
- ((c))
PV
- ((d))
PW
Show Answer
OV
The given sequence is:
65 questions · 180 minutes · with answers · free
Given the sequence of terms, AD CG FK JP, the next term is
OV
OW
PV
PW
OV
The given sequence is:
Which of the following assertions are CORRECT?
P: Adding 7 to each entry in a list adds 7 to the mean of the list
Q: Adding 7 to each entry in a list adds 7 to the standard deviation of the list
R: Doubling each entry in a list doubles the mean of the list
S: Doubling each entry in a list leaves the standard deviation of the list unchanged
P. Q
Q. R
P. R
R. S
P. R
Explanation:
Let E(x) represent mean
Then by the property of mean
E(Cx) = cE(x) where c is constant
And E(x + c) = E(x) + E(c) = E(x) + c
∴ Options P and R always holds true.
Now,
Let Var (x) represent the variance
Then var (x + c) = var (x) + var (c)
var (x + c) = var (x) {∵ var (c) = 0}
∴ S.D (x + c) = S.D (x)
Now,
var (cx) =(c2)var (x)
S.D (cx) = (c)S.D (x)
∴ Options Q and S are incorrect.
An automobile plant contracted to buy shock absorbers from two suppliers X and Y. X supplies 60% and Y supplies 40% of the shod absorbers. All shock absorbers are subjected to a quality test. The ones that pass the quality test are considered reliable Of X's shock absorbers, 96% are reliable. Of Y's shock absorbers, 72% are reliable. The probability that a randomly chosen shock absorber, which is found to be reliable is made by Y is
0.288
0.334
0.667
0.720
0.334
Calculation:
Let 100 shock absorbers are supplied
so, X supplies = 60 (60% of 100)
Y supplies = 40 (40% of 100)
Reliable supply by X = 96% of 60 = 57.6
Reliable supply by Y = 72% of 40 = 28.8
Required probability
A political party orders an arch for the entrance to the ground in which the annual convention is being held. The profile of the arch follows the equation y = 2x - 0.1x2 where y is the height of the arch in meters. The maximum possible height of the arch is
8 meters
10 meters
12 meters
14 meters
10 meters
Given:
y = 2x – 0.1x2
differentiating w.r.t x
∴ At x = 10, y will have a maximum value.
ymax = y(10) = (2 × 10) - 0.1(102) = 10
Wanted Temporary, Part-time persons for the post of Field Interviewer to conduct personal interviews to collect and collate economic data. Requirements: High School-pass, must be available for Day, Evening, and Saturday work. Transportation paid, expenses reimbursed. which one of the following is the best inference from the above advertisement?
Gender-discriminatory
Xenophobic
Not designed to make the post attractive
Not gender-discriminatory
Not gender-discriminatory

Explanation:
Choose the most appropriate alternative from the options given below to complete the following sentence:
Suresh's dog is the one ________ was hurt in the stampede.
that
which
who
whom
that
The correct answer is option 1- that
Explanation
To answer this question, we need to understand the meaning of defining and non-defining clauses.
Example: My bike that has a broken seat is in the garage.
Example: The goat was standing on the roof of the house which was abandoned.
In the given sentence, if we consider the first clause, the information given is incomplete and it can only be completed via the introduction of the second clause. Hence, we have to use 'that' in this sentence.
Choose the grammatically INCORRECT sentence:
They gave us the money back less the service charges of Three Hundred rupees.
This country's expenditure is not less than that of Bangladesh.
The committee initially asked for a funding of Fifty Lakh rupees, but later settled for a lesser sum.
This country's expenditure on educational reforms is very less
This country's expenditure on educational reforms is very less
The correct answer is option 4.
Explanation
As we can see, the question has been framed to test our grammatical knowledge regarding the use of the adjective 'less'.
Which one of the following options is the closet in meaning to the word given below?
Mitigate
Diminish
Divulge
Dedicate
Denote
Diminish
The correct answer is option 1- Diminish Explanation
Mitigate: make (something bad) less severe, serious, or painful; lessen the gravity of (an offence or mistake)
Diminish: make or become less; decrease in size, degree etc.
Thus we can see that among the options, 'diminish' is closest in meaning to the word 'mitigate'. They are near-synonyms.

The meaning of the other words:
Choose the most appropriate alternative from the options given below to complete the following sentence:
Despite several ________ the mission succeeded in its attempt to resolve the conflict.
attempts
setbacks
meetings
delegations
setbacks
The correct answer is option 2- setbacks
Explanation
Setback: something that happens that delays or prevents a process from developing
From the given context, it is clear that the mission finally resolved the conflict after many failed attempts and obstacles. Thus, 'setback' is the correct word for the given blank.
The meaning of the other words:
You may be confused regarding the use of 'attempts' and 'setbacks'. Attempt does not have any negative connotation to it, whereas setback has one. As the sentence is specifically referring to fruitless attempts taken in the past, 'setbacks' would be a more apt choice.
The cost function for a product in a firm is given by 5q2, where q is the amount of production. The firm can sell the product at a market price of Rs.50 per unit. The number of units to be produced by the Emi such that the profit is maximized is
5
10
15
25
5
As q = total number of quantities produced.
Total cost = 5q2
Total sales = 50q
Profit (P) = total cost – total sales
P = 5q2 – 50q
Differentiating w.r.t q
∴ At q = 5, profit (P) is maximum.
Consider the following logical inferences.
I1: If it rains then the cricket match will not be played.
The cricket match was played.
Inference: There was no rain.
I2: If it rains then the cricket match will not be played.
It did not rain
Inference: The cricket match was played.
Which of the following is TRUE?
Both I1 and I2 are correct inferences
I1 is correct but I2 is not a correct inference
I1 is not correct but I2 is a correct inference
Both I1 and I2 are not correct inferences
I1 is correct but I2 is not a correct inference
The correct answer is “option 2”.
EXPLANATION:
I1 states that:
Statement
Consider A = it rains,
B = match played
So, If (it rains) then (match will not be played) that means,
A → (¬ B)
Inference states that “there was no rain” means A = false (F)
Therefore, for any F → (¬ B) i.e. for any "F that implies not B" is true.
So this inference is valid.
Here the only condition is if it rains the match will not be played. That doesn’t mean if it will not rain then the match will be played.
If the match was played then it means it doesn’t rain.
So this inference is valid.
I2 states that:
Statement
Consider A = it rains,
B = match played
So, If (it rains) then (match will not be played) that means,
A → (¬ B)
Inference states that “the match was played”.
Here the only condition is if it rains the match will not be played. If the match was played then it means it doesn’t rain.
That doesn’t mean if it will not rain then the match will be played.
So this inference is invalid.
Hence, the correct answer is "option 2".
Which of the following is TRUE?
Every relation in 3NF is also in BCNF
A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every key of R
Every relation in BCNF is also in 3NF
No relation can be in both BCNF and 3NF
Every relation in BCNF is also in 3NF
The correct answer is "option 3".
CONCEPT
Normalization is used to minimize redundancy from a set of relations.
It is used to organize data effectively in the database.
Normal forms are used to reduce redundancy from the database.
Third Normal form: A relation is said to be in third normal form if it is in 2NF & there must not exist any transition dependency.
Also, it must satisfy these properties:
BCNF: A relation is said to be in Boyce-Codd normal form (BCNF) if it is in 3NF & must satisfy this property:
EXPLANATION:
Option 1: FALSE
Any relation in BCNF must be in 3NF.
Option 2: FALSE
A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every key of R but this does not guarantee transitive dependency.
Option 3: TRUE
Every relation is BCNF must be in 3NF.
Option 4: FALSE
Any relation can be in both BCNF & 3NF if it satisfies the condition of BCNF.
Hence, the correct answer is “option 3”.
What will be the output of the following C program segment?
char inChar = ‘A’ ;
switch ( inChar )
{
case ‘A’ : printf (“Choice A\n”) ;
case ‘B’ :
case ‘C’ : printf (“Choice B”) ;
case ‘D’ :
case ‘E’ : default : printf ( “ No Choice” ) ;
}
No Choice
Choice A
Choice A
Choice B No Choice
Program gives no output as it is erroneous
Choice A
Choice B No Choice
The correct answer is "option 3".
CONCEPT:
The expression in switch condition is evaluated once and compared with values of each case value.
Also, the break statement is used to move the control out of the switch case after matching case statements gets executed.
If there is no match, then the default clause is used.
The default clause is optional
EXPLANATION:
char inChar = ‘A’ ;
// inChar variable having char datatype is initialized with value “A”.
switch ( inChar ) // switch condition is compared
case ‘A’: printf("Choice A\n");
// the case value is matched & statement gets executed but since there is no break it will move to case value B
case 'B':
//no statement & no break so it will move to case value C
case ‘C’: printf ("Choice B");
// print given statement & since no break so it will move to case value D
case 'D':
//no statement & no break so it will move to case value E
case 'E':
//no statement & no break so it will move to the default case
default: printf ( "No Choice" ) ; }
// print the statement and move out of the switch case.
So the output will be:
Choice A
Choice B No Choice
Hence the correct answer is "option 3".
Assuming P ≠ NP, which of the following is TRUE?
NP-complete = NP
NP-complete ∩ P = Φ
NP-hard = NP
P = NP-complete
NP-complete ∩ P = Φ
The correct answer is option 2
CONCEPT:

From Diagram: NP-complete ⋂ P = ϕ
NP-complete problems:
They are those for which no polynomial-time algorithm exists. We can say a problem is NP-complete if it is NP and belongs to NP-hard.
NP problems:
A problem is a member of the NP class if there exists a non-deterministic machine that can solve it in polynomial time.
NP-Hard:
A problem is called NP-hard if all the NP class problems are polynomial-time reducible to that and as hard as any problem of NP class
EXPLANATION:
So the option NP-complete ∩ P = Φ is correct
The worst case running time to search for an element in a balanced binary search tree with n2n elements is
Θ (n log n)
Θ (n2n)
Θ (n)
Θ (log n)
Θ (n)
The correct answer is "option 3".
CONCEPT:
There are three types of complexities:
EXPLANATION:
Since the worst-case running time to search ‘n’ elements in a balanced Binary Search Tree (BST) is (log2n).
If the number of elements is (n2n) then,
Search time will be: T(n) = (log2n.2n)
Since log2(A.B) = log2A + log2B
∴T(n) =log2n + log22n
∴T(n) = log2n + n.log22 = log2n + n
T(n) = O(n)
Hence the correct answer is "option 3".
The truth table
| X | Y | F(X, Y) |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
represents the Boolean function
X
X + Y
X ⊕ Y
Y
X
The correct answer is "option 1".
EXPLANATION:
Option 1: TRUE
The truth table X is**:**
| X | Y | F | X |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 |
F is equal to X.
Option 2: FALSE
The truth table X+Y is**:**
| X | Y | F | X+Y |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 |
F is not equal to X+Y.
Option 3: FALSE
The truth table X’Y + XY' is**:**
| X | Y | F | X’ Y + XY' |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 |
F is not equal to X’.Y +X.Y'.
Option 4: FALSE
The truth table Y is :
| X | Y | F | Y |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 |
F is not equal to Y.
Hence, the correct answer is "option 1".

From truth table, the sum of minterms
F(X, Y) = X.Y̅ + X.Y = X(Y̅ + Y) = X
The decimal value 0.5 in IEEE single precision floating point representation has
fraction bits of 000…000 and exponent value of 0
fraction bits of 000…000 and exponent value of −1
fraction bits of 100…000 and exponent value of 0
no exact representation
fraction bits of 000…000 and exponent value of −1
The correct answer is option 2:
Concept:
32-bit floating-point representation of a binary number in IEEE- 754 is
| Sign (1 bit) | Exponent E (8 bit) | Mantissa M (23 bits) |
|---|
In IEEE-754 format, 32-bit (single precision)
Decimal value = (-1)s × 1.M × 2E – 127
Option 2: Correct
If E = 126 then exponent part = 126 - 127 = -1
Fraction part = M = 0
Since 0.5 is positive and hence S = 0
Decimal value = (-1)s × 1.M × 2E – 127
Decimal value = (-1)0 × 1.0 × 2126 – 127 = 0.5
A process executes the code
fork();
fork();
fork();
The total number of child processes created is
3
4
7
8
7
The correct answer is option 3.
Concept:
Fork () is a system call that creates a new process. After a new child process is created, both processes will execute the next instruction. If fork() returns a negative value, the creation of the child process was unsuccessful. Return zero to the newly created process.
Explanation:
If there are n fork() calls, then the number of child processes created is 2n – 1.
Calculation:
n = 3,
Number of child processes created = 23 – 1 = 7
Consider the function f(x) = sin(x) in the interval x ∈ [π/4, 7π/4]. The number and location(s) of the local minima of this function are
One, at π/2
One, at 3π/2
Two, at π/2 and 3π/2
Two, at π/4 and 3π/2
One, at 3π/2
The correct answer is option 2
CONCEPT:
y = f(x)
x ∈ [a,e]

f(a) is local minima
f(c) is local maxima
f(d) is local minima
f(e) is local maxima
Absolute max OR global max OR greatest value = max(f(c),f(e)) =f(e)
Absolute min OR global min OR least value = max(f(a),f(d)) =f(d)
EXPLANATION:
Graph of sin(x)

So local minima One, at 3π/2 in the interval x ∈ [π/4, 7π/4].
The protocol data unit (PDU) for the application layer in the Internet stack is
Segment
Datagram
Message
Frame
Message
The correct answer is option 3
CONCEPT
PDU for the application layer is messages.

Additional Information
Let A be the 2 × 2 matrix with elements a11 = a12 = a21 = +1 and a22 = −1. Then the eigenvalues of the matrix A19 are
1024 and −1024
1024√2 and −1024√2
4√2 and −4√2
512√2 and −512√2
512√2 and −512√2
The correct answer is "option 4".
CONCEPT:
According to Cayley Hamilton theorem:
If matrix A has Eigenvalue ‘x’ then An has Eigenvalue as xn.
DATA:
According to the given values,
a11 = a12 = a21 = 1, a22 = -1
The 2 x 2 matrix will be:
CALCULATION:
Considering characteristic equation is |A - λ I| = 0
where λ is eigen value and I is identity matrix
∴ Characteristics equation is given by
\(\left| \begin{array}{*{35}{r}} 1-\lambda & 1 \ 1 & -1-\lambda \ \end{array} \right|=0\)
Solving the matrix,
−(1 − λ).(1 + λ) − 1 = 0
−(1 − λ2) – 1 = 0
− 2 + λ2 = 0
λ2 = 2
λ = ±(2)1/2
Therefore the Eigen values are:
((2)1/2)19= 29 x (2)1/2 = 512√2
((-2)1/2)19= (−1)9 x 29 x (2)1/2 = −512√2
Hence the correct answer is "option 4".
What is the complement of the language accepted by the NFA shown below?
Assume ∑ = {a} and ϵ is the empty string

Φ
{ϵ}
a*
(a, ϵ)
{ϵ}
The correct answer is "option 2".
EXPLANATION:
NFA is:

Consider, ∑ = {a} and ϵ is the empty string
The ∑ = {a} and the NFA accept the following strings:
{a, aa, aaa, aaaa,……}
That means, the language accepted by the regular expression is {a+}
Therefore, the complement of the language is:
= {a* - a+}
= ϵ
Hence, the correct answer is "option 2".
What is the correct translation of the following statement into mathematical logic?
“Some real numbers are rational”
∃x (real(x) ∨ rational(x))
∀x (real(x) → rational(x))
∃x (real(x) ∧ rational(x))
∃x (rational(x) → real(x))
∃x (real(x) ∧ rational(x))
The correct answer is option 3.
STATEMENT:
“Some real numbers are rational”
Option 1: Incorrect
There exist some numbers which are either real OR rational
Option 2: Incorrect
All real numbers are rational
Option 3: Correct
There exist some numbers which are both real and rational
Option 4: Incorrect
There exists a number such that if it is rational, it is real
Given the basic ER and relational models, which of the following is INCORRECT?
An attribute of an entity can have more than one value
An attribute of an entity can be composite
In a row of a relational table, an attribute can have more than one value
In a row of a relational table, an attribute can have exactly one value or a NULL value
In a row of a relational table, an attribute can have more than one value
The correct answer is "option 3".
EXPLANATION:
Option 1: CORRECT
In the Entity-Relationship model or ER model, the Multi-valued attributes of any entity can have one or more attribute values.
In a single-valued attribute, any entity can only have a single attribute value.
Option 2: CORRECT
In ER model, the attribute which can be further broken down into more attribute values is known as the “composite attribute”.
So, an attribute of an entity can be composite.
Option 3: INCORRECT
In the Entity-Relationship model or ER model, the Multi-valued attributes of any entity can have one or more attribute values.
An attribute can have multiple attribute values but not in a row of relational tables.
In a relational table, rows must contain atomic values.
Option 4: CORRECT
In the Relational model, the values of the intersection of one row & column should contain either:
Hence the correct answer is “option 3”.
Which of the following statements are TRUE about an SQL query?
P: An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause
Q: An SQL query can contain a HAVING clause only if it has a GROUP BY clause
R: All attributes used in the GROUP BY clause must appear in the SELECT clause
S: Not all attributes used in the GROUP BY clause need to appear in the SELECT clause
P and R
P and S
Q and R
Q and S
Q and R
The correct answer is option 3
EXPLANATION:
GROUP BY clause:
Syntax:
SELECT column_name(s)
FROM table_name
WHERE condition
GROUP BY column_name(s)
Example:
SELECT COMPANY, COUNT(*)
FROM PRODUCT_MAST
GROUP BY COMPANY
Therefore all attributes used in the GROUP BY clause must appear in the SELECT clause
HAVING clause:
Syntax:
SELECT column1, column2
FROM table_name
WHERE conditions
GROUP BY column1, column2
HAVING conditions
ORDER BY column1, column2;
Example:
SELECT COMPANY, COUNT(*)
FROM PRODUCT_MAST
GROUP BY COMPANY
HAVING COUNT(*)>2;
Therefore an SQL query can contain a HAVING clause only if it has a GROUP BY clause.

Confusion Points
The answer is as per standard SQL
The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with ṅ discs is
T(n) = 2T(n − 2) + 2
T(n) = 2T(n − 1) + n
T(n) = 2T(n/2) + 1
T(n) = 2T(n − 1) + 1
T(n) = 2T(n − 1) + 1
The correct answer is option 4
Concept
Rule Of Towers of Hanoi problem:
Tower of Hanoi is a mathematical puzzle where we have three poles and n disks. The main goal in the puzzle is to move the entire stack to another pol, obeying the following simple rules:
Solution Of Towers of Hanoi problem:
Begin with n disks on pole one
Moreover, it is easy to say that the puzzle can not be solved using fewer steps. This shows that
The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with ṅ discs is
T(n) = 2T(n − 1) + 1
Example:
Follow the above algorithm to solve the problem of the Tower of Hanoi
here we have three-pole and also have three disks

Let G be a simple undirected planar graph on 10 vertices with 15 edges. If G is a connected graph, then the number of bounded faces in any embedding of G on the plane is equal to
3
4
5
6
6
The correct answer is "option 4".
CONCEPT:
A planar graph is a graph that can be drawn on the plane in such a way that its edges must intersect only at their endpoints.
In a planar graph, the graph is drawn in such a way that no edges must cross each other.
The graph whose edges overlap or cross each other is known as a Non-planar graph.
A graph to be planar must satisfy the following Euler’s formula:
v - e + f = 2
where
v is the number of vertices
e is the number of edges
f is the number of faces
CALCULATION
v = 10, e = 15
According to Euler’s formula:
v - e + f = 2
10 – 15 + f = 2
f = 2 – 10 + 15
f = 7
Out of 7, there will be always one unbounded face.
So, the number of faces is 6.
Hence, the correct answer is "option 4".
Let W(n) and A(n) denote respectively, the worst case and average case running time of an algorithm executed on an input of size n. Which of the following is ALWAYS TRUE?
A(n) = Ω (W(n))
A(n) = Θ (W(n))
A(n) = O (W(n))
A(n) = o (W(n))
A(n) = O (W(n))
The correct answer is "option 3".
CONCEPT:
There are three types of complexities:
EXPLANATION:
The average case time can be equal to or lesser than the worst case.
So, A(n) would be the upper bound case by W(n).
Also, it will not be a strict upper bound as it can be the same as an average case like Merge sort.
Therefore,
A(n) = O(W(n))
Hence the correct answer is "option 3".
The amount of ROM needed to implement a 4 bit multiplier is
64 bits
128 bits
1 Kbits
2 Kbits
2 Kbits
The correct answer is option 4
Explanation:
A ROM cannot be written and implement with the 4-bit multiplier, so we must store all possible combinations of 24 × 24 inputs and their corresponding output bits giving a total of 24 × 24 × 8 bits, that is 2 Kbits.
So, the amount of ROM needed to implement a 4-bit multiplier is 2 Kbits.
Let's take an example of two 4 bit number multiplication
Let
Then

Additional Information
Multiplication of two n bit number will result in data = (2n) bits
Multiplication of two n bit number needs 2n address lines
Size of ROM = 22n × 2n bits
n = 4
Size of ROM = 22×4 × 2(4) bits
Size of ROM = 211 bits
Size of ROM = 2Kbits

G → Giga, M → mega, K → kilo
1 G = 230
1 M = 220
1 K = 210
Register renaming is done in pipelined processors:
As an alternative to register allocation at compile time
For efficient access to function parameters and local variables
To eliminate certain kind of hazards
As part of address translations
To eliminate certain kind of hazards
Important Points:
WAR → write after read
WAW → write after write
Consider a random variable X that takes values +1 and −1 with probability 0.5 each. The values of the cumulative distribution function F(x) at x = −1 and +1 are
0 and 0.5
0 and 1
0.5 and 1
0.25 and 0.75
0.5 and 1
The correct answer is option 3
Concept:
Cumulative Distribution Function
If f(x) is the probability density function and F(X) is the cumulative distribution function then the relation between both of them is:
F(X) = P[X ≤ x] = \(\mathop \smallint \nolimits_{ - \infty }^x f\left( x \right)dx\) = sum of all values less than equal to x.
Explanation:
Given that P(-1) =0.5 and P(1) =0.5. So, at all other points, p must be zero as the sum of all probabilities must be 1.
F(X) is the cumulative distribution function and let P is the probability and given X is random variable, So
F(X) = P[X ≤ x]
F(-1)=P(X <= -1)
= P(x = -1)
=0.5
and F(1)=P(X <= 1)
=P(x = -1) + P(x = 1)
=0.5 + 0.5
=1
So, the correct answer is option 3
Which of the following Application layer protocols is used to support electronic mail?
SMTP
IP
TCP
UDP
SMTP
SMTP

Additional Information
TCP:
TCP is the transfer layer protocol. Electronic mail function is supported by the transfer layer protocol TCP. TCP is a connection-oriented and reliable transport protocol. Therefore, SMTP transfer messages from the sender’s mail servers to the recipient’s mail servers using TCP
UDP:
In the IPv4 addressing format, the number of networks allowed under Class C addresses is
220
224
214
221
221
IPv4 address: 32 bits
IP address = Network ID + Host ID
Network ID + Host ID =32
PREFIX is the part of the Network ID
| Class | PREFIX (bits reserved from 1st byte) | Network ID (bits) | Range of 1st byte | No. of IP address consumed | Number of networks | IP address per network | Host per network | Percentage of IPV4 address consumed |
|---|---|---|---|---|---|---|---|---|
| Class A | 0 | 8 | 0 -127 | 231 | 27 | 224 | 224 – 2 | 50% |
| Class B | 10 | 16 | 128-191 | 230 | 214 | 216 | 216 – 2 | 25% |
| Class C | 110 | 24 | 192 -223 | 229 | 221 | 28 | 28 – 2 | 12.5% |
| Class D | 1110 | - | 224- 239 | 228 | MULTICAST ADDRESS | 6.25% | ||
| Class E | 1111 | - | 239-255 | 228 | RESERVED FOR FUTURE | 6.25% |
Which of the following problems are decidable?
Does a given program ever produce an output?
If L is a context-free language, then, is L̅ also context-free?
If L is a regular language, then, is L̅ also regular?
If L is a recursive language, then, is L̅ also recursive?
1, 2, 3, 4
1, 2
2, 3, 4
3, 4
3, 4
The correct answer is option 4
CONCEPT:
Decidable language: A language is decidable if there exists a Turing machine which halts or accepts it.
EXPLANATION:
1: Undecidable
There is no TM to determine whether a given program will produce an output.
2: Undecidable
Context-free languages are not closed under complementation.
3: Decidable
Regular languages are closed under complementation.
4: Decidable
Recursive languages are closed under complementation.
So option 4 is correct
Given the language L = {ab, aa, baa}, which of the following strings are in L * ?
2) aaaabaaaa
baaaaabaaaab
baaaaabaa
1, 2 and 3
2, 3 and 4
1, 2 and 4
1, 3 and 4
1, 2 and 4
The correct answer is option 3.

Key Points
Option 1: abaabaaabaa
The combination of {ab,aa, baa} forms abaabaaabaa. And this is correct combination.
"ab aa baa ab aa"
Option 2: aaaabaaaa
The combination of {ab,baa} forms aaaabaaaa. And this is correct combination.
“aa aa baa aa”
Option 3: baaaaabaaaab
This is not a correct combination of {ab,aa,baa}. Ending with 'b' can not get from given strings.
"baa aa ab aa aab"
Option 4: baaaaabaa
The combination of {ab,aa, baa} forms baaaaabaa. And this is the correct combination.
"baa aa ab aa"
Hence the correct answer is 1, 2 and 4.
Which of the following graphs is isomorphic to






The correct answer is "option 2".
EXPLANATION:
The original graph is:

Option 1: Not an Isomorphic

The original graph doesn’t contain 3 cycle sub-graph but this graph contains.
So this is not an isomorphic graph.
Option 2: An Isomorphic

This graph contains a 5 cycle graph as in the original graph and the max degree of this graph is 4.
So, this is an isomorphic graph.
Option 3: Not an Isomorphic

The original graph doesn’t contain a node having degree 3 but this graph contains.
So this is not an isomorphic graph.
Option 4: Not an Isomorphic

The original graph doesn’t contain 4 cycle sub-graph but this graph contains.
So this is not an isomorphic graph.
Consider the following transactions with data items P and Q initialized to zero:
T1 :read (P);
read (Q);
if P = 0 then Q := Q + 1 ;
write (Q).
T2 : read (Q);
read (P);
if Q = 0 then P := P + 1 ;
write (P).
Any non-serial interleaving of T1 and T2 for concurrent execution leads to
a serializable schedule
a schedule that is not conflict serializable
a conflict serializable schedule
a schedule for which a precedence graph cannot be drawn
a schedule that is not conflict serializable
The correct answer is option 2.

Key Points
P and Q are initialized to Zero, write operation on P and Q will be executed.
Consider any non-serial schedule like R1(P), R2(Q), R1(Q), R2(P), W1(Q), W2(P). R1(P) conflicts with W2(P) Hence T1 must be before T2. R2(Q) conflicts with W1(Q) Hence T2 must be before T1. There is no serial schedule that satisfies both of them hence it does not conflict with serializable.
Hence the correct answer is a schedule that is not conflict serializable.
The bisection method is applied to compute a zero of the function f(x) = x4 – x3 – x2 – 4 in the interval [1, 9]. The method converges to a solution after _______ iterations.
1
3
5
7
3
Concept:
Bisection method:
Used to find the root for a function. Root of a function f(x) = a such that f(a)= 0
Property: if a function f(x) is continuous on the interval [a…b] and sign of f(a) ≠ sign of f(b). There is a value c belongs to [a…b] such that f(c) = 0, means c is a root in between [a….b]
Note:
Bisection method cut the interval into 2 halves and check which half contains a root of the equation.
Suppose interval [a…b] .
Cut interval in the middle to find m :
sign of f(m) not matches with f(a) proceed the search in the new interval.
Calculation:
The bisection method is applied to a given problem with [1, 9]
After 1 iteration
Now since f(x1) > 0, x2 replaces x1
Now, x0 = 1 and x1 = 5
And after 2nd iteration
Now since f(x1) f(x2) > 0, x2 replaces x1 and x0 = 1 and x1 = 3 and after 3rd iteration
Now, f(x2) = f(2) = 24 – 23 – 22 – 4 = 0
So the method converges exactly to the root in 3 iterations.
Let G be a weighted graph with edge weights greater than one and G' be the graph constructed by squaring the weights of edges in G. Let T and T' be the minimum spanning trees of G and G', respectively, with total weights t and t'. Which of the following statements is TRUE?
T' = T with total weight t' = t2
T' = T with total weight t' < t 2
T' ≠ T but total weight t' = t2
None of the above
None of the above
The correct answer is “option 4”.
CONCEPT:
A spanning tree of graph G is a subset of G which has all vertices covered with the minimum possible number of edges.
Some properties of spanning tree are:
Every connected and undirected graph G has at least one spanning tree.
EXPLANATION:
Consider graph G with edge weights > 1,

Consider graph G’ with squared edge weights of graph G,

The minimum spanning tree (T) of graph G is:

Minimum Spanning Tree (T’) of graph G’ is:

So, T is not equal to T'and t' < t2.
Hence, the correct answer is "option 4".
What is the minimal form of the Karnaugh map shown below?
Assume that X denotes a don’t care term

b̅ d̅
b̅ d̅ + b̅ c̅
b̅ d̅ + a b̅ c̅ d
b̅ d̅ + b̅ c̅ + c̅ d̅
b̅ d̅ + b̅ c̅
The correct answer is “option 2”.
CONCEPT:
Karnaugh Map is used to simplify Boolean algebra expressions.
It is a graphical technique of simplifying Boolean expressions.
It is also known as K-map.
K-map contains two types of methods:
Example: b̅.d̅ + d̅.c̅
Example: (b̅ + d̅)(d̅ + c̅)
EXPLANATION:

The first quad will form from the K-map:
(ab – 00, 10, cd – 00,10)
Value is: b̅.d̅
The second quad will form from the K-map:
(ab – 00, 10, cd – 00,01)
Value is c̅.b̅
So, the minimal form of the given K-map is b̅.d̅ + c̅.b̅**.**
Hence, the correct answer is "option 2".
Consider the 3 processes, P1, P2 and P3 shown in the table.
| Process | Arrival time | Time unit Required |
|---|---|---|
| P1 | 0 | 5 |
| P2 | 1 | 7 |
| P3 | 3 | 4 |
The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling with CPU quantum of 2 time units) are
FCFS: P1, P2, P3 RR2: P1, P2, P3
FCFS: P1, P3, P2 RR2: P1, P3, P2
FCFS: P1, P2, P3 RR2: P3, P1, P2
FCFS: P1, P3, P2 RR2: P1, P2, P3
FCFS: P1, P3, P2 RR2: P1, P3, P2
Correct Explanation for FCFS and RR2 Scheduling
🔹 Given:
| Process | Arrival Time | Burst Time |
|---|---|---|
| P1 | 0 | 5 |
| P2 | 1 | 7 |
| P3 | 3 | 4 |
🔸 FCFS (First Come First Serve)
✅ FCFS Completion Order: P1, P2, P3
🔸 RR2 (Round Robin with Time Quantum = 2)
✅ RR2 Completion Order: P3, P1, P2
📌 Summary
| Scheduling Policy | Completion Order |
|---|---|
| FCFS | P1, P2, P3 |
| RR2 | P3, P1, P2 |
✔️ Final Answer: FCFS: P1, P2, P3 RR2: P3, P1, P2
Fetch_And_Add(X, i) is an atomic Read-Modify-Write instruction that reads the value of memory location X, increments it by the value i, and returns the old value of X. It is used in the pseudocode shown below to implement a busy-wait lock. L is an unsigned integer shared variable initialized to 0. The value of 0 corresponds to lock being available, while any non-zero value corresponds to the lock being not available.
AcquireLock(L){
while (Fetch_And_Add(L,1))
L = 1;
}
ReleaseLock(L){
L = 0;
}
This implementation
fails as L can overflow
fails as L can take on a non-zero value when the lock is actually available
works correctly but may starve some processes
works correctly without starvation
fails as L can take on a non-zero value when the lock is actually available
The correct answer is option 2
CONCEPT:
M=Fetch_And_Add(X, I) //return previous value of i
if X=10 and i=2
then X=X+2 =10+2 =12
M=2 // because return previous value of i is 2
EXPLANATION:
AcquireLock(L){
}
ReleaseLock(L){
3. L = 0;
}
Option 1: TRUE
| P1 | P2 | P3 | P4 | P5 | -------- | Pn |
|---|---|---|---|---|---|---|
| L=0 L=1 CS | L=1 L=2 | L=2 L=3 | L=3 L=4 | L=3 L=5 | …….. | L=n L=n+1 |
Let's take 4-bit register
if n=15
| 1111 + 1 10000 //overflow |
|---|
Here overflow occurs and L becomes zero so it fails
Option 2: TRUE
1,2,3 shows the execution of line number

when P0 execute line number 3 then L=0 and lock is available but P1 fall into an infinite loop
So, fails as L can take on a non-zero value when the lock is actually available

Confusion Points
Option 1 is also the correct answer and the given answer is as per the official answer key, that is, option 2
Suppose a fair six-sided die is rolled once. If the value on the die is 1, 2, or 3, the die is rolled a second time. What is the probability that the sum total of values that turn up is at least 6?
10/21
5/12
2/3
1/6
5/12
The correct answer is "option 2".
EXPLANATION:
Value on the die for the first time:
{1, 2, 3}
Value on the die for the second time:
{1, 2, 3, 4, 5, 6}
Therefore, values are:
| First value =1 | (1,1) | (1,2) | (1,3) | (1,4) | (1,5) | (1,6) |
|---|---|---|---|---|---|---|
| Sum | 2 | 3 | 4 | 5 | 6 | 7 |
| First value =2 | (2,1) | (2,2) | (2,3) | (2,4) | (2,5) | (2,6) |
| Sum | 3 | 4 | 5 | 6 | 7 | 8 |
| First value =3 | (3,1) | (3,2) | (3,3) | (3,4) | (3,5) | (3,6) |
| Sum | 4 | 5 | 6 | 7 | 8 | 9 |
Sample space = 36
The sum must be at least 6 so,
Values of dice are: (1,5), (1,6), (2,4), (2,5), (2,6), (3,3), (3,4), (3,5), (3,6)
So, 9/36 is the probability of getting 6 when both dices are thrown.
If the value of dice comes to 6 in the first dice then there is no need to roll it again.
Prob. of getting 6 is: 1/6
Total probability = 1/6 + 9/36
= 5/12
Hence, the correct answer is “option 2”.
An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it: 245.248.128.0/20. The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?
245.248.136.0/21 and 245.248.128.0/22
245.248.128.0/21 and 245.248.128.0/22
245.248.132.0/22 and 245.248.132.0/21
245.248.136.0/24 and 245.248.132.0/21
245.248.136.0/21 and 245.248.128.0/22
The correct answer is Option 1.

Key Points

Since Half of 4096 post addresses must be given organization A, we can set the 12th bit to 1, include that bit into the network path of organization A. So the valid allocation of address to A is 245.248.136.0/21.
The 12th bit is set to 0, but we need only half of the 2048 address, 13th bit can be set to be 0 addresses to B is 245.248.128.0/22.
Hence the correct answer is 245.248.136.0/21 and 245.248.128.0/22.
Suppose a circular queue of capacity (n −1) elements is implemented with an array of n elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are
full: (REAR+1) mod n == FRONT empty: REAR == FRONT
full: (REAR+1) mod n == FRONT empty: (FRONT+1) mod n == REAR
full: REAR == FRONT empty: (REAR+1) mod n == FRONT
full: (FRONT+1) mod n == REAR empty: REAR == FRONT
full: (REAR+1) mod n == FRONT empty: REAR == FRONT
The correct answer is "option 1".
CONCEPT:
A circular queue is a queue whose last position is connected back to the first position.

ENQUEUE – It is the operation to insert elements into the queue.
DEQUEUE – It is the operation to delete elements from the queue.
After inserting an element in the last position, the next element again gets inserted into the first position.
EXPLANATION:
Given, Rear = Front = 0
Here, the Rear is used to insert elements & the front is used to delete elements.
To check full condition in queue:
(Rear + 1) % n == Front
Example: Consider queue is full that means Rear = 6, front = 0, n = 7
(6+1) % 7 = 7 % 7 = 0
To check empty condition in queue:
Rear == Front
Example: Consider queue is empty that means Rear = 0, front = 0, n = 7
Rear = Front = 0
Hence, the correct answer is “option 1”.
Consider the program given below, in a block-structured pseudo-language with lexical scoping and nesting of procedures permitted.
Program main;
Var ...
Procedure A1;
Var ...
Call A2;
End A1
Procedure A2;
Var ...
Procedure A21;
Var ...
Call A1;
End A21
Call A21;
End A2
Call A1;
End main.
Consider the calling chain: Main → A1 → A2 → A21 → A1
The correct set of activation records along with their access links is given by





The correct answer is “option 4”.
The access link is a pointer to the activation record.
A direct implementation of the normal static scope rule for a nested function is obtained by adding a pointer called access link to each activation record.
Consider any procedure P, if P is nested immediately within procedure Q in any code, then access link in any activation of P points to the most recent activation of Q.
EXPLANATION:

Main → A1 → A2 → A21 → A1
Activation records are created at procedure exit time.
Since A1 & A2 are defined under Main ().
A1 & A2 access links are pointed to the main function.
A21 is defined under A2, so its access link will point to A2.
Hence, the correct answer is “option 4”.
How many onto (or surjective) functions are there from an n-element (n ≥ 2) set to a 2-element set?
2n
2n - 1
2n - 2
2(2n - 2)
2n - 2
The correct answer is “option 3”.
CONCEPT:
An Onto function is such a function that for every element in the codomain, there exists an element in the domain that maps to it.
A function f from A to B is known as Onto function if**:**
For all 'b' in B, there is an 'a' in A such that f(a) = b.
In other words, all elements of B are used.
The onto function is:

The non-onto function is:

Here, value 3 is not used.
CALCULATION:
Consider number of elements in m & n respectively.
Number of onto functions possible is:
nm – nC1(n-1)m + nC2(n-2)m +……
Here, m = n, n= 2
= 2n – 2C1(2-1)n + 2C2(2-2)n
= 2n – 2×1 + 0
= 2n – 2
Hence, the correct answer is “option 3”.
Let G be a complete undirected graph on 6 vertices. If vertices of G are labeled, then the number of distinct cycles of length 4 in G is equal to
15
30
45
360
45
The correct answer is “option 3”.
CONCEPT:
A graph that contains an edge between every pair of vertices is known as a complete graph.
A complete graph with 6 vertices is:

EXPLANATION:
To get a cycle to length 4, edges of length 4 can be selected to form a cycle.
To get the cycle of length 4, select any 4 vertices.
The number of selection of 4 vertices out of 6 vertices is: 6C4 i.e. 15
Example:
Consider 4 vertices {a, b, c, d}, total cycles using 4 vertices are:
a-b-c-d, a-b-d-c, a-c-b-d, a-c-d-b, a-d-b-c, a-d-c-b
Therefore, number of cycle using n vertices is (n-1)!
But number of distinct cycles of length 4 with vertices (a,b,c,d) is 3.
{Since abcd and adcb are same, in different directions}

So, the total number of distinct cycles of length 4 is:
= 15 × 3
= 45
Hence, the correct answer is "option 3".
A list of n strings, each of length n, is sorted into lexicographic order using merge - sort algorithm. The worst case running time of this computation is:
O(n log n)
O(n2 log n)
O(n2 + log n)
O(n3)
O(n2 log n)
The correct answer is "option 2".
CONCEPT:
The Recurrence relation for the number of comparisons needed to sort an array of n integers is:
T(n) = 2T(n/2) + n
= O(nlog2n)
EXPLANATION:
Consider n strings of length n in place of each integer, since each integer takes O(1) time to sort then,
Complexity to sort one string of size n - O(n)
Complexity to sort n strings of size n - O(n * nlog2n) = O(n2log2n)
Hence, worst case running time is O(n2log2n).
Consider the directed graph shown in the figure below. There are multiple shortest paths between vertices S and T. Which one will be reported by Dijkstra’s shortest path algorithm? Assume that, in any iteration, the shortest path to a vertex v is updated only when a strictly shorter path to v is discovered.

SDT
SBDT
SACDT
SACET
SACET
The correct answer is “option 4”.
CONCEPT:
Dijkstra’s algorithm is an algorithm used for finding the shortest paths between nodes or vertices in a graph.
This algorithm is basically used to find the shortest path from a starting node to a target node in a weighted graph.
This algorithm creates a tree of the shortest path from a vertex to other nodes in the graph.
This algorithm assigns initial distance values & will try to improve step by step.
Dijkstra’s algorithm works as follows**:**
CALCULATION:
| S | A | C | E | G | D | B | F | T | ||
|---|---|---|---|---|---|---|---|---|---|---|
| S | 0 | ∞ | ∞ | ∞ | ∞ | ∞ | ∞ | ∞ | ∞ | |
| SB | 0 | 4 | ∞ | ∞ | ∞ | 7 | 3 | ∞ | ∞ | SELECT B |
| SBA | 0 | 4 | ∞ | ∞ | ∞ | 7 | 3 | ∞ | ∞ | SELECT A |
| SBAC | 0 | 4 | 5 | ∞ | ∞ | 7 | 3 | ∞ | ∞ | SELECT C |
| SBACE | 0 | 4 | 5 | 6 | ∞ | 7 | 3 | ∞ | ∞ | SELECT E |
| SBACED | 0 | 4 | 5 | 6 | 8 | 7 | 3 | ∞ | 10 | SELECT D |
| SBACEDT | 0 | 4 | 5 | 6 | 8 | 7 | 3 | 12 | 10 | SELECT T |
The shortest-path tree is:

Hence, the shortest path from S to T is S → A → C → E → T.
A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system is
3 KBytes
35 KBytes
280 KBytes
dependent on the size of the disk
35 KBytes
The correct answer is option 2
DATA:
In the index node of a Unix- style file system,
Direct Block pointer = 8
Single Indirect Block pointer = 1
Double Indirect Block pointer = 1
Disk block address = disk block entries size = 8 B
Disk Block size = 128 B
CALCULATION:
Number of entries in a block = = 24
File size = (8 direct + 1 singel indirect + 1 double indirect) × Block size
File size = (8 × 1 + 1 × 24 + 1 × 24 × 24 ) × 128 B
File size = (210 B + 211 B + 215 B )
File size = (1 + 2 + 32)KB
∴ The maximum size of file is 35 KB or 35 KBytes
Consider the virtual page reference string
1, 2, 3, 2, 4, 1, 3, 2, 4, 1
on a demand paged virtual memory system running on a computer system that has main memory size of 3 page frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the corresponding page replacement policy. Then
OPTIMAL < LRU < FIFO
OPTIMAL < FIFO < LRU
OPTIMAL = LRU
OPTIMAL = FIFO
OPTIMAL < FIFO < LRU
The correct answer is Option 2.
Concept:
First In First Out (FIFO):
In this algorithm, the operating system keeps track of all pages in the memory in a queue. The oldest page is in the front of the queue. When a page needs to be replaced page in the front of the queue is selected for removal.
Optimal Page replacement:
In this algorithm, pages are replaced which would not be used for the longest duration of time in the future.
Least Recently Used :
In this algorithm, the page will be replaced which is least recently used.
Solution:
First In First Out (FIFO):
The given virtual page reference string is 1, 2, 3, 2, 4, 1, 3, 2, 4, 1 and the main memory size is 3-page frames.
| 1 | 1 | 1 | 1 | 4 | 4 | 4 | 4 | 4 | 4 |
|---|---|---|---|---|---|---|---|---|---|
| 2 | 2 | 2 | 2 | 1 | 1 | 1 | 1 | 1 | |
| 3 | 3 | 3 | 3 | 3 | 2 | 2 | 2 | ||
| F | F | F | H | F | F | H | F | H | H |
Total number of page faults= 6
Optimal Page replacement:
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
|---|---|---|---|---|---|---|---|---|---|
| 2 | 2 | 2 | 4 | 4 | 4 | 4 | 4 | 4 | |
| 3 | 3 | 3 | 3 | 3 | 2 | 2 | 2 | ||
| F | F | F | H | F | H | H | F | H | H |
Total number of page faults= 5
Least Recently Used :
| 1 | 1 | 1 | 1 | 4 | 4 | 4 | 2 | 2 | 2 |
|---|---|---|---|---|---|---|---|---|---|
| 2 | 2 | 2 | 2 | 2 | 3 | 3 | 3 | 1 | |
| 3 | 3 | 3 | 1 | 1 | 1 | 4 | 4 | ||
| F | F | F | H | F | F | F | F | F | F |
Total number of page faults= 9
The number of page faults with OPTIMAL, FIFO, LRU (5,6,9) is OPTIMAL < FIFO < LRU.
Suppose R1(A, B) and R2(C, D) are two relation schemas. Let r1 and r2 be the corresponding relation instances. B is a foreign key that refers to C in R2. If data in r1 and r2 satisfy referential integrity constraints, which of the following is ALWAYS TRUE?
ΠB(r1) - ΠC(r2) = Φ
ΠC(r2) - ΠB(r1) = Φ
ΠB(r1) = ΠC(r2)
ΠB(r1) - ΠC(r2) ≠ Φ
ΠB(r1) - ΠC(r2) = Φ
The correct answer is option 1
Concept:
Referential integrity constraints
B is a foreign key of R1 that refers to C(primary key) in R2, B must be null or to be available in R2
r2(C) is a superset of r1(B)
So {subset - Superset} =Φ
So the correct answer is ΠB(r1) - ΠC(r2) = Φ

Additional Information
functional dependency: Dependency of attributes in relations
Foreign key
Primary key
Consider a source computer (S) transmitting a file of size 106 bits to a destination computer (D) over a network of two routers (R1 and R2) and three links (L1, L2, and L3). L1 connects S to R1; L2 connects R1 to R2; and L3 connects R2 to D. Let each link be of length 100 km. Assume signals travel over each link at a speed of 108 meters per second. Assume that the link bandwidth on each link is 1Mbps. Let the file be broken down into 1000 packets each of size 1000 bits. Find the total sum of transmission and propagation delays in transmitting the file from S to D?
1005 ms
1010 ms
3000 ms
3003 ms
1005 ms
The correct answer is option 1
Data:
Number of packets = n =1000
Size of each Packet = L = 1000 bits
The link bandwidth on each link is = BW = 1Mbps =106 bits/s
Each link be of length = d= 100 km
Signals travel over each link at a speed = v= 108m/s
Transmission delay = T
Propagation delay = P

Formula:
Calculation:
Propagation delay for the first packet to transmit S to R1
So, the propagation delay for the first packet to transmit S to D
P =1 × 3=3ms
Transmission delay for the first packet to transmit S to R1
So, the transmission delay for the first packet to transmit S to D
T=1 × 3=3ms
So, total time is taken to transmit the first packet from S to D =P +T=6ms
Using pipelining, the remaining packet follows the first packet
then remaining every packet take 1ms to transmit from S to D
So, the total time is taken to transmit all 1000 packets from S to D is
⇒ time for the first packet + time for the remaining 999 packets
⇒ 6ms + 999ms
⇒ 1005ms
So, the total time is taken to transmit all 1000 packets from S to D is 1005ms.
Consider an instance of TCP’s Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of the slow start phase is 2 MSS and the threshold at the start of the first transmission is 8 MSS. Assume that a timeout occurs during the fifth transmission. Find the congestion window size at the end of the tenth transmission.
8 MSS
14 MSS
7 MSS
12 MSS
7 MSS
The correct answer is option 3
EXPLANATION:
Initial window size or window size for first transmission: cwnd = 2 MSS
For 2nd transmission → cwnd = 22 = 4 MSS
For 3rd transmission → cwnd = 23 = 8 MSS
When threshold is reached then additive increase
For 4th transmission → cwnd = 8 + 1 = 9 MSS
For 5th transmission → cwnd = 9+ 1 = 10 MSS(fails)
Now window size reduced to 10/2 =5 MSS
For 6th transmission → cwnd = 1 MSS
For 7rd transmission → cwnd = 21 = 2 MSS
For 8th transmission → cwnd = 22 = 4 MSS
Thersoled reached now additive increase
For 9th transmission → cwnd = 4 + 1 = 5 MSS
For 10th transmission → cwnd = 5 + 1 =6 MSS
So, at the end of 10th successful transmission
The congestion window size will be 6 + 1 = 7 MSS
Consider the set of strings on {0,1} in which, every substring of 3 symbols has at most two zeros. For example, 001110 and 011001 are in the language, but 100010 is not. All strings of length less than 3 are also in the language. A partially completed DFA that accepts this language is shown below.

The missing arcs in the DFA are
| 00 | 01 | 10 | 11 | Q | |
|---|---|---|---|---|---|
| 00 | 1 | 0 | |||
| 01 | 1 | ||||
| 10 | 0 | ||||
| 11 | 0 |
| 00 | 01 | 10 | 11 | Q | |
|---|---|---|---|---|---|
| 00 | 0 | 1 | |||
| 01 | 1 | ||||
| 10 | 0 | ||||
| 11 | 0 |
| 00 | 01 | 10 | 11 | Q | |
|---|---|---|---|---|---|
| 00 | 1 | 0 | |||
| 01 | 1 | ||||
| 10 | 0 | ||||
| 11 | 0 |
| 00 | 01 | 10 | 11 | Q | |
|---|---|---|---|---|---|
| 00 | 1 | 0 | |||
| 01 | 1 | ||||
| 10 | 0 | ||||
| 11 | 0 |
| 00 | 01 | 10 | 11 | Q | |
|---|---|---|---|---|---|
| 00 | 1 | 0 | |||
| 01 | 1 | ||||
| 10 | 0 | ||||
| 11 | 0 |
The correct answer is option 4.

Key Points
L={All the strings of 0's and 1's where every substring of 3 symbols has at most 2 zero's }
Case 1: If we go with option 1.

If we take the substring 0000, it has a substring 000 containing more than 2 zero's so it is an invalid string but it is accepted by DFA. Hence this option is not possible.
Case 2: If we go with option 2.

W=000 is a string and has a substring 000 having more than 2 zeros. Not in a language but it is accepted. So option 2 is not possible.
Case 3: If we go with option 3.

W=001000 has a substring 000 having more than 2 zeros and accepted but it is not in the given language.
Case 4: If we go with option4.

This machine accepts all the strings that were every substring of 3 symbols has at most 2 zeros.
So the correct answer is option 4.
The height of a tree is defined as the number of edges on the longest path in the tree. The function shown in the pseudocode below is invoked as height(root) to compute the height of a binary tree rooted at the tree pointer root.
int height (treeptr n)
{ if (n == NULL) return -1;
if (n → left == NULL)
if (n → right == NULL) return 0;
else return ; ; // Box 1
else { h1 = height (n → left);
if (n → right == NULL) return (1+h1);
else { h2 = height (n → right);
return ; // Box 2
}
}
}
The appropriate expressions for the two boxes B1 and B2 are
B1: (1+height(n → right))
B2: (1+max(h1, h2))
B1: (height(n → right))
B2: (1+max(h1,h2))
B1: height(n → right)
B2: max(h1, h2)
B1: (1+ height(n → right))
B2: max(h1, h2)
B1: (1+height(n → right))
B2: (1+max(h1, h2))
The correct answer is option 1
EXPLANATION:
The box B1 gets executed when left subtree of n is NULL and right subtree is not NULL. So, height of n will be height of right subtree plus one.
The box B2 gets executed when both left and right subtrees of n are not NULL. So, height of n will be max of heights of left and right subtrees of n plus 1.
So, the correct answer is
B1: (1+height(n → right))
B2: (1+max(h1, h2))
EXAMPLE:
Find the height of this tree using option 1 in the program
int height (treeptr n)
{ if (n == NULL) return -1;
if (n → left == NULL)
if (n → right == NULL) return 0;
else return (1+height(n → right)) ; // Box 1
else { h1 = height (n → left);
if (n → right == NULL) return (1+h1);
else { h2 = height (n → right);
return (1+max(h1, h2)) ; // Box 2
}
}
}

So, the height of the above tree is 3
Consider the following C code segment.
int a, b, c = 0;
void prtFun(void);
main( )
{ static int a = 1; / Line 1 /
prtFun( );
a += 1;
prtFun( );
printf(“ \n %d %d ”, a, b);
}
void prtFun(void)
{ static int a = 2; / Line 2 /
int b = 1;
a += ++b;
printf(“ \n %d %d ”, a, b);
}
What output will be generated by the given code segment?
3 1
4 1
4 2
4 2
6 1
6 1
4 2
6 2
2 0
3 1
5 2
5 2
4 2
6 2
2 0
The correct answer is option 3.

Key Points
If the variables are static then, it is persisting previous state value from the destruction of various function calls. The variable 'a' in prtFun() is static, i.e its lifetime is global and hence retains its value always, meaning history sensitive.

Hence the correct answer is 4 2, 6 2, 2 0.
What output will be generated by the given code segment if:
Line 1 is replaced by auto int a = 1;
Line 2 is replaced by register int a = 2;
3 1
4 1
4 2
4 2
6 1
6 1
4 2
6 2
2 0
4 2
4 2
2 0
4 2
4 2
2 0
The correct answer is option 4.

Key Points
If the variable is auto, these variables will be reinitialized in every function calls. Now the variables are all auto storage classes. Their lifetime is local.

Hence correct answer is 4 2, 4 2, 2 0.
Consider the following relations A, B and C:
| A | ||
|---|---|---|
| Id | Name | Age |
| 12 | Arun | 60 |
| 15 | Shreya | 24 |
| 99 | Rohit | 11 |
| B | ||
|---|---|---|
| Id | Name | Age |
| 15 | Shreya | 24 |
| 25 | Hari | 40 |
| 98 | Rohit | 20 |
| 99 | Rohit | 11 |
| C | ||
|---|---|---|
| Id | Phone | Area |
| 10 | 2200 | 02 |
| 99 | 2100 | 01 |
How many tuples does the result of the following relational algebra expression contain? Assume that the schema of A∪B is the same as that of A.
(A∪B) ⋈ A.Id > 40 ∨ C.Id < 15 C
7
4
5
9
7
The correct answer is option 1.

Key Points
Apply first cross-product then apply filter. Cross product yields 10 rows, then you play filter A.ID>40 or C.ID<15 produces 7 rows.
AUB= A.Id
12,15,25,98,99
|x| is cross product followed selection and projection.
| A.Id B.Id X gives(cross product) | 10rows | Condition | |
|---|---|---|---|
| A.Id | B.Id | A.Id>40 V C.ID<15 | |
| 5 rows 2 rows the result contains 7 rows | 12 | 10 | True |
| 12 | 99 | False | |
| 15 | 10 | True | |
| 15 | 99 | False | |
| 25 | 10 | True | |
| 25 | 99 | False | |
| 98 | 10 | True | |
| 98 | 99 | True | |
| 99 | 10 | True | |
| 99 | 99 | True |
Hence the correct answer is 7.
How many tuples does the result of the following SQL query contain?
SELECT A.Id
FROM A
WHERE A.Age > ALL (SELECT B.Age
FROM B WHERE B.Name = ‘Arun’)
4
3
0
1
3
The correct answer is option 2.

Key Points
The ALL keyword specifies that the search condition is TRUE if the comparison is TRUE for every value that the subquery returns. If the subquery returns no value, the condition is TRUE.
There is no Name='Arun' in the B table. So it returns no value then the condition become is TRUE for every row. So Finally it prints the ID of the A table.
| Id |
|---|
| 12 |
| 15 |
| 99 |
Hence the correct answer is 3.
For the grammar below, a partial LL(1) parsing table is also presented along with the grammar. Entries that need to be filled are indicated as E1, E2, and E3. ε is the empty string, $ indicates end of input, and, | separates alternate right hand sides of productions.
S → a A b B | b A a B | ε
A → S
B → S
| a | b | $ | |
|---|---|---|---|
| S | E1 | E2 | S → ε |
| A | A → S | A → S | Error |
| B | B → S | B → S | E3 |
The FIRST and FOLLOW sets for the non-terminals A and B are
FIRST(A) = {a, b, ε} = FIRST(B)
FOLLOW(A) = {a, b}
FOLLOW(B) = {a, b, $}
FIRST(A) = {a, b, $}
FIRST(B) = {a, b, ε}
FOLLOW(A) = {a, b}
FOLLOW(B) = {$}
FIRST(A) = {a, b, ε} = FIRST(B)
FOLLOW(A) = {a, b}
FOLLOW(B) = Φ
FIRST(A) = {a, b} = FIRST(B)
FOLLOW(A) = {a, b}
FOLLOW(B) = {a, b}
FIRST(A) = {a, b, ε} = FIRST(B)
FOLLOW(A) = {a, b}
FOLLOW(B) = {a, b, $}
The correct answer is option 1
EXPLANATION:
FIRST(A) = FIRST(s) ={a, b, ε}
FIRST(B) = FIRST(s) ={a, b, ε}
So,FIRST(A) = {a, b, ε} = FIRST(B)
FOLLOW(A) = {First of { bB}, FIRST of {aB}}
FOLLOW(A) = {a, b}
FOLLOW(B) = FOLLOW(S) ={FOLLOW(A), $}
FOLLOW(B) = FOLLOW(S) ={FOLLOW(A), $} ={a, b,$}
Now, the answer is
FIRST(A) = {a, b, ε} = FIRST(B)
FOLLOW(A) = {a, b}
FOLLOW(B) = {a, b, $}
The appropriate entries for E1, E2, and E3 are
E1: S → aAbB, A → S
E2: S → bAaB, B → S
E3: B → S
E1: S → aAbB, S → ε
E2: S → bAaB, S → ε
E3: S → ε
E1: S → aAbB, S → ε
E2: S → bAaB, S → ε
E3: B → S
E1: A → S, S → ε
E2: B → S, S → ε
E3: B → S
E1: S → aAbB, S → ε
E2: S → bAaB, S → ε
E3: B → S
The correct answer is option 3
EXPLANATION:
FIRST and FOLLOW:
| FIRST | FOLLOW | |
|---|---|---|
| S | {a, b, ϵ } | {a,b, $ } |
| A | {a,b, ϵ } | {b,a} |
| B | {a,b,ϵ } | {a,b,$} |
Parsing Table:
| a | b | $ | |
|---|---|---|---|
| S | S→ aAbB S→ ϵ | S → bAaB S→ ϵ | S→ ϵ |
| A | A → S | A → S | Error |
| B | B → S | B → S | B→S |
Hence the answer is
E1: S → aAbB, S → ε
E2: S → bAaB, S → ε
E3: B → S
A computer has a 256 KByte, 4-way set associative, write back data cache with block size of 32 Bytes. The processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, 2 valid bits, 1 modified bit and 1 replacement bit.
The number of bits in the tag field of an address is
11
14
16
27
16
The correct answer is option 3
Data:
Physical address (PA) = 232 bytes
Block size = 32 B = 25 B
Number of bits for block size = 5
cache size =256 KByte = 218 B
set associative = 4 -way
Calculation:
number of bits = ⌈log2 n⌉
Number of blocks = =
Number of sets in cache =
Number of bits in set =11
PA = tag + set + offset
32 = tag + 11+ 5
∴ tag = 16 bits
So, the number of bits in the tag field of an address is 16 bits
The size of the cache tag directory is
160 Kbits
136 Kbits
40 Kbits
32 Kbits
160 Kbits
The correct answer is option 1
Data:
Physical address space = 232 bytes
Block size = 32 B = 25 B
Number of bits for block size = 5
cache size =256 KByte = 218 B
set associative = 4 -way
Calculation:
number of bits = ⌈log2 n⌉
Number of blocks = =
Number of sets in cache =
Number of bits in set =11
Virtual address = tag + set + Byte offset (in bits)
32 = tag + 11+ 5
∴ tag = 16 bits
16 bit address 2 valid bits, 1 modified bit and 1 replacement bit
So, total bits =20
So, Each cache tag directory entry contains = 20 × Number of blocks = 20 × 213 bits
∴ 213 = 8 K bits
So, Each cache tag directory entry contains = 20 × 8 K bits=160 Kbits
So, the size of the cache tag directory is 160 Kbits
Timed interface, section switching, instant scoring, and question-by-question analytics — free.
Start Timed Attempt