MAT102H5F
Assignment 01 - Fall 2024
Due: Friday, September 20th, 2024 at 11:59pm via Crowdmark.
Late assignments will not be accepted.
Be sure to show and explain all of your work.
Before continuing, ensure that you read the Expectations on Student Writing. Poorly written
assignments, even those whose content is ostensibly correct, will receive a poor mark or a mark
of zero. If you are uncertain as to what qualifies as good writing, do not hesitate to seek out the
advice of a course instructor or teaching assistant.
1. Given two sets A and B, define A∆B as follows:
A∆B = {x : (x ∈ A and x ∈
/ B) or (x ∈ B and x ∈
/ A)}.
(a) For generic sets A and B, draw and shade the Venn diagrams corresponding to A∆B,
A∆A, and A∆∅. Hypothesize general statements about what A∆A and A∆∅ equal,
then prove your result.
Solution: The shaded region in the Venn diagram below shows A∆B:
A∆A A∆∅
A∆B
A B
To see why A∆A = ∅, let us use the definition. We have
A∆A = {x : (x ∈ A and x ∈
/ A) or (x ∈ A and x ∈
/ A)} = {x : (x ∈ A and x ∈
/ A)}.
In words, we have that x ∈ A∆A if and only if x ∈ A and x ∈ / A. But then there does
not exist such an x given that P ∧ ¬P is always false for any statement P .
To show that A∆∅ = A we begin with the definition again. We have
A∆∅ = {x : (x ∈ A and x ∈
/ ∅) or (x ∈ ∅ and x ∈
/ A)}.
The statement (x ∈ A and x ∈ / ∅) is always true whenever x ∈ A, whereas (x ∈ ∅ and x ∈
/
A) is always false. It follows that A∆∅ = A as claimed.
Rubric: 4 points
• 1 points for the correct diagrams.
• 2 points for good proofs for A∆A and A∆∅.
• 1 point for a well explained solution and proofs.
1
(b) For any sets A and B, show that
A∆B = (A \ B) ∪ (B \ A).
Solution: We wish to show that A∆B ⊆ (A \ B) ∪ (B \ A) and A∆B ⊇ (A \ B) ∪ (B \ A)
and hence conclude that A∆B = (A \ B) ∪ (B \ A).
First, suppose x ∈ A∆B. Then, by definition, (x ∈ A and x ∈ / B) or (x ∈ B and x ∈/ A).
If x ∈ A and x ∈/ B, then by definition of the set difference, x ∈ A \ B, and similarly if
x ∈ B and x ∈ / A, then x ∈ B \ A. So, if x ∈ A∆B, then x ∈ A \ B or x ∈ B \ A; that is
x ∈ (A \ B) ∪ (B \ A) by definition of the set union. So, A∆B ⊆ (A \ B) ∪ (B \ A)
Next, suppose x ∈ (A\B)∪(B\A). Then, x ∈ A\B or x ∈ B\A by definition of the union.
If x ∈ A \ B, then x ∈ A and x ∈ / B and similarly if x ∈ B \ A, then x ∈ B and x ∈/A
by the definition of the set difference. So, (x ∈ A and x ∈
/ B) or (x ∈ B and x ∈/ A) and
by the definition of ∆, (A \ B) ∪ (B \ A) ⊆ A∆B.
Rubric: 4 points:
• 2 points for the (⊆) proof. One point for a solid logic, and one point for written
style.
• 2 points for the (⊇) proof. One point for a solid logic, and one point for written
style.
Any valid proof should receive full marks.
(c) Show that (A∆B)∆(B∆C) = A∆C for any sets A, B, and C. For this problem you may
assume, without proof, that ∆ is associative; namely that A∆(B∆C) = (A∆B)∆C.
Solution: Using the associativity property in part (b), and the equalities we proved in
part (a) we have,
(A∆B)∆(B∆C) = A∆(B∆(B∆C)) (by associativity)
= A∆((B∆B)∆C) (by associativity)
= A∆(∅∆C) (because B∆B = ∅)
= A∆C (because ∅∆C = C).
Rubric: 2 points:
• 1 point for the correct working.
• 1 point for writing and style (including referencing part (a)).
2. (a) Consider a compound predicate S consisting of two constituent predicates P and Q. The
predicate S returns true precisely when an even number of its constituent predicates are
true. Using only the classical operations of AND (∧), OR (∨), and NOT (¬), construct
S. Use a truth-table to verify that your answer is correct.
Solution: We know the truth table for P ∧ Q is
P Q P ∧Q
T T T
T F F
F T F
F F F
2
which outputs true when both P and Q are true. Additionally, the truth table for
¬P ∧ ¬Q is
P Q ¬P ∧ ¬Q
T T F
T F F
F T F
F F T
This gives us true when both P and Q are both false, so combining both tables using
OR (∨) we get one possible solution which is S = (P ∧ Q) ∨ (¬P ∧ ¬Q). The truth table
reads as follows:
P Q (P ∧ Q) (¬P ∧ ¬Q) (P ∧ Q) ∨ (¬P ∧ ¬Q)
T T T F T
T F F F F
F T F F F
F F F T T
Alternatively, another solution is S = (P ∨ ¬Q) ∧ (¬P ∧ Q). This solution can be
derived with clever guessing-and-checking, or by expanding the answer above. This is
also commonly called an XNOR gate.
Rubric: 4 points:
• 1 point for the correct formula.
• 1 point for a correct truth table.
• 2 points for well argued, motivated, and written solution.
(b) Now consider the case of a compound predicate U which consists of three constituent
predicates P , Q, and R, and returns true precisely when an even number of its con-
stituent predicates are true. Let S be the compound predicate you constructed in part
(a). Using only the predicates R and S, and the classical operations of AND (∧), OR
(∨), and NOT (¬), construct U . Use a truth-table to verify that your answer is correct.
Solution: From part (a) we can write the truth table for S:
P Q S
T T T
T F F
F T F
F F T
We know that S is true when both P and Q are true, or neither are true. Now R can
either be true or false, so we construct an initial truth table with our desired outputs in
the last column, corresponding to true precisely when an even number of {P, Q, R} is
true.
3
P Q R S desired output
T T T T F
T F T F T
F T T F T
F F T T F
T T F T T
T F F F F
F T F F F
F F F T T
The behaviour of S almost matches what we need for our output, except that the truth
values are reversed in the first four rows. This is because when R is true it changes
the parity of the number of true input predicates. In effect, we need to replicate the
following truth table which does not depend (directly) on P and Q:
S R desired output
T T F
T F T
F T T
F F F
But this is just the negation of the table from part (a)! Thus
U = ¬ [(S ∧ R) ∨ (¬S ∧ ¬R)]
= (¬S ∨ ¬R) ∧ (S ∨ R).
By the same token, if we were to negate the alternative answer to part (a), we would get
U = (S ∧ ¬R) ∨ (R ∧ ¬S). We can verify that this solution is correct using the following
truth table:
P Q R S (S ∧ ¬R) (R ∧ ¬S) (S ∧ ¬R) ∨ (R ∧ ¬S) number of true
predicates
T T T T F F F 3
T T F T T F T 2
T F T F F T T 2
T F F F F F F 1
F T T F F T T 2
F T F F F F F 1
F F T T F F F 1
F F F T T F T 0
Rubric: 6 points:
• 2 points for a correct formula.
• 2 points for a truth table.
• 2 points for a well argued, motivated, and written solution.