GATE DA 2024 (original) (raw)

Consider the two neural networks (NNs) shown in Figures 1 and 2, with π‘…π‘’πΏπ‘ˆ activation (π‘…π‘’πΏπ‘ˆ(𝑧) = max{0, 𝑧}, βˆ€π‘§ ∈ ℝ). ℝ denotes the set of real numbers. The connections and their corresponding weights are shown in the Figures. The biases at every neuron are set to 0. For what values of 𝑝, π‘ž, π‘Ÿ in Figure 2 are the two NNs equivalent, when π‘₯1 ,π‘₯2 , π‘₯3 are positive?

Image12

Three fair coins are tossed independently. T is the event that two or more tosses result in heads. S is the event that two or more tosses result in tails. What is the probability of the event that (T ∧ S) ?

Consider the following Python function:1

Python `

def fun(D, s1, s2): if s1 < s2: D[s1], D[s2] = D[s2], D[s1] fun(D, s1+1, s2-

`

What does this Python function fun() do? Select the ONE appropriate option below.

Let F(n) denote the maximum number of comparisons made while searching for an entry in a sorted array of size 𝑛 using binary search. Which **ONE of the following options is TRUE?

Consider the function computeS(X) whose pseudocode is given below:

computeS(X)
𝑆[1] ← 1
for 𝑖 ←2 to length(X)
𝑆[𝑖] ← 1
if 𝑋[𝑖 βˆ’ 1] ≀ 𝑋[𝑖]
𝑆[𝑖] ← 𝑆[𝑖] + 𝑆[𝑖 βˆ’ 1]
end if
end for
return S

which ONE of the following values is returned by the function computeS(x)

for X=[6,3,5,4,10]?

Consider the following python code:

Python `

def count(child_dict, i): if i not in child_dict.keys(): return 1 ans = 1 for j in child_dict[i]: ans += count(child_dict, j) return ans

child_dict = dict() child_dict[0] = [1,2] child_dict[1] = [3,4,5] child_dict[2] = [6,7,8] print(count(child_dict,0))

`

Which **ONE of the following is the output of this code?

A fair six-sided die (with faces numbered 1, 2, 3, 4, 5, 6) is repeatedly thrown Independently. What is the expected number of times the die is thrown until two consecutive throws of even numbers are seen?

[Tex]\text{Let } M = \begin{bmatrix} 1 & 2 & 3 \\ 3 & 1 & 3 \\ 4 & 3 & 6 \end{bmatrix}[/Tex]. [Tex]\text{Find } \det(M^2 + 12M)[/Tex]

Consider sorting the following array of integers in ascending order using an in-place Quicksort algorithm that uses the last element as the pivot.

60 70 80 90 100

The minimum number of swaps perfoemed during this quicksort ?

Consider the following tree traversals on a full binary tree:

1.PreOrder

2.Inorder

3.PostOrder

Which of the following traversal options is/are suffiecient to uniquely reconstruct the full Binary Tree?

There are 64 questions to complete.

Take a part in the ongoing discussion