Download presentation

Presentation is loading. Please wait.

Published byCaden Kitching Modified about 1 year ago

1
More Set Definitions and Proofs 1.6, 1.7

2
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.

3
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}

4
Generalized Unions and Intersections A1 A2 ... An = A1 A2 ... An =

5
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

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

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

8
Prove (A B) B = A ABA B(A B) B

9
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.

10
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.

11
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.

12
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? General rule for complements?

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

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google