Docsity

Constructing Proofs - Homework 4 Solutions | CS 1050, Assignments of Computer Science

Toggle sidebar
bg1
CS1050 HW 4 Answer Key
There are 100 points total over the entire homework.
(These answers are just one possibility. There are other equivalent, correct answers.)
Section 1.6
1) [10 points]
a. {x | x = 3n ๏ƒ™ n ๏ƒŽ N ๏ƒ™ n ๏‚ฃ 4}}
b. {x | x ๏ƒŽ Z ๏ƒ™ -3 ๏‚ฃ x ๏‚ฃ 3}
c. { x | x is a letter of the English alphabet between m and p inclusive}
2) [8 points]
a. NO. ร˜ is a set with no elements and a power set has to have 2n elements
for n ๏ƒŽ N. Often people say YES because they confuse ร˜ with {ร˜}, which
are not equal. See Example 12 on page 82.
b. YES. {a}.
c. NO. This set has 3 elements, and a power set must have 2n elements for n
๏ƒŽ N.
d. YES. {a,b}
3) [10 points]
Show that A๏‚ดB ๏‚น B๏‚ดA if A and B are non-empty and not equal.
Let A and B be non-empty sets. Thus ๏€คa such that a ๏ƒŽ A and ๏€คb such that b ๏ƒŽ B. The
Cartesian product A๏‚ดB is the set of all ordered pairs (a,b), and the Cartesian product
B๏‚ดA is the set of all ordered pairs (b,a) where a ๏ƒŽ A and b ๏ƒŽ B. But ordered pairs (a,b)
and (c,d) are equal if and only if a = c and b = d (page 83). Thus (a,b) = (b,a) if and only
if a = b. Thus A๏‚ดB = B๏‚ดA if and only if all elements of A and B are equal (A = B).
Section 1.7
4) [10 points]
Let A = {a,b,c,d,e} and B = {a,b,c,d,e,f,g,h}
a. A ๏ƒˆ B = {a,b,c,d,e,f,g,h}
b. A ๏ƒ‡ B = {a,b,c,d,e}
c. A โ€“ B = ร˜
d. B โ€“ A = {f,g,h}
5) [10 points]
Find the sets A and B if A โ€“ B = {1,5,7,8}, B โ€“ A = {2,10}, and A ๏ƒ‡ B = {3,6,9}.
A = {1,3,5,6,7,8,9}
B = {2,3,6,9,10}
6)
Show the following
a. (A ๏ƒˆ B) ๏ƒ (A ๏ƒˆ B ๏ƒˆ C) [10 points]
pf3

Partial preview of the text

Download Constructing Proofs - Homework 4 Solutions | CS 1050 and more Assignments Computer Science in PDF only on Docsity!

CS1050 HW 4 Answer Key There are 100 points total over the entire homework. (These answers are just one possibility. There are other equivalent, correct answers.) **Section 1.

  1. [10 points]** a. {x | x = 3n ๏ƒ™ n ๏ƒŽ N ๏ƒ™ n ๏‚ฃ 4}} b. {x | x ๏ƒŽ Z ๏ƒ™ -3 ๏‚ฃ x ๏‚ฃ 3} c. { x | x is a letter of the English alphabet between m and p inclusive} 2) [8 points] a. NO. ร˜ is a set with no elements and a power set has to have 2n^ elements for n ๏ƒŽ N. Often people say YES because they confuse ร˜ with {ร˜}, which are not equal. See Example 12 on page 82. b. YES. {a}. c. NO. This set has 3 elements, and a power set must have 2n^ elements for n ๏ƒŽ N. d. YES. {a,b} 3) [10 points] Show that A๏‚ดB ๏‚น B๏‚ดA if A and B are non-empty and not equal. Let A and B be non-empty sets. Thus ๏€คa such that a ๏ƒŽ A and ๏€คb such that b ๏ƒŽ B. The Cartesian product A๏‚ดB is the set of all ordered pairs (a,b), and the Cartesian product B๏‚ดA is the set of all ordered pairs (b,a) where a ๏ƒŽ A and b ๏ƒŽ B. But ordered pairs (a,b) and (c,d) are equal if and only if a = c and b = d (page 83). Thus (a,b) = (b,a) if and only if a = b. Thus A๏‚ดB = B๏‚ดA if and only if all elements of A and B are equal (A = B). **Section 1.
  2. [10 points]** Let A = {a,b,c,d,e} and B = {a,b,c,d,e,f,g,h} a. A ๏ƒˆ B = {a,b,c,d,e,f,g,h} b. A ๏ƒ‡ B = {a,b,c,d,e} c. A โ€“ B = ร˜ d. B โ€“ A = {f,g,h} 5) [10 points] Find the sets A and B if A โ€“ B = {1,5,7,8}, B โ€“ A = {2,10}, and A ๏ƒ‡ B = {3,6,9}. A = {1,3,5,6,7,8,9} B = {2,3,6,9,10} 6) Show the following a. (A ๏ƒˆ B) ๏ƒ (A ๏ƒˆ B ๏ƒˆ C) [10 points]

