Midterm 2023 Algebra
Midterm 2023 Algebra
Foundational Mathematics
Answer key Midterm Exam
p q ¬q p ∧¬q q ∨p (p∧¬q) =⇒ (q ∨ p)
T T F F T T
T F T T T T
F T F F T T
F F T F F T
According to the truth table, the statement is true.
2. Set A =]−∞, −3] and B =]−5, 5]∪{6, −2}. Give A∩B, without justification. (1 mark)
A ∩ B =] − 3, 5] ∪ {6}
1
4. Let R be the equivalence relation defined on the set C by
∀x, y ∈ C, xRy ⇔ x4 = y 4 .
5. A bag contains 10 red marbles, 10 white marbles, and 10 blue marbles. What is the
minimum number N of marbles you have to choose randomly from the bag to ensure
that we get 5 marbles of same color ? (1 mark)
f : N −→ Z, defined by, ∀n ∈ N,
n
if n is even
f (n) = 2
− n + 1 if n is odd
2
∀m, n ∈ N∗ , mRn ⇔ ∃k ∈ N∗ ; m = k 2 n
(a) R is reflexive. Indeed, for all n ∈ N∗ , there exists k = 1 such that n = 12 n. So nRn.
(1 mark)
(b) R is transitive.
Let n, m, r ∈ N∗ such that mRn and nRr.
We have
mRn ⇔ ∃k ∈ N∗ ; m = k 2 n
and
nRr ⇔ ∃k ′ ∈ N∗ ; n = k ′2 r.
Therefore m = (kk ′ )2 r = k ′′ r, where k ′′ = kk ′ ∈ N∗ , that is mRr. (1 mark)
(c) R is antisymmetric.
Let n, m ∈ N∗ such that mRn and nRm.
We have
mRn ⇔ ∃k ∈ N∗ ; m = k 2 n
and
nRm ⇔ ∃k ′ ∈ N∗ ; n = k ′2 m.
This implies that m = (kk ′ )2 m. Then m((kk ′ )2 − 1) = 0. As m ̸= 0, then kk ′ = 1
since kk ′ ∈ N∗ and this gives k = k ′ = 1 since k, k ′ ∈ N∗ . Therefore m = n. (1
mark)
2
2. Is it a total order ? (1 mark)
Assume for a contradiction that A is upper bounded, then there exists M ∈ N∗ such
that for all x ∈ A, xRM. In particular, we get 4RM and 8RM . This gives 4 = k 2 M and
k′ k′
8 = k ′2 M with k, k ′ ∈ N∗ and then ( )2 = 2 which is impossible since is rational. It
k k
follows that A is not upper bounded.
f (X) = (X ∩ A, X ∩ B).
1. Show that
f is injective ⇐⇒ A ∪ B = E
Suppose f injective.
We have f (A ∪ B) = ((A ∪ B) ∩ A, (A ∪ B) ∩ B) = (A, B) and
f (E) = (E ∩ A, E ∩ B) = (A, B). As f (A ∪ B) = f (E) and f is injective then A ∪ B = E.
(1 mark)
Now, assume that A ∪ B = E and let X1 , X2 ∈ P(E) such that f (X1 ) = f (X2 ). Then
we have
X1 ∩ A = X2 ∩ A and X1 ∩ B = X2 ∩ B.
X1 = X1 ∩ E
= X1 ∩ (A ∪ B)
= (X1 ∩ A) ∪ (X1 ∩ B)
= (X2 ∩ A) ∪ (X2 ∩ B)
= X2 ∩ (A ∪ B)
= X2 ∩ E = X2 .
A ∩ B = (X ∩ A) ∩ B = A ∩ (X ∩ B) = ∅.(1 mark)
3
Now, suppose that A ∩ B = ∅ and let (Y1 , Y2 ) ∈ P(A) × P(B). Set X = Y1 ∪ Y2 ∈ P(E).
Since A ∩ Y2 ⊆ A ∩ B and Y1 ∩ B ⊆ A ∩ B, then A ∩ Y2 = ∅ and Y1 ∩ B = ∅. We have