Mat 2345 Student Responsibilities — Week 4 2.1 Sets Notation Used
Total Page:16
File Type:pdf, Size:1020Kb
Student Responsibilities — Week 4 I Reading: Textbook, Section 2.1–2.3 Mat 2345 I Attendance: Strongly Encouraged Week 4 I Week 4 Overview Fall 2013 I 2.1 Sets I 2.2 Set Operations I 2.3 Functions 2.1 Sets Notation used to specify sets I list the elements between braces; listing an object more than once does not change the set—ordering means nothing. I Set: an unordered collection or group of objects, which are said to be elements, or members of the set S = a, b, c, d = b, c, a, d, d { } { } I Set builder notation – specify by predicate; here, S contains all I A set is said to contain its elements elements from U which make the predicate P true S = x P(x) { | } I There must be an underlying Universal Set, U, either specifically stated or understood I brace notation with ellipses; here, the negative integers: S = ..., 3, 2, 1 { − − − } Common Universal Sets Notation I R — Real Numbers I x S — x is a member of S, or x is an element of S ∈ I x / S — x is not an element of S I N — Natural Numbers: 0, 1, 2, 3,... ∈ { } I Z — Integers: ..., 3, 2, 1, 0, 1, 2, 3,... Set Equality — Definition #1 { − − − } I Two sets are equal if and only if they have the same elements. + I Z — Positive Integers I That is, if A and B are sets, then A and B are equal if and only if x[x A x B]. ∀ ∈ ↔ ∈ p I Q — Rational Numbers: p, q Z q = 0 { q | ∈ ∧ 6 } I We write A = B if A and B are equal sets. Subsets Power Set I Subset: Let A and B be sets. Then A B x [ x A x B ] I Power Set: P(A) is the set of all possible subsets of the set A ⊆ ⇔ ∀ ∈ → ∈ I If A = a, b , then I Empty, void, or Null Set: ∅ is the set with no members { } P(A) = ∅, a , b , a, b { { } { } { }} I the assertion x ∅ is always false, thus: ∈ I What is the power set of the set B = 0, 1, 2 ? x [ x ∅ x B] is always (vacuously) true, ∀ ∈ → ∈ { } and therefore ∅ is a subset of every set I Note: a set B is always a subset of itself: B B ⊆ I How many elements would P( a, b, c, d ) have? { } I Proper subset: A B if A B, but A = B ⊂ ⊆ 6 Cardinality Example I Cardinality: A is the number of distinct elements in A | | I Let A = ∅, ∅ I If the cardinality is a natural number (in N), then the set is { { }} I A has two elements and hence four subsets: called finite; otherwise, it’s called infinite ∅, ∅ , ∅ , ∅, ∅ { } {{ }} { { }} I Example: Let A = a, b I Note that ∅ is both a member of A and a subset of A { } I A = a, b = 2 | | |{ }| I P(A) = P( a, b ) = 4 I Russell’s Paradox: Let S be the set of all sets which are not | | | { } | I A is finite, and so is P(A) members of themselves. Is S a member of itself or not? n I Note : A = n P(A) = 2 1 | | → | | I Note2: N is infinite since N is not a natural number — I The Paradox of the Barber of Seville: The (male) barber of | | it is called a transfinite cardinal number Seville shaves all and only men who do not shave themselves. Who shaves the barber of Seville? I Note3: Sets can be both members and subsets of other sets Cartesian Product I Cartesian Product of A with B: A B is the set of ordered I The Cartesian product of the sets A , A ,..., A , denoted by × 1 2 n pairs: < a, b > a A b B A A A is the set of ordered n–tuples { | ∈ ∧ ∈ } 1 × 2 × · · · × n < a1, a2,..., an >, where ai Ai for 1 i n. I Notation: Πn A = < a , a ,..., a > a A , ∈ ≤ ≤ i=1 i { 1 2 n | i ∈ i } an n–tuple I A A A = 1 × 2 × · · · × n I The Cartesian product of any set with is — why? < a1, a2,..., an > ai Ai , i = 1, 2,..., n ∅ ∅ { | ∈ } I Example 1. Let A = a, b and B = 1, 2, 3 { } { } I If A = a, b and B = 1, 2, 3 , what is A B A? A B = < a, 1 >, < a, 2 >, < a, 3 >, < b, 1 >, < b, 2 >, < b, 3 > { } { } × × × { } What is B A? × If A = m and B = n, what is A B ? | | | | | × | Quantifiers Truth Sets The Universe of Discourse, also known as the Domain of Discourse, is often referred to simply as the domain. I Let P be a predicate and D a domain. The Truth Set of P is the set of elements x D P(x) is true. The domain specifies the possible values of our variables. ∈ 3 I The truth set of P(x) is denoted: x D P(x) We can use quantifiers to restrict the domain { ∈ | } I Assume the domain is the set of integers. What are the truth sets: I x S[P(x)] denotes x[x S P(x)] ∀ ∈ ∀ ∈ → I P = x Z x = 1 Truth Set: Ex: x R[x2 0] means: { ∈ | | | } ∀ ∈ ≥ 2 2 I Q = x Z x = 2 Truth Set: for every real number x, x is non-negative { ∈ | } I R = x Z x = x Truth Set: Note: The meaning of the universal quantifier changes when we { ∈ | | | } change the domain. I Note: xP(x) is true over the domain U IFF the truth set of P ∀ is U. I x S[P(x)] denotes x[x S P(x)] ∃ ∈ ∃ ∈ ∧ I Note: xP(x) is true over the domain U IFF the truth set of Ex: x Z[x2 = 1] means: ∃ ∃ ∈ P = ∅. there exists an integer x such that x2 = 1 6 2.2 Set Operations Equality of Sets By a previous logical equivalence, we have: I Boolean Algebra: an algebraic system, instances of which are propositional calculus and set theory. A = B IFF I The operators in set theory are defined in terms of the x [(x A x B) (x B x A)] corresponding operator in propositional calculus. ∀ ∈ → ∈ ∧ ∈ → ∈ — or another definition — I As before, there must be a universe, U, and all sets are assumed to be subsets of U. A = B IFF A B and B A ⊆ ⊆ Set Operations More Set Operations I Union of A and B, denoted A B, is the set ∪ x x A x B { | ∈ ∨ ∈ } I Difference of A and B, or the complement of B relative to A, denoted A B, is the set − A B I Intersection of A and B, denoted A B, is the set ∩ ∩ Note: The absolute complement of A is U A x x A x B − { | ∈ ∧ ∈ } If the intersection is void, A and B are said to be disjoint I Symmetric Difference of A and B, denoted A B, is the set ⊕ (A B) (B A) − ∪ − I Complement of A, denoted A, is the set x (x A) = x x A { | ¬ ∈ } { | 6∈ } Examples Venn Diagrams U = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 { } A = 1, 2, 3, 4, 5 and B = 4, 5, 6, 7, 8 Venn Diagrams are a useful geometric visualization tool for 3 or { } { } fewer sets. I A B = 1, 2, 3, 4, 5, 6, 7, 8 ∪ { } I A B = 4, 5 I The Universal set U is a rectangular box ∩ { } I A = 0, 6, 7, 8, 9, 10 I Each set is represented by a circle and its interior { } I B = 0, 1, 2, 3, 9, 10 { } I All possible combinations of the sets must be represented I A B = 1, 2, 3 − { } I Shade the appropriate region to represent the given set operation I B A = 6, 7, 8 − { } I A B = 1, 2, 3, 6, 7, 8 ⊕ { } Examples U U A B AB For 2 sets A B ∩ U A B U A B C C For 3 sets A (C B) ∪ ∩ Set Identities Universal Instantiation Set identities correspond to the logical equivalences. We now apply an important rule of inference called Example The complement of the union is the intersection of the Universal Instantiation complements: In a proof, we can eliminate the universal quantifier A B = A B ∪ ∩ which binds a variable if we do not assume anything To prove this statement, we would need to show: about the variable other than it is an arbitrary mem- x [x A B x A B] ber of the Universe. We can then treat the resulting ∀ ∈ ∪ ↔ ∈ ∩ predicate as a proposition. To show two sets are equal: I we can show for all x that x is a member of one set IFF it is a We say, “Let x be arbitrary.” Then we can treat the predicates member of the other, or as propositions. I show that each is a subset of the other Universal Generalization Assertion Reason x A B x / (A B) Defn of complement We can apply another rule of inference ∈ ∪ ⇔ ∈ ∪ [x (A B)] Defn of / ⇔ ¬ ∈ ∪ ∈ [(x A) (x B)] Defn of union ⇔ ¬ ∈ ∨ ∈ (x A) (x B) DeMorgan’s Laws Universal Generalization ⇔ ¬ ∈ ∧ ¬ ∈ (x / A) (x / B) Defn of / ⇔ ∈ ∧ ∈ ∈ We can apply a universal quantifier to bind a variable (x A) (x B) Defn of complement ⇔ ∈ ∧ ∈ if we have shown the predicate to be true for all values x (A B) Defn of intersection of the variable in the Universe ⇔ ∈ ∩ Hence, x A B x A B is a tautology since and claim the assertion is true for all x, i.e., ∈ ∪ ↔ ∈ ∩ I x was arbitrary, and x[x A B x A B] I we have used only logically equivalent assertions and definitions ∀ ∈ ∪ ↔ ∈ ∩ Q.E.D.