CSCI 301 'Quiz' 1 - Solutions

Section 1: Sets and Set Notation

  1. Write down each of the following sets using the roster method:
    1. The set of all integers with absolute value greater than 2.

      • Solution: \(\{\ldots, -5, -4, -3, 3, 4, 5, \ldots\}\)
    2. The set of all even positive integers less than 15

      • Solution: \(\{2, 4, 6, 8, 10, 12, 14\}\)
  2. True or False:
    1. \(\emptyset \in \{\emptyset\}\)
      • Solution: True. The empty set \(\emptyset\) is an element of the set containing only the empty set.
    2. \(\{\emptyset\} \subseteq \{\emptyset, \{a\}\}\)
      • Solution: True. For a set to be a subset, each of its elements must be elements of the other set. Here, \(\{\emptyset\}\) contains the element \(\emptyset\), which is also an element of \(\{\emptyset, \{a\}\}\), so \(\{\emptyset\} \subseteq \{\emptyset, \{a\}\}\) is true.

        Note / fun fact: Claude got this one wrong when generating the solutions! It had the reasoning right but the answer wrong!

    3. \(5 \in \{x : x \in \mathbb{Z} \text{ and } x^2 < 30\}\)
      • Solution: True. Since \(5 \in \mathbb{Z}\) and \(5^2 = 25 < 30\), \(5\) is an element of this set.
    4. \(\sqrt{2} \in \mathbb{Q}\)
      • Solution: False. \(\sqrt{2}\) is an irrational number, so it is not in the set of rational numbers \(\mathbb{Q}\).
  3. Express the following sets using set builder notation:
    1. All integers divisible by 3
      • Solution: \(\{3k : k \in \mathbb{Z}\}\) or \(\{x : x \in \mathbb{Z} \text{ and } x \text{ is divisible by } 3\}\)
    2. All real numbers greater than 5
      • Solution: \(\{x : x \in \mathbb{R} \text{ and } x > 5\}\)

Section 2: Set Operations and Cardinality

  1. Let \(X = \{1, 3, 5, 7\}\) and \(Y = \{3, 4, 5, 6\}\). Find:
    1. \(X \cup Y\)
      • Solution: \(X \cup Y = \{1, 3, 4, 5, 6, 7\}\)
    2. \(X \cap Y\)
      • Solution: \(X \cap Y = \{3, 5\}\)
    3. \(X - Y\)
      • Solution: \(X - Y = \{1, 7\}\)
    4. \(|X \cup Y|\)
      • Solution: \(|X \cup Y| = |\{1, 3, 4, 5, 6, 7\}| = 6\)
  2. What is the cardinality of each of the following sets?
    1. \(\{3k : k \in \mathbb{Z^+} \text{ and } k < 4\}\)
      • Solution: This set is \(\{3, 6, 9\}\) (where \(k = 1, 2, 3\)), so \(|\{3k : k \in \mathbb{Z^+} \text{ and } k < 4\}| = 3\)
    2. \(\{\{a\}, b, \{c, d\}\}\)
      • Solution: This set has 3 distinct elements: \(\{a\}\), \(b\), and \(\{c, d\}\). Therefore, \(|\{\{a\}, b, \{c, d\}\}| = 3\)
    3. \(\mathcal{P}(\{0, 1\})\)
      • Solution: The power set of \(\{0, 1\}\) is \(\{\emptyset, \{0\}, \{1\}, \{0, 1\}\}\), so \(|\mathcal{P}(\{0, 1\})| = 4\)
  3. Let \(A = \{a, b, c\}\) and \(B = \{1, 2\}\). Find:
    1. \(A \times B\)
      • Solution: \(A \times B = \{(a,1), (a,2), (b,1), (b,2), (c,1), (c,2)\}\)
    2. \(|A \times B|\)
      • Solution: \(|A \times B| = |A| \times |B| = 3 \times 2 = 6\)
    3. \(B \times \emptyset\)
      • Solution: \(B \times \emptyset = \emptyset\) (The Cartesian product with the empty set is always the empty set)

Section 3: Logic

  1. Let \(P =\) True, \(Q =\) False, and \(R =\) True. Determine the truth value of each of the following:
    1. \(P \land (Q \lor R)\)

      • Solution: \(Q \lor R\) is True \(\lor\) True = True. So \(P \land (Q \lor R)\) is True \(\land\) True = True.
    2. \((P \lor Q) \land \neg R\)

      • Solution: \(P \lor Q\) is True \(\lor\) False = True. \(\neg R\) is \(\neg\) True = False. So \((P \lor Q) \land \neg R\) is True \(\land\) False = False.
    3. \(\neg (P \land Q) \lor R\)

      • Solution: \(P \land Q\) is True \(\land\) False = False. \(\neg (P \land Q)\) is \(\neg\) False = True. So \(\neg (P \land Q) \lor R\) is True \(\lor\) True = True.
  2. For each of the following conditional statements, determine if it is true or false:
    1. If \(2 + 2 = 4\), then Paris is in France.
      • Solution: True. Since both the antecedent (2+2=4) and consequent (Paris is in France) are true, the conditional is true.
    2. If \(2 + 2 = 5\), then the sun rises in the west.
      • Solution: True. When the antecedent is false (2+2=5), the conditional is always true regardless of the consequent.
    3. If water is dry, then \(1 + 1 = 2\).
      • Solution: True. When the antecedent is false (water is dry), the conditional is always true regardless of the consequent.
  3. Consider the sets \(U = \{1, 2, 3, 4, 5, 6, 7, 8\}\), \(A = \{1, 3, 5, 7\}\), and \(B = \{1, 2, 5, 6\}\).
    1. List the elements of \(\overline{A \cap B}\).
      • Solution: First, \(A \cap B = \{1, 5\}\). So \(\overline{A \cap B} = U - (A \cap B) = \{2, 3, 4, 6, 7, 8\}\)
    2. List the elements of \((A \cup B) - (A \cap B)\).
      • Solution: \(A \cup B = \{1, 2, 3, 5, 6, 7\}\) and \(A \cap B = \{1, 5\}\). So \((A \cup B) - (A \cap B) = \{2, 3, 6, 7\}\)