# Lecture Outline Introduction to sets and set notation (5.1, 5.3)

## Presentation on theme: "Lecture Outline Introduction to sets and set notation (5.1, 5.3)"— Presentation transcript:

Lecture Outline Introduction to sets and set notation (5.1, 5.3)
Discrete Structures 1 Lecture Outline Lecture 1 Introduction to sets and set notation (5.1, 5.3) Visualizing sets: Venn diagrams (5.1) Axiom of extension (5.1) Equivalence relations (10.2, 10.3) Relations between sets: set equality (5.1) Relations between sets: set containment (5.1) Operations on sets: union and intersection (5.1) Operations on sets: difference and complement (5.1) Operations on sets: more examples (5.1) Disjoint sets (5.1) Partitions of sets (5.1) Power Sets (5.1) Cartesian products (5.1)

Lecture Outline Application: alphabets, strings and languages (5.1)
Discrete Structures 1 Lecture Outline Lecture 1 Application: alphabets, strings and languages (5.1) Properties of sets: subset relations (5.2) Properties of sets: set identities (5.2) Summary of set identities (5.2) Disproofs (5.3) Number of subsets of a given set (5.3) Algebraic Proofs (5.3) Boolean Algebra (5.3) Russell’s paradox (5.4) The Halting Problem (5.4)

Introduction to Sets and Set Notation
Discrete Structures 1 Introduction to Sets and Set Notation Lecture 1 Georg Cantor was the first to suggest that the study of sets, themselves, might be as important and valuable as the study of the elements, and the properties thereof, which comprise sets. There is no formal definition for set or element, but we can all agree, for the purpose of discussion, on the following: A set is any collection of objects; and Individual objects within a set are called elements.

Introduction to Sets and Set Notation (cont’d)
Discrete Structures 1 Introduction to Sets and Set Notation (cont’d) Lecture 1 Set Notation Sets are typically represented by capital letters A, B, C, … while elements are represented by lower case letters a, b, c, … 2. The symbols  and  are used to indicate whether an element belongs (e.g. a  A) or doesn’t belong (e.g. b  C) to a set. 3. Sets may be defined by verbal description (e.g. A = {all integers which are multiples of 4}), by listing elements (e.g. A = {…,-8 -4, 0, 4, 8, 12, …}), or by a defining property (e.g. A = {n  Z n = 4k, where k  Z}).

Introduction to Sets and Set Notation (cont’d)
Discrete Structures 1 Introduction to Sets and Set Notation (cont’d) Lecture 1 Set Notation Specific letters reserved for specific sets include Z (integers), Z+ (positive integers), Q (rational numbers), and R (real numbers). 5. The symbol  is especially reserved for the empty set (a collection containing no objects, i.e. { }). Such a set may seem strange or unnecessary, but in fact it is both important and useful. For example, the fact that there are no real number solutions to the equation x2 = -1 may be expressed {x  R x2 = -1} =  . 6. Likewise, the symbol U is especially reserved for the universal set, which is the largest possible set of objects under discussion in a particular context.

Introduction to Sets and Set Notation (cont’d)
Discrete Structures 1 Introduction to Sets and Set Notation (cont’d) Lecture 1 Let U = {1, 2, 3,…….}, the set of positive integers. Let, A = {1, 4, 9, 16…..64, 81} = { x² | x  U , x²  100} = { x² | x  U  x²  100} = {x²  U | x²  100} C = {2, 4, 6, 8, …} = {2k | k  U } The set A is a finite set, C is an infinite set. For a finite set | A| Denotes the number of elements of A or the cardinality of A, | A| = 9.

VisualizingSets: Venn Diagrams
Discrete Structures 1 VisualizingSets: Venn Diagrams Lecture 1 It was John Venn who first introduced the idea of representing sets and their associated relations and operations, using diagrams. These diagrams now bear his name. In Venn diagrams, the universal set U is normally represented as a rectangle, with other subsets A, B, etc. represented by circles. In the examples which follow, the universal set U will appear in red, with the subsets A and B coloured blue and green, respectively.

VisualizingSets: Venn Diagrams (cont’d)
Discrete Structures 1 VisualizingSets: Venn Diagrams (cont’d) Lecture 1 Examples (U, A, B) A  B A = B

VisualizingSets: Venn Diagrams (cont’d)
Discrete Structures 1 VisualizingSets: Venn Diagrams (cont’d) Lecture 1 Examples (U, A, B) A  B A  B

