# More Set Definitions and Proofs 1.6, 1.7. Ordered n-tuple The ordered n-tuple (a1,a2,…an) is the ordered collection that has a1 as its first element,

## Presentation on theme: "More Set Definitions and Proofs 1.6, 1.7. Ordered n-tuple The ordered n-tuple (a1,a2,…an) is the ordered collection that has a1 as its first element,"— Presentation transcript:

More Set Definitions and Proofs 1.6, 1.7

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.

Cartesian Product of A and B Let A and B be sets. The Cartesian product of A and B, denoted A x B is the set of all ordered pairs (a,b) where a  A and b  B. Hence A x B = {(a,b) | a  A  b  B} The Cartesian product of the sets A1,A2,.., An denoted by A1 x A2 x … x An is the set of ordered n-tuples (a1,a2,..,an) where ai belongs to Ai for I = 1,2,...,n. A1 x A2 x…x An = {(a1,a2,..,an) | ai  Ai for I=1,2…,n}

Generalized Unions and Intersections A1  A2 ...  An = A1  A2 ...  An =

Let Ai = {1,2,3…i}for i = 1,2,3,… (that is, A1=1; A2=1,2; A3=1,2,3; etc…) Find = 1,2,3,..., n = 1

Let Ai = {i,i+1,i+2…} Find = Z+ = n, n+1, n+2, …

Symmetric Difference Problem Prove(A  B)  B = A  A  B  elements in A or B but not in both.

Prove (A  B)  B = A ABA  B(A  B)  B 1101 1011 0110 0000

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.

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. Thus (A  B)  B = A.

Computer Representation of Sets How to store the elements of sets and make computing the union, intersection, difference, etc., easier? Assume U is finite and of reasonable size. It has cardinality n. First, specify an arbitrary ordering of the elements of U. Represent a subset A of U with a bit string of length n, where the i’th bit is 1 if u i belongs to A and 0 if u i does not belong to A.

Using the Computer Representation Let U = {1,2,3,4,5,6,7,8,9,10}. Assume an ordering of the elements as written What bit string represents the subset of all odd integers? What bit string represents the set of all integers that do not exceed 5? What’s the complement of this set? 1010101010 1111100000 0000011111 General rule for complements?

Using the Computer Representation The bits strings of {1,2,3,4,5} and {1,3,5,7,9} are 111110000 and 1010101010, respectively What is the union of these sets? 1111100000  1010101010 = What is the intersection of these sets? 1111100000  1010101010 = What’s the general rules? 1111101010 1010100000 bitwise OR for union; bitwise AND for intersection

Download ppt "More Set Definitions and Proofs 1.6, 1.7. Ordered n-tuple The ordered n-tuple (a1,a2,…an) is the ordered collection that has a1 as its first element,"

Similar presentations