1 / 13

More Set Definitions and Proofs

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.

lathrop
Download Presentation

More Set Definitions and Proofs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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…) = 1,2,3, . . ., n Find = 1 Find

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

  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 A B AB (AB)  B 1 1 0 1 1 0 1 1 0 1 1 0 0 0 0 0

  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 ui belongs to A and 0 if ui 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? 1010101010 1111100000 0000011111 • 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 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

More Related