Exercises

This page allows you to practice some exercises on Essentials of Logic and Set Theory. If you notice that you have difficulties, we advise you to go over the corresponding sections in the book.

Question 1

Let A={2,3,4} A = \{ 2, 3, 4 \}, B={2,5,6}B = \{ 2, 5, 6 \}, C={5,6,2}C = \{5, 6, 2 \}, and D={6}D = \{ 6 \}.

(a) Determine which of the following six statements are true: (i) 4C4 \in C, (ii) 5C5 \in C, (iii) ABA \subseteq B, (iv) DCD \subseteq C, (v) B=CB = C, (vi) A=BA = B.

(b) List all members of each of the following eight sets: (i) AB A \cap B, (ii) ABA \cup B, (iii) AB A \setminus B, (iv) BAB \setminus A; (v) (AB)(AB)(A \cup B) \setminus (A \cap B), (vi) ABCDA \cup B \cup C \cup D, (vii) ABCA \cap B \cap C, and (viii) ABCD A \cap B \cap C \cap D.

Show answer

(a) The true statements are (ii) 5C5 \in C, (iv) DCD \subseteq C and (v) B=CB = C.

(b) Note that (i) AB={2}A \cap B = \{ 2 \}, (ii) AB={2,3,4,5,6}A \cup B = \{ 2, 3, 4, 5, 6 \}, (iii) AB={3,4}A \setminus B = \{3, 4 \}, (iv) BA={5,6}B \setminus A = \{ 5, 6 \}, (v) (AB)(AB)={2,3,4,5,6}{2}={3,4,5,6}(A \cup B) \setminus (A \cap B) = \{2, 3, 4, 5, 6 \} \setminus \{2\} = \{3, 4, 5, 6 \}, (vi) ABCD={2,3,4,5,6}A \cup B \cup C \cup D = \{2, 3, 4, 5, 6 \}, (vii) ABC={2} A \cap B \cap C = \{ 2 \} and (viii) ABCD=A \cap B \cap C \cap D = \emptyset.

Question 2

A survey revealed that 50 people liked coffee and 40 liked tea. Both these figures include 35 who liked both coffee and tea. Finally, ten did not linke either coffee or tea. How many people in all responded to the survey?

Show answer

Note that 5035=1550 - 35 = 15 liked coffee, but not tea, and 4035=540 - 35 = 5 liked tea but not coffee. Because 3535 liked both and 1010 liked neither, there were 15+5+35+10=6515 + 5 + 35 + 10 = 65 respondents.

Question 3

Make a complete list of all the different subsets of the set {a,b,c}\{ a, b, c \}. How many are there if the empty set and the set itself are included? Do the same for the set {a,b,c,d}\{a, b, c, d \}.

Show answer

The 23=82^3 = 8 subsets of {a,b,c}\{a, b, c \} are the set itself, and the empty set, together with the six subsets {a},{b},{c},{a,b},{a,c},\{a\}, \{b\}, \{c\}, \{a, b\}, \{a, c\}, and {b,c}\{b, c\}. The 24=162^4 = 16 subsets of {a,b,c,d}\{a, b, c, d\} are the 88 preceding sets together with 88 more sets that include dd — namely {d},{a,d},{b,d},{c,d},{a,b,d},{a,c,d},{b,c,d},\{d \}, \{a, d\}, \{b, d\}, \{c, d\}, \{a, b, d\}, \{a, c, d\}, \{b, c, d\}, and {a,b,c,d}\{a, b, c, d \}. Apart from {a,b,c,d}\{a, b, c, d\} and the empty set, there are 1414 other subsets.

Question 4

Determine which of the following formulas are true. If any formula is false, find a counter example to demonstrate this. [Hint: drawing a Venn diagram can be helpful.] (a) AB=BAA \setminus B = B \setminus A

(b) A(BC)(AB)CA \cap (B \cup C) \subseteq (A \cap B) \cup C

