GATE 2024
64 questions
MCQ 36 · MSQ 12 · NAT 161-mark 29 · 2-mark 35
Questions 41–45 of 64
Which ONE of the following is the correct representation of the clusters produced?
Answer: (A)
The smallest distance in the table is . It occurs for and for . So these two pairs form clusters first, at height 1. Only (A) and (B) show this; in (C) and (D) the point joins before joins .
Now find the next smallest cluster distance:
The smallest is 2, so joins first. This does not match (B), where joins .
Finally , so the last merge is at height 3. This is the dendrogram in (A).
Answer: (A)
Answer: (A)
First hidden layer (all weights 1):
, , .
Second hidden layer (all weights 2, each neuron takes all of ):
.
Output (weights 3):
.
Figure 2 gives . Matching coefficients, . Option (B) has and , so and are weighted wrongly. Option (D) gives every input weight 36, but and each pass through only 2 of the 3 first-layer neurons.
Answer: (A)
Which ONE of the following statements about breadth-first search (BFS) and depth-first search (DFS) is true, when reaching the goal state number 6?
Answer: (C)
Rule: "previously expanded states are not added to the unexpanded state list", so no state is expanded twice. In the figures, the filled circles are the expanded states.
BFS expands level by level, smallest number first: 1 (adds 2, 3), 2 (adds 4), 3 (adds 5), 4 (adds 6), 5 (adds 7). The next state is 6, the goal. States expanded: 1, 2, 3, 4, 5, which is 5.
DFS goes deep, taking the smallest number: 1, then 2, then 3, then 4, then 5. Expanding 5 gives 6 and 7, and the next state taken is 6, the goal. States expanded: 1, 2, 3, 4, 5, which is 5.
Both expand the same number of states.
Answer: (C)
(i) Bubble sort
(ii) Insertion sort
(iii) Selection sort
Which ONE among the following choices of sorting algorithms sorts the numbers in the array in increasing order after exactly two passes over the array?
Answer: (B)
Bubble sort swaps adjacent pairs that are out of order. Pass 1: . Pass 2: . Not sorted, since 2 and 1 are still out of order.
Insertion sort inserts the next element into the sorted prefix. Pass 1 inserts 3: . Pass 2 inserts 2: . Not sorted, since 1 has not been placed yet.
Selection sort puts the smallest remaining element in the next position. Pass 1 swaps 1 with 4: . Pass 2 swaps 2 with 3: . Sorted.
Only selection sort, (iii), is sorted after exactly two passes.
Answer: (B)
Which of the following functional dependencies can be derived from the above set?
One or more options are correct.
Answer: (A), (B), (D)
(B) : and are given, so follows by union. This is derivable.
(A) and (D): starts as . adds , giving . Then and add and , so . It contains and , so and are both derivable.
(C) : is not in . No dependency has on its right side, so can be derived only from a set that already contains . This is not derivable.
Answer: (A), (B), (D)