VisualizingSets: Venn Diagrams (cont’d)
Discrete Structures 1 VisualizingSets: Venn Diagrams (cont’d) Lecture 1 Examples (U, A, B) B  A Ac

Discrete Structures 1 Axiom of Extension Lecture 1 A better understanding of what are the essential characteristics of a set is provided by the axiom of extension. Definition (Axiom of Extension) A set is completely determined when all of its elements have been clearly specified. In particular, the order in which the elements are listed is irrelevant, as is listing an element more than once. Examples {…, -2, -1, 0, 1, 2, 3, …} = Z = {0, 1, -1, 2, -2, 3, -3, …} {b, a, n, a, n, a} = {letters in “banana”} = {a, b, n}

Equivalence Relations
Discrete Structures 1 Equivalence Relations Lecture 1 Definition Let R be a relation on a set A. Then R is an equivalence relation on A provided: 1. for any a  A, a R a (reflexive property); 2. for any a, b  A, if a R b, then b R a (symmetric property); and 3. For any a, b, c  A, if a R b and b R c, then a R c (transitive property). Examples of Equivalence Relations on Sets A = Z R = “=” (“is identical to”) A = {all straight lines} R = “” (“is parallel to”) A = Q R = “=” (“is equal to, when reduced to lowest terms”) A = {all people} R = “has the same birthdate as”

Relations Between Sets: Set Equality
Discrete Structures 1 Relations Between Sets: Set Equality Lecture 1 Note that the elements of a set can themselves be sets. For example, a set S could be defined as S = {{a, b}, {a, c}, {b, a}, {b, c}}, where each element of S is itself a 2-element set. It follows that any relation defined on S would specify how elements of S are (or are not) related to one another, thereby establishing relations between sets. Definition (Set Equality) Let A and B be any two sets. A and B are said to be equal, denoted A = B, if and only if every element of A is in B, and every element of B is in A. In other words, equal sets are identical sets.

Relations Between Sets: Set Equality (cont’d)
Discrete Structures 1 Relations Between Sets: Set Equality (cont’d) Lecture 1 For example, in the case of S = {{a, b}, {a, c}, {b, a}, {b, c}}, {a, b} = {b, a} but {a, b}  {a, c}. Clearly, set equality is an equivalence relation. That is: 1. For each set A, A = A; 2. For any two sets A and B, if A = B, then B = A; and 3. For any three sets A, B and C, if A = B and B = C, then A = C.

Relations Between Sets: Set Containment
Discrete Structures 1 Relations Between Sets: Set Containment Lecture 1 Definition Let A and B be any two sets. A is said to be contained in B (or B contains A, or A is a subset of B), denoted A  B, if and only if every element of A is also an element of B. Clearly, set containment is at least a partial ordering relation. That is: 1. For each set A, A  A; 2. For any two sets A and B, if A  B and B  A , then A = B; and 3. For any three sets A, B and C, if A  B and B  C, then A  C.

Relations Between Sets: Set Containment (cont’d)
Discrete Structures 1 Relations Between Sets: Set Containment (cont’d) Lecture 1 Comparing the definitions of set equality and set containment, it is clear that if A = B, then A  B and B  A. Likewise, by the antisymmetric property for “”, if A  B and B  A , then A = B. It follows that A = B is logically equivalent to A  B and B  A. For this reason, one technique used in proving that two sets are equal is to prove that each is a subset of the other.

Relations Between Sets: Set Containment (cont’d)
Discrete Structures 1 Relations Between Sets: Set Containment (cont’d) Lecture 1 Definition Let A and B be any two sets. A is said to be a proper subset of B, denoted A  B, if and only if every element of A is in B, but there is at least one element of B that is not in A. Equivalently, A  B means that A  B but A  B.

Operations on Sets: Union and Intersection
Discrete Structures 1 Operations on Sets: Union and Intersection Lecture 1 Definition Let A and B be any two subsets of a universal set U. 1. The union of A and B, denoted A  B, is defined by A  B = {x  U x  A or x  B}. 2. The intersection of A and B, denoted A  B, is defined by A  B = {x  U x  A and x  B}. Examples Suppose U = {1, 2, 3, 4, 5, 6} and let A = {1, 3, 5} B = {2, 4, 6} C = {1, 2, 3}. Then A  B = {1, 2, 3, 4, 5, 6} = U A  B =  A  C = {1, 2, 3, 5} A  C = {1, 3} B  C = {1, 2, 3, 4, 6} B  C = {2}

