20. After shuffling once we obtain a deck with cards $[ 15,6,4,1,13,9,8,7,12,11,5,10,3,14,2,16 ]$. What were the neighbours of 2 before the deck was shuffled?
(a) 3
(b) 6
(c) 7
(d) 14
Part (B) - Short-answer questions
For questions in part ( $B$ ), you have to write your answer with a short explanation in the space provided for the question in your answer sheet. If you need more space, you may continue on the pages provided for rough work. Any such overflows must be clearly labeled.
Questions 1 and 2 are based on the following description.
Each round of a TV game show consists of ten questions. Before each round the host takes ten boxes and places prizes in nine of them, leaving one empty. The host then shuffles these boxes and labels them from 1 to 10. When the guest answers a question correctly, the host opens the corresponding box. If the box has a prize, the guest earns the prize. If the box is empty, the round ends and the guest gets to keep their earnings so far.
- In the Easy Round, all questions are easy, and each prize is ₹1000. Guest Chatur knows all the answers. What is the expected earnings for Chatur in this round? Explain your answer.
- To proceed to the next round, a guest must earn at least ₹7000 in the Easy Round. What is the probability that guest Chatur, who knows all the answers of the Easy Round, progresses to the second round? Explain your answer.
- Find values of $x$ and $y$ that satisfy both the following equations:
$$\begin{aligned}
& \sqrt { \frac { x } { y } } + \sqrt { \frac { y } { x } } = \frac { 5 } { 2 } \\
& \frac { x } { \sqrt { y } } + \frac { y } { \sqrt { x } } = \frac { 9 } { 2 }
\end{aligned}$$
Questions 4 and 5 are based on the following description.
The following question appeared in a quiz:
\begin{displayquote} "Write the code for a function SecondBest $( A , n )$ that takes an array $A$ and a positive integer $n$ as arguments. The elements of $A$ are all integers, and $n$ is the number of elements in $A$. The call SecondBest $( A , n )$ should return the second largest element in $A$. If $A$ has no second largest element, then the function should return the special value None." \end{displayquote}
A student submitted the code below as the answer to this question. In the code the array A is indexed from 0 .
\begin{verbatim} function SecondBest(A, n) { if n == 1 { return(None); } first = A[0]; second = A[1]; for i from 2 to (n-1) { if (A[i] >= first) and (A[i] >= second) { second = first; first = A[i]; } else { if A[i] >= second { second = A[i]; } } } if first != second { return(second); } else { return(None); } } \end{verbatim}
This answer turned out to be wrong; this function gives the correct answer for some valid inputs, and wrong answers for other valid inputs. Answer the next two questions about this function.