Let e be an arbitrary element of (A ๏ƒˆ B). Then e๏ƒŽA or e๏ƒŽB or e is an element of both. It follows that e must then be an element of (A ๏ƒˆ B ๏ƒˆ C). Therefore (A ๏ƒˆ B) ๏ƒ (A ๏ƒˆ B ๏ƒˆ C). b. (A โ€“ B) โ€“ C ๏ƒ (A โ€“ C) [10 points] Let e be and arbitrary element of (A โ€“ B) โ€“ C. If e ๏ƒŽ (A โ€“ B) โ€“ C, then e ๏ƒŽ (A โ€“ B) and e ๏ƒ C. If e ๏ƒŽ (A โ€“ B), then e ๏ƒŽ A and e ๏ƒ B. Thus e ๏ƒŽ A and e ๏ƒ C, which means e ๏ƒŽ (A โ€“ C). Therefore (A โ€“ B) โ€“ C ๏ƒ (A โ€“ C). c. (B โ€“ A) ๏ƒˆ (C โ€“ A) = (B ๏ƒˆ C) โ€“ A [8 points for each part] i. Membership Table A B C B โ€“ A C โ€“ A (B โ€“ A) ๏ƒˆ (C โ€“ A) B ๏ƒˆ C (B ๏ƒˆ C) โ€“ A 1 1 1 0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 1 1 1 0 0 0 0 0 0 0 0 Since column (B โ€“ A) ๏ƒˆ (C โ€“ A) is identical with column (B ๏ƒˆ C) โ€“ A, they must be identical. ii. Propositional Logic (B โ€“ A) ๏ƒˆ (C โ€“ A) = {x | x ๏ƒŽ (B โ€“ A) ๏ƒˆ (C โ€“ A)} Set builder notation = {x | x ๏ƒŽ (B โ€“ A) ๏ƒš x ๏ƒŽ (C โ€“ A)} Def. of Union = {x | (x ๏ƒŽ B ๏ƒ™ x ๏ƒ A) ๏ƒš (x ๏ƒŽ C ๏ƒ™ x ๏ƒ A)} Def. of Difference x = {x | (x ๏ƒ A ๏ƒ™ x ๏ƒŽ B) ๏ƒš (x ๏ƒ A ๏ƒ™ x ๏ƒŽ C)} Commutative x = {x | x ๏ƒ A ๏ƒ™ (x ๏ƒŽ B ๏ƒš x ๏ƒŽ C)} Distributive = {x | (x ๏ƒŽ B ๏ƒš x ๏ƒŽ C) ๏ƒ™ x ๏ƒ A } Commutative = {x | x ๏ƒŽ (B ๏ƒˆ C) ๏ƒ™ x ๏ƒ A } Def. of Union = {x | x ๏ƒŽ ((B ๏ƒˆ C) โ€“ A)} Def. of Difference = (B ๏ƒˆ C) โ€“ A Set builder notation iii. Tabular proof using set identities (B โ€“ A) ๏ƒˆ (C โ€“ A) Def. of Difference x Commutative x Distributive Commutative Def. of Difference =(BI A)U(CI A) = (A I B)U(A I C) = A I (B UC) = (BUC)I A = (BUC) โˆ’ A