Operations on Sets: Difference and Complement
Discrete Structures 1 Operations on Sets: Difference and Complement Lecture 1 Definition Let A and B be any two subsets of a universal set U. 1. The difference B minus A (or relative complement of A in B), denoted B  A, is defined by B  A = {x  U x  B and x  A}. 2. The complement of A, denoted Ac, is defined by Ac = {x  U x  A}. Examples Again, suppose U = {1, 2, 3, 4, 5, 6} and let A = {1, 3, 5} B = {2, 4, 6} C = {1, 2, 3} Then B  A = {2, 4, 6} = B A  B = {1, 3, 5} = A C  A = {2} A  C = {5} Ac = {2, 4, 6} = B Bc = A Cc = {4, 5, 6}

Operations on Sets: Symmetric Difference
Discrete Structures 1 Operations on Sets: Symmetric Difference Lecture 1 Symmetric Difference: A  B = { x | ( x  A  x  B)  x  A  B} Also written A  B

Operations on Sets: More Examples
Discrete Structures 1 Operations on Sets: More Examples Lecture 1 Example 1 (Intervals of Real Numbers) Let U = R, and suppose A = {x  R -1  x  2} and B = {x  R -2  x  1}. A  B = {x  R -1  x  2 or -2  x  1} = {x  R -2  x  2}. A  B = {x  R -1  x  2 and -2  x  1} = {x  R -1  x  1}. 3. B  A = {x  R -2  x  1 and (-1  x  2)} = {x  R -2  x  1 and (x  -1 or x  2)} = {x  R (-2  x  1 and x  -1) or (-2  x  1 and x  2)} = {x  R -2  x  -1}.

Operations on Sets: More Examples (cont’d)
Discrete Structures 1 Operations on Sets: More Examples (cont’d) Lecture 1 Example 1 (cont’d) Again, let U = R and suppose A = {x  R -1  x  2} and B = {x  R -2  x  1}. Ac = {x  R (-1  x  2)} = {x  R x  -1 or x  2} Graphically, these sets may be represented as follows: A  B A  B B  A Ac

Operations on Sets: More Examples (cont’d)
Discrete Structures 1 Operations on Sets: More Examples (cont’d) Lecture 1 Example 2 (Proving Equality of Sets) Given a universal set U with a subset A, prove that Ac = U  A. Proof We will prove that each set is contained in the other. First, assume an arbitrarily-chosen x  Ac. By the definition of complement, it follows that x  U and x  A. But then, by the definition of difference, x  U  A. This proves that Ac  U  A. Now, assume an arbitrarily-chosen x  U  A. By the definition of difference, it follows that x  U and x  A. But then, by the definition of complement, x  Ac. This proves that U  A  Ac. Since each set is contained in the the other, the two are equal.

Discrete Structures 1 Disjoint Sets Lecture 1 Definition Two sets A and B are said to be disjoint if they have no elements in common, i.e. A and B are disjoint if, and only if, A  B = . To prove any two sets are disjoint, it is therefore sufficient to show that their intersection is empty. This is sometimes done by assuming that there exists a common element in both sets, and then obtaining a contradiction. Example Show that A  B and A  B are disjoint. Solution: Assume an element x common to both sets. Since x  A  B, then x  B. But, since x  A  B, x B. This contradiction means that (A  B)  (A  B) = .

Disjoint Sets (cont’d)
Discrete Structures 1 Disjoint Sets (cont’d) Lecture 1 Definition The sets A1, A2, …, An are said to be mutually disjoint (also called pairwise disjoint or nonoverlapping) if, and only if, Ai  Aj =  for any i, j  Z+ such that 1  i  n, 1  j  n and i  j. Examples 1. The sets A0 = {…, -6, -3, 0, 3, 6, 9, …}, A1 = {…, -5, -2, 1, 4, 7, 10, …}, and A2 = {…, -4, -1, 2, 5, 8, 11, …} are mutually disjoint subsets of Z.

Disjoint Sets (cont’d)
Discrete Structures 1 Disjoint Sets (cont’d) Lecture 1 Examples (cont’d) 2. The sets A  B, A  B and B  A are mutually disjoint.

Discrete Structures 1 Partitions of Sets Lecture 1 Definition A collection of nonempty subsets {A1, A2, …, An} is a partition of a set A if, and only if (i) A = A1  A2  …  An, and (ii) the sets A1, A2, …, An are mutually disjoint. A2 A1 A3 A4

