* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Proposition: The following properties hold A ∩ B ⊆ A, A ∩ B ⊆ B, A
Survey
Document related concepts
Georg Cantor's first set theory article wikipedia , lookup
Location arithmetic wikipedia , lookup
List of first-order theories wikipedia , lookup
Computability theory wikipedia , lookup
Hyperreal number wikipedia , lookup
Non-standard analysis wikipedia , lookup
Mathematical proof wikipedia , lookup
Birkhoff's representation theorem wikipedia , lookup
Elementary mathematics wikipedia , lookup
Proofs of Fermat's little theorem wikipedia , lookup
Transcript
Proposition: The following properties hold A ∩ B ⊆ A, A ∩ B ⊆ B, A ⊆ A ∪ B, B ⊆ A ∪ B A ∪ A = A, A ∩ A = A, A ∪ B = B ∪ A, A ∩ B = B ∩ A A ∪ B = B ⇔ A ⊆ B, A ∩ B = A ⇔ A ⊆ B A ∪ (B ∪ C) = (A ∪ B) ∪ C, A ∩ (B ∩ C) = (A ∩ B) ∩ C A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C), A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) Definition: If A and X are sets we define the complement of A in X to be X − A = {x | x ∈ X and x 6∈ A}. Note: In applications there is usually a universal set in the background denoted U . This could be the set of all the people in the world, the set of all real numbers, etc., Definition: If there is a universal set U , we define the complement of A to be ∼A = U − A = {x | not (x ∈ A)}. Note: Since inclusions, unions, intersections and complements are defined using ⇒, or, and and not many identities about sets follow from logical equivalences. Example: We know not (P and Q) ≡ (not P) or (not Q). Letting P and Q stand for the statements P: x ∈ A Q: x ∈ B gives not (x ∈ A and x ∈ B) ≡ (not x ∈ A) or (not x ∈ B) which is the same as ∼(A ∩ B) = (∼A) ∪ (∼B) Here are more properties: A ∪ ∼A = U, A ∩ ∼A = ∅. If A is not necessarily a subset of X, X − ∅ = X, X − X = ∅, A ∩ (X − A) = ∅. De Morgan’s Laws X − (A ∪ B) = (X − A) ∩ (X − B), X − (A ∩ B) = (X − A) ∪ (X − B). De Morgan’s Laws for X = U ∼(A ∪ B) = (∼A) ∩ (∼B), ∼(A ∩ B) = (∼A) ∪ (∼B). Definition: The symmetric difference of two sets is defined by A4B = {x | (x ∈ A and x 6∈ B) or (x 6∈ A and x ∈ B)}. Cardinality Definition: If A is a finite set we write |A| for the number of elements in A and call |A| the cardinality of A. Proposition: If A and B are finite sets then |A ∪ B| = |A| + |B| − |A ∩ B| Proof: From a Venn diagram we see |A ∪ B| = |A∩ ∼B| + |A ∩ B| + | ∼A ∩ B| The first two terms give |A| while the last term gives |B| − |A ∩ B|. Example: In a survey of 100 phoneowners 55 have iphones, 40 have Samsungs and 3 have both. (!!!) How many have neither? Solution: Let I be the set of iphone owners in the survey and S be the set of Samsung phone owners in the survey. Here the universal set U is the set of people surveyed. The set of surveyed people with neither an iphone nor a Samsung is ∼(I ∪ S). So we want to find | ∼(I ∪ S)|. We know | ∼(I ∪ S)| = |U | − |I ∪ S| = 100 − |I ∪ S| so we should find |I ∪ S| and the last proposition gives |I ∪ S| = |I| + |S| − |I ∩ S|. Thus we can say |I ∪ S| = |I| + |S| − |I ∩ S| = 55 + 40 − 3 = 92 so that the number with neither phone is 100 − 92 = 8. Proposition: If A, B and C are finite sets then |A ∪ B ∪ C| = |A| + |B| + |C| −|A ∩ B| − |A ∩ C| − |B ∩ C| +|A ∩ B ∩ C| Proof: Look at Venn diagram and record how often regions are counted. I’ll write ∼D as D0 and D ∩ E as DE to save space. Summand ABC +|A| 1 +|B| 1 +|C| 1 −|AB| −1 −|AC| −1 −|BC| −1 +|ABC| 1 Total 1 ABC 0 1 1 0 −1 0 0 0 1 AB 0 C 1 0 1 0 −1 0 0 1 AB 0 C 0 1 0 0 0 0 0 0 1 A0 BC 0 1 1 0 0 −1 0 1 A0 BC 0 0 1 0 0 0 0 0 1 A0 B 0 C 0 0 1 0 0 0 0 1 A0 B 0 C 0 0 0 0 0 0 0 0 0 Example: A group of 100 families are surveyed about where they shop. They all shop at at least one of Tesco , Supervalu or Dunnes Stores. Suppose 45 shop at Tesco, 50 shop at Supervalu and 60 shop at Dunnes, while 22 shop at Tesco and Supervalu, 17 shop at Tesco and Dunnes and 19 shop at Supervalu and Dunnes. How many shop only at Tesco? Only at Supervalu? Only at Dunnes? Idea: 100 = |T ∪ S ∪ D|. Use the proposition to find |T ∩ S ∩ D|. Fill in the rest of the numbers. |T ∪ S ∪ D| = |T | + |S| + |D| −|T ∩ S| − |T ∩ D| − |S ∩ D| +|T ∩ S ∩ D| This gives 100 = 45 + 50 + 60 − 22 − 17 − 19 + |T ∩ S ∩ D| so that |T ∩ S ∩ D| = 3. So |T ∩ S∩ ∼D| |T ∩ ∼S ∩ D| | ∼T ∩ S ∩ D| |T ∩ ∼S∩ ∼D| | ∼T ∩ S∩ ∼D| | ∼T ∩ ∼S ∩ D| = = = = = = |T ∩ S| − 3 = 19 |T ∩ D| − 3 = 14 |D ∩ S| − 3 = 16 |T | − |T ∩ S∩ ∼D| − |T ∩ ∼S ∩ D| − 3 = 9 |S| − |T ∩ S∩ ∼D| − | ∼T ∩ S ∩ D| − 3 = 12 |D| − |T ∩ S∩ ∼D| − | ∼T ∩ S ∩ D| − 3 = 27 An old MS121 final Exam question: |A ∪ B ∪ C| = |A| + |B| + |C| −|A ∩ B| − |A ∩ C| − |B ∩ C| +|A ∩ B ∩ C| = |A| + (|A| + 2) + 2(|A| + 2) −|A ∩ B| − (|A ∩ B|) − (0) +(0) = 2(2|A| + 3 − |A ∩ B|) Product sets Definition: If A and B are sets their Cartesian product, denote A × B is the set whose elements are all possible ordered pairs (a, b), where a ∈ A and b ∈ B. That is, A × B = {(a, b) | a ∈ A and b ∈ B} Example: If A = {1, 2} and B = {p, q, r} then A × B = {(1, p), (1, q), (1, r), (2, p), (2, q), (2, r)} If A and B are finite we can picture the Cartesian product as a grid. In the case of the last example this would be ` (1, r) ` (2, r) ` (1, q) ` (2, q) ` (1, p) ` (2, p) Note: If A and B are finite, then |A × B| = |A||B|. (That is the product of the two cardinalities. ) Note: We already view the plane R2 as R × R. Note: If A = B then we write A × A as A2 . Note: We can extend this definition to more than two sets and to a Cartesian product of a set with itself several times. Example: If A = {0, 1}, then A3 = {(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1), (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1)} This is the same as the set of binary strings of length 3. We usually write these as 000, 001, 010, 011, 100, 101, 110, 111 Example: The number of elements in A3 is |A|3 . In the above example, |A| = 2 and A3 has 8 = 23 elements. In general, the number of binary strings of length n is 2n . Webwork reminder For semester 1 the entire MS121 Continuous assessment is for webwork homework. So do it. Set 1 due on Sunday (10/12/2014) ‘I cannot get in!’ website http://webwork.dcu.ie/webwork2/MS121/ username [email protected] (your DCU e-mail address) password 14567890 (your DCU student ID) Change the password once you are in. Set theory and methods of proof. Suppose we want to prove P ⇒ Q. Let U be the universal set of all things under discussion (Integers, real numbers, triangles, pairs of integers, ?) Set A = {x ∈ U | P (x)}, B = {x ∈ U | Q(x)}. Proving P ⇒ Q is equivalent to showing A ⊆ B. Showing x ∈ A ⇒ x ∈ B is the direct proof. Now look at a Venn diagram of two general sets A and B in a universal set U . To say A ⊆ B is equivalent to saying ∼B ⊆∼A. So we could approach proving P ⇒ Q by proving not Q ⇒ not P . This is the contrapositive approach. Finally, again looking at the Venn diagram we see that A ⊆ B is equivalent to saying ∼B ∩ A = ∅. This gives the proof by contradiction approach. Past exam questions on logic and set theory (i) (not P) ⇒ (not Q) (ii) P or (not Q) P Q not P T T F F T F F T T T F F not Q (not P) ⇒ (not Q) F T T T F F T T P Q P ⇒ Q P and (P ⇒ Q) T T T T F F T F F T T F F F T F P not P T F F T Por (not P) T T Last column contains only T’s, so a tautology. P Q not Q P or (not Q) T T F T T F T T F T F F T T F F Last column contains some F’s, so not a tautology. (i) x1 1 1 = = x1 + 2 1+2 3 1 1 3 x2 1 3 3 x3 = = 1 = 1 = x2 + 2 7 +2 +2 3 3 3 1 1 7 1 x3 7 = 1 = 1 7 = x4 = x3 + 2 15 +2 +2 7 7 7 x2 = (ii) The denominators are 1, 3, 7, 15, . . . which we recognise as 1, 1 + 2, 1 + 2 + 22 , 1 + 2 + 22 + 23 , . . . These terms are of the form 1 + a + a2 + . . . + an−1 . We proved that 1 + a + a2 + . . . + an−1 = 1 − an 1−a For a = 2 we find the denominators are 2n − 1 and hence xn = 2n 1 . −1 To prove, by induction, that this is the case we proceed in the usual way: Base step: 1 1 x1 = 1 = =1 2 −1 2−1 which is what is given in the question. Inductive step: Assuming that xk = 1 2k − 1 we prove, using xk+1 = (xk )/(xk + 2), that xk+1 = xk+1 = = = 1 2k+1 −1 . xk xk + 2 1 2k −1 1 + 2k −1 1 2k −1 1 + 2k −1 2 2 2k − 1 2k − 1 1 1 + 2(2k − 1) 1 = k+1 1+2 −2 1 = k+1 2 −1 =