Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
12 views22 pages

Mscds2020 Solutions

Uploaded by

Robin Perkins
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views22 pages

Mscds2020 Solutions

Uploaded by

Robin Perkins
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

CHENNAI MATHEMATICAL INSTITUTE

M.Sc. Data Science Entrance Examination 2020 - Solutions

Part A - Answers

A1. (d) A11. (b)

A2. (a), (b) and (d) A12. (d)

A3. (a) A13. (c)

A4. All. A14. (b)

A5. (c) A15. (b)

A6. (a) and (c) A16. (a), (b) and (c).

A7. (d) A17. (d)

A8. (a), (b) and (d) A18. (a)

A9. (b) and (d) A19. (b) and (d)

A10. (b), (c) and (d) A20. (a) and (c)


Notation
• A function f from a set A to a set B is said to be injective (or one-to-one) if f (x) = f (y)
implies x = y for all x, y ∈ A;

• f is said to be surjective (or onto) if for every y ∈ B there exists x ∈ A such that f (x) = y;

• f is said to be bijective if it is both injective and surjective;

• f is said to be invertible if there exists a function g from B to A such that f (g(y)) = y for all
y ∈ B and g(f (x)) = x for all x ∈ A and then g is said to be inverse of f and is denoted by f −1 .

• For a matrix A, |A| denotes the determinant of A and AT denotes the transpose of A.

• For a set X, X c denotes the complement of X.

Part A - Solutions

This section consists of some questions requiring a single answer and some multiple choice
questions. For questions that ask you to calculate a value, you will be assessed based on the
answer you provide. No explanation is required. In multiple choice questions, there may be
multiple correct choices. You have to select all the correct options and no incorrect option to get
full marks. There is no partial credit. Write the correct options / answer in the space provided
on page 1. Only page 1 will be seen for grading part A.

1. Consider the following program. Assume that x and y are integers.

f(x, y)
{
if (y != 0)
return (x * f(x, y-1));
else
return 1;
}

What is f(6,3)?

(a) 243
(b) 729
(c) 125
(d) 216

Solution: (d) is correct. This code computes xy . f(6,3) will compute 63 which is 216.

2. Consider the matrices

2
   
0 0 0 0 15 5 4 3 2 1

 0 0 0 13 14 

 9 8 7 6 0 

A=
 0 0 10 11 12 
 and B=
 12 11 10 0 0 .

 0 6 7 8 9   14 13 0 0 0 
1 2 3 4 5 15 0 0 0 0

Which of the following hold true?

(a) |A| = |B|


(b) trace(A) = trace(B)
(c) |A| = −|B|
(d) trace(AB) = trace(BA)
 
1 2 3 4 5

 0 6 7 8 9 

Solution: (a), (b) and (d) are true. The given matrices are obtained from 
 0 0 10 11 12 

 0 0 0 13 14 
0 0 0 0 15
by 10 row and 10 column exchanges respectively.

3. Consider the following program. Assume that all variables are integers. Note that x%y computes
the remainder after dividing x by y. The division is an integer division. For example, 1/3 will
return zero while 10/3 will return 3.

g(n)
{
result = 0;
i = 1;

repeat until (n == 0)
{
remainder = n%2;
n = n / 2;
result = result + (remainder * i);
i = i * 10;
}

return result;
}

What is g(25)?

(a) 11001
(b) 10011
(c) 11011
(d) 10101

3
Solution: (a) is correct. This code converts any given integer to its binary repre-
sentation.25 is 11001 in binary.
Note: This question had a minor typographical error in the actual exam paper. This has been
taken into account when evaluating the question.

4. Which of the following limits are correct?


x2 + 2x
(a) lim =1
x→0 2x
2x2 + x − 1 3
(b) lim =
x→1/2 2x − 1 2
(c) lim 18x3 − 12x2 + 1 = ∞
x→∞
(d) lim 18x3 − 12x2 + 1 = −∞
x→−∞

Solution: All are correct.


x2 + 2x x+2 x2 + 2x 2
(a) = so lim = = 1;
2x 2 x→0 2x 2
2x2 + x − 1 (2x − 1)(x + 1) 2x2 + x − 1 1 3
(b) = = x + 1, so lim = +1= ;
2x − 1 2x − 1 x→1/2 2x − 1 2 2
3 2 3 12 1
(c) lim 18x − 12x + 1 = lim x (18 − + 3 ) = ∞;
x→∞ x→∞ x x
3 2 3 12 1
(d) lim 18x − 12x + 1 = lim x (18 − + 3 ) = −∞
x→−∞ x→−∞ x x

5. As per the data released by the US Department of Health, Education and Welfare, the number
of Ph.D. degrees conferred in Earth Sciences from the year 1948 to 1954 is as given in Table 5.

Year Degrees
1948 57
1949 88
1950 125
1951 135
1952 126
1953 146
1954 141

