set operations
play

Set Operations B . It is denoted A B . A B = { x | x A x B } A B = { - PowerPoint PPT Presentation

Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide01.html Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide02.html Set Operations prev | slides | next prev | slides | next Let A and B be sets.


  1. Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide01.html Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide02.html Set Operations prev | slides | next prev | slides | next Let A and B be sets. The union of A and B is the set of all elements in either A or B or in both sets. It is denoted A B . The intersection of A and B is the set of all elements in both A and Set Operations B . It is denoted A B . A B = { x | x A x B } A B = { x | x A x B } 1 2 3 4 5 6 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13 1 of 1 09/07/2003 04:30 PM 1 of 1 09/07/2003 04:30 PM Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide03.html Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide04.html Set Operations Set Operations prev | slides | next prev | slides | next In terms of Venn diagrams we have Two sets are disjoint if their intersection is the empty set. Union Intersection If A ={1, 2} and B ={3, 4, 5} then they are disjoint because A B = . Question: how big is A B ? For example, suppose A ={1, 2, 3, 4} and B ={2, 4, 6}. In this case A B ={1,2,3,4,6} | A | = 4 | B | = 3 | A B | = 5 1 2 3 4 5 6 7 8 9 10 11 12 13 How can we figure out what the cardinality of A B directly from the cardinality of A and the cardinality of B ? 1 2 3 4 5 6 7 8 9 10 11 12 13 1 of 1 09/07/2003 04:30 PM 1 of 1 09/07/2003 04:30 PM

  2. Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide05.html Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide06.html Set Operations Set Operations prev | slides | next prev | slides | next The inclusion-exclusion principle comes to our rescue. In its most In fact, we cannot calculate | A B | knowing only | A | and | B |. We basic form it is need one additional piece of information. The difficulty lies in that if we find | A |+| B | we’ve counted the | A B | = | A | + | B | - | A B | elements that are common to both sets twice. We need some way to reduce this by the number of elements common to both sets... The last term subtracts the sum by the number of elements common to both sets, which is exactly what we needed to do. 1 2 3 4 5 6 7 8 9 10 11 12 13 Suppose | A B | = 7, | A | = 5 and | A B | = 3. What is | B |? (answer) 1 2 3 4 5 6 7 8 9 10 11 12 13 1 of 1 09/07/2003 04:30 PM 1 of 1 09/07/2003 04:30 PM Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide07.html Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide08.html Set Operations Set Operations prev | slides | next prev | slides | next Let A and B be sets. The difference of A and B , denoted A - B , is the Here are Venn diagrams for these two types of complements: set containing all elements that are in A but not also in B . This set is also called the complement of B with respect to A . A - B A’ A - B = { x | x A x B } If U is the universal set then the complement of A is denoted A’ and is the set U - A . 1 2 3 4 5 6 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13 1 of 1 09/07/2003 04:30 PM 1 of 1 09/07/2003 04:30 PM

  3. Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide09.html Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide10.html Set Operations Set Operations prev | slides | next prev | slides | next Set Identities Set Identities Identity Name Identity Name = A A B = B A A Identity laws Commutative laws A U = A A B = B A A U = U A ( B C ) = ( A B ) C Domination laws Associative laws = A ( B C ) = ( A B ) C A A A = A A ( B C ) = ( A B ) ( A C ) Idempotent laws Distributive laws A A = A A ( B C ) = ( A B ) ( A C ) ( A’)’ = A Complementation law ( A B ) ’ = A’ B’ De Morgan’s laws ( A B ) ’ = A’ B’ 1 2 3 4 5 6 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13 1 of 1 09/07/2003 04:30 PM 1 of 1 09/07/2003 04:30 PM Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide11.html Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide12.html Set Operations Set Operations prev | slides | next prev | slides | next The bad news is that we’ve only completed half of the proof: to Prove that A ( B C ) = ( A B ) ( A C ) using a common element show equality we need still to show that proof . ( A B ) ( A C ) A ( B C ) x A ( B C ) x A x ( B C ) x A ( x B x C ) The good news is that this is easy. Because each of the steps in the ( x A x B ) ( x A x C ) first part of the proof is logically equivalent to the step before it, it follows that if we start at the bottom and assume that x is in ( A B ) x ( A B ) x ( A C ) ( A C ) then we can conclude that x is in A ( B C ) and we are done. x ( A B ) ( A C ) 1 2 3 4 5 6 7 8 9 10 11 12 13 We have assumed that x is in A ( B C ) and shown that in this case x must be in ( A B ) ( A C ). Thus we have that A ( B C ) ( A B ) ( A C ) 1 2 3 4 5 6 7 8 9 10 11 12 13 1 of 1 09/07/2003 04:30 PM 1 of 1 09/07/2003 04:30 PM

  4. Set Operations http://localhost/~senning/courses/ma229/slides/setops/slide13.html Set Operations prev | slides | next The main idea behind a common element proof to show that two sets A and B are equal is to first assume that x is a typical element of A and show that it must be in B . This shows that B . A Next, assume that x is in B and show that it must also be in A . This shows that B A Finally, because A B and B A it must be that A = B . 1 2 3 4 5 6 7 8 9 10 11 12 13 1 of 1 09/07/2003 04:31 PM

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend