20. What does the function call Mystery ([6, 5, 4, 3, 2, 5], 6) return?
(a) 3
(b) 4
(c) 5
(d) 6
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.
- A girl writes five consecutive positive integers on a blackboard. She then erases one of them. The sum of the remaining four numbers is 2025 . What number did she erase?
- A toy company currently sells 1,000 toys each month at a price of ₹500 per toy. To increase their sales, the company is considering to lower the price. Market research shows that for every ₹10 decrease in the price, the number of toys sold increases by 100 . However, the price cut applies to all the toys sold.
(a) By how much should the company reduce the price, so as to maximize its monthly revenue?
(b) What would be the maximum revenue per month that the company can achieve?
Assume that the decrease in price is an integer multiple of ₹1.
3. 15 balls are placed independently and uniformly at random into 15 bins numbered from 1 to 15 . The probability that a ball ends up in a particular bin is $\frac { 1 } { 15 }$.
(a) What is the probability that the first 5 balls go into different bins, conditioned on the event that first four balls are in different bins?
(b) What are the possible values of the expected number of balls in bin 1 conditioned on the event that the first 13 balls are in different bins?
4. There are 18 chocolates in a bag, of which 7 are green, 6 are blue, and 5 are red. We pick chocolates one at a time from the bag without replacement.
(a) What is the probability that the first and the third chocolate are green?
(b) What is the probability that after picking twelve chocolates, only chocolates of one colour remain in the bag?
5. Let $M$ be an $n \times n$ matrix. We define an elementary row operation on $M$ to be one of the following: i Interchanging some two rows of $M$. ii Multiplying a row in $M$ by a non-zero scalar. iii Adding a scalar multiple of one row of $M$ to another row of $M$. An $n \times n$ matrix is said to be elementary if it is the result of a single elementary row operation performed on the $n \times n$ identity matrix. Which of the following statements is/are true? Justify your answer with a short proof, if the statement is true, otherwise, provide a counterexample. a Every elementary operation on a $n \times n$ matrix $A$ can be performed by multiplying $A$ by an elementary $n \times n$ matrix on the right. b An elementary row operation on a $n \times n$ matrix $A$ results in a matrix with the same determinant as that of $A$. 6. Consider the following polynomial of positive degree $n$
$$P _ { n } ( x ) = 1 + 2 x + 3 x ^ { 2 } + \ldots + ( n + 1 ) x ^ { n }$$
Show that there is no real number $r$ such that $P _ { n } ( r ) = 0$ when $n$ is even. 7. How many positive integers less than 1000 are neither divisible by 3 nor divisible by 5 ? Explain how you arrived at your answer. 8. Three hostel friends Amar, Prem and Raj are suspected of breaking a window. They made the following statements when questioned by the warden:
- Amar: I did not break it. Prem is lying.
- Prem: Amar is telling the truth. Raj broke the window.
- Raj: I did not break it. Either Amar is telling the truth or Prem is telling the truth.
You know that exactly one of them lied and the other two told the truth. Then, who broke the window? Justify. 9. A cloth bag labeled $X$ contains two apples, bag $Y$ contains two oranges and bag $Z$ one apple and one orange. You pick a bag at random and then remove one fruit from that bag at random. Suppose you removed an apple. What is the probability that the fruit remaining in the bag is also an apple? Justify.
Questions 10 and 11 are based on the following description.
The following question appeared in a quiz: "Write the pseudocode for a function Closest $( A , n , x )$ that takes an array $A$, a positive integer $n$, and an integer $x$ as arguments. The elements of $A$ are all integers less than $2 ^ { 64 }$, and $n$ is the number of elements in $A$. The call Closest $( A , n , x )$ should return an integer $y$ such that: (i) $y \neq x$, (ii) $y$ is present in $A$, and (iii) there is no $z \neq x$ in $A$ where $| z - x | < | y - x |$ holds. If $A$ has no such element $y$, then the function should return the special value None."
A student submitted the code below as the answer to this question. In the code the array A is indexed from 0 , and MAXINT $= 2 ^ { 64 } - 1$. The call abs( $z$ ) returns the absolute value $| z |$ of integer $z$.
\begin{verbatim} function Closest(A, n, x) { minVal = MAXINT; for i from 0 to (n-1) { absDiff = abs(x - A[i]); if (absDiff < minVal) { minVal = absDiff; y = A[i]; } } if (minVal != MAXINT) { return(y); } 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. 10. What do the following function calls return?
(a) Closest $( [ - 10,2,10 ] , 3,8 )$ [0pt] (b) Closest ([0,-5,4], 3, 7) 11. Give one example of (i) an input array A with exactly 3 elements and (ii) an integer x for which the call Closest(A, 3, x) returns a wrong answer. What is this wrong answer? What is the correct answer? 12. A sequence of five natural numbers $s _ { 1 } \leq s _ { 2 } \leq s _ { 3 } \leq s _ { 4 } \leq s _ { 5 }$ satisfy the following conditions:
- $\sum _ { i = 1 } ^ { 5 } s _ { i } = 35$
- $\sum _ { i = 1 } ^ { 3 } s _ { i } = 15$
- $\sum _ { i = 3 } ^ { 5 } s _ { i } = 27$
- $s _ { 2 }$ is even
- $s _ { 4 } - s _ { 2 } = 2$
Find all such sequences that satisfy the above conditions. 13. Five executives of a company namely CEO (chief executive officer), CFO (chief financial officer), COO (chief operating officer), CTO (chief technology officer), CMO (chief marketing officer) are to be seated around a circular table.
- The CEO must sit next to the CFO.
- The COO must not sit next to the CTO.
- The CTO must not sit next to the CEO.
In how many distinct ways can they be seated? (Rotations of the same arrangement are considered the same). 14. Evaluate the following limit:
$$\lim _ { x \rightarrow 0 } \frac { e ^ { 2 x } - 2 x - \cos x } { x \sin x }$$
- Find the determinant of the following matrix:
$$A = \left[ \begin{array} { c c c c }
1 & 1 & 4 & 3 \\
5 & 8 & 26 & 21 \\
2 & 3 & 10 & 8 \\
3 & 5 & 16 & 13
\end{array} \right]$$
- Let $f : \mathbb { R } \rightarrow \mathbb { R }$ be a function which is twice differentiable everywhere and suppose that $f ^ { \prime } ( q ) = 0$ for every rational number $q$. Find the value of $f \left( \pi ^ { 2 } \right) - f ( \pi )$.
- Consider the following $2 \times 2$ matrix
$$B = \left[ \begin{array} { c c }
0 & r \\
- 1 & 0
\end{array} \right] ,$$
where $r$ is a nonzero real number. Find $B ^ { 2025 }$, i.e., the matrix obtained by multiplying $B$ with itself 2025 times.
Instructions for Questions 18,19, and 20:
Read the following description carefully and answer the questions that follow. Use all the information provided. Clearly show all your calculations.
Description:
NorthCool Beverages Pvt. Ltd. is a leading beverage company that operates across six northern states of India. During the past summer the company launched an aggressive marketing campaign to promote its range of flavoured drinks. The charts below summarise the sales data collected during this campaign. 18. What is the revenue, in Lakhs, from the sales of the mango flavoured drink? 19. NorthCool Beverages plans to launch a new variant, "Lemon Max", in the two states with the highest sales of the lemon flavour. The company expects Lemon Max to generate additional revenue equal to $20 \%$ of the current lemon flavour sales in those two states. What would be the percentage revenue share of lemon flavour drinks if their expectations are met?
[Figure]Figure 1: Revenue share by flavour, and sales of lemon-flavoured drink by state - On average, for every ₹ 1 lakh in total revenue from the lemon-flavoured drink, 10,000 litres of lemonflavoured drink are sold across the six states. Estimate the total volume (in litres) of lemon-flavoured drink sold by NorthCool Beverages across all six states.