Uploaded by Sasha Z

January answers

advertisement
Mathematics A
Exam
7th January 2022
1. (a) Let U = {1, 2, 3, 4, 5, 6, 7} be a universe. Consider its subsets
A = {1, 2, 5, 6} and B = {2, 4, 6, 7}.
Form the sets A ∪ B, A ∩ B, A \ B and B c .
The sets are:
A ∪ B = {1, 2, 4, 5, 6, 7},
A ∩ B = {2, 6},
(2p)
A \ B = {1, 5},
B c = {1, 3, 5}.
(b) Find a function f : N → N such that f is an injection, but not a surjection. Give a
brief explanation.
(3p)
The question is to find a function f : N → N, which means that f is uniquely defined
for every element in N = {0, 1, 2, 3, . . .}. In addition, f has to be an injection, which
means that each element of N has a different image. Thirdly, f should not be surjective,
which means that there is an element in N which is not an image of any element. Now, for
instance, f (n) = 2n is such a function. It is defined for any element of N. If f (n) = f (m),
then 2n = 2m gives m = n, that is, f is an injection. The map is not surjection, because
odd elements are not images.
This question turned to be more difficult than I expected. Barely no one paid attention
to the requirement that f needs to be defined for every n ∈ N. Therefore, I decided to
give full points here if one managed to define a function which is an injection and not a
surjection, and present some sort of explanation why the function fulfils the requirements.
(c) Find a function g : N → N such that g is a surjection, but not an injection. Give a
brief explanation.
(3p)
For instance, this function
0
if n = 0
g(n) =
n − 1 otherwise
fullfills the requirements. It is a function on N, that is, for each n ∈ N, f (n) is uniquely
defined. It is surjective, because every element in N is an image of an element. The map
g is not an injection, because g(0) = g(1).
Again, barely no one paid attention that that g should be a function form N to N. I
gave full points here if one managed to define a function which is a surjection but not an
injection, plus some explanations.
2. (a) Show that for all integers n ≥ 2,
n
n+1
2
n =
+
.
2
2
This can be shown directly by the definition of the binomial coefficient:
(n + 1)!
n(n − 1) (n + 1)n
n
n+1
n!
+
=
+
=
+
=
2!(n − 2)! 2!(n − 1)!
2
2
2
2
=
n((n − 1) + (n + 1))
n · 2n
=
= n2 .
2
2
(4p)
Alternative way: This can be proved also by induction, but it is not the easiest way.
The Base Case: For n = 2, n2 = 4 and n2 + n+1
= 1 + 3 = 4, so the claim holds.
2
The inductive step: Suppose that the claim holds for n = k, that is
k
k+1
2
k =
+
.
2
2
Let n = k + 1. We have
k
k+1
k+1
k
(k + 1) = k + 2k + 1 =
+
+ 2k + 1 =
+
+ 2k + 1
2
2
2
2
k+1
k 2 − k + 4k + 2
k+1
k(k − 1)
=
+
+ 2k + 1 =
+
2
2
2
2
k+1
(k + 1)(k + 2)
k+1
k 2 + 3k + 2
=
+
=
+
2
2
2
2
k+1
(k + 2)!
k+1
k+2
=
+
=
+
.
2! k!
2
2
2
2
2
This means that the claim holds also for n = k + 1.
(b) How many different arrangements of the letters are in the word PEPPER? Justify
your answer.
(4p)
There are 6 letters in PEPPER. There are therefore 6! arrangements. But there are
only three different letters P, E, R, so many of the arrangements are same. The question
is how many different arrangements there are. The letters P can be ordered 3! ways all
considered the same and the letters E can be ordered 2! ways. The number of different
arrangements is
4·5·6
6!
=
= 2 · 5 · 6 = 60.
3! 2!
2
Alternative way: There
are 6 “slots” to fill with 3 P’s, 2 E’s and 1 R’. We can choose
6
the place of P’s in 3 ways, then we can choose the place for 2 E’s from remaining 3
places in 32 ways, and 1 R gets the remaining slot. The number of different arrangements
is:
6 3 1
= 20 · 3 · 1 = 60.
3 2 1
The order in which we do this “filling” does not matter. We can first choose R, then Es,
and then P’s:
6 5 3
= 6 · 10 · 1 = 60.
1 2 3
3. For each of the following statements, decide whether it is true or false. If true, give a
proof; if false, give a counterexample.
(a) If a positive integer p is prime, then so is 2p + 1.
(2p)
FALSE. The number p = 7 is prime, but 2p + 1 = 15 (= 3 · 5) is not prime.
(b) If a positive integer n has remainder 1 when divided by 3, then n3 has also remainder
1 when divided by 3.
(3p)
TRUE. Suppose that n has the remainder 1 when divided by 3. This means that n =
3k + 1 for some k ∈ Z. Now
n3 = (3k + 1)3 = 27k 3 + 27k 2 + 9k + 1 = 3(9k 3 + 9k 2 + 3k)) + 1.
Because 9k 3 + 9k 2 + 3k is an integer, this means that n3 has the remainder 1 when divided
by 3.
(c) Let m be an odd integer and n an even integer. The number m2 + n2 is never even.
(3p)
2
2
Let m = 2k + 1 and n = 2l for some integers k and l. Then m = 4k + 4k + 1 and
n2 = 4l2 . Now
m2 + n2 = 4k 2 + 4k + 4l + 1 = 2(2k 2 + 2k + 2l) + 1.
is an odd integer. This means that m2 + n2 is not even.
4. (a) Use Euclidean algorithm to find the greatest common divisor of 270 and 192. (4p)
The computations goes like this:
270 = 192 + 78
192 = 2 · 78 + 36
78 = 2 · 36 + 6
36 = 6 · 6 + 0
Because the remainder is zero in the last line, gcd(270, 192) = 6 which is the previous
remainder.
(b) Express gcd(270, 192) as a linear combination of 270 and 192.
By “reversing” the computation of (a), we have
(4p)
6 = 78 − 2 · 36
= 78 − 2(192 − 2 · 78)
= 5 · 78 − 2 · 192
= 5 · (270 − 192) − 2 · 192
= 5 · 270 − 7 · 192
This is now the required linear combination: 5 · 270 − 7 · 192 = 6
5. (a) Let A be a square matrix. What is the definition of the inverse A−1 of A?
(2p)
For an n × n matrix A, the inverse matrix of A is an n × n matrix B that satisfies
AB = BA = In , where In is the identity matrix of size n.
(b) Let


