GATE 2026 Data Science and Artificial Intelligence (DA) – Exam Pattern & Question Paper
The Graduate Aptitude Test in Engineering (GATE) 2026 – Data Science and Artificial Intelligence (DA) is a national-level computer-based examination conducted to evaluate candidates' understanding of data science, artificial intelligence, mathematics, statistics, and computing concepts. The examination is conducted in English and has a total duration of 3 hours (180 minutes). The paper contains 65 questions carrying 100 marks.
GATE 2026 DA Exam Pattern
- Examination Mode: Computer Based Test (CBT)
- Total Questions: 65
- Total Marks: 100 Marks
- Examination Duration: 3 Hours
- General Aptitude: 10 Questions – 15 Marks
- DA Subject Section: 55 Questions – 85 Marks
- Question Marks: Each question carries either 1 or 2 marks.
Types of Questions
The GATE DA paper includes three types of questions:
- MCQ (Multiple Choice Questions): Four options are provided, and only one option is correct.
- MSQ (Multiple Select Questions): One or more options can be correct. All correct options must be selected to receive full marks.
- NAT (Numerical Answer Type): Candidates must calculate and enter the numerical answer without selecting any options.
Marking Scheme
There is negative marking only for incorrect MCQ answers. One-third mark is deducted for a wrong 1-mark MCQ, and two-thirds mark for a wrong 2-mark MCQ. There is no negative marking for MSQ and NAT questions. MSQ questions do not have partial marking.
Why Should You Practise This Question Paper?
Practising this GATE 2026 DA question paper helps you understand the actual examination pattern, question difficulty, and different types of problems asked in the exam. It allows you to test your conceptual knowledge, improve problem-solving skills, practise numerical calculations, and develop better time-management strategies. By attempting the questions and checking your solutions, you can identify your strong and weak topics and understand which concepts require more revision. Regular practice can also improve accuracy, confidence, and exam preparation. This question paper is a useful practice resource for students preparing for upcoming GATE examinations.
Choose the word that best fills the blank.
Verbosity means excessive use of words, while brevity means being concise. Insolence means rudeness or disrespect; respect is the contrasting word.
Digits 2, 5 and 7 give a product of 2 × 5 × 7 = 70. Their sum is 2 + 5 + 7 = 14.
Let x = nlog₁₀(m) and y = mlog₁₀(n).
The relation between x and y is ______.
log₁₀(x) = log₁₀(n) × log₁₀(m).
log₁₀(y) = log₁₀(m) × log₁₀(n).
Since multiplication is commutative, the expressions are equal. Therefore x = y.
Based only on the above sentence, which one of the following statements is true?
Choose the option with the correct sequence of words to fill the blanks.
Correct sentence: “My friend and I parted at the door of the cabin that I had rented for the night.”
Ignoring permutations, the number of ways to pick these five integers is ______.
Mean = 12, so the total sum of five integers is 5 × 12 = 60.
In sorted order, the median (third number) is 18. Since 20 must be the unique mode, the only valid set is 0, 2, 18, 20, 20.
Its sum is 60, median is 18, and 20 is the unique mode. Ignoring permutations, there is 1 way.
It was observed that:
(i) The first game was the only game where two students of the same class played against each other.
(ii) The students of Class 5 won more games than the students of Class 4.
(iii) The boys won two games and the girls won one game.
The student who did not lose any game is ______.
A valid sequence is: Rishi beats Swathi, Rishi beats Pavan, and Tanvi beats Rishi. This gives two wins to the boys and one to the girls, with Class 5 winning two games and Class 4 winning one. Tanvi is the student who never loses a game in this sequence.
PQ is a two-digit number with Q in the units place and P in the tens place. Similarly, RS is a two-digit number.
PQ and RS are consecutive numbers and (PQ)2 + (RS)2 = XYP, where XYP is a three-digit number.
The value of Y is ______.
The consecutive two-digit numbers are 19 and 20.
19² + 20² = 361 + 400 = 761.
Therefore X = 7, Y = 6 and P = 1. All six digits P, Q, R, S, X and Y are distinct, as required. Hence Y = 6.
The area of the shaded region PQRO is ______ cm².
The angle at the circumference is 45°, so the central angle POR = 2 × 45° = 90°.
Since PQ = RQ, the corresponding central angles POQ and QOR are each 135°.
Area of triangle PQR = 50(1 + √2) cm².
Area of triangle POR = ½ × 10 × 10 × sin 90° = 50 cm².
Shaded area = 50(1 + √2) − 50 = 50√2 cm².
Which of the following options is true about the angle θ between the first and the tenth principal components?
PCA principal components are orthogonal to one another. Therefore, the first and tenth distinct principal-component directions are perpendicular, giving an angle of 90°.
Which is the correct number of validation splits that will be generated?
Total samples = 1000. The first 100 are reserved for testing, leaving 1000 − 100 = 900 training samples.
LOOCV creates one validation split per training sample, so the number of validation splits is 900.
A* is an informed search algorithm because it uses a heuristic estimate along with the path cost to guide the search. BFS, DFS and depth-limited search are uninformed search methods.
(The names of the predicates are intuitive.)
“Each king is a person” should be represented as ∀x (IsKing(x) ⇒ IsPerson(x)).
The conjunction in option C says every object is both a king and a person, which is not the intended meaning. The implication is required.
Let T(n) denote the expected time to sort the array. Assume that the time to partition is linear in the size of the current subarray.
Which recurrence relation correctly represents T(n) in this scenario?
Since the array is randomly ordered and all elements are distinct, the pivot is equally likely to have any rank from 0 to n−1. For each possible rank k, the subproblem sizes are k and n−k−1.
Averaging over all pivot ranks gives:
T(n) = (1/n) Σk=0n−1 [T(k) + T(n−k−1)] + O(n).
def append_to_lst(val, lst=[]):
lst.append(val)
return lst
print(append_to_lst(1))
print(append_to_lst(2))
print(append_to_lst(3, []))
Which of the following is the correct output of this program?
Python evaluates the default list only once when the function is defined. Therefore, the first two calls reuse the same list: [1], then [1, 2]. The third call explicitly passes a new empty list, so its output is [3].
Which of the following statements is correct?
D does not appear on the right-hand side of any dependency, so every candidate key must contain D.
A⁺ = {A, B, C}; adding D allows CD → E, so (AD)⁺ contains all attributes.
E → A → BC, so (ED)⁺ contains all attributes.
CD → E → A → BC, so (CD)⁺ contains all attributes.
Thus the candidate keys are AD, ED and CD.
To further visualize Sales Quantity for each combination of Product Type, Month and State, which OLAP operation should be performed?
State represents a more detailed geographical level than Country. Drill-down moves from a higher-level summary to a more detailed level in a hierarchy, such as Country → State.
Which of the following is the probability that the product of all the elements of M is even?
There are 22026 − 1 non-empty subsets in total.
The product is odd only when every chosen element is odd. There are 1013 odd numbers from 1 to 2026, giving 21013 − 1 non-empty subsets with odd product.
Therefore,
P(even product) = 1 − (21013 − 1)/(22026 − 1)
= 21013(21013 − 1)/(22026 − 1).
n₁ + n₂ + n₃ + n₄ = 20.
Which of the following is the probability that all of n₁, n₂, n₃ and n₄ in the provided solution are positive?
The number of non-negative integer solutions to the equation is C(20 + 4 − 1, 4 − 1) = C(23, 3).
For all variables to be positive, let xᵢ = nᵢ − 1. Then x₁ + x₂ + x₃ + x₄ = 16, with each xᵢ non-negative.
The number of positive solutions is C(16 + 4 − 1, 3) = C(19, 3).
Probability = C(19, 3) / C(23, 3).
sin θ cos θ ]
M is a rotation matrix. For a rotation matrix, raising it to a power multiplies the rotation angle by that power.
Since 2026 = 5 × 405 + 1,
2026 × (2π/5) = 810π + 2π/5.
The term 810π represents 405 complete rotations. Therefore, M2026 = M.
Which of the following gives the area of S₁ ∩ S₂?
The condition xTx ≤ 16 means x₁² + x₂² + x₃² ≤ 16.
This describes a sphere of radius 4, including its interior. The intersection with a two-dimensional subspace through the origin is a circular disk of radius 4.
Area = πr² = π × 4² = 16π.
Each task must be matched with an appropriate algorithm that can solve it. Denote a match as T:A.
Task Algorithm T1 – Clustering A1 – Markov Chain Monte Carlo T2 – Classification A2 – K-Medoid T3 – Sampling A3 – Linear Discriminant Analysis T4 – Feature Extraction A4 – Naive BayesWhich of the following options gives the correct matching?
• Clustering → K-Medoid (A2)
• Classification → Naive Bayes (A4)
• Sampling → Markov Chain Monte Carlo (A1)
• Feature Extraction → Linear Discriminant Analysis (A3)
Hence, the correct matching is T1:A2, T2:A4, T3:A1, T4:A3.
Which of the following statements are correct if X entails Y?
Select any correct option.
If X entails Y, whenever X is true, Y must be true.
A. X ⇒ Y expresses this implication, so it is correct.
B. X ∧ ¬Y cannot be true; therefore, it is false, so this is correct.
C. “If X then Y” is another way to express the same implication.
D. “If Y then X” is the converse and does not necessarily follow.
Hence, A, B and C are correct.
Pre-order: P Q S E R F G In-order: S Q E P F R GWhich of the following statements are true about the Binary Tree T?
Select any correct option.
In a pre-order traversal, the first node is the root. Therefore, P is the root of the tree.
From the in-order traversal, the left subtree of P contains S, Q and E; its pre-order sequence is Q, S, E. Thus Q has two children: S and E.
The right subtree of P has root R, with F in its left subtree and G in its right subtree.
Post-order visits the left subtree, then the right subtree, and finally the root. The resulting sequence is:
S, E, Q, F, G, R, P.
Hence A and B are correct; C and D are incorrect.
Question 26
Which of the following operations will NEVER violate the foreign key constraint?
Deleting records from relation S does not create a foreign key violation because it removes references rather than creating invalid references. Inserting into S or deleting referenced records from R may violate the constraint.
Question 27
Which of the following statements is/are correct?
f′(x) = 3x(x − 2), so the critical points are x = 0 and x = 2. At x = 2, the function has a minimum because the derivative changes from negative to positive. Also, f(1) = 1 − 3 + 2 = 0, so x = 1 is a root.
The function does not have exactly two roots in [−0.9, 0], and x = 0 is not its only maximum on the given domain.
Question 28
Which of the following statements is/are correct?
Both distributions are symmetric about zero, so G(0) = H(0) = 0.5. At zero, the standard normal density is 1/√(2π), while the t₁ (Cauchy) density is 1/π; these are not equal.
For the positive crossing point c, G(c) > H(c). By symmetry, G(−c) = 1 − G(c) and H(−c) = 1 − H(c), giving G(−c) < H(−c).
Question 29
Suppose that at the end of iteration i, the value of w becomes 10.00. Let x = 10.00 be the input for iteration (i + 1).
The value of w at the end of iteration (i + 1) is ______. (Rounded off to two decimal places)
The gradient is ∂f/∂w = x = 10.
SGD update: wnew = w − η(∂f/∂w)
= 10 − 0.10 × 10 = 9.00.
Question 30
MAX starts at the root and has three strategies: 1, 2 and 3. Next, MIN also has three strategies: 1, 2 and 3. The game ends there. Both players always take optimal strategies throughout the game.
Terminal values from left to right under each root strategy are:
Strategy 1: 8, 6, −1
Strategy 2: 1, 5, 7
Strategy 3: −4, −3, −12
At the root, the best strategy for MAX is ______. (Answer in integer)
MIN chooses the minimum terminal value for each strategy:
Strategy 1: min(8, 6, −1) = −1
Strategy 2: min(1, 5, 7) = 1
Strategy 3: min(−4, −3, −12) = −12
MAX chooses the maximum among −1, 1 and −12. The maximum is 1, which corresponds to strategy 2.
Question 31
The maximum number of comparisons that may have to be performed if y is not an element of A is _______. (Answer in integer)
Binary search approximately halves the remaining search interval after each comparison. For 1000 elements, the maximum number of comparisons for an unsuccessful search is ⌈log₂(1000 + 1)⌉ = ⌈log₂(1001)⌉ = 10.
Question 32
Let:
Node size = 4096 bytes
Node Pointer size = 10 bytes
Search Key Field size = 11 bytes
Data Record Pointer size = 12 bytes
The maximum number of Node Pointers that can be present in a non-leaf node of the B+ Tree is _______. (Answer in integer)
Let p be the number of node pointers in a non-leaf node. There are p − 1 search keys, so:
10p + 11(p − 1) ≤ 4096
21p − 11 ≤ 4096
21p ≤ 4107
p ≤ 195.57...
Since p must be an integer, the maximum number of node pointers is 195.
Question 33
The condition f(f(n)) = n means that every element is either fixed or belongs to a pair that swaps its two elements.
Count the possibilities:
• No swaps: 1 way
• One swapped pair: C(4,2) = 6 ways
• Two swapped pairs: 3 ways
Total = 1 + 6 + 3 = 10.
Question 34
(Rounded off to two decimal places)
The exponential distribution has the memoryless property:
P(X > s + t | X > s) = P(X > t).
Therefore,
P(X > 10 | X > 5) = P(X > 5)
= 0.35.
Question 35
∑i=0∞ ∑j=1∞ 2−i 3−j
(Answer in integer)
Since the terms can be separated into two geometric series:
∑i=0∞ 2−i = 1/(1 − 1/2) = 2
∑j=1∞ 3−j = (1/3)/(1 − 1/3) = 1/2
Therefore, the double sum = 2 × 1/2 = 1.
Question 36
P₁: [2, 3, −1], P₂: [3, 1, 1], P₃: [5, −2, 3] and P₄: [3, 3, 3].
Hierarchical Agglomerative Clustering is used to cluster the above points. If Manhattan Distance is used as the distance metric during clustering, which of the following options indicates the two points that will be merged first?
Manhattan distance is calculated by adding the absolute differences of the coordinates.
d(P₁,P₂) = 1 + 2 + 2 = 5
d(P₁,P₄) = 1 + 0 + 4 = 5
d(P₂,P₄) = 0 + 2 + 2 = 4
The minimum distance is 4, between P₂ and P₄. Therefore, they will be merged first.
Correct Option: (D)
Question 37
Ridge Regression uses an L₂ regularization penalty. Regularization can increase model bias while reducing variance in predictions, helping to control overfitting.
Correct Option: (D)
Question 38
(i) (C ∧ S) ⇔ D
(ii) C ⇒ (S ⇔ D)
(iii) C ⇔ ((D ⇒ S) ∨ ¬S)
Which of the following options is correct?
The given condition is represented by C ⇒ (S ⇔ D): for a creative person, success is equivalent to being disciplined. Hence, statement (ii) is true.
Statement (i) is not equivalent to the given condition. In statement (iii), (D ⇒ S) ∨ ¬S simplifies to TRUE. Therefore, statement (iii) reduces to C, which is not always true.
Thus, only statement (ii) is true.
Correct Option: (B)
Question 39
def mystery(n):
if n <= 0:
return 1
else:
return mystery(n-1) + mystery(n-2)
Now, consider the function call mystery(4). Assume that a typical runtime stack is used to manage function calls. Each function call is pushed onto the stack and removed only after it finishes execution.Which option denotes the total number of function calls, including the initial call, to compute mystery(4)?
Let T(n) denote the total number of function calls.
T(−1) = 1, T(0) = 1
T(1) = 1 + T(0) + T(−1) = 3
T(2) = 1 + T(1) + T(0) = 5
T(3) = 1 + T(2) + T(1) = 9
T(4) = 1 + T(3) + T(2) = 1 + 9 + 5 = 15.
Correct Option: (C) 15
Question 40
Let Gᴿ be the graph obtained by reversing the directions of all the edges in G without changing the set of vertices.
Assume that BFS or DFS from any given vertex v visits only the reachable vertices from v in that graph.
Which of the following statements must always be true, regardless of the structure of G?
If u is reachable from v in G, there is a directed path from v to u. Reversing all edges creates a path from u to v in Gᴿ.
Therefore, v is reachable from u in Gᴿ, and BFS from u will visit v.
Correct Option: (D)
Question 41
Initially, the root contains keys 5 and 8. Inserting 3 into the left leaf causes that leaf to overflow. The leaf is split, and the separator is inserted into the parent. The root then overflows because it can contain at most two keys.
Splitting the root promotes the middle separator, 5, to become the new root key.
Correct Option: (A) 5
Question 42
| Relation X | ||
|---|---|---|
| P | Q | R |
| P1 | Q1 | R1 |
| P2 | Q2 | R2 |
| P3 | Q3 | R2 |
| Relation Y | ||
|---|---|---|
| P | Q | S |
| P1 | Q1 | 2 |
| P1 | Q2 | 5 |
| P2 | Q1 | 6 |
| P3 | Q3 | 1 |
| Relation Z | |
|---|---|
| P | T |
| P1 | T1 |
| P3 | T2 |
| P4 | T3 |
| P4 | NULL |
πP,R,S [ (σQ=Q3 ∨ R=R2(X ⋈ Y)) ⋈ (σS>1(Y ⋈ Z)) ]
Here, ⋈ denotes natural join. Which option is the correct output?
First, X ⋈ Y matches rows on both P and Q. Applying the condition Q = Q3 OR R = R2 leaves the matching tuple (P3, Q3, R2, S=1).
In Y ⋈ Z, the condition S > 1 retains the matching tuples with P1 and S values 2 and 5. The P3 tuple has S = 1, so it is excluded.
The final natural join requires matching common attributes P, Q and S. The retained tuples have no match, so the result contains zero rows.
Correct Option: (D) Zero rows
Question 43
| Time | Location | Product |
|---|---|---|
| Year | Country | Item Category |
| Month | State | Item Type |
| Day | City | Item |
There are three dimensions: Time, Location and Product. Each hierarchy has three levels, plus the ALL level representing aggregation over the entire dimension.
Thus, each dimension has 4 possible levels. The total number of cuboids is:
4 × 4 × 4 = 4³ = 64.
Correct Option: (A) 4³
Question 44
Which of the following options is the variance of (2X − 1)Y?
Since X is Bernoulli, X is either 0 or 1. Therefore, (2X − 1) is either −1 or +1, so its square is always 1.
Let W = (2X − 1)Y. Since X and Y are independent and E[Y] = 0:
Var(W) = E[W²] − (E[W])²
= E[(2X − 1)²Y²]
= E[(2X − 1)²] E[Y²]
= 1 × 100 = 100.
Correct Option: (A) 100
Question 45
Which of the following is the value of L?
The expression is the cumulative probability P(N ≤ n), where N follows a Poisson distribution with parameter λ = n.
For a Poisson random variable with parameter n, the mean is n and the variance is n. As n tends to infinity, the standardized variable approaches a standard normal distribution.
The cutoff k = n is at the mean. Therefore, the limiting cumulative probability is 0.5.
Correct Option: (A) 0.5
| 1 | 0 | 0 |
| 0 | cos t | sin t |
| 0 | −sin t | cos t |
Which one of the following options lists all the possible values of t satisfying
The sum of eigenvalues of a matrix is equal to its trace.
γ₁ + γ₂ + γ₃ = 1 + cos t + cos t
1 + 2 cos t = 1 + √2
2 cos t = √2
cos t = √2/2
Since t ∈ [−π, π],
t = π/4 or t = −π/4.
Correct Option: (C)
Let, out of X’s stories, 6 were classified as that of Y. On the other hand, out of Y’s stories, 2 were classified as that of X.
Considering X and Y as two classes, which of the following statements is/are true?
Total stories = 20 + 10 = 30.
Correct predictions:
X = 20 − 6 = 14
Y = 10 − 2 = 8
Accuracy = (14 + 8)/30
= 22/30 = 11/15.
Precision of X = 14/(14 + 2)
= 14/16 = 0.875.
Precision of Y = 8/(8 + 6)
= 8/14 ≈ 0.571.
Therefore, Precision of X is higher than Precision of Y.
Recall of X = 14/20 = 0.7.
Recall of Y = 8/10 = 0.8.
Hence, (A) and (B) are correct.
Correct Options: (A), (B)
Which of the following statements is/are NOT valid in first-order logic?
(A) ∀x P(x) ⇒ ∃x P(x)
If P(x) is true for every element, it is true for at least one element. This is valid for a non-empty domain.
(B) ∃x P(x) ⇒ ∀x P(x)
P(x) being true for some elements does not imply that it is true for every element. Hence, invalid.
(C) ∃x P(x) ⇔ ∀x P(x)
Existential and universal statements are not equivalent in general. Hence, invalid.
(D) ∀x P(x) ⇒ ∃x ¬P(x)
If P(x) is true for every element, then no element satisfies ¬P(x). Hence, invalid.
Correct Options: (B), (C), (D)
Let N₁ be the total number of comparisons done by BS on the elements of P and N₂ be the total number of comparisons done by IS on the elements of P.
Which of the following options is/are correct?
Given array:
P = [1, 2, 3, 5, 4]
Bubble Sort performs 10 comparisons under the standard fixed-pass implementation.
Insertion Sort comparisons:
Inserting 2: 1 comparison
Inserting 3: 1 comparison
Inserting 5: 1 comparison
Inserting 4: 2 comparisons
Therefore, N₂ = 5.
N₁ = 10 and N₂ = 5.
(A) is false because N₂ = 5, not 4.
(B) is true because N₁ > N₂.
(C) is true because only 4 and 5 need to exchange places.
(D) is true because both algorithms perform comparisons involving elements already in the correct relative order.
Correct Options: (B), (C), (D)
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?
Each call to outer() creates a separate list x.
Therefore, f1 and f2 do not share the same list.
Line P:
[10]
Line Q:
[10, 20]
Line R:
[30]
Line S:
[10, 20, 40]
Hence, (B) and (D) are correct.
Correct Options: (B), (D)
The number of learnable parameters in the multi-layer perceptron is __________ .
(Answer in integer)
Input to first hidden layer: \(30\times4=120\)
First to second hidden layer: \(4\times3=12\)
Second hidden layer to output: \(3\times1=3\)
Total learnable parameters \(=120+12+3=\boxed{135}\).
A study revealed that if a person suffers from the disease D, the test result in that clinic comes out positive 80% of the time, and negative 20% of the time. If a person is not suffering from the disease D, the test comes out positive 10% of the time and negative 90% of the time. It is also known that among the general population, the disease D occurs in 30% of the individuals.
If a person tests positive for D in that clinic, the probability that he/she actually suffers from the disease D is __________ . (Rounded off to two decimal places)
By Bayes' theorem,
\(P(D\mid +)=\frac{P(+\mid D)P(D)}{P(+\mid D)P(D)+P(+\mid \neg D)P(\neg D)}\)
\(=\frac{0.8\times0.3}{(0.8\times0.3)+(0.1\times0.7)}\)
\(=\frac{0.24}{0.31}\approx0.77\).
def fun(L, i=0):
if i >= len(L)-1:
return 0
if L[i] > L[i+1]:
L[i+1], L[i] = L[i], L[i+1]
return 1+fun(L, i+1)
else:
return fun(L, i+1)
data = [5, 3, 4, 1, 2]
count = 0
for _ in range(len(data)):
count += fun(data)
print(count)
The output of the program is __________ . (Answer in integer)
Each call to
fun(data) makes one left-to-right pass through adjacent elements and counts the swaps. Across the five passes, the swap counts are 4, 2, 1, 0 and 0.Total \(=4+2+1+0+0=\boxed{7}\).
| P | Q | R |
|---|---|---|
| P1 | Q1 | R1 |
| P2 | Q2 | R2 |
| P3 | Q3 | R2 |
| P | S |
|---|---|
| P1 | 10 |
| P1 | 15 |
| P2 | 20 |
| P3 | 1 |
Consider that the following tuple relational calculus expression is evaluated.
{t | t ∈ X ∧ ∃z ∈ X (t[P] = z[P]) ∧ ∃m ∈ Y (m[P] = t[P] ∧ m[S] > 1)}
The number of tuples that will be returned is __________ . (Answer in integer)
The condition requires a matching P value in relation Y with S greater than 1. P1 satisfies the condition because its S values include 10 and 15. P2 satisfies it because its S value is 20. P3 does not satisfy it because its only S value is 1. Therefore, two tuples from X are returned.
| Account | |
|---|---|
| AccNo | Balance |
| A1 | 5000 |
| A2 | 5000 |
| A3 | 10000 |
| A4 | 15000 |
| A5 | 18000 |
SELECT AccNo FROM Account AS A
WHERE (SELECT COUNT(*) FROM Account AS B
WHERE A.Balance < B.Balance) >= (SELECT COUNT(*)
FROM Account AS C WHERE A.Balance > C.Balance)
The number of rows returned by the SQL query is __________ . (Answer in integer)
For A1 and A2, the number of accounts with greater balances is 3 and the number with lower balances is 0. For A3, both counts are 2. These three rows satisfy the condition. A4 and A5 do not satisfy it. Therefore, the query returns \(\boxed{3}\) rows.
Let R12 be a many-to-many relationship between E1 and E2. Participation of both E1 and E2 in R12 is total.
The minimum number of relations required to convert the ER model into relational model (assuming there is no other functional dependency) where each relation is in third normal form (3NF) is __________ . (Answer in integer)
1. Relation for entity E1.
2. Relation for entity E2.
3. A separate relation for the multi-valued attribute A22.
4. A separate relation for the many-to-many relationship R12.
Answer: 4
2000 ∑ni=1 ∑nj=1 (xi − xj)2 = 99
Let us denote
―
n ∑ni=1 xi
―
99 ∑ni=1(xi − x̄)2
Given:
(1/2000) ∑i=1n ∑j=1n (xi − xj)² = 99
Using the identity:
∑i=1n ∑j=1n (xi − xj)² = 2n ∑i=1n(xi − x̄)²
Since n = 100:
(1/2000) × 200 × ∑(xi − x̄)² = 99
∑(xi − x̄)² = 990
Required value = 990/99 = 10
Answer: 10
The value of correlation(X, Y) is __________ . (Answer in integer)
Given X follows Uniform(−1,1).
The conditional mean is:
E[Y | X=x] = x²
Therefore:
E[XY] = E[X × E(Y|X)] = E[X³] = 0
Also, E[X] = 0 and E[Y] = E[X²] = 1/3.
Thus Cov(X,Y) = E[XY] − E[X]E[Y] = 0.
Hence correlation(X,Y) = 0.
Answer: 0
The probability that the row-sum of the second row and the column-sum of the third column are both equal to 3 is ________ . (Rounded off to two decimal places)
The second row and third column share one common element.
If the common element is 1:
P = 0.5 × (6/16) × (6/16)
If the common element is 0:
P = 0.5 × (4/16) × (4/16)
Total probability:
P = 0.5 × (6/16)² + 0.5 × (4/16)²
P = 26/256 = 0.1015625
Rounded off to two decimal places:
Answer: 0.10
n 11T) be a matrix, where 1 = (1,1,1, ... ,1)T ∈ ℝn and In is the identity matrix of order n.
The value of
A = In − (1/n)11T is a projection matrix onto the subspace orthogonal to the all-ones vector.
For n ≥ 2, its eigenvalues are 1 and 0.
The maximum value of xTAx subject to xTx = 1 is the largest eigenvalue of A.
Answer: 1
.png)




0 Comments