Partitions of Sets (cont’d)
Discrete Structures 1 Partitions of Sets (cont’d) Lecture 1 Examples 1. The collection of sets {A0, A1, A2} from the earlier example, i.e A0 = {…, -6, -3, 0, 3, 6, 9, …} = {3k k  Z}, A1 = {…, -5, -2, 1, 4, 7, 10, …} = {3k + 1k  Z} and A2 = {…, -4, -1, 2, 5, 8, 11, …} = {3k + 2k  Z} is a partition of Z. 2. If Q and I represent the rational and irrational numbers, then {Q, I} is a partition of the real numbers R. 3. {Z+, Z} is not a partition of Z (since 0 belongs to neither set). 4. {{2, 4, 6}, {2, 3, 5}} is not a partition of {2, 3, 4, 5, 6} (since the sets are not mutually disjoint).

Partitions and Equivalence Classes
Discrete Structures 1 Partitions and Equivalence Classes Lecture 1 Recall the definition of an equivalence relation. Definition Let R be a relation on a set A. Then R is an equivalence relation on A provided: 1. for any a  A, a R a (reflexive property); 2. for any a, b  A, if a R b, then b R a (symmetric property); and 3. For any a, b, c  A, if a R b and b R c, then a R c (transitive property). It turns out that an equivalence relation on A gives rise to a natural partition of A into subsets A1, A2, …, An called equivalence classes.

Partitions and Equivalence Classes (cont’d)
Discrete Structures 1 Partitions and Equivalence Classes (cont’d) Lecture 1 Definition Let R be an equivalence relation on a set A. Then, for each element a  A, there is an associated equivalence class (denoted [a], and containing the element a) defined by [a] = {x  Ax R a}. Examples 1. If A is Z and R is “=” (signifying equality of integers), then [n] = {x  Zx = n} = {n}, i.e. each equivalence class contains exactly one element. 2. If A is Q and R is “=” (signifying equality of fractions), then, for example, [1/3] = {m/n  Qm/n = 1/3} = {…, -3/-9, -2/-6, -1/-3, 1/3, 2/6, 3/9, 4/12,…}, i.e. each equivalence class contains infinitely many elements.

Discrete Structures 1 Power Sets Lecture 1 Definition For any given set A, the power set of A, denoted P(A), is the set of all subsets of A. Examples 1. If A = {a, b}, then P(A) = {, {a}, {b}, {a, b}} 2. If A = {1, 2, 3}, then P(A) = {, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}} Theorem For any sets A and B, if A  B, then P(A)  P(B). Proof: Let X be any element of P(A). It follows that X  A. But A  B, and, by the transitivity of “”, X  B. Since X is a subset of B, then X belongs to P(B). This proves that P(A)  P(B), as required.

Number of Subsets of a Given Set
Discrete Structures 1 Number of Subsets of a Given Set Lecture 1 In a previous slide we saw that if A contains 2 elements, then P(A) contains 4 = 22 elements, and if A contains 3 elements, then P(A) contains 8 = 23 elements. This suggests the general result that if A contains n elements, then P(A) contains 2n elements. Indeed, the latter can be proved as a theorem using mathematical induction. However, we will postpone a proof until we can do so using the Binomial Theorem. The number of elements in a set A is often denoted n(A). For example, if A = {a, b}, then n(A) = 2 and n(P(A)) = 22 = 4.

Infinite Sets and Power Sets
Discrete Structures 1 Infinite Sets and Power Sets Lecture 1 It is worth noting that the concept of the number of elements in a set (i.e. the “size” of a set) can also be extended to the case where A is an infinite set. A set which is infinite but which can be placed in a one-to-one correspondence with Z+ = {1, 2, 3, …} is said to be countably infinite, whereas when no such one-to-one correspondence is possible, we say the set is uncountably infinite. Countably infinite sets include (countability proofs not included): Z+; Z; {4k + 1k  Z}; all prime integers; Q and Q+. Uncountably infinite sets include (uncountability proofs not included): R; {r  R0 < r < 1}; irrational numbers; P(Z+) and P(Q).