(c) A(BC)(AB)CA \cup (B \cap C) \subseteq (A \cup B) \cap C

(d) A(BC)=(AB)CA \setminus (B \setminus C) = (A \setminus B) \setminus C

Show answer

Generally, only (b) is true. Let's consider them one-by-one:

(a) ABBAA \setminus B \neq B \setminus A whenever BAB \subseteq A with BA\emptyset \neq B \neq A. You can check it with an easy example. Take A={1,2}A = \{ 1, 2\} and B={2}B = \{2 \}. Then AB={1} A \setminus B = \{ 1 \}, while BA=B \setminus A = \emptyset.

(b) True, because A(BC)=(AB)(AC)(AB)CA \cap (B \cup C) = (A \cap B) \cup (A \cap C) \subseteq (A \cap B) \cup C.

(c) Holds if and only if ACA \subseteq C.

(d) Is violated when A={1,2}A = \{1, 2\}, B={1}B = \{1 \}, and C={1,3}C = \{1, 3 \}. In that case, the lefthand side becomes A(BC)={1,2}{}={1,2}A \setminus (B \setminus C) = \{ 1, 2 \} \setminus \{ \emptyset \} = \{ 1, 2 \}. However, the righthand side equals (AB)C={2}{1,3}={2}(A \setminus B) \setminus C = \{ 2 \} \setminus \{1, 3 \} = \{ 2 \}.

Question 5

Prove that

(a) (AB)c=AcBc(A \cup B)^{c} = A^{c} \cap B^{c}

(b) (AB)c=AcBc(A \cap B)^{c} = A^{c} \cup B^{c}

[Hint: drawing a Venn diagram can be helpful]

Show answer

(a) Let's consider an arbitrary element xx. We will show that x(AB)c    xAcBcx \in (A \cup B)^{c} \iff x \in A^{c} \cap B^{c}. Consider the lefthand side. Note that x(AB)cx \in (A \cup B)^{c} means that xABx \notin A \cup B. Thus, xAx \notin A and xBx \notin B. For the right hand side, we have that xAcBcx \in A^{c} \cap B^{c} means that xAcx \in A^{c} and xBcx \in B^{c}. This also means that xAx \notin A and xBx \notin B. Thus, the two sets are equal.

(b) Let's consider an arbitary element xx. We will show that x(AB)c    xAcBcx \in (A \cap B)^{c} \iff x \in A^{c} \cup B^{c}. Consider the lefthand side. If x(AB)cx \in (A \cap B)^{c}, then xABx \notin A \cap B. Thus, it is not true that xAx \in A and xBx \in B. Therefore, xAx \notin A or xBx \notin B. For the righthand side, xAcBcx \in A^{c} \cup B^{c} means that either xAcx \in A^{c} or xBcx \in B^{c}. However, this also means that xAx \notin A or xBx \notin B. Thus, the two sets are equal.

Question 6

Use appropriate implication or equivalence arrows to represent the following propositions:

(a) The equation 2x4=22x - 4 = 2 is fulfilled only when x=3x=3

(b) If x=3x = 3, then 2x4=22x - 4 = 2

(c) The equation x22x+1=0x^2 - 2x + 1 = 0 is satisfied if x=1x=1

(d) If x2>4x^2 > 4, then x>2|x| > 2, and conversely

Show answer

(a) 2x4=2    x=32x - 4 = 2 \implies x = 3.

(b) x=3    2x4=2x = 3 \implies 2x-4 = 2.

(c) x=1    x22x+1=0x = 1 \implies x^2 - 2x + 1 = 0.

(d) x2>4    x>2x^2 > 4 \iff |x| > 2.

Question 7

In each of the following implications, where xx, yy, and z z are numbers, decide: (i) if the implication is true; and (ii) if the converse implication is true.

(a) x=4    x=2x = \sqrt{4} \implies x = 2

(b) (x=2x=2 and y=5y=5)     x+y=7\implies x + y = 7

