Sets and logic · Year 12

In Year 12 you learn: logic and truth tables.

Sets collect objects together. Logic makes precise what “and”, “or”, “not” and “if … then” mean. Together they are the grammar of mathematics. They also power database searches and computer circuits.

Key facts

  • A ∪ B (union): in A or B or both. A ∩ B (intersection): in both. A′ (complement): not in A. ∅ is the empty set.
  • n(A ∪ B) = n(A) + n(B) − n(A ∩ B). For three sets: add the singles, subtract the pairs, add back the triple.
  • A set with n elements has 2ⁿ subsets, and n(A × B) = n(A) × n(B).
  • ¬ means not, ∧ means and, ∨ means or, and ⇔ means if and only if. ⇒ means implies: it is false only when a true statement implies a false one.
  • De Morgan’s laws: ¬(P ∧ Q) ≡ ¬P ∨ ¬Q and ¬(P ∨ Q) ≡ ¬P ∧ ¬Q.
  • P ⇒ Q is equivalent to its contrapositive ¬Q ⇒ ¬P, but not to its converse Q ⇒ P.

Worked examples

Example 1

In a class of 30, 18 play football, 12 play tennis and 5 play both. How many play neither?

Answer: 5

Example 2

Show that P ⇒ Q has the same truth table as ¬P ∨ Q.

Answer: Both are false only when P is true and Q is false

Example 3

How many integers from 1 to 100 are divisible by 3 or 5?

Answer: 47

Example 4

A = {1, 2, 3, 4} and B = {3, 4, 5}. Find A ∩ B and A ∪ B.

Answer: A ∩ B = {3, 4}, A ∪ B = {1, 2, 3, 4, 5}

Example 5

How many subsets does the set {a, b, c} have?

Answer: 8

Other years