------------------------------------------------------------------------------ Mohamed G. Gouda CS 311 Fall 2014 Homework 3 ------------------------------------------------------------------------------ 1. (2 points) Let A be the set that has the three elements { }, 1, and {2, 3}. What are the eight elements of set PS(A) of set A. ------------------------------------------------------------------------------- 2. (2 points) (a) Use direct inference to prove the following predicate true (A sub (B^C)) => (A sub B) where A, B, and C are sets, "sub" denotes "subset", and "^" denotes the set intersection operator. (b) Use guessing to prove the following predicate false (A sub (BvC)) => (A sub B) where A, B, and C are sets, "sub" denotes "subset", and "v" denotes the set union operator. ------------------------------------------------------------------------------- 3. (2 points) Use direct inference to prove the predicate (A sub B) => ((A^B sub A) and (A sub A^B)) where A and B are sets, "sub" denotes "subset", and "^" denotes the set intersection operator. ------------------------------------------------------------------------------- 4. (4 points) Use by-contradiction to prove the predicate (A sub B) => (A-B = { }) where A and B are sets, "sub" denotes "subset", and "-" denotes the set difference operator. (You can use the following hint in your proof: {((Exist x, P(x)) and (All y, not(P(y)))) => F} ) ------------------------------------------------------------------------------- Solutions ------------------------------------------------------------------------------- 1. The eight elements of set PS(A) are: { }, {{ }}, {1}, {{2, 3}}, {{ }, 1}, {{ }, {2, 3}}, {1, {2, 3}}, {{ }, 1, {2, 3}} ------------------------------------------------------------------------------- 2. (a) x in A => {A sub B^C} x in B^C => {definition of ^} (x in B) and (x in C) => {(P and Q) => P} x in B (b) Let A be {0}, B be {1}, and C be {0}. Thus, BvC = {0, 1} and so (A sub BvC) but not(A sub B). -------------------------------------------------------------------------------- (3) First, prove (A sub B) => (A^B sub A) x in A^B => {definition of ^} (x in A) and (x in B) => {(P and Q) => P} x in A Second, prove (A sub B) => (A sub A^B) x in A => {A sub B} (x in A) and (x in B) => {definition of ^} x in (A^B) --------------------------------------------------------------------------------- (4) not (A-B = { }) => {definition of { } set) Exist x, x in (A-B) => {definition of A-B} Exist x, (x in A) and not(x in B) => {definition of A sub B} (Exist x, (x in A) and not(x in B)) and (All y, not(y in A) or (y in B)) => {((Exist x, P(x)) and (All y, not(P(y)))) => F} F ---------------------------------------------------------------------------------