GATE 2025
65 questions
MCQ 35 · MSQ 18 · NAT 121-mark 30 · 2-mark 35
Questions 26–30 of 65
Which of the following statements is/are correct in a Bayesian network?
One or more options are correct.
Answer: (C), (D)
Variable elimination is an exact inference algorithm, not an approximate one. It sums out variables one by one to get exact conditional or marginal probabilities. So the statement "VE is approximate" is false. The statement "VE is used to determine conditional probabilities" is what it is meant for. True.
Gibbs sampling is a Markov-Chain Monte Carlo (MCMC) method. It is an approximate inference technique and not an exact one. So "Gibbs sampling is exact" is false.
Rejection sampling is also a sampling-based, approximate inference method. True.
Answer: Variable elimination determines conditional probabilities; and Rejection sampling is approximate inference.
Gibbs sampling is a Markov-Chain Monte Carlo (MCMC) method. It is an approximate inference technique and not an exact one. So "Gibbs sampling is exact" is false.
Rejection sampling is also a sampling-based, approximate inference method. True.
Answer: Variable elimination determines conditional probabilities; and Rejection sampling is approximate inference.
For which of the following inputs does binary search take time in the worst case?
One or more options are correct.
Answer: (C)
Binary search reaches a worst-case time of only if it can go straight to the middle element in time at each step. This needs two things: (a) random access by index, which rules out linked lists because reaching the middle there takes traversal time, and (b) sorted order, which binary search needs to work correctly.
Only "an array of integers in increasing order" has both of these.
Answer: An array of n integers in increasing order
Only "an array of integers in increasing order" has both of these.
Answer: An array of n integers in increasing order
Let , where is the identity matrix and . Which of the following options is/are correct?
One or more options are correct.
Answer: (A), (B)
We have , where (so x is a unit vector).
As , the vector is an eigenvector of with eigenvalue . Now take any vector that is orthogonal to . Then , which gives eigenvalue (multiplicity ).
So the eigenvalues of are (along ) and (multiplicity , along directions orthogonal to ). All of them are strictly positive.
All eigenvalues are nonzero, so has full rank and is invertible. No eigenvalue is , so the claim that 0 is an eigenvalue is false. All eigenvalues of are positive, so all eigenvalues of (their reciprocals) are also positive. So cannot have a negative eigenvalue.
Answer: Rank of A is n; and A is invertible.
As , the vector is an eigenvector of with eigenvalue . Now take any vector that is orthogonal to . Then , which gives eigenvalue (multiplicity ).
So the eigenvalues of are (along ) and (multiplicity , along directions orthogonal to ). All of them are strictly positive.
All eigenvalues are nonzero, so has full rank and is invertible. No eigenvalue is , so the claim that 0 is an eigenvalue is false. All eigenvalues of are positive, so all eigenvalues of (their reciprocals) are also positive. So cannot have a negative eigenvalue.
Answer: Rank of A is n; and A is invertible.
Suppose that insertion sort is applied to the array and it takes exactly two swaps to sort the array. Select all possible values of .
One or more options are correct.
Answer: (A), (C)
Run insertion sort on and count the swaps for each possible :
Case : Insert into . It makes swap (it moves past ). Insert : no swap. Insert : it makes swap (it moves past ). Total swaps: . Matches.
Case : Insert : no swap. Insert : no swap. Insert : it makes swap (it moves past and stops at ). Total swaps: only . Doesn't match.
Case : Insert : no swap. Insert : no swap. Insert : it makes swaps (it moves past , then past ). Total swaps: . Matches.
Case : Insert : no swap. Insert : it makes swap (it moves past ). Insert : it makes swaps (it moves past , then past ). Total swaps: . Doesn't match.
Answer: x=10 and x=14
Case : Insert into . It makes swap (it moves past ). Insert : no swap. Insert : it makes swap (it moves past ). Total swaps: . Matches.
Case : Insert : no swap. Insert : no swap. Insert : it makes swap (it moves past and stops at ). Total swaps: only . Doesn't match.
Case : Insert : no swap. Insert : no swap. Insert : it makes swaps (it moves past , then past ). Total swaps: . Matches.
Case : Insert : no swap. Insert : it makes swap (it moves past ). Insert : it makes swaps (it moves past , then past ). Total swaps: . Doesn't match.
Answer: x=10 and x=14
Let and be two sets of objects. Let be a measure of dissimilarity between two objects and . Consider the following definitions of dissimilarity between and .
Which of the following statements is/are correct?
Which of the following statements is/are correct?
One or more options are correct.
Answer: (B), (D)
is the largest distance between a point of one cluster and a point of the other. is the smallest distance between such a pair.
Single linkage joins clusters by looking at their closest pair of points. This is the minimum, which is . Complete linkage joins clusters by looking at their farthest pair of points. This is the maximum, which is .
Answer: Single Linkage uses DIS-2; and Complete Linkage uses DIS-1.
Single linkage joins clusters by looking at their closest pair of points. This is the minimum, which is . Complete linkage joins clusters by looking at their farthest pair of points. This is the maximum, which is .
Answer: Single Linkage uses DIS-2; and Complete Linkage uses DIS-1.