GATE 2026
65 questions
MCQ 33 · MSQ 14 · NAT 181-mark 30 · 2-mark 35
Questions 46–50 of 65
Let be the eigenvalues of the matrix ,
where is in radians.
Which one of the following options lists all the possible values of satisfying ?
where is in radians.
Which one of the following options lists all the possible values of satisfying ?
Answer: (C)
The matrix is block-diagonal. One eigenvalue is , which comes from the fixed top-left entry . The other part is the rotation block . Its eigenvalues are , a complex-conjugate pair.
The sum of all three eigenvalues is . This uses Euler's formula, .
Set this sum equal to :
In the range , the solutions are and . Cosine is even, so both values of t give the same result.
Answer:
The sum of all three eigenvalues is . This uses Euler's formula, .
Set this sum equal to :
In the range , the solutions are and . Cosine is even, so both values of t give the same result.
Answer:
Consider that stories of Author and stories of Author were kept together without mentioning the names of the authors. classifier was then asked to predict the author of each of these stories. Let, out of 's stories, were classified as that of . On the other hand, out of 's stories, were classified as that of .
Considering and as two classes, which of the following statements is/are true?
Considering and as two classes, which of the following statements is/are true?
One or more options are correct.
Answer: (A), (B)
Make the confusion matrix first. Author X has stories, and of them were labelled Y, so were labelled correctly as X. Author Y has stories, and of them were labelled X, so were labelled correctly as Y.
Accuracy . So (A) is true and (D), which says , is false.
Precision(X) . The bottom part is all stories predicted as X: correct plus of Y's wrongly labelled X.
Precision(Y) . The bottom part is all stories predicted as Y: correct plus of X's wrongly labelled Y.
Since , (B) is true.
Recall(X) and Recall(Y) . Since , (C) is false.
Answer: (A), (B)
Accuracy . So (A) is true and (D), which says , is false.
Precision(X) . The bottom part is all stories predicted as X: correct plus of Y's wrongly labelled X.
Precision(Y) . The bottom part is all stories predicted as Y: correct plus of X's wrongly labelled Y.
Since , (B) is true.
Recall(X) and Recall(Y) . Since , (C) is false.
Answer: (A), (B)
Let be a predicate.
Which of the following statements is/are NOT valid in first-order logic?
Which of the following statements is/are NOT valid in first-order logic?
One or more options are correct.
Answer: (B), (C), (D)
A statement is valid if it is true in every interpretation. The domain is taken to be non-empty.
- (A) : if every element satisfies , some element does, as the domain is non-empty. Valid.
- (B) : take domain with true and false. The left side is true and the right side is false. Not valid.
- (C) : it includes the implication in (B), so the same model makes it false. Not valid.
- (D) : take domain with true. The left side is true and the right side is false. Not valid. It is true in some models, but valid statements must hold in all.
Answer: (B), (C), (D)
- (A) : if every element satisfies , some element does, as the domain is non-empty. Valid.
- (B) : take domain with true and false. The left side is true and the right side is false. Not valid.
- (C) : it includes the implication in (B), so the same model makes it false. Not valid.
- (D) : take domain with true. The left side is true and the right side is false. Not valid. It is true in some models, but valid statements must hold in all.
Answer: (B), (C), (D)
Consider the problem of sorting the given array in ascending order:
Consider two sorting algorithms Bubble Sort and Insertion Sort .
Let be the total number of comparisons done by on the elements of and be the total number of comparisons done by on the elements of .
Which of the following options is/are correct?
Consider two sorting algorithms Bubble Sort and Insertion Sort .
Let be the total number of comparisons done by on the elements of and be the total number of comparisons done by on the elements of .
Which of the following options is/are correct?
One or more options are correct.
Answer: (B), (C), (D)
Only one pair, (5,4), is out of order, so one swap sorts the array. Both algorithms still compare pairs that are already in order.
Bubble sort (checks every adjacent pair in a pass and stops after a pass with no swap): Pass 1 compares (1,2), (2,3), (3,5), (5,4), which is comparisons, and swaps only (5,4). Pass 2 compares (1,2), (2,3), (3,4), which is comparisons with no swap, so it stops. . If the early stop is not used, passes 3 and 4 add more comparisons and .
Insertion sort: inserting 2, 3 and 5 takes comparison each, because each is larger than the element before it. Inserting 4 takes comparisons: it is smaller than 5, so 5 shifts right (one swap), then 4 is compared with 3 and stops. .
(A) is false, because , not .
(B) is true, because in both versions of bubble sort.
(C) is true: the only out-of-order pair is fixed by one swap.
(D) is true: bubble sort compares (1,2), (2,3), (3,5), and insertion sort compares 2 with 1, 3 with 2, 5 with 3. In every one of these pairs the elements are already in order.
Answer: (B), (C), (D)
Bubble sort (checks every adjacent pair in a pass and stops after a pass with no swap): Pass 1 compares (1,2), (2,3), (3,5), (5,4), which is comparisons, and swaps only (5,4). Pass 2 compares (1,2), (2,3), (3,4), which is comparisons with no swap, so it stops. . If the early stop is not used, passes 3 and 4 add more comparisons and .
Insertion sort: inserting 2, 3 and 5 takes comparison each, because each is larger than the element before it. Inserting 4 takes comparisons: it is smaller than 5, so 5 shifts right (one swap), then 4 is compared with 3 and stops. .
(A) is false, because , not .
(B) is true, because in both versions of bubble sort.
(C) is true: the only out-of-order pair is fixed by one swap.
(D) is true: bubble sort compares (1,2), (2,3), (3,5), and insertion sort compares 2 with 1, 3 with 2, 5 with 3. In every one of these pairs the elements are already in order.
Answer: (B), (C), (D)
Consider the given Python program.
def outer():
x = []
def inner(val):
x.append(val)
return x
return inner
f1 = outer()
f2 = outer()
print(f1(10)) # Line P
print(f1(20)) # Line Q
print(f2(30)) # Line R
print(f1(40)) # Line S Which of the following options is/are correct?One or more options are correct.
Answer: (B), (D)
A Python closure keeps a reference to the variable in the enclosing scope. Here the statement runs again each time is called. (A mutable default argument is different, because it is made only once when the function is defined.) So and each get their own separate, independent list. They do not share the same .
- Line P: adds to the list that belongs to and prints .
- Line Q: adds to the same list that used before, and prints [10, 20].
- Line R: adds to the separate list of , which was empty until now. It prints and not , because the list of is independent of the list of .
- Line S: adds again to the list of , which is now , and prints [10, 20, 40].
Answer: Output of Line Q is [10,20]; and output of Line S is [10,20,40].
- Line P: adds to the list that belongs to and prints .
- Line Q: adds to the same list that used before, and prints [10, 20].
- Line R: adds to the separate list of , which was empty until now. It prints and not , because the list of is independent of the list of .
- Line S: adds again to the list of , which is now , and prints [10, 20, 40].
Answer: Output of Line Q is [10,20]; and output of Line S is [10,20,40].