GATE 2025
65 questions
MCQ 35 · MSQ 18 · NAT 121-mark 30 · 2-mark 35
Questions 46–50 of 65
Consider a fact table in an OLAP application: Facts(, val), where and are its dimension attributes and val is a dependent attribute. Suppose attribute takes 3 values and takes 2 values, and all combinations of these values are present in the table Facts. How many tuples are there in the result of the following query?
SELECT D1, D2, sum(val) FROM Facts
GROUP BY CUBE (D1, D2);
SELECT D1, D2, sum(val) FROM Facts
GROUP BY CUBE (D1, D2);
Answer: (D)
gives the groupings on every subset of the dimensions: , , and (grand total). The result has the rows of all four groupings.
With taking 3 values and taking 2 values, and all combinations present:
- Group by : rows
- Group by only: rows
- Group by only: rows
- Grand total (no grouping): row
Total tuples.
Answer: (D)
With taking 3 values and taking 2 values, and all combinations present:
- Group by : rows
- Group by only: rows
- Group by only: rows
- Grand total (no grouping): row
Total tuples.
Answer: (D)
Consider the following Python code snippet.
A={"this","that"}
B={"that","other"}
C={"other","this"}
while "other" in C:
if "this" in A:
A,B,C=A-B,B-C,C-A
if "that" in B:
A,B,C=C|A,A|B,B|C
When the above program is executed, at the end, which of the following sets contains "this"? Answer: (B)
Trace the sets one step at a time. At the start: , , .
Iteration 1 (is "other" ? Yes):
Is "this" ? Yes
Is "that" (now )? Yes
Iteration 2 (is "other" ? Yes, ):
Is "this" (now )? Yes
Is "that" (now )? No, so skip.
Check the loop condition: is "other" (now )? No, so the loop ends.
Final state: . Only has "this".
Answer: Only B
Iteration 1 (is "other" ? Yes):
Is "this" ? Yes
Is "that" (now )? Yes
Iteration 2 (is "other" ? Yes, ):
Is "this" (now )? Yes
Is "that" (now )? No, so skip.
Check the loop condition: is "other" (now )? No, so the loop ends.
Final state: . Only has "this".
Answer: Only B
Which of the following statements is/are correct about the rectified linear unit (ReLU) activation function defined as ReLU() = max(, 0), where ?
One or more options are correct.
Answer: (A), (C)
- Continuous everywhere: true — the two linear pieces ( for , and for ) join exactly at . Both give , so the graph has no jump anywhere.
- Differentiable everywhere: false — the slope changes suddenly from on the left to on the right at . This is a sharp corner.
- Not differentiable at : true, for the same reason as above.
- for all : false — for example, gives but , so they are not equal.
Answer: ReLU is continuous everywhere; and ReLU is not differentiable at x=0.
Consider the function . Which of the following statements is/are correct?
One or more options are correct.
Answer: (C), (D)
Given: with .
Take the derivative: . The critical points are at . Second derivative: . At the two points we get (local max) and (local min).
Now find the value of f at every candidate point (the critical points and both endpoints): , (local max), (local min), .
The global maximum over is at the endpoint (since ). It is not at the local max . So the statement "max at " is false, but "maximum value is " is true. In the same way, the global minimum is at the endpoint (since ). It is not at . So the statement "min at " is false.
The function is an upward parabola. Its vertex (the minimum) is at , using the vertex formula . This statement is true.
Answer: Maximum value of f is 133/2; and minimum of f' is at x=-7/2.
Take the derivative: . The critical points are at . Second derivative: . At the two points we get (local max) and (local min).
Now find the value of f at every candidate point (the critical points and both endpoints): , (local max), (local min), .
The global maximum over is at the endpoint (since ). It is not at the local max . So the statement "max at " is false, but "maximum value is " is true. In the same way, the global minimum is at the endpoint (since ). It is not at . So the statement "min at " is false.
The function is an upward parabola. Its vertex (the minimum) is at , using the vertex formula . This statement is true.
Answer: Maximum value of f is 133/2; and minimum of f' is at x=-7/2.
Let be a system of orthonormal vectors in . Consider the matrix . Which of the following statements is/are correct?
One or more options are correct.
Answer: (A), (B)
Here with orthonormal in . is symmetric. Since for and , we get for each , and for any orthogonal to all the . So is the orthogonal projection onto the 5-dimensional span of the .
Eigenvalues: with multiplicity and with multiplicity .
(A) True. For a symmetric matrix the singular values are . The eigenvalues and are not negative, so , and the singular values are the same numbers as the eigenvalues.
(B) True. The singular values are and .
(C) False. is an eigenvalue (5 times), so .
(D) False. , so is singular and not invertible. Its rank is only , not .
Answer: (A), (B)
Eigenvalues: with multiplicity and with multiplicity .
(A) True. For a symmetric matrix the singular values are . The eigenvalues and are not negative, so , and the singular values are the same numbers as the eigenvalues.
(B) True. The singular values are and .
(C) False. is an eigenvalue (5 times), so .
(D) False. , so is singular and not invertible. Its rank is only , not .
Answer: (A), (B)