Based on the average of all available three year moving averages of annual growth rate, and the
number of degrees in 1954, what will be the (approximate) predicted number of degrees in earth
sciences in 2020? Note that a moving average or a rolling average is an average of a subset of
data points. Choose the best answer.

(a) 900
(b) 9,000
(c) 9,00,000
(d) 90,00,000

4
Solution: (c) is correct. First, we compute the Annual Growth Rate (AGR). Then,
we could compute the three year moving averages of AGR. Our calculations should
result in the moving averages as shown in Table 1. Note that the moving averages
average to 14.23. Starting with 141 in 1954, at a growth rate of 14.23%, we will
have 141 * (1 + 14.23/100)6 6 = 9,19,412.8. However, you may approximate to save
some time. For instance, the rule of 72 suggests that at a rate of 14%, the number
of Ph.D.s will double in approximately (72/14) 5 years. Therefore we have (1954)
150, (1959) 300, (1964) 600... and so on till (2019) 12,28,000. Hence, 9 Lakhs is the
closest answer.
Year Ph.D.s Annual Growth Rate Moving Avg
1948 57
1949 88 54.39
1950 125 42.05
1951 135 8 34.81
1952 126 -6.67 14.46
1953 146 15.87 5.74
1954 141 -3.42 1.93
Avg 14.23

Table 1: Solution table for Ph.D. degrees earned in Earth Sciences

6. Suppose that A is an n×n matrix with n = 10 and b is an n×1 vector. Suppose that the equation
Ax = b for an n × 1 vector does not admit any solution. Which of the following conclusions can
be drawn from the given information?

(a) A−1 does not exist.


(b) The equation AT x = b also does not admit any solution.
(c) |A| = 0.
(d) Suppose c is another n × 1 vector such that Ax = c also does not admit a solution. Then
the vector c is a constant multiple of the vector b.

Solution: All we can conclude is that (a) and (c) are true, for otherwise Ax = b has
solution for all b. That (b) is false can be seen by taking A = (aij ) with a11 = a21 = 1,
a12 = a22 = 2 and the rest of the entries as 0; b = (bi ) with b1 = 3 and b2 = 6 and the
rest of bj ’s to be 0. Now Ax = b does not admit a solution, but x1 = 1 and x2 = 2
and rest of the xj ’s equal to 0 is a solution to AT x = b. In the same example, taking
c1 = 5 and c2 = 6 and rest of the entries as 0, we see that Ax = c also does not admit
a solution but b and c are linearly independent.

7. Consider the following bar chart:


Which of the following are true?

(a) Number of students who scored A grade in Algebra is higher than the number of students
who scored A grade in Calculus.
(b) Percentage of students who scored A or B in algebra is lower than the percentage of students
who scored A or B in calculus.

5
(c) Calculus is easier than algebra.
(d) Average percentage of students scoring A grade considering this data, is 12%.

Solution: (d) is correct. We do not have the total number of students enrolled in
Algebra and Calculus. Hence, we cannot conclude that A graders count in Algebra
is higher. 54% students scored A or B in Algebra. Only 40% scored A or B in
Calculus. Hence the second option is also false. Nothing in the question tells that
calculus is easier than algebra. In fact, the calculus distribution has a heavier tail.
Moreover, the data distribution does not mention that the same students over the
same semester took both classes. Hence, it would be inappropriate to compare the
difficulty of these courses. The final option is indeed true. The average percent of
students is (16 + 8)/2 = 12.

8. Let A = ((aij )) be a 7 × 7 matrix with ai,i+1 = 1 for 1 ≤ i ≤ 6, a7,1 = 1 and all the other elements
of the matrix are zero. Which of the following statements are true?

(a) |A| = 1
(b) trace(A) = 0
(c) A−1 = A
(d) A7 = I, where I is the identity matrix

Solution: (a), (b) and (d) are true.


 
0 1 0 0 0 0 0
0 0 1 0 0 0 0
 
0 0 0 1 0 0 0
 
0
A= 0 0 0 1 0 0
0 0 0 0 0 1 0
 
0 0 0 0 0 0 1
1 0 0 0 0 0 0
This is a permutation matrix, 6 interchanges of columns, 1st and 2nd, then 2nd
and 3rd,... finally 6th and 7th will take this to identity matrix, so determinant is 1.
Trace is sum of diagonal elements, which is 0. A7 is identity and A−1 = A6 which is
not equal to A.

6
9. Let A and B be events such that P (A) = 0.4, P (B) = 0.5 and P (A ∪ B) = 0.7. Which of the
following are true? (For sets A, B, A∆B = (Ac ∩ B) ∪ (A ∩ B c )).
(a) A and B are mutually exclusive
(b) A and B are independent
(c) P (A∆B) = 0.1
(d) P (Ac ∪ B c ) = 0.8
Solution : (b) and (d) are correct. (a) is False, for if it were true, P (A ∪ B) = P (A) +
P (B) = 0.9. (b) is true since P (A∩B) = P (A)+P (B)−P (A∪B) = 0.2 = P (A)∗P (B). Here,
P (A∆B) = P ((Ac ∩B)∪(A∩B c )) = P (Ac ∩B)+P (A∩B c )) which, by independence, equals
0.6∗0.5+0.4∗0.5 = 0.5. (d) P (Ac ∪B c ) = P (Ac )+P (B c )−P (Ac ∩B c ) = 0.6+0.5−0.6×0.5 = 0.8.

Description for the following 2 questions:


The lifespan of a battery in a car follows Gamma distribution with probability density function
β α −βx α−1
f (x) = e x , 0 < x < ∞,
Γ(α)
where α > 0 and β > 0 . The mean and variance of a Gamma distribution are E(X) = αβ and
V(X) = βα2 respectively. From historical data the mean and variance of the lifespan of a battery
are estimated as 4 years and 2 years respectively.
10. Which of the following statements are correct?
(a) α = 16 and β = 4
(b) α = 8 and β = 2
(c) E(X 2 ) = αβ ( 1+α
β )
(d) E(X 2 ) = 18
Solution: (b), (c) and (d) are correct.

α
E(X) = =4
β
and
α α 1 1
V(X) = 2
= 2 =⇒ . = 2 =⇒ 4 = 2 =⇒ β = 2
β β β β
α α
E(X) = = 4 =⇒ = 4 =⇒ α = 8
β 2
Hence (b) is correct and (a) is wrong.
Now
α α α 1+α
V(X) = E(X 2 ) − [E(X)]2 =⇒ 2
= E(X 2 ) − [ ]2 =⇒ E(X 2 ) = ( )
β β β β
Hence, (c) is correct.
8 1+8
E(X 2 ) = ( ) = 18
2 2
Hence (d) is correct.

7
11. Out of a large number of cars produced by the automaker, the percentage of batteries that will
last for more than 8 years is

(a) "Z #
8
β α −βx α−1
e x dx × 100%.
0 Γ(α)

(b) " #
8
β α −βx α−1
Z
1− e x dx × 100%.
0 Γ(α)

(c) "Z #

xβ α −βx α−1
e x dx × 100%.
8 Γ(α)

(d) "Z #
8
xβ α −βx α−1
e x dx × 100%.
0 Γ(α)

Solution: (b) is correct.


Let X is the life-span of the battery. The percentage of batteries that will last for more than 8
years is

P(X > 8) × 100%


Z ∞
f (x)dx × 100%
8
Z 8
1− f (x)dx × 100%
0

(c) and (d) are not correct, because it is working on


Z
xf (x)dx,

which is not correct to calculate the probability.

12. How many squares are there on a 7 x 7 chessboard?

(a) 49
(b) 204
(c) 203
(d) 140

Solution: (d) is correct. There exist 49


P1x1 squares, 36 2x2 squares and P so on till
7 2 = 1 + 22 + ... + 72 = 140. ( n 2
1 7x7 square. Therefore the total is k=1 k k=1 k =
n(n+1)(2n+1)
6 ).

8
13. It is mid-semester exam week at CMI and first-year students from both M.Sc. Data Science
(DS) and M.Sc. Computer Science (CS) have their exams scheduled for Monday from 10:00am
to 1:00pm in Lecture Hall 1. The first row in Lecture Hall 1 has six seats. In how many different
ways can three M.Sc. DS students—Anish, Binish and Finish—and three M.Sc. CS students—
Ramesh, Suresh, and Ragesh—be seated in this row, in such a way that two students from the
same course do not sit next to each other?
(a) 36
(b) 48
(c) 72
(d) 96
Solution: (c) is correct. Suppose the first seat is occupied by a CS student. Then
there are three choices for who this student could be. The second seat must be
occupied by a DS student, and there are three choices for this. The third seat must
be occupied by a CS student, and there are two choices for this. The fourth seat
must be occupied by a DS student, and there are two choices for this. The last two
occupants are fixed, so there is one choice for these. In total there are 3 * 3 * 2 *
2 = 36 ways of seating the students if the first seat is occupied by a CS student.
Symmetrically, there are 36 (other) ways of seating the students if the first seat is
occupied by a DS student. In total, there are 72 ways of seating these students.
14. Suppose you roll two six-sided fair dice with faces numbered from 1 to 6 and take the sum of the
two numbers that turn up. What is the probability that:
• the sum is 12;
• the sum is 12, given that the sum is even;
• the sum is 12, given that the sum is an even number greater than 4?
1 1 1
(a) 36 , 18 , and 12 , respectively
1 1 1
(b) 36 , 18 , and 14 , respectively
1 1 1
(c) 36 , 16 , and 14 , respectively
1 1 1
(d) 36 , 16 , and 12 , respectively

