CSCI 301 'Quiz' 2 - Solutions

  1. Complete the missing entries in this partially filled truth table:

    Solution:

    \(P\) \(Q\) \(P \Rightarrow Q\) \(Q \lor P\) \((P \Rightarrow Q) \lor (Q \lor P)\)
    T T T T T
    T F F T T
    F T T T T
    F F T F T
  2. For the following pair of logical expressions, determine whether they are logically equivalent; justify your answer with a truth table or, if they are equivalent you may justify with a sequence of manipulations using known equivalences. \((\neg P \land Q) \lor (P \land \neg Q)\) and \(\neg (P \Leftrightarrow Q)\)

    Solution: Let’s verify using a truth table:

    P Q \(\neg P \land Q\) \(P \land \neg Q\) \((\neg P \land Q) \lor (P \land \neg Q)\) \(\neg (P \Leftrightarrow Q)\)
    T T F F F F
    T F F T T T
    F T T F T T
    F F F F F F

    The last two columns are the same, so the two are logically equivalent.

  3. Are the following two statements logically equivalent? Briefly explain.

    1. 4 divides \(a\) if \(a\) is even

    2. if \(a\) is not even, it is not divisible by 4

    Solution: No. Let $Q = $ “4 divides \(a\)” and $P = $ “\(a\) is even”.

  4. Translate each statement into symbolic form using quantifiers:

    1. Some integers are perfect squares Solution: \(\exists x \in \mathbb{Z}, \exists y \in \mathbb{Z}, x = y^2\)

    2. For every positive real number, there exists a smaller positive real number Solution: \(\forall x \in \mathbb{R}^+, \exists y \in \mathbb{R}^+, y < x\)

    3. Every prime number greater than 2 is odd

    Solution: Sometimes \(\mathbb{P}\) is used to represent the set of primes. If we use this notation, then: \(\forall p \in \mathbb{P}, (p > 2) \Rightarrow (p \text{ is odd})\)

    Alternative: \(\forall p \in \mathbb{P}, (p > 2) \Rightarrow O(p)\) We could also just say something like \(\forall p\), \(p\) is prime $ ~p > 2 O(p)$.

  5. Translate each symbolic statement into English, and indicate whether they are true or false:

    1. \(\forall x \in \mathbb{Z}, \exists y \in \mathbb{Z}, x = 2y \lor x = 2y + 1\)

      Solution: “For every integer x, there exists an integer y such that x is either equal to 2y or equal to 2y+1.”

      This statement is true - integers are either even or odd.

    2. \(\exists x \in \mathbb{R}, \forall y \in \mathbb{R}, x \cdot y = y\)

      Solution: “There exists a real number x such that for all real numbers y, x times y equals y.”

      This statement is true. The value x = 1 satisfies this condition, as 1 · y = y for all real numbers y.

  6. Translate each statement to symbols, negate it, simplify the negation, and express the result in English:

    1. All natural numbers are positive

      Solution:

      • Original: \(\forall n \in \mathbb{N}, n > 0\)
      • Negation: \(\neg(\forall n \in \mathbb{N}, n > 0) \equiv \exists n \in \mathbb{N}, \neg(n > 0) \equiv \exists n \in \mathbb{N}, n \leq 0\)
      • In English: “There exists a natural number that is not positive (i.e., less than or equal to zero).”
    2. There exists a real number that is both positive and negative

      Solution:

      • Original: \(\exists x \in \mathbb{R}, (x > 0) \land (x < 0)\)
      • Negation: \(\neg(\exists x \in \mathbb{R}, (x > 0) \land (x < 0)) \equiv \forall x \in \mathbb{R}, \neg((x > 0) \land (x < 0)) \equiv \forall x \in \mathbb{R}, (x \leq 0) \lor (x \geq 0)\)
      • Simplified: \(\forall x \in \mathbb{R}, \text{true}\) (since any real number satisfies either x ≤ 0 or x ≥ 0)
      • In English: “Every real number is either non-positive or non-negative.” (Which is a tautology, always true)
    3. \(a\) is positive and \(b\) is negative.

      Solution: