CMPSCI 190DM: A Mathematical Foundation for Informatics

Solutions for Practice Third Midterm Exam

David Mix Barrington

15 November 2015


Question text is in black, solutions in blue.

  Q1: 15 points
  Q2: 15 points
  Q3: 35 points
  Q4: 15 points
  Q5: 20 points
Total: 100 points

  • Question 1 (15): Briefly identify the following terms or concepts (3 points each):

  • Question 2 (15): Determine whether each of these five statements is true or false. No explanation is needed or wanted, and there is no penalty for guessing.

  • Question 3 (35): Let X be the set of dogs {Arly, Baxter, Cardie, Duncan, Ebony}. Give the sizes of each of the following sets. No proof is necessary for a correct answer, but a justification may help with partial credit (5 points each).

  • Question 4 (15): Let A, B, and C be any three sets. Give an element-wise proof that (A - B) ∪ (B - C) ⊆ (B ∩ C)'. (Recall that if X and Y are any two sets, Y' is the complement of Y and "X - Y" means "(X ∩ Y')".)

    Let x be an arbitrary element of the left-hand set. We must show that it is in the right-hand set.

    Case 1: x is in (A - B). Since x is not in B, it is not in (B ∩ C) and so it is in (B ∩ C)'.

    Case 2: x is in (B - C). Since x is not in C, it is not in (B ∩ C) and so it is in (B ∩ C)'.

  • Question 5 (20): Let f: A → B and g: B → C be two functions that are each bijections. Let h: A → C be defined so that for any x in A, h(x) = g(f(x)). Prove that h is a bijection. (Recall that a function is a bijection if and only if it is both one-to-one and onto.)

    Proof 1: Since f is a bijection, it has an inverse f-1: B → A. Since g is a bijection, it has an inverse g-1: C → B. We can define a function z: C → A by letting z(y) = f-1(g-1(y)) for any y in C. This function is an inverse of h because z(h(x)) = x for any element x of A, and h(z(y)) = y for any element y of C. Since h has an inverse, it must be a bijection.

    Proof 2: We show separately that h is both onto and one-to-one. If c is any element of C, it equals g(b) for some b in B because g is onto. This b then equals f(a) for some a in A because f is onto. So c = g(f(a)) = h(a), and since any arbitary element of c is hit by h, h must be onto.

    Let x and y be two different elements of A. Since f is one-to-one, f(x) and f(y) must be two different elements of B. Since g is one-to-one, g(f(x)) and g(f(y)) must be two different elements of C. These elements are h(x) and h(y) respectively. Since h maps any two distinct elements of A to distinct elements of C, it is one-to-one.

    Since h is both onto and one-to-one, it is a bijection.

    Last modified 15 November 2015