GATE 2024 (Session 1)
65 questions
MCQ 29 · MSQ 20 · NAT 161-mark 30 · 2-mark 35
Questions 46–50 of 65
Consider the following read-write schedule over three transactions , and , where the subscripts in the schedule indicate transaction IDs:
Which of the following transaction schedules is/are conflict equivalent to ?
Which of the following transaction schedules is/are conflict equivalent to ?
One or more options are correct.
Answer: (B), (C), (D)
Conflicting pairs (same data item, different transactions, and at least one write):
- z: only T1 touches it so T1 does not conflict with any other transaction.
- x: only T2 touches it.
- y: the operations happen before T3 must come before T2.
So every serial order with T3 before T2 is conflict equivalent to S, and T1 can be placed at any position: .
The order has T2 before T3 so it is not equivalent.
Answer: , ,
- z: only T1 touches it so T1 does not conflict with any other transaction.
- x: only T2 touches it.
- y: the operations happen before T3 must come before T2.
So every serial order with T3 before T2 is conflict equivalent to S, and T1 can be placed at any position: .
The order has T2 before T3 so it is not equivalent.
Answer: , ,
Consider a Boolean expression given by .
Which of the following statements is/are CORRECT?
Which of the following statements is/are CORRECT?
One or more options are correct.
Answer: (A), (B)
Minterms 3, 5, 6, 7 are 011, 101, 110, 111 F is 1 when two or more inputs are 1 (majority function).
- The other combinations are maxterms: TRUE.
- Majority function: TRUE.
- Check Y: but so F depends on Y.
- Check X: but so F depends on X.
Answer: and
- The other combinations are maxterms: TRUE.
- Majority function: TRUE.
- Check Y: but so F depends on Y.
- Check X: but so F depends on X.
Answer: and
Consider the following C function definition.
int f(int x, int y) {
for (int i=0; i < y; i++) {
x=x+x+y;
}
return x;
} Which of the following statements is/are TRUE about the above function?One or more options are correct.
Answer: (B), (D)
Each pass does , and the loop runs y times. After y passes:
- (A) : . This is less than , so (A) is false. It is more than , so (C) is false.
- (B) : , so (B) is true.
- (D) : , so (D) is true.
(The two large values are about and . Both are below , so int does not overflow.)
Answer: (B), (D)
- (A) : . This is less than , so (A) is false. It is more than , so (C) is false.
- (B) : , so (B) is true.
- (D) : , so (D) is true.
(The two large values are about and . Both are below , so int does not overflow.)
Answer: (B), (D)
Let be any matrix, where . Which of the following statements is/are TRUE about the system of linear equations ?
One or more options are correct.
Answer: (A)
A is with , so . The null space (the set of solutions of ) has dimension .
(A) The null space has dimension at least , so there are at least linearly independent solutions. TRUE.
(B) If the dimension is more than , then vectors cannot span all solutions. Take A as the zero matrix: every vector is a solution, so the dimension is . FALSE.
(C) Take (). The solutions are . No non-zero solution has a zero entry, but . FALSE.
(D) Take . The solutions are , with only 1 non-zero variable, which is less than . FALSE.
Answer: (A)
(A) The null space has dimension at least , so there are at least linearly independent solutions. TRUE.
(B) If the dimension is more than , then vectors cannot span all solutions. Take A as the zero matrix: every vector is a solution, so the dimension is . FALSE.
(C) Take (). The solutions are . No non-zero solution has a zero entry, but . FALSE.
(D) Take . The solutions are , with only 1 non-zero variable, which is less than . FALSE.
Answer: (A)
Consider the 5 -state DFA accepting the language shown below. For any string let be the number of in and be the number of 1 's in .
Which of the following statements is/are FALSE?
Which of the following statements is/are FALSE?
One or more options are correct.
Answer: (B), (C)
On input 0 the DFA goes 1231. On input 1 it goes 1451. The reverse arrows undo a step. So the DFA keeps track of :
state 1 = 0, states 2 and 5 = 1, states 3 and 4 = 2.
. States with the same value are equivalent.
- States 2 and 4 (values 1 and 2) are distinguishable. On input "1": 21 accepts, 45 rejects TRUE.
- 3 and 4: both have value 2 equivalent statement FALSE.
- 2 and 5: both have value 1 equivalent statement FALSE.
- difference 0 accepted TRUE.
Answer: "States 3 and 4 are distinguishable" and "States 2 and 5 are distinguishable"
state 1 = 0, states 2 and 5 = 1, states 3 and 4 = 2.
. States with the same value are equivalent.
- States 2 and 4 (values 1 and 2) are distinguishable. On input "1": 21 accepts, 45 rejects TRUE.
- 3 and 4: both have value 2 equivalent statement FALSE.
- 2 and 5: both have value 1 equivalent statement FALSE.
- difference 0 accepted TRUE.
Answer: "States 3 and 4 are distinguishable" and "States 2 and 5 are distinguishable"