2 2 1
A = 0 1 0 .
1 2 1
Form A−1 .
(3p)
The method for finding A−1 is first to reduce A to the identity matrix I3 . This can be
done by the following elementary operations:
(1) Subtract R3 from R1
(2) Subtract R1 from R3
(3) Subtract 2R2 from R3


2 2 1
0 1 0
1 2 1
(1)
⇒


1 0 0
0 1 0
1 2 1
(2)
⇒


1 0 0
0 1 0
0 2 1
(3)
⇒


1 0 0
0 1 0
0 0 1
Note that there are also other ways to do the reduction. When we do these same operations
in the same order to the identity matrix, we get A−1 :








1 0 0
1 0 −1
1 0 −1
1
0 −1
(1)
(2)
(3)
0 1 0 ⇒
0 1 0  ⇒
0 1 0 ⇒
0
1
0
0 0 1
0 0 1
−1 0 2
−1 −2 2
(c) Verify that your answer in (b) is correct.
(2p)
We show that the above matrix B is the identity matrix. We remember from the lectures,
that it is enough to prove AB = I3 or BA = I3 .


 

2 2 1
1
0 −1
1 0 0
0 1 0  0
1
0  = 0 1 0
1 2 1 −1 −2 2
0 0 1
For instance, the element in position (1, 1) is obtained as 2 · 1 + 2 · 0 + 1 · (−1) = 1.
Similarly, the element in position (2,3) is obtained by 0 · (−1) + 1 · 0 + 0 · 2 = 0, and so on.
Download