Discrete Structures 1 Cartesian Products Lecture 1 Definition Let A and B be any sets (which could be equal). The Cartesian product of A and B, denoted A  B, is the set of all ordered pairs (a, b), where a  A and b  B. That is, A  B = {(a, b)a  A and b  B}. Likewise, the Cartesian product of the (not necessarily distinct) sets A1, A2, …, An is defined by A1  A2  …  An = {(a1, a2, …, an) a1 A1, a2 A2, …, an An}.

Cartesian Products (cont’d)
Discrete Structures 1 Cartesian Products (cont’d) Lecture 1 Examples Let A = {a, b} and B = {1, 2, 3}. Then A  B = {(a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3)}, A  A = A2 = {(a, a), (a, b), (b, a), (b, b)}. 2. Let A = R (real numbers). Then R3 = R  R  R = {(x, y, z)x, y, z  R}, which represents all points in 3-dimensional space.

Cartesian Products (cont’d)
Discrete Structures 1 Cartesian Products (cont’d) Lecture 1 Examples Let A = {a, b}, B = {1, 2} and C = {#, &}. Then: (a) A  B = {(a, 1), (a, 2), (b, 1), (b, 2)} and B  C = {(1, #), (1, &), (2, #), (2, &)} (b) (A  B)  C = {((a, 1), #), ((a, 1), &), ((a, 2), #), ((a, 2), &), ((b, 1), #), ((b, 1), &), ((b, 2), #), ((b, 2), &)} and A  (B  C) = {(a, (1, #)), (a, (1, &)), (a, (2, #)), (a, (2, &)), (b, (1, #)), (b, (1, &)), (b, (2, #)), (b, (2, &))} It follows that (A  B)  C  A  (B  C), despite some obvious similarities.

Application: Alphabets, Strings and Languages
Discrete Structures 1 Application: Alphabets, Strings and Languages Lecture 1 In computer programming, the finite set of characters used to construct program statements may be considered an alphabet, denoted . These would typically include letters, digits, and other special symbols such as +, , and *. A combination of characters from an alphabet is called a string. For example, if the alphabet is {a, b, 1, 2, 3, +, }, then the following are all strings: ab, , a+b3. Because the order of characters in a string matters, a string is essentially an ordered n-tuple (without the brackets and commas). The number of characters in a string is called the length of the string. Thus, the length of ab is 2 and the length of a+b3 is 5.

Application: Alphabets, Strings and Languages (cont’d)
Discrete Structures 1 Application: Alphabets, Strings and Languages (cont’d) Lecture 1 The set of all strings of length n is thus the set of all ordered n-tuples of characters from the alphabet. In other words, it is the Cartesian product n =     ...   (n times). For example, if the alphabet is  = {a, b}, then 3 = {aaa, aab, aba, baa, abb, bab, bba, bbb}. Of course, not all character strings are permitted in computer programs. The rules of programming will ultimately determine which strings are acceptable, and these strings may be said to form the programming language. For example, assuming  = {0, 1, +}, and that only standard (infix) addition notation is permitted, the only acceptable strings would 0+0, 0+1, 1+0 and Strings like +01, 11+ and 101 would thus be excluded from this particular language.

Properties of Sets: Subset Relations
Discrete Structures 1 Properties of Sets: Subset Relations Lecture 1 There are several relations satisfied by subsets under the the set containment relation “”. These are all obvious from Venn diagrams, though they may also be formally proved. Theorem 1. Inclusion of Intersection For all sets A and B, A  B  A and A  B  B. 2. Inclusion in Union For all sets A and B, A  A  B and B  A  B. 3. Transitive Property For all sets A, B and C, if A  B and B  C, the A  C.

Properties of Sets: Subset Relations (cont’d)
Discrete Structures 1 Properties of Sets: Subset Relations (cont’d) Lecture 1 The transitive property is clearly satisfied, since it is one of three properties which define a partial order relation. A formal proof the inclusion of intersection property is given below. Proof (Inclusion of Intersection) Let x be an arbitrarily chosen element of A  B. According to the definition of A  B, it follows that x  A and x  B. Therefore, if x  A  B, then x  A and x  B, i.e. A  B  A and A  B  B, as required. A similar proof will formally prove the inclusion in union property.

Properties of Sets: Set Identities
Discrete Structures 1 Properties of Sets: Set Identities Lecture 1 An identity is an equation which is true for all values of the variables within it. In this case, the set identities which follow involve the operations of union, intersection, difference and complement, and hold for all subsets of a given universal set. In each case, formally proving a set identity requires showing that the two given sets are equal, i.e. that each set is contained in the other. In some cases, we will include a formal proof, while in other cases, the identity is merely supported by means of a Venn diagram. Compare the various set identities in Theorems and with the logical equivalences in Theorem 1.1.1!

Properties of Sets: Set Identities (cont’d)
Discrete Structures 1 Properties of Sets: Set Identities (cont’d) Lecture 1 Theorem 5.2.2/5.3.3 (Set Identities) Let A, B, and C be any subsets of a universal set U. Then the following set identities hold: 1. Commutative Laws (a) A  B = B  A (b) A  B = B  A Proof (of (a); proof is similar for (b)) Let x be an arbitarily chosen element of A  B. Then, by definition, x  A and x  B. But then x  B and x  A, so that x  B  A. This proves that A  B  B  A. Similarly, let x be an arbitarily chosen element of B  A. Then, by definition, x  B and x  A. But then x  A and x  B, so that x  A  B. This proves that B  A  A  B, as required.

Properties of Sets: Set Identities (cont’d)
Discrete Structures 1 Properties of Sets: Set Identities (cont’d) Lecture 1 Theorem 5.2.2/5.3.3 (cont’d) 2. Associative Laws (a) (A  B)  C = A  (B  C) (b) (A  B)  C = A  (B  C) Venn Diagrams for (a)

Properties of Sets: Set Identities (cont’d)
Discrete Structures 1 Properties of Sets: Set Identities (cont’d) Lecture 1 Theorem 5.2.2/5.3.3 (cont’d) 3. Distributive Laws (a) A  (B  C) = (A  B)  (A  C) (b) A  (B  C) = (A  B)  (A  C) Venn Diagrams for (a)

Properties of Sets: Set Identities (cont’d)
Discrete Structures 1 Properties of Sets: Set Identities (cont’d) Lecture 1 Theorem 5.2.2/5.3.3 (cont’d) 4. Identity Laws (a) A  U = A (b) A   = A Proof (a) Consider any x  A  U. Then x  A and x  U, so x  A Therefore, A  U  A. Likewise, take any x  A. But A is a subset of U, so x  U. It follows that x  A  U, i.e A  A  U. Therefore, A  U = A, as required. (b) Consider any x  A  . Then x  A or x  . But x  , so x  A. Thus, A    A. Now, take any x  A. It follows that x  A or x  , and hence x  A  , i.e. A  A   Therefore, A   = A, as required.

Properties of Sets: Set Identities (cont’d)
Discrete Structures 1 Properties of Sets: Set Identities (cont’d) Lecture 1 Theorem 5.2.2/5.3.3 (cont’d) 5. Complement Laws (a) A  Ac = U (b) A  Ac =  Venn diagrams for (a) and (b)

Properties of Sets: Set Identities (cont’d)
Discrete Structures 1 Properties of Sets: Set Identities (cont’d) Lecture 1 Theorem 5.2.2/5.3.3 (cont’d) 6. Double Complement Law (Ac)c = A Proof Consider any x  (Ac)c. Then x  U and x  Ac. It follows that x  A, and therefore, (Ac)c  A. Now, take any x  A. It follows that x  Ac, and hence x  (Ac)c. Thus, A  (Ac)c. This proves that (Ac)c = A, as required.

Properties of Sets: Set Identities (cont’d)
Discrete Structures 1 Properties of Sets: Set Identities (cont’d) Lecture 1 Theorem 5.2.2/5.3.3 (cont’d) 7. Idempotent Laws (proofs trivial, so omitted) (a) A  A = A (b) A  A = A 8. Universal Bound Laws (a) A  U = U (b) A   =  Proof (a) Every set is a subset of U, so A  U  U. Now, take any x  U. Then it is true that x  U or x  A, and hence x  A  U. Therefore, U  A  U, and thus A  U = U, as required. (b) If there is an x  A  , then x  . But  contains no elements, so there is no such x, i.e. A   = , as required.

Properties of Sets: Set Identities (cont’d)
Discrete Structures 1 Properties of Sets: Set Identities (cont’d) Lecture 1 Theorem 5.2.2/5.3.3 (cont’d) 9. De Morgan’s Laws (a) (A  B)c = Ac  Bc (b) (A  B)c = Ac  Bc Venn diagrams for (a)

Properties of Sets: Set Identities (cont’d)
Discrete Structures 1 Properties of Sets: Set Identities (cont’d) Lecture 1 Theorem 5.2.2/5.3.3 (cont’d) 9. De Morgan’s Laws (a) (A  B)c = Ac  Bc (b) (A  B)c = Ac  Bc Proof (of (b)) Consider any x  (A  B)c. It follows that x  U and x  A  B, and hence that either x  U and x  A or x  U and x  B. But this means x  Ac or x  Bc, i.e. x  Ac  Bc Therefore, (A  B)c  Ac  Bc. Now take any x  Ac  Bc. Then x  Ac or x  Bc, and hence either x  U and x  A or x  U and x  B. But this means that x  U and x  A  B, i.e. x  (A  B)c. It follows that Ac  Bc  (A  B)c. Thus, (A  B)c = Ac  Bc, as required.

Properties of Sets: Set Identities (cont’d)
Discrete Structures 1 Properties of Sets: Set Identities (cont’d) Lecture 1 Theorem 5.2.2/5.3.3 (cont’d) 10. Absorption Laws (a) A  (A  B) = A (b) A  (A  B) = A Venn diagrams for (a) and (b)

Properties of Sets: Set Identities (cont’d)
Discrete Structures 1 Properties of Sets: Set Identities (cont’d) Lecture 1 Theorem 5.2.2/5.3.3 (cont’d) 11. Complements of U and  (proofs trivial, so omitted) (a) Uc =  (b)  c = U 12. Alternate Representation for Set Difference A  B = A  Bc Venn diagrams

Summary of Set Identities
Discrete Structures 1 Summary of Set Identities Lecture 1 Let A, B, and C be any subsets of a universal set U. Then the following set identities hold: 1. Commutative Laws (a) A  B = B  A (b) A  B = B  A 2. Associative Laws (a) (A  B)  C = A  (B  C) (b) (A  B)  C = A  (B  C) 3. Distributive Laws (a) A  (B  C) = (A  B)  (A  C) (b) A  (B  C) = (A  B)  (A  C) 4. Identity Laws (a) A  U = A (b) A   = A

Summary of Set Identities (cont’d)
Discrete Structures 1 Summary of Set Identities (cont’d) Lecture 1 Let A, B, and C be any subsets of a universal set U. Then the following set identities hold: 5. Complement Laws (a) A  Ac = U (b) A  Ac =  6. Double Complement Law (Ac)c = A 7. Idempotent Laws (a) A  A = A (b) A  A = A 8. Universal Bound Laws (a) A  U = U (b) A   = 

Summary of Set Identities (cont’d)
Discrete Structures 1 Summary of Set Identities (cont’d) Lecture 1 Let A, B, and C be any subsets of a universal set U. Then the following set identities hold: 9. De Morgan’s Laws (a) (A  B)c = Ac  Bc (b) (A  B)c = Ac  Bc 10. Absorption Laws (a) A  (A  B) = A (b) A  (A  B) = A 11. Complements of U and  (a) Uc =  (b)  c = U 12. Alternate Representation for Set Difference A  B = A  Bc

Disproofs Find a counter example for a Set Identity
Discrete Structures 1 Disproofs Lecture 1 Find a counter example for a Set Identity Algebraic Proof that the Set Identity is True / False

Algebraic Proofs of Set Identities
Discrete Structures 1 Algebraic Proofs of Set Identities Lecture 1 There exist any number of other set identities which may be derived from the previous list of 12. (For that matter, identities 6 through 12 are derivable from the first 5, which are the defining properties of a Boolean algebra.) Example Use the given list of set identities to show that (A  B)  (A  B) = A. Solution: (A  B)  (A  B) = (A  B)  (A  Bc) [Alt. Rep’n] = A  (B  Bc) [Dist’ve Law] = A  U [Compl. Law] = A, as required. [Ident. Law]

Algebraic Proofs of Set Identities (cont’d)
Discrete Structures 1 Algebraic Proofs of Set Identities (cont’d) Lecture 1 Of course, the previous example could also be proved from first principles, by showing that each set is contained in the other. Proof First, assume any x  (A  B)  (A  B). Then x  A and x  B or x  A and x  B. In both of these cases, x  A, and hence (A  B)  (A  B)  A. Now, take any x  A. Since B is another subset of the universal set U, either x  B or x  B. It follows that x  A and x  B or x  A and x  B, i.e. that x  (A  B)  (A  B). This proves that A  (A  B)  (A  B), as required.

Download ppt "Lecture Outline Introduction to sets and set notation (5.1, 5.3)"

Similar presentations