Skip to content
Early access — you're among the first to try PYQLabs. Share feedback

GATE Data Science & AI

130 questions · 3 years · 13 subjects

Public preview: use this branch page to find high-signal topics and keyed questions. Explanations are being added selectively, starting with recent and recurring concepts.

High-yield topics

All trends →

Practice Data Science & AI PYQs

40 questions shown in Computer Science. Filter for cleaner practice sessions.

Showing Computer Science PYQs from Data Science & AI.
2026 Q13

Which of the following algorithms is NOT an example of uninformed search?

Computer Science/MCQ/answer key
2026 Q14

Which of the following statements is NOT true? (The names of the predicates are intuitive.)

Computer Science/MCQ/answer key
2026 Q15

Consider that the quick sort algorithm is used to sort an array of n distinct randomly ordered elements. In every call, the pivot is chosen as the first element of the current suba...

Computer Science/MCQ/answer key
2026 Q16

Consider the given Python program. 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 t...

Computer Science/MCQ/answer key
2026 Q17

Let R(A, B, C, D, E) be a relational schema with functional dependency set F={A→BC, CD→E, E→A}. Which of the following statements is correct?

Computer Science/MCQ/answer key
2026 Q18

Consider that the visualization of a 3-dimensional data cube is showing Sales Quantity for each combination of the attributes Product Type, Month and Country. From this, if we want...

Computer Science/MCQ/answer key
2026 Q19

Let M be a randomly chosen non-empty subset of S = {1,2,3,...,2026}. Which of the following is the probability that the product of all the elements of M is even?

Computer Science/MCQ/answer key
2026 Q20

Suppose that a computer program provides a non-negative and integer-valued random solution to the equation n₁ + n₂ + n₃ + n₄ = 20. Which of the following is the probability that al...

Computer Science/MCQ/answer key
2026 Q21

