Mohamed G. Gouda CS 313K Fall 2012 Exercise 9 1. Let A, B, and C be three sets and let * denote the Cartesian product operator. Also, let (A sub B) denote the fact that A is a subset of B. Prove, by direct inference, that (A sub B) => (A*C sub B*C) Sol: (x,y) in A*C => {Definition of *} (x in A) and (y in C) => {Definition of A sub B} (x in B) and (y in C) => {Definition of *} (x,y) in B*C 2. Let A and B be two sets, ^ be the intersection operator, and * be the Cartesian product operator. Show, by two-sided inference, that (A^B)*(A^B) = (A*B)^(B*A) Sol: (x,y) in (A^B)*(A^B) <=> {Definition of *} (x in A^B) and (y in A^B) <=> {Definition of ^} (x in A) and (x in B) and (y in A) and (y in B) <=> {Symmetry and associativity of "and"} (x in A) and (y in B) and (x in B) and (y in A) <=> {Definition of *} (x,y) in (A*B) and (x,y) in (B*A) <=> {Definition of ^} (x,y) in (A*B)^(B*A) 3. Let A, B, and C be three sets and let v be the union operator, ^ be the intersection operator, and - be the set difference operator. Show, by two-sided inference, A-(B^C) = (A-B)v(A-C) Sol: x in A-(B^C) <=> {Definition of -} (x in A) and (x in c(B^C)) <=> {De-Morgan's on complement "c", proven in lecture} (x in A) and (x in (c(B) v c(C))) <=> {Definition of v} (x in A) and ((x in c(B)) or (x in c(C))) <=> {Distribution of "and" over "or"} ((x in A) and (x in c(B))) or ((x in A) and (x in c(C))) <=> {Definition of -} (x in (A-B)) or (x in (A-C)) <=> {Definition of v} x in (A-B)v(A-C) 4. Let A, B, and C be three sets and let v be the union operator and * be the Cartesian product operator. Show, by two-sided inference, that (A v B)*C = (A*C) v (B*C) Sol: (x,y) in (A v B)*C <=> {Definition of *} (x in A v B) and (y in C) <=> {Definition of v} ((x in A) or (x in B)) and (y in C) <=> {Distribution of "and" over "or"} ((x in A) and (y in C)) or ((x in B) and (y in C)) <=> {Definition of *} (x,y) in (A*C) or (x,y) in (B*C) <=> {Definition of v} (x,y) in (A*C) v (B*C) 5. Let A, B, and C be three sets, and let (A sub B) denotes the fact that A is a subset of B. Prove, by direct inference, that (A sub B) and (B sub C) and (C sub A) => (A = B) and (B = C) Sol: Proving (A = B) (A sub B) and (B sub C) and (C sub A) => {From Problem 5 in Exercise 8, (B sub C) and (C sub A) => (B sub A)} (A sub B) and (B sub A) => {Simple Theorem of sub} A = B Proving (B = C) (A sub B) and (B sub C) and (C sub A) => {From Problem 5 in Exercise 8, (C sub A) and (A sub B) => (C sub B)} (B sub C) and (C sub B) => {Simple Theorem of sub} B = C 6. Let PS(A) be the power set of set A. Show, by guessing values for sets A and B, that PS(A) v PS(B) is not necessarily equal to PS(A v B). Sol: Guess A = {1} and B = {2}. PS(A) = {{}, {1}} PS(B) = {{}, {2}} PS(A) v PS(B) = {{}, {1}, {2}} A v B = {1,2} PS(A v B) = {{}, {1}, {2}, {1,2}} Then, PS(A) v PS(B) != PS(A v B) 7. Let A, B, and C be arbitrary sets and let v denote the set union operator, and ^ denote the set intersection operator. Show, by two-sided inference, that A ^ (B v C) = (A ^ B) v (A ^ C) Sol: x in A ^ (B v C) <=> {Definition of ^} (x in A) and (x in (B v C)) <=> {Definition of v} (x in A) and ((x in B) or (x in C)) <=> {Distribution of "and" over "or"} ((x in A) and (x in B)) or ((x in A) and (x in C)) <=> {Definition of ^} (x in A ^ B) or (x in A ^ C) <=> {Definition of v} x in (A ^ B) v (A ^ C) 8. Let A, B, and C be three sets. Let (A sub B) denote the fact that A is a subset of B and "-" denote the set difference operator. Show, by contradiction, that (A sub B) => ((C-B) sub (C-A)) Sol: (Exist x, x in (C-B) and not(x in (C-A))) => {Definition of (C-A)} (Exist x, (x in (C-B)) and not(x in C and not(x in A))) => {De-Morgan's} (Exist x, (x in (C-B)) and (not(x in C) or (x in A))) => {Distribution of "and" over "or"} (Exist x, (x in (C-B)) and (not(x in C))) or (1) (Exist x, (x in (C-B)) and (x in A)) (2) To complete the proof, we need to prove (1)=>F and (2)=>F. Proving (1)=>F (Exist x, (x in (C-B)) and (not(x in C))) => {Definition of (C-B)} (Exist x, (x in C) and not(x in B) and not(x in C)) => {(x in C) and not(x in C) => F} F Proving (2)=>F (Exist x, (x in (C-B)) and (x in A)) => {Definition of C-B} (Exist x, (x in C) and not(x in B) and (x in A)) => {A sub B} (Exist x, (x in C) and not(x in B) and (x in B)) => {not(x in B) and (x in B) => F} F