Solution: (b) is correct.

(a) There are 36 outcomes (the first die can turn up anything from 1 to 6, and so
can the second die) of which exactly one sums up to 12. So the first probability
is 1/36.
(b) (This requires writing out the outcomes which add up to an even number.)
There are 18 outcomes which sum up to an even number (For any number that
turns up on the first die, three numbers on the second die give an even sum.),
of which exactly one sums up to 12. So the probability is 1/18.
(c) (The list of outcomes from part 2 comes in handy here.) There are 14 outcomes
which sum up to an even number larger than 4 (One outcome if the first die
turns up 1, two outcomes each if the first die turns up 2 or 3, and three outcomes
each if the first die turns up 4, 5, or 6.), of which exactly one sums up to 12.
So the probability is 1/14.

9
15. Let f (x) be a real-valued function all of whose derivatives exist. Recall that a point x0 in the
domain is called an inflection point of f (x) if the second derivative f 00 (x) changes sign at x0 .
x5 x4
Given the function f (x) = − + 3x + 1, which of the following statements are true?
20 2
(a) x0 = 0 is not an inflection point.
(b) x0 = 6 is the only inflection point.
(c) x0 = 0 and x0 = 6, both are inflection points.
(d) The function does not have an inflection point.

Solution: (b) is correct. The point of this question is to check if the concept of
inflection point is understood; the given function will have one inflection point, but
also points where second derivative is zero but is not an inflection point. Here
4
f 0 (x) = x4 − 2x3 + 3 and f 00 (x) = x2 (x − 6), so f 00 (x) vanishes at 0 and 6; but only 6 is an
000 000
inflection point since f (0) = 0 while f (6) 6= 0.

16. Which of the following are true?


2019 2020
(a) <
2020 2021
1
(b) x + ≥ 2 for all x > 0
x
(c) 260 > 524
(d) 2314 < 3142

Solution: (a), (b), (c) are correct.


(a) 2019 × 2021 = 20202 − 1 < 20202
(b) Since (x − 1)2 ≥ 0.
(c) 260 = (25 )12 = 3212 > 2512 = (52 )12 = 524 .
(d) 2314 = 2210+104 = (25 )42 × 2104 = (32)42 × 2104 > 3142 .
Note: This question had a minor typographical error in the actual exam paper. The correction
has been taken into account for evaluating the question.

17. The identity



1 X
= (2r)k
(1 − 2r)
k=0
is true
1
(a) if and only if r 6= 2
1
(b) if and only if 0 ≤ r < 2
(c) if and only if − 21 ≤ r < 1
2
(d) if and only if − 21 < r < 1
2

Solution: (d) is correct. If |r| ≥ 21 then the series on the right does not converge as
the nth term does not go to 0, while if |r| < 12 , this is a geometric series and the sum
is given by the LHS.

18. The sum and product of the roots of the polynomial 9x2 + 171x − 81 are, respectively:

10
(a) −19 and −9
(b) 19 and 9
(c) −9 and 19
(d) 9 and −19

Solution: (a) is correct.


The sum and product of roots of a quadratic polynomial ax2 + bx + c = 0 are given
by −b/a and c/a respectively. In the given example, a = 9, b = 171, c = −81, so sum of
roots equals −171/9 = −19 and product of roots equals −81/9 = −9.

Note: This question had a minor typographical error in the actual exam paper. This has been
taken into account when evaluating the question.

19. Choose the conclusions that follow logically from the statements given below.

i Nobody who really appreciates A.R.Rahman fails to subscribe to his YouTube channel.
ii Owls are hopelessly ignorant of music.
iii No one who is hopelessly ignorant of music ever subscribes to A.R.Rahman’s YouTube
channel.

(a) Anyone who subscribes to A.R.Rahman’s YouTube channel is hopelessly ignorant of music.
(b) Owls don’t really appreciate A.R.Rahman.
(c) Owls are not really appreciated by A.R.Rahman.
(d) Anyone who really appreciates A.R.Rahman is not hopelessly ignorant of music.

Solution: (b) and (d) are correct.