(c) (x1)(x2)(x3)=0    x=1(x-1)(x-2)(x-3) = 0 \implies x=1

(d) x2+y2=0    x=0x^2 + y^2 = 0 \implies x=0 or y=0y=0

Show answer

(a)     \impliestrue,     \impliedbytrue.

(b)     \impliestrue,     \impliedbyfalse.

(c)     \impliesfalse,     \impliedbytrue.

(d)     \impliestrue (actually both are zero),     \impliedbyfalse (only having one equal to zero is not enough).

Question 8

Consider the proposition 2x+5132x + 5 \geq 13. Is the condition x0x \geq 0 necessary, or sufficient, or both necessary and sufficient for the inequality to be satisfied?

Show answer

Note that 2x+513    2x8    x42x + 5 \geq 13 \iff 2x \geq 8 \iff x \geq 4. This means that x0x \geq 0 is necessary, but not sufficient.

Question 9

Which of the following statements are equivalent to the (dubious) statement: "If inflation increases, then unemployment decreases".

(a) For unemployment to decrease, inflation must increase.

(b) A sufficient condition for unemployment to decrease is that inflation increases.

(c) Unemployment can only decrease if inflation increases.

(d) If unemployment does not decrease, then inflation does not increase.

(e) A necessary condition for inflation to increase is that unemployment decreases.

Show answer

The statements (b), (d) and (e) all express the same condition. The remaining two statements, (a) and (c) are different.

Question 10

Prove the following two statements by induction:

(a) For all natural numbers nn: 1+2+3++n=12n(n+1)1 + 2 + 3 + \ldots + n = \frac{1}{2}n(n+1).

(b) For all natural numbers nn: n3+(n+1)3+(n+2)3n^3 + (n + 1)^3 + (n+2)^3 of three consecutive cubes is always divisible by 99.

Show answer

(a) For n=1n=1, the left- and righthand side are both equal to 11. Suppose the statement is true for n=kn=k. Now,

1+2+3++k+(k+1)=12k(k+1)+(k+1)1 + 2 + 3 + \cdots + k + (k+1) = \frac{1}{2}k(k+1) + (k+1),

where the righthand side can be rewritten as

12k2+112k+1=12(k2+3k+2)=12(k+1)(k+2)\frac{1}{2}k^2 + 1\frac{1}{2}k + 1 = \frac{1}{2}(k^2 + 3k + 2) = \frac{1}{2}(k+1)(k+2). This is the original statement for n=k+1n=k+1. Thus, by induction, the statement is true for all nNn \in \mathbb{N}.

(b) For n=1n=1, the sum n3+(n+1)3+(n+2)3=36n^3 + (n+1)^3 + (n+2)^3 = 36, which is divisible by 99. Suppose the statement is true for n=kn=k, that is, k3+(k+1)3+(k+2)3=9mk^3 + (k+1)^3 + (k+2)^{3} = 9m, for some mNm \in \mathbb{N} (divisible by 99, means that it can be written as a multiple of 99). First, define Sk+1=(k+1)3+(k+2)3+(k+3)3S_{k+1} = (k+1)^{3} + (k+2)^{3} + (k + 3)^3 and Sk=k3+(k+1)3+(k+2)3S_{k} = k^3 + (k+1)^3 + (k+2)^3. Note that the difference is given by

Sk+1Sk=k3+(k+3)3S_{k+1} - S_{k} = -k^{3} + (k+3)^3.

Thus,

(k+1)3+(k+2)3+(k+3)3=9mk3+(k+3)3(k+1)^3 + (k+2)^3 + (k+3)^3 = 9m -k^3 + (k+3)^3.

With some simple algebra, the righthand side can be written as 9(m+k2+3k+3)9(m + k^2 + 3k + 3), which is clearly divisible by 99. So, the statement also holds for n=k+1n = k+1. Then, by induction, the statement is true for all nNn \in \mathbb{N}.

Last updated