M1W1T4 Pas 1.3
M1W1T4 Pas 1.3
M1W1T4 Pas 1.3
Graded
Practice Assignment
Assignment Solution
Mathematics for Data Science - 1
1. (2 points) Devendra has three sons (Jatin, Rabi, and Hem). Rabi has one son
named Rathi. Hem has two sons (Avi and Manish). This family tree has been
shown in the figure below.
Let us define a relation R as follows,
• R := {(A, B)|A and B are first cousins, i.e. their parents are siblings}.
Devendra
2. (2 points) If A and B are two sets, U is the universal set, φ is an empty set and
((A ∩ U ) ∪ (B ∪ φ)) = ((A ∩ φ) ∪ A) ∩ (B ∩ B) then which of the following is(are)
true?
Either A or B is an empty set.
√
A = B.
√
A is a subset of B and B is a subset of A.
B is proper subset of A.
Solution:
From left hand side, we get
((A ∩ U ) ∪ (B ∪ φ))
= ((A ∪ (B ∪ φ)) [as the interesection of the universal set U and A, denoted by
A ∩ U = A]
Again, union of B and the empty set φ will be the set B only, i.e., (B ∪ φ) = B
Therefore, (A ∪ (B ∪ φ)) = (A ∪ B).
Now, from right hand side, we get,
((A ∩ φ) ∪ A) ∩ (B ∩ B) = (φ ∪ A) ∩ (B ∩ B) [as the intersection of the set A and
the empty set φ is, the empty set φ only, i.e. φ ∩ A=φ]
Now, the union of these two sets will be φ ∪ A = A and the intersection of two
sets B ∩ B = B
Therefore,
(φ ∪ A) ∩ (B ∩ B) = (A ∩ B).
Hence, from LHS and RHS we get,
A∪B =A∩B
This means, either A = B or A is a subset of B and B is a subset of A.
Hence, second and third options will be correct. As we have obtained A = B so
in some cases, A and B can not be empty sets, hence option 1 is incorrect.
As A = B, therefore A ⊆ B (A is a subset of B) or B ⊆ A. For B to be a
proper subset of A, i.e. B ⊂ A, the set B is to be properly contained in the set
A, hence option 4 is not correct.
Page 2
Read the text below for answering Q3 and Q4
Let a relation R be defined as R = {(A, B) | A is an ancestor of B}.
5. (2 points) Let X be the set of all natural numbers divisible by 5, Y be the set
of all natural numbers divisible by 10, and Z be the set of all natural numbers
that are not perfect squares. Let A, B, C, D, E, F, G be the regions marked in
the following Venn diagram. For example, A = X \ (Y ∪ Z), B = Y \ (X ∪ Z),
and C = Z \ (X ∪ Y ). (Note : A region in the Venn-diagram can be empty)
Page 3
X Y
A B
D
G
F E
C
Z
Page 4
6. (2 points) Let L denote the following list of words: Marvel, Daredevil, Natasha,
Stephen, Peter.
Let R and S be relations defined on pairs of words formed from L as given below.
• A pair of words are in R if they have at least two distinct letters in common.
• A pair of words are in S if they have at least three distinct letters in common.
For example, (Marvel, Daredevil) is both in R and S, as the letters A,R,V,E and
L are in common.
Which of the following statements are correct?
√
(Daredevil, Marvel) is in both R and S.
(Stephen, Peter) is in S but not in R.
(Daredevil, Natasha) is in S.
√
There is a pair which is neither in R nor in S.
Solution:
Let us write the words given in first option:
DAREDEVIL
MARVEL
Both words have 5 common letters - A, R, E, V, L
So both of these words will be in both the sets R and S as a pair of words are
in R if they have at least two distinct letters in common and a pair of words are
in S if they have at least three distinct letters in common.
For the second option, the words are
STEPHEN
PETER
These two words have 3 common letters- T, E and P. Hence, these two words
are included in both the sets R and S. So, option 2 is incorrect.
For option 3,
DAREDEVIL
NATASHA
only the letter ’A’ is common. Hence this pair is neither in the set S nor in the
set R.
So, option 3 is incorrect but option 4 is correct.
7. (2 points) Consider the following table of few materials and their dielectric con-
stant values.
Page 5
Material Dielectric constant
Air 1
Vacuum 1
Paper 3
Porcelain 6
Nerve membrane 7
Silicon 12
We can think of this as a function f from the set of materials to the set of
dielectric constant values consisting of the elements {1, 3, 6, 7, 12}. Now pick out
the correct statement from the following.
f is neither one to one nor onto.
f is one to one but not onto.
√
f is onto but not one to one.
f is bijective.
NOT Injective, Surjective, NOT Bijective NOT Injective, NOT Surjective, NOT Bijective
https://en.wikipedia.org/wiki/Injective_function
Solution:
An injective function ( or one-to-one function) is a function that maps distinct
elements of its domain to distinct elements of its codomain. In other words,
Page 6
every element of the function’s codomain is the image of at most one element
of its domain. If a function f is mapped from the domain X to the co-domain
Y in a manner, such that, different inputs from X to f produce different inputs
in Y , then f will be an injective function. Here both the elements ”Air” and
”Vacuum” are mapped to the same element ”1” in the set of dielectric constants.
Hence this function is not injective.
A function f from a set X to a set Y is surjective (also known as onto), if for
every element y in the codomain Y of f , there is at least one element x in the
domain X of f such that f (x) = y. For a surjective function, the range is same
as the co-domain.
In the given table, dielectric constant values of every materials is from the set
{1, 3, 6, 7, 12} and for all the elements of the set {1, 3, 6, 7, 12} there is at least
one material such that f (Material)=dielectric constant. Hence this is an onto
function.
So option 3 is correct.
A function is bijective when it is both injective and surjective function. As this
function is not injective, hence it is not a bijective function. Hence option 4 is
wrong.
8. (2 points) Suppose A = {a, b, c, d, e}. How many subsets of 2 elements are pos-
sible?
6
9
√
10
8
Solution:
The subsets containing 2 elements can be written as:
{a, b}, {a, c}, {a, d}, {a, e}
{b, c}, {b, d}, {b, e}
{c, d}, {c, e}
{d, e}
Hence 10 such subsets are possible.
Page 7
• C = {x ∈ N | x mod 5 = 0 and 1 ≤ x ≤ 11}
Diagram A Diagram B
A B A B
C C
Diagram C Diagram D
C B A
B
A C
Solution:
For two given integers a and b, b mod a = 0 means, if we divide b by a, the
remainder will be 0.
The elements of the first set A, given in the question as A = {x ∈ N | x mod 3 =
0 and 1 ≤ x ≤ 11} will be {3, 6, 9}.
The elements of the set B, given in the question as B = {x ∈ N | x mod 4 =
0 and 1 ≤ x ≤ 11} will be {4, 8}.
The elements of the set C, given in the question as C = {x ∈ N | x mod 5 =
0 and 1 ≤ x ≤ 11} will be {5, 10}.
So, none of the elements are common among the three sets A, B, C. Hence, there
is no overlapping or intersection among the regions A, B, C in the Venn diagram.
Among the given options, only option B satisfies this criteria. Therefore, option
B is the correct answer.
Page 8
10. (3 points) If X, Y and Z are 3 sets, complement of any set A is denoted as Ac
and U is the universal set then find [(X ∩ Y )c ∪ (Z c ∩ U )]c from the given Venn
diagram
X Y
(X c ∪ Y c ∪ Z)
φ
√
(X ∩ Y ∩ Z)
(X ∪ Y ∪ Z)
Solution:
(X ∩Y ) is the blue colored region in the figure below and (X ∩Y )c is the uncolored
region in the universal set in the Figure 7.
Page 9
Now (Z c ∩ U ) = Z c . Now, (X ∩ Y ))c ∪ Z c is shown as the yellow colored portion
in Figure 8. Therefore, the white colored portion in Figure 8 is ((X ∩ Y )c ∪ Z c )c .
From Figure 8 we can see that this area is (X ∩ Y ∩ Z). Hence option 3 is correct.
11. (3 points) In a class of 50 students numbered 1 to 50, all even numbered students
opt for Physics, those whose numbers are divisible by 5 opt for Chemistry and
those whose numbers are divisible by 7 opt for Mathematics. How many opt for
none of the three subjects?
19
√
17
21
11
Solution:
Students who opt for Physics will be -{2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 30,
32, 34, 36, 38, 40, 42, 44, 46, 48, 50}
Students who opt for Chemistry will be -{5, 10, 15, 20, 25, 30, 35, 40, 45, 50}
Students who opt for Mathematics will be -{7, 14, 21, 28, 35, 42, 49}
Other students have not opted for any of the three subjects. These students are-
{1, 3, 9, 11, 13, 17, 19, 23, 27, 29, 31, 33, 37, 39, 41, 43, 47}.
Number of these students or the cardinality of this set is 17. Hence option 2 is
correct.
Page 10
Read the following passage to answer Q12, Q13, Q14
In the ’Rock-Paper- Scissors’ game, there are 3 shapes- ’rock’, ’paper’ and ’scis-
sors’. The rule of the game is as follows :
Page 11