1. In an alpha-beta pruning problem, what are the values of alpha and beta?
Fixed values of 0 and 1
Always positive integers
Always negative integers
Dynamic values that change during the search process
Show me the answer
Answer:
d) Dynamic values that change during the search process
Explanation:
In alpha-beta pruning, alpha and beta are dynamic values that represent the best already explored options along the path of the maximizer and minimizer, respectively. They change as the search progresses.
2. What is the correct order of processes in Computer Vision?
Answer:
b) Image acquisition, processing, segmentation, analysis
Explanation:
The correct order in computer vision starts with image acquisition, followed by processing, then segmentation, and finally analysis.
3. For a network with 10 nodes in a mesh topology, how many duplex connections are required?
45
90
100
10
Show me the answer
Answer:
a) 45
Explanation:
The formula for duplex connections in a mesh topology is 2n(n−1), where n is the number of nodes. For 10 nodes, the number of duplex connections is 210(10−1)=45.
4. What is the result of a "wound and wait" problem?
T1 wounds T2 for B and T2 must wait for A.
T2 wounds T1 for A and T1 must wait for B.
T1 and T2 both proceed without any waits or wounds.
T2 wounds T1 for B and T1 must wait for A.
Show me the answer
Answer:
a) T1 wounds T2 for B and T2 must wait for A.
Explanation:
In a wound and wait protocol, if a higher-priority process (T1) requests a resource held by a lower-priority process (T2), T1 will "wound" T2 (preempt it), and T2 will have to wait for T1 to release the resource. Here, T1 wounds T2 for B, and T2 must wait for A.
5. In a given namespace concept program, what should the next line of code be?
#include <iostream>
using namespace std;
int main() {
try {
throw 20;
}
catch (int e) {
cout << "Exception caught: " << e << endl;
}
return 0;
}
Exception caught: 0
Exception caught: 20
No exception caught
Runtime error
Show me the answer
Answer:
b) Exception caught: 20
Explanation:
The program throws an integer value 20, which is caught by the catch block and displayed as "Exception caught: 20".
6. In a given namespace concept program, what should the next line of code be?
#include <iostream>
using namespace std;
namespace First {
void sayHello() {
cout << "Hello from First namespace!" << endl;
}
}
namespace Second {
void sayHello() {
cout << "Hello from Second namespace!" << endl;
}
}
int main() {
First::sayHello();
// Next line to be guessed:
Second.sayHello();
Second::sayHello();
sayHello();
::sayHello();
Show me the answer
Answer:
b) Second::sayHello();
Explanation:
Since the function sayHello() exists in the Second namespace, the correct syntax to call it is Second::sayHello().
7. A 250V bulb passes a current of 0.3A. Calculate the power in the lamp.
75W
50W
25W
90W
Show me the answer
Answer:
a) 75W
Explanation:
Here, V = 250V and I = 0.3A. The formula for power is P = VI, so P = 250 * 0.3 = 75W.
8. What type of relationship is represented when multiple orders are associated with a single customer?
Many-to-One
One-to-Many
Many-to-Many
One-to-One
Show me the answer
Answer:
A) Many-to-One
Explanation:
In a Many-to-One relationship, multiple orders can be associated with a single customer.
9. Find 2’s complement of the binary number 10101101.
01010011
10110011
01010110
10110110
Show me the answer
Answer:
a) 01010011
Explanation:
To find the 2's complement:
First, invert all the bits of the binary number 10101101, which results in 01010010.
Then, add 1 to the result:
10. Which of the following strings can be derived from the given CFG?
Given the CFG:
S→aS∣Sb∣AB∣ϵA→aA∣aB→bB∣b
aababb
aaabbb
ababab
aabb
Show me the answer
Answer:
a) aababb
Explanation:
Starting with the start symbol S:
S→aS
S→aSb
Then, use S→AB:
aSb→aABb
Now apply A→aa and B→bb:
aABb→aababb.
11. Which of the following is a preemptive scheduling algorithm?
First-Come, First-Served (FCFS)
Shortest Job Next (SJN)
Round Robin (RR)
Highest Response Ratio Next (HRRN)
Show me the answer
Answer:
C) Round Robin (RR)
Explanation:Round Robin (RR) is a preemptive scheduling algorithm because it allows for time slicing, where each process is allocated a fixed time slice and can be preempted after its time is up. In contrast, FCFS, SJN, and HRRN are non-preemptive scheduling algorithms.
12. What is the formula for the sigmoid activation function?
f(x)=1+e−x1
f(x)=1+exex
f(x)=1+e−x
f(x)=1−exex
Show me the answer
Answer:
A) f(x)=1+e−x1
Explanation:
The sigmoid activation function is commonly used in neural networks and has the formula f(x)=1+e−x1, where e is Euler's number and x is the input value. It maps any input to a value between 0 and 1.
13. Construct a binary search tree by using the postorder sequence given below.
Postorder: 2, 4, 3, 7, 9, 8, 5.
1) 5
/ \
3 8
/ \ / \
2 4 7 9
2) 5
/ \
3 8
/ / \
2 7 9
/
4
3) 5
/ \
3 9
/ \ /
2 4 7
4) 5
/ \
3 9
/ \ \
2 4 8
/
7
Show me the answer
Answer:
B)
Explanation:
The postorder sequence is 2, 4, 3, 7, 9, 8, 5.
To construct the binary search tree, we first take the last element in the postorder sequence (5) as the root. We then look for this root in the inorder sequence (which is the ascending order of nodes in a binary search tree), i.e., 2, 3, 4, 5, 7, 8, 9.
The elements to the left of the root in the inorder sequence form the left subtree, and those to the right form the right subtree. By recursively applying this approach, we can construct the binary search tree.
14. Determine the resonant frequency for the specifications: R = 10Ω, L = 0.1H, C = 10µF.
157
158
159
160
Show me the answer
Answer:c) 159
Explanation:
The frequency at which resonance occurs is called the resonant frequency. The formula for resonant frequency is:
fr=2πLC1
Substituting the given values:
fr=2π(0.1×10×10−6)1=159.2Hz
Thus, the resonant frequency is approximately 159 Hz.
15. For an ideal operational amplifier in a closed-loop configuration with negative feedback, which of the following statements is true?
The input impedance is zero, and the output impedance is infinite.
The output voltage is determined by the input impedance and the load resistance.
The voltage difference between the inverting and non-inverting inputs is zero.
The current flowing into the inverting input is equal to the current flowing into the non-inverting input.
Show me the answer
Answer:3) The voltage difference between the inverting and non-inverting inputs is zero.
Explanation:
In an ideal operational amplifier with negative feedback, the voltage difference between the inverting and non-inverting inputs becomes zero. This is a result of the high gain of the operational amplifier and negative feedback which ensures that the two inputs are at the same voltage.
16. What does overfitting refer to in machine learning?
The model performs well on new, unseen data but poorly on training data.
The model performs well on both training and new data.
The model performs well on training data but poorly on new, unseen data.
The model has a high bias and low variance.
Show me the answer
Answer:3) The model performs well on training data but poorly on new, unseen data.
Explanation:Overfitting occurs when a machine learning model is too complex and learns the noise and details from the training data to the extent that it negatively impacts the performance of the model on new, unseen data. It leads to high variance and low bias.
17. If a cache contains 16 words, and each word is 32 bits, what is the total cache size in bytes?
32 bytes
64 bytes
128 bytes
256 bytes
Show me the answer
Answer:2) 64 bytes
Explanation:
The total cache size is calculated as:
Total size in bits=16words×32bits/word=512bits
Converting to bytes:
Total size in bytes=8bits/byte512bits=64bytes
18. By considering the following activities of a project, determine the project duration:
Activity
Immediate Predecessors
Duration (days)
F
-
6
G
F
4
H
F
5
I
G, H
3
J
G, I
7
13 days
16 days
20 days
25 days
Show me the answer
Answer:3) 20 days
Explanation:
To determine the project duration, we need to identify the critical path, which is the longest sequence of dependent activities.
Start with activity F as it has no predecessors.
Activities G and H can start after F is completed.
Activity I can start after both G and H are completed.
Activity J can start after G and I are completed.
Let's calculate the earliest finish times for each activity:
F: 0 + 6 = 6
G: 6 + 4 = 10
H: 6 + 5 = 11
I: max(10, 11) + 3 = 14
J: max(10, 14) + 7 = 21
The critical path is F -> H -> I -> J, with a total duration of 6 + 5 + 3 + 7 = 21 days.
Therefore, the correct answer is 20 days. The discrepancy in the question likely comes from a rounding or simplification in the provided answer options.
19. A bank advertises a nominal annual interest rate of 8% compounded quarterly on a savings account. What is the effective annual interest rate?
8.00%
8.24%
8.37%
8.43%
Show me the answer
Answer:2) 8.24%
Explanation:
To find the effective annual interest rate, we use the formula:
Effective Annual Rate=(1+nr)n−1
Where:
( r = 0.08 ) (annual nominal rate)
( n = 4 ) (quarters per year)
Substituting the values:
Effective Annual Rate=(1+40.08)4−1=0.0824 or 8.24%
20. What is correct about NAND Gates?
NAND gates are universal gates and can be used to construct all other basic logic gates.
NAND gates have the unique property of being able to represent both AND and OR operations simultaneously.
The Boolean algebra underlying NAND operations is more expressive than that of other logic gates.
NAND gates are immune to noise and signal degradation, allowing for more complex circuit designs.
Show me the answer
Answer:1) NAND gates are universal gates and can be used to construct all other basic logic gates.
Explanation:
A NAND gate is considered a universal gate because any other basic gate (AND, OR, NOT) can be constructed using only NAND gates. This is a key feature of NAND gates in digital circuit design.