Let $M = \begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix}$ be a $2 \times 2$ matrix, where $\theta = \frac{2\pi}{5}$, and $I_2 = \begin{pmatrix...

Computer Science/MCQ/answer key
2026 Q22

Consider a set $S_1 = \{x = (x_1, x_2, x_3)^T \in \mathbb{R}^3 \mid x^T x \le 16\}$. Let $S_2$ be another set which is a subspace of $\mathbb{R}^3$ with dimension two. Which of the...

Computer Science/MCQ/answer key
2026 Q23

In the following table, the Task column lists a few tasks related to machine learning. The Algorithm column lists a few algorithms. Each entry "t" from the Task column is to be mat...

Computer Science/MTF/answer key
2026 Q24

Sentence X is said to entail Sentence Y if whenever X is TRUE, Y also must hold TRUE. Which of the following statements is/are correct if X entails Y?

Computer Science/MCQ/answer key
2026 Q25

You are given the following Pre-order and In-order traversals of a Binary Tree T with nodes E, F, G, P, Q, R, S. Pre-order: P Q S E R F G In-order: S Q E P F R G Which of the follo...

Computer Science/MCQ/answer key
2026 Q26

Consider two relations r and s defined on the relational schemas R(A, B) and S(E, C), respectively. A is the primary key of R and E is a foreign key of S referencing A in R. Which...

Computer Science/MCQ/answer key
2026 Q31

Let A be a sorted array containing 1000 distinct integers. You perform a recursive binary search on A to find an element y. Suppose each comparison checks whether the middle elemen...

Computer Science/NAT/answer key
2026 Q32

In a relational database, a B+ Tree Index is to be constructed for a relation on a key field. In a B+ Tree, a Node Pointer points to a sub-tree and a Data Record Pointer points to...

Computer Science/NAT/answer key
2026 Q33

The number of bijections f(.) from the set S = {1, 2, 3, 4} to itself such that f(f(n)) = n, for all n ∈ S, is __________. (Answer in integer)

Computer Science/NAT/answer key
2026 Q34

Let X be an exponentially distributed random variable with mean λ(> 0). If P(X > 5) = 0.35, then the conditional probability P(X > 10|X > 5) is __________. (Rounded off to two deci...

Computer Science/NAT/answer key
2026 Q35

The value of $\Sigma_{i=0}^{\infty} \Sigma_{j=1}^{\infty} 2^{-i} 3^{-j}$ is __________. (Answer in integer)

Computer Science/NAT/answer key
2026 Q36

Let four points in three-dimensional space be: P1: [2, 3, -1], P2: [3, 1, 1], P3: [5, -2, 3] and P4: [3, 3, 3]. Hierarchical Agglomerative Clustering is used to cluster the above p...

Computer Science/MCQ/answer key
2026 Q37

Which of the following statements is true for Ridge Regression?

Computer Science/MCQ/answer key
2026 Q38

Assume that a Creative (C) person will Succeed (S) if the person is also Disciplined (D), but will not succeed otherwise. Now, consider the following statements: (i) C ∧ S ⇔ D (ii)...

Computer Science/MCQ/answer key
2026 Q39

A recursive function in Python is given. def mystery(n): if n <= 0: return 1 else: return mystery(n-1) + mystery(n-2) Now, consider the following function call: mystery(4) Assume t...

Computer Science/MCQ/answer key
2026 Q40

Consider a directed graph $G = (V, E)$, where $V$ is the finite set of vertices and $E$ is the set of directed edges between the vertices. $G$ may contain cycles but there is no se...

Computer Science/MCQ/answer key
2026 Q41

Consider a B+ Tree where the maximum number of key values in each leaf node is 2 and the maximum number of pointers in each non-leaf node is 3. Let the content of the B+ Tree be as...

Computer Science/MCQ/answer key
2026 Q42

Consider the given relations X, Y and Z. The relation X has three columns P, Q and R. The relation Y has three columns P, Q and S. The relation Z has two columns P and T. Consider...

Computer Science/MCQ/answer key
2026 Q43

Consider the concept hierarchies as shown in the figure. Which of the following options denotes the total number of possible data cuboids from these concept hierarchies?

Computer Science/MCQ/answer key
2026 Q47

Consider that 20 stories of Author X and 10 stories of Author Y were kept together without mentioning the names of the authors. A classifier was then asked to predict the author (X...

Computer Science/MCQ/answer key
2026 Q48

Let P(x) be a predicate. Which of the following statements is/are NOT valid in first-order logic?

Computer Science/MCQ/answer key
2026 Q49

Consider the problem of sorting the given array in ascending order: P = [1, 2, 3, 5, 4] Consider two sorting algorithms Bubble Sort (BS) and Insertion Sort (IS). Let N1 be the tota...

Computer Science/MCQ/answer key
2026 Q50

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 p...

Computer Science/MCQ/answer key
2026 Q51

Consider a table Employee (EmpID, TeamID), where the column EmpID (ID of an employee) is the primary key. The column TeamID denotes the team ID of the team of which the employee is...

Computer Science/MCQ/answer key
2026 Q52

Let M = (I_n - (1/n)11^T) be a matrix, where 1 = (1,1,1, ...,1)^T ∈ R^n and I_n is the identity matrix of order n. Which of the following options is/are correct?

Computer Science/MCQ/answer key
2026 Q53

Let X_1,X_2,...,X_n be n independent random variables. Each of the random variables follows Normal(μ = 0, σ² = 1) distribution. Define X̄ = (1/n)Σ_{i=1}^n X_i . Which of the follow...

Computer Science/MCQ/answer key
2026 Q56

Consider a fully-connected feed-forward multi-layer perceptron. It has 30 neurons in the input layer, followed by two hidden layers and an output layer. The first hidden layer has...

Computer Science/NAT/answer key
2026 Q57

A clinic specializes in testing for a disease D. The result of the test can be either positive or negative. A study revealed that if a person suffers from the disease D, the test r...

Computer Science/NAT/answer key
2026 Q58

Consider the given Python program. 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...

Computer Science/NAT/answer key
2026 Q59

Let there be two relations X and Y as shown. X has three columns P, Q and R. Y has two columns P and S. Consider that the following tuple relational calculus expression is evaluate...

Computer Science/NAT/answer key
2026 Q60

Let Account be a relation as shown. Consider the given SQL query. SELECT AccNo FROM Account AS A WHERE (SELECT COUNT(*) FROM Account AS B WHERE A.Balance = (SELECT COUNT(*) FROM Ac...

Computer Science/NAT/answer key
2026 Q61

Consider an ER model with the entities E1 (A11, A12, A13) and E2 (A21, A22, A23), where, A11, A12, A13 are the attributes of E1, and A21, A22, A23 are the attributes of E2. Let A22...

Computer Science/NAT/answer key