More Set Definitions and Proofs Prove (A⊕B) ⊕ B = A Prove (A⊕B

9/18/14
Mental Warm up with Symmetric Difference!
•  Prove(A⊕B) ⊕ B = A
More Set Definitions and Proofs
§  A⊕B ⇔ elements in A or B but not in both.
2.1, 2.2 Rosen 6th Edition
Prove (A⊕B) ⊕ B = A
First prove by using a membership table.
A
1
1
0
0
B
1
0
1
0
A⊕B
0
1
1
0
(A⊕B) ⊕ B
1
1
0
0
A and (A⊕B) ⊕ B have identical membership tables.
Proof of (A⊕B) ⊕ B = A, cont.
Now we will show that A ⊆ (A⊕B) ⊕ B .
Let e∈A.
Either e is also ∈B or e∉B.
If e ∈B, then e ∉(A⊕B) so e is an element of
(A⊕B) ⊕ B.
If e∉B, e is an element of (A⊕B) and e must
be an element of (A⊕B) ⊕ B .
Prove (A⊕B) ⊕ B = A
Proof: We must show that (A⊕B) ⊕ B ⊆ A
and that A ⊆ (A⊕B) ⊕ B.
First we will show that (A⊕B) ⊕ B ⊆ A .
Let e∈ (A⊕B) ⊕ B.
Then e ∈ (A⊕B) or e ∈ B but not both.
If e ∈ (A⊕B), then either e∈A or e∈B.
If e∈A and e∉B then we are done.
If e∈B, and e∉A, then e∈ (A⊕B) but can not
be an element of (A⊕B) ⊕ B by definition
so this case can not exist.
Generalized Unions
The union of a collection of sets A1 ∪A2 ∪ ... ∪ An can
be written more compactly using the notation:
n
A
A1 ∪A2 ∪ ... ∪ An =
i =1
i
Example: Let A1={a, b}; A2={a, b, c}; A3={b, c, d}
3
 A = {a, b, c, d}
i
i =1
1
9/18/14
More general example.
Generalized Intersections
The intersection of a collection of sets A1 ∩A2 ∩ ... ∩ An
can be written more compactly using the notation:
n
A1 ∩ A2 ∩ ... ∩ An =
A
Let Ai = {1,2,3…i}
n
Find
A
i
i =1
i
= {1,2,3, . . ., n}
i =1
n
Example: Let A1={a, b}; A2={a, b, c}; A3={b, c, d}
3
A =
i
Find
A
i
= {1}
i =1
{b}
i =1
Let Ai = {i,i+1,i+2…}
n
Find
A
i =1
i
= Z+
Sets are collections of objects that are
unordered. Order can be important so we
need a different structure to represent ordered
collections of objects.
Ordered n-tuples
n
Find
A
i
= {n, n+1, n+2, …}
i =1
Ordered n-tuple
The ordered n-tuple (a1,a2,…an)is the ordered
collection that has a1 as its first element, a2
as its second element . . . And an as its nth
element.
2-tuples are called ordered pairs.
(10, 3) ≠ (3, 10)
Cartesian Product of A and B
Let A and B be sets. The Cartesian Product
of A and B, denoted A × B is the set of
ordered pairs (a,b) where a ∈A and b ∈ B.
Hence A × B = {(a,b) | a ∈A ∧ b ∈ B}
Example: A = {1,2}, B= {a,b,c}
A × B = {(1,a), (1,b), (1,c), (2,a), (2,b), (2,c)}
Note that A × B ≠ B × A
2
9/18/14
Cartesian Product of the sets A1,A2,…An
The Cartesian Product of the sets A1,A2, .. , An denoted
by A1×A2× … ×An is the set of ordered n-tuples
(a1,a2,..,an) where ai belongs to Ai for i = 1,2,... ,n.
A1 × A2 ×…× An = {a1,a2,..,an | ai ∈Ai for i=1,2…,n}
Example: A ={0,1}; B = {1,2}; C = {0,1,2}
A × B × C = {(0,1,0), (0,1,1), (0,1,2), (0,2,0), (0,2,1),
(0,2,2), (1,1,0), (1,1,1), (1,1,2), (1,2,0), (1,2,1), (1,2,2)}
3