(This is a rewording of one of Lewis Carroll’s problems.
Lets assign symbols
P: “is an owl”
Q: “is hopelessly ignorant of music”
R: “subscribes to Rahman’s YouTube channel’
S: “really appreciates Rahman”.
Then the given statements mean: S implies R, P implies Q and Q implies negation
of R. So P implies Q, Q implies negation of R and negation of R implies negation of
S. Thus we deduce: P implies negation of S, i.e. Owls don’t really appreciate A.R.
Rahman, this is (b).
Q implies negation of R and negation of R implies negation of S. So Q implies
negation of S, which means S implies negation of Q, this is part (d).

20. Which of the following inequalities are true?

(a) ex ≥ (1 + x) for x ≥ 0
(b) ex ≤ (1 + x) for x < 0
(c) ln(x) < (1 + x) for x > 0
(d) ex < x2 for all real numbers x

11
Solution: (a) and (c) are true.
There are many ways to answer this. For example, using the second derivative
test. Let f (x) = ex − 1 − x using the second derivative test we see that x = 0 is
the global minimum. Hence, f (x) ≥ 0 (in fact) for all real values of x. If one sets
g(x) = 1 + x − ln(x) then x = 1 is the global minima and g(x) ≥ 2 for x > 0. One could
also appeal to the Taylor expansion; for x ≥ 0 we have ex = 1 + x + · · · .

12
Part B

For questions in part (B), you have to write your answer with a short explanation in the space provided
below the question.
 n For numerical answers, the following forms are acceptable: fractions, decimals,
n
symbolic e.g.: r , Pr , n! etc.

1. For any string str, length(str) returns the length of the string, append(str1,str2) concate-
nates str1 with another string str2, and trim(str) removes any spaces that exist at the end of
the string str. The function reverse(str, i, j) reverses the part of the string from position
i to position j. Assume that position 0 refers to the first character in the string. What does the
following pseudo-code do?

def manipulate(string str)


{
reverse(str, 0, length(str)-1);
append(str, ‘ ’);
n = length(str);
j = 0;

for (i = 0; i < n; i=i+1) {


if (str[i] is ‘ ’) {
reverse(str, j, i-1);
j = i + 1;
}
}

trim(str);
return str;
}

Solution: This pseudo-code reverses a sentence word by word. For example, if the
input string is “I love India”, the output is “India love I”.

 
0 −1
2. Consider the matrix A = . Find An , in terms of n, for n ≥ 2.
1 0
     
2 −1 0 3 0 1 4 1 0
Solution: A = , A = , A = . So the next powers of A will
0 −1 −1 0 0 1
cycle through the above matrices. This means for n ≥ 1,
 
4n 1 0
A = , A4n+1 = A
0 1
   
4n+2 2 −1 0 4n+3 3 0 1
A =A = and A =A = .
0 −1 −1 0

13
3. The following graph shows the performance of students in an exam. The marks scored by every
student are a multiple of five. The j th -percentile u∗ for a discrete data x1 , x2 , . . . , xn is defined
as follows. Let x(1) , x(2) , . . . , x(n) be the ordering of the data in ascending order. Let t = j∗n
100 and
let k be an integer such that k ≤ t < (k + 1) and let s = t − k. Then u∗ = x(k) + s ∗ (x(k+1) − x(k) ).
Here, x(n+1) is defined to be x(n) .

Based on the information presented in the graph, answer the following questions.

(a) Compute the 10th percentile of marks.


Solution: If the student fell into the 10th percentile, there must be 10% students
scoring lesser marks. There are 66 students. So, to beat 6 students, the student
should score 50 marks.
(b) Is the median score higher than the mean score?
Solution: Median falls at 70 and mean is 70.53. So, median is not higher than
the mean.

4. In the figure shown below, the circle has diameter 5. Moreover, AB is parallel to DE. If DE = 3
and AB = 6, what is the area of triangle ABC?

Solution: The area of the triangle ABC is 24. CAB and CED are similar triangles.
Note that the triangle CED is a right triangle since the angle D spans the diameter.
The diameter CE of the circle forms the hypotenuse of the triangle CED. Therefore,
CD = 4. Since AB = 6 which is twice DE, BC scales up twice as CD as well.
Therefore, AB = 6, BC = 8 and area of triangle ABC = 12 (6)(8) = 24.

14
The following description holds for the two problems below.
A permutation σ is a bijection from the set [n] = {1, 2, . . . , n} to itself. We denote it using the
notation  
1 2 ... n
,
σ(1) σ(2) . . . σ(n)
 
1 2 3
e.g. if n = 3 then denotes the permutation defined by σ(1) = 2, σ(2) = 3 and
2 3 1
σ(3) = 1. An inversion in σ is a pair (i, j) such that i < j but σ(i) > σ(j). The sign of
a permutation σ (denoted sgn(σ)) is defined to be (−1)inv(σ) , where inv(σ) denotes the total
number of inversions in σ. In the above example, there are 2 inversions corresponding to the
pairs (1, 3) and (2, 3) so that sgn(σ) = (−1)2 = 1.
For each permutation σ, define a matrix Aσ as follows:
(
1 if σ(i) = j
Aσ (i, j) =
0 otherwise

5. Find sgn(σ), sgn(τ ), Aσ and Aτ for the following permutations:


   
1 2 3 4 5 6 1 2 3 4 5 6
σ= , τ= .
2 3 4 5 1 6 4 1 3 2 6 5
Solution:
• sgn(σ) = (−1)inv(σ) = (−1)4 = 1,
• sgn(τ ) = (−1)inv(τ ) − (−1)5 = −1,
 
0 1 0 0 0 0
 0 0 1 0 0 0 
 
 0 0 0 1 0 0 
• Aσ =  
 0 0 0 0 1 0 

 1 0 0 0 0 0 
0 0 0 0 0 1
 
0 0 0 1 0 0
 1 0 0 0 0 0 
 
 0 0 1 0 0 0 
• Aτ =  
 0 1 0 0 0 0 

 0 0 0 0 0 1 
0 0 0 0 1 0

6. What are the determinants |Aσ | and |Aτ |? Can you relate these with the signs of permutations
σ and τ ?
Solution: |Aσ | = 1 and |Aτ | = −1. These can be found by observing that the matrices
are obtained from the 6 × 6 identity matrix by row/column exchanges. Aσ requires
even number of row exchanges, while Aτ requires odd number of row exchanges.
In general, for any permutation σ,
sgn(σ) = |Aσ |.

15
7. The case fatality rate (CFR) of a disease is the ratio of the number of deaths from the disease
to the total number of people diagnosed with the disease (“patients”), and is usually expressed
as a percentage. It has been reported that the CFR of Pandemic-20 among elderly people in
Gondwanaland is 20%. One way of treating a Pandemic-20 patient involves putting the patient
on a ventilator. It has been observed that in Gondwanaland, 60% of the elderly Pandemic-20
patients who survived the disease had been put on a ventilator, and 10% of the elderly Pandemic-
20 patients who died from the disease had been put on a ventilator. What is the probability
that an elderly Pandemic-20 patient in Gondwanaland survives the disease if they were put on a
ventilator as part of the treatment? Solution: Apply Bayes’ formula. Here

• Let A be the event that an elderly Pandemic-20 patient in Gondwanaland sur-


vives the disease;
• Let A0 denote the complement of A; namely, the event that an elderly Pandemic-
20 patient in Gondwanaland dies from the disease;
• Let B be the event that an elderly Pandemic-20 patient in Gondwanaland was
put on a ventilator as part of the treatment.

We have been told that

• P (A) = 0.80
• P (A0 ) = 0.20
• P (B | A) = 0.6
• P (B | A0 ) = 0.1

And we want to find P (A | B). Observe that P (B) = P (B | A) · P (A) + P (B | A0 ) · P (A0 ) =


0.6 · 0.8 + 0.1 · 0.2 = 0.50. Applying Bayes’ formula we get that P (A | B) = 0.6·0.8
0.5 = 0.96.

8. Owing to a defect in a certain machine which makes N95 masks, there is a 0.1% probability that
a mask it makes is not effective in preventing airborne viruses from being inhaled.
(a) What is the probability that the first 1000 masks that the machine produces are effective?
(You may leave your solutions as arithmetic expressions; there is no need to compute their
decimal representations.)
Solution: 0.9991000 . The probability that any one mask is not effective is 0.001.
The probability that any one mask is effective is thus 1 − 0.001 = 0.999. The
probability that the first 1000 (in fact, any 1000) masks are all effective is
0.9991000 .
(b) What is the probability that among the first one crore (107 ) masks that the machine pro-
7
duces, there is at least one mask which is not effective? Solution: 1 − (0.99910 ). By a
similar argument as for part (a), the probability that the first (or any set of ) 107
7
masks are all effective is 0.99910 . So the probability that at least one of these
7
masks is not effective is 1 − (0.99910 ).

9. The International Chess Federation is organizing an online chess tournament in which 20 of the
world’s top players will take part. Each player will play exactly one game against each other

16
player. The tournament is spread over three weeks; it starts at 9 a.m. on the Monday of Week 1
and ends at 6 p.m. on the Friday of Week 3. Note that before 9 a.m. on the Monday of Week 1
every player would have completed the same number of games in the tournament; namely, zero.
Also, after 6 p.m. on Friday in Week 3, every player would have completed the same number of
games in the tournament, namely, nineteen.
Prove that at any point in time between 9 a.m. on the Monday of Week 1 and 6 p.m. on the
Friday of Week 3, there are at least two players who would have completed the same number of
games in the tournament till that point.
Solution: At any point in time, the possible values for the number of games com-
pleted by any one player are {0, 1, 2, . . . , 19}. Pick an arbitrary point t in time. If a
player P1 has completed 19 games at time t, then the number of games completed
by any other player (say P2 ) at time t cannot be 0. This is because P1 must have
completed one game with P2 by time t, in order to have completed 19 games in total.
So both 0 and 19 cannot appear together in the list of actual values for the number
of games completed by all the players at time t.
Thus the count of players is 20, and the count of possible values for the number
of games completed by all the players at time t is at most 19. It follows from the
Pigeonhole Principle that there are at least two players who would have completed
the same number of games in the tournament till time t.

10. Your class has a textbook and a final exam. Let P, Q and R be the following propositions:

• P : You get an A on the final exam.


• Q: You do every exercise in the book.
• R: You get an A in the class.

Translate the following assertions into propositional formulas using P, Q, R and the propositional
connectives ∧ (and ), ∨ (or ), ¬ (not) and ⇒ (implies).

(a) To get an A in the class, it is necessary for you to get an A on the final.
(b) You get an A on the final, but you don’t do every exercise in this book; nevertheless, you
get an A in this class.

Solution:

(a) R ⇒ P (R implies P ), or equivalently, ¬P ⇒ ¬R (not(P ) implies not(R))


(b) P ∧ (¬Q) ∧ R (P and not(Q) and R)

17
11. Two friends Amar and Prem wish to meet at a theme party between 5 p.m. and 6 p.m. (They
are said to meet if they are in the room at the same time or if one of them leaves as the other
enters.) Once they enter, they stay for exactly 20 minutes.

(a) Fill in the blanks:


i. The latest time by which any one of them can enter is ;
ii. If Amar and Prem are to meet, then their entry times can be separated by at most an
interval of minutes.
(b) What is the probability that Amar and Prem will meet? (Hint: Plot the arrival times on
the x- and y-axes.)

Solution:

(a) i. The latest time by which any one of them can enter is 5 : 40 p.m. ;
ii. If Amar and Prem are to meet, then their entry times can be separated by
at most an interval of 20 minutes.
(b) The sample space is the area of the square, each side of which represents 40
minutes. The event space is represented by the polygon in the square:
5:40 p.m.

5:20 p.m.

5 p.m. 5:20 p.m. 5:40 p.m.

So the probability that the two will meet is the ratio of the two areas, which
equals: 34 or 0.75. (Assuming that each side is 2 units, the area of the square is
4 units and the area of the polygon inside it is [4 − (area of the two triangles)] =
[4 − 1] = 3 units.)

12. Let f be a continuous function on the closed interval [a, b] and differentiable on the open interval
(a, b), where a < b. It is known that there exists c in (a, b) such that

f (b) − f (a)
f 0 (c) = .
b−a

Determine c for f (x) = 2x3 − 3x2 + 7x − 2 on [a, b] with a = 1 and b = 6.


Solution: f (1) = 4, f (6) = 364 and f 0 (c) = 6c2 − 6c + 7. Then
364 − 4 360
6c2 − 6c + 7 = = = 72
6−1 5
6c2 − 6c − 65 = 0

18
p √
6± 36 − 4.6.(−65) 6 ± 1596 6 ± 39.95
c= = = = 3.82 and − 2.83
2.6 12 12
So the final solution is √
6 + 1596
c= = 3.82
12

13. Let R be the set of all binary relations on the set {1, 2, 3}. Suppose a relation is chosen from R
at random. What is the probability that the chosen relation is symmetric?
n(n+1)
Solution: Number of symmetric binary relations on a set of size n is 2 2 . Total
number of binary relations are the relations that can be formed from the nine
elements of the set, {(1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3)} which is 29 .
6
Therefore, the answer is 229 = 1/8.

14. Peppa and her friends Suzy and Emily are making 3 masks: a knight mask, a pirate mask and
an elf mask. The one wearing the knight mask must always tell the truth, the one wearing the
pirate mask must always lie and the one wearing the elf mask could sometimes lie and sometimes
tell the truth. After making three masks, one of each kind, they all wear one each and make the
following statements:

Peppa : I am a wearing an elf mask.


Suzy : That is true.
Emily : I am not wearing an elf mask.

What kind of mask is each one wearing?


Solution: Peppa cannot have a knight mask, else her statement would be a lie which
is a contradiction.
Peppa cannot be wearing an elf mask, for if that were true, then Suzy would be
lying - hence Suzy would have a knight mask which means Emily would have the
pirate mask, a contradiction since then her statement would have to be a lie so
Emily would have to be a wearing an elf mask.
Thus, Peppa has to be wearing a pirate mask, which means Suzy is wearing an elf
mask and Emily is wearing a knight mask.

15. For the function f (x) = ln(x)/x, show that the maximum value of y occurs when x = e. Use
this to show that xe < ex for all positive values of x.
Solution: f 0 (x) = 1−ln
x2
x
. Equating f 0 (x) to zero gives ln x = 1 which is true iff x = e.
Further this implies that for all x > 0, lnxx < f (e), i.e. lnxx < lnee i.e. e ln x < x i.e
ln(xe ) < ln(ex ). Since ln is an injective function, this implies xe < ex for x > 0.

16. Given the set of letters {a,b,c,d,e,f,g,h,i,j,k,l,m}, we can list out all permutations of
these letters in lexicographic (dictionary) order. The first three permutations in this list are

19
abcdefghijklm, abcdefghijkml and abcdefghijlkm and the last one is mlkjihgfedcba. What
permutations would appear immediately before and after the following one in this lexicographi-
cally ordered list of permutations?

bcjameflkihgd

Solution: Previous permutation: bcjameflkihdg Next permutation: bcjamegdfhikl Explana-


tion: The lexicographically smallest permutation of any subset of letters is in ascending order
and the lexicographically largest is in descending order. To get the next permutation, we should
disturb as small a suffix as possible. Look for a maximal suffix in descending order that cannot
be incremented, in this case lkihgd. There is no further permutation whose suffix starts with f,
so increment f to g and reorder the remaining letters in ascending order to get the next suffix
gdfhikl. Reverse this reasoning to get the previous permutation.

17. Consider the following code, where A is an array of integers of size size(A) with values A[0] to
A[size(A)-1], and reverse(A,i,j) reverses the segment A[i] to A[j] if i <= j and has no
effect otherwise. For instance, if A = [0,1,2,3,4,5], then reverse(A,2,4) would modify A to
[0,1,4,3,2,5].

def mystery(A){
for j in [0,1,..,size(A)-1] {
p = j;
for i in [j,j+1,..,size(A)-1] {
if A[i] > A[p] {
p = i;
}
reverse(A,j,p);
}
}
}

(a) What is the effect of this code on an input array A?


Solution: The contents of the array are sorted in descending order. This is
called “pancake sort”. Each iteration of the loop finds the position p of the
largest element from A[j] to the end of the array and flips the segment from
A[j] to A[p] to bring this largest element to position j.

(b) Suppose size(A) is 1000. How many times is the test How many times is the test A[i] >
A[p] executed?
Solution: 500,500 comparisons. For j ∈ {0, 1, . . . , 999}, in iteration j, there are
1000 − j comparisons made. So in all there are 1000 + · · · + 2 + 1 = (1000 × 1001)/2 =
500500 comparisons.

20
18. Eight students are to be seated around a circular table in a circular room. Two seatings are
regarded as defining the same arrangement if each student has the same student on his or her
right in both seatings: it does not matter which way they face. How many arrangements of
these 8 students are there with 2 chosen students, say student A and student B, always sitting
together?
Solution: The answer is 2 ∗ 6! = 1440. There are 6! ways to seat the remaining
students with B sitting to the left of A; similarly, there are 6! ways to seat the
remaining students with B sitting to the right of A.

19. Let f be a continuous bijection from closed unit interval [0, 1] onto itself. (Recall: intermediate
value theorem: Let f be a real valued continuous function on an interval [a, b]. Let c, d ∈ [a, b] be
such that f (c) < f (d) and α ∈ (f (c), f (d)) is an intermediate value. Then there exists y ∈ [a, b]
such that f (y) = α.)

(i) Show that f (0) equals 0 or 1.


Solution: (i) If f (0) = a ∈ (0, 1), pick b, c ∈ [0, 1] such that b < a < c. Let x, y ∈ [0, 1]
be such that f (x) = b and f (y) = c. Since b 6= c, we conclude x 6= y. Since f is
continuous, intermediate value theorem will yield existence of z in the interval
(x, y) (if x < y) or (y, x) such that f (z) = a. Since z 6= 0, this contradicts the
assumption that f is a bijection.

(ii) Show that f (1) equals 0 or 1.


Solution: (ii) follows similarly.

(iii) Show that f admits a fixed point.


Solution:(iii) if f (0) = 0 then nothing to prove. If f (0) = 1, we can conclude
that f (1) = 0. Now take g(x) = f (x) − x. This is a continuous function such that
g(0) = 1 and g(1) = −1 and hence intermediate value theorem will yield z such
that g(z) = 0- a fixed point of f .

(iv) Give an example of such a function wherein the fixed point is unique and an example of a
function with more than one fixed point.
Solution: An example: f (x) = 1 − x has unique fixed point x = 0.5. f (x) = x has
uncountably many fixed points!.

21
20. A multi-national conglomerate sells soap products for five different market segments, namely (i)
Women, (ii) Men, (iii) Kids, (iv) Sports, and (v) Luxury. The sales of these five segments (in
lakh number of packs) during 2012 and 2017 are shown in the following figure.

(a) By what percentage were the sales of the Women segment in 2017 more than the sales of
the Men segment in 2017?
Solution: Required percentage = 48−38 38 × 100 ≈ 26.32%

(b) During the period 2012-2017, which segment experienced the minimum rate of increase in
sales?
Solution:

• Rate of increase in women’s segment = 48−2020 × 100 ≈ 140% ;
38−6
• Rate of increase in men’s segment = 6 × 100 ≈ 533.33%,
• Rate of increase in kid’s segment = 29−15
15 × 100 ≈ 93.33%,
• Rate of increase in sports segment = 12−8
8 × 100 ≈ 50%,
10−5
• Rate of increase in luxury segment = 5 × 100 ≈ 100%.
So correct answer is sports.

22

You might also like