Foundations of Discrete Mathematics. Chapter 2. By Dr. Dalia M. Gil, Ph.D. Sets. Set: A collection of things called elements or members. The set of natural numbers N consists of the numbers 1, 2,... Their members are all positive. Sets.
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation
Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement.Téléchargez la présentation en cliquant sur ce lien.Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.
Sets • Set: A collection of things called elements or members. • The set of natural numbers N consists of the numbers 1, 2,... Their members are all positive.
Sets • The set of integers Z consists of the natural numbers (1, 2, …), their negatives (…, -3, -2, …, 2, 3, …, and 0. • Zero (0) is an integer, but not a natural number.
Ways to Describe Sets • {egg1, egg2} • {x} • N = {1, 2, 3, …} • Z = {…, -3, -2, -1, 0, 1, 2, 3, …} This set has two elements This set has one element The set of natural numbers The set of integer numbers
Describing a Set with a Builder Notation { some expression | the expression has certain properties } Example: the set of odd natural numbers. {n | n is an odd integer, n > 0} such that
Describing a Set with a Builder Notation • The set of rational numbers Q Q = {m/n| m, n Z, n ≠ 0} • The members of Q are fractions, which are ratios of integers with nonzero denominators. • Examples ¾, -2/17, 5(=5/1)
Describing a Set with a Builder Notation • The set of irrational numbers. • The members of irrational set cannot be written in the form m/n with m and n both integers. • The decimal expansions of the irrational numbers neither terminate or repeat. • Examples √2, 3√17, e, , ln 5
Describing a Set with a Builder Notation • The set of complex numbers C. • The members of complex set have the form a + bi where a and b are real numbers, i2 = -1 C = {a + bi | a, b R, i2 = -1}
Equality of Set • Sets A and B are equal, and we write A = B, if and only if A and B contain the same elements or neither set contains any element. • {1, 2, 1} = {1, 2} = {2, 1} • {1/2, 2/4, -3/-6}, /2} = {1/2} • {t|t = r – s, r, s {0, 1, 2}} = {-2, -1, 0, 1, 2}
The Empty Set • The empty set is a set that contains no elements. • P = {n N | 5n = 2} • S = {n N | n2 + 1 = 0} • The set small of people less than 1 millimeter. These sets are all equal since none of them contains any elements.
Subsets • A set A is a subset of a set B (A B), if and only if every element of A is an element of B. • If A B but A ≠ B, then A is called a proper subset of B and we write A B ≠
Subsets • A B A is contained in B A is a subset of B • B A B is superset of A
Examples of Subsets • {a, b} {a, b, c} {a,b} is a subset of {a,b,c} • {a, b} {a, b, c} ≠ {a,b} is a proper subset of {a,b,c}
Examples of Subsets • {a, b} {a, b, {a, b}} {a,b} is a subset of {a,b,{a,b}} {a,b} is an element of {a,b,{a,b}} • {a, b} {a, b, {a, b}} {a,b} belongs to {a,b,{a,b}}
Examples of Subsets N Z Q R C ≠ ≠ ≠ ≠ • The set of natural numbers is a proper subset of the set of integer numbers. • The set of integer numbers is a proper subset of the set of rational numbers.
Examples of Subsets N Z Q R C ≠ ≠ ≠ ≠ • The set of rational numbers is a proper subset of the set of real numbers. • The set of real numbers is a proper subset of the set of complex numbers.
Subsets. Proposition 1 • For any set A, A A and A Proof • If a A, then a A, so A A • If A is false, then there must exist some x such that x A. This an absurdity since there is no x
Subsets. Proposition 2 • If A and B are sets, then A = B if and only if A B and B A Proof () If A = B, then A is a subset of B and B is a subset of A. () If A is a subset of B and B is a subset of A, then A = B.
Subsets. Proposition 2 • a b membership a b, a is an element of the set b. • a b subset a b, a is a set each of whose elements is also in the set b.
The Power Set • The power set of a set A, denoted P(A), is the set of all subsets of A: P(A) = {B | B A}
Examples of The Power Set • If A = {a}, then P(A) = {, {a}} • If A = {a, b}, then P(A) = {, {a}, {b}, {a, b}} • P ({a, b, c}) = {, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}
Union and Intersection • The union of sets A and B, A B, is the set of elements in A or in B (or in both). • The intersection of sets A and B, A B, is the set of elements that belongs to both A and B.
Examples: Union and Intersection • If A = {a, b, c} and b = {a, x, y, b} • A B = { a, b, c, x, y} • A B = {a, b} • A {} = {a, b, c, } • B {} =
Union and Intersection • The union and intersection of sets are associative operations. • (A1 A2) A3 = A1 (A2 A3) • For any three sets A1, A2, A3 , the expression A1 A2 A3 is unambiguous.
Union and Intersection • The union of n sets A1 A2 A3 … An is written n Ai i=1 • Represents the set of elements that belong to one or more of the sets Ai
Union and Intersection • The intersection the sets A1, A2, … An is written n Ai i=1 • Represents the set of elements which belong to all of the sets Ai
Union and Intersection • A = {1, 2, 3, 4} • B = {3, 4, 5, 6} • C = {2, 3, 5, 7} • B C= {2, 3, 4, 5, 6, 7} • A (B C)= {2, 3, 4}
Union and Intersection • A = {1, 2, 3, 4} • B = {3, 4, 5, 6} • C = {2, 3, 5, 7} • A B = {3, 4} • (A B) C= {2, 3, 4, 5, 7}
Union and Intersection A (B C)= {2, 3, 4} (A B) C= {2, 3, 4, 5, 7} A (B C) ≠ (A B) C
Union and Intersection A (B C)= {2, 3, 4} (A B) = {3, 4} (A C)= {2, 3} (A B) (A C)= {2, 3, 4} A (B C) = (A B) (A C)
Union and Intersection Let A, B, and C be sets. Verify A (B C) = (A B) (A C) Solution using proposition 2: If A and B are sets, then A = B if and only if A B and B A
Union and Intersection To show A, B, and C be sets. Verify A (B C) (A B) (A C) Let x A (B C) Then x is in A and also in B C, Since x B C, either x B or x C. This suggests two cases
Union and Intersection Case 1: x B In this case, is in A as well as in B, so it’s in A B Case 2: x C In this case, is in A as well as in B, so it’s in A C
Union and Intersection We have shown that either x A Borx A C By definition of union, x (A B) (A C)
Union and Intersection We must show thatA (B C) (A B) (A C) Let x (A B) (A C) Then either x (A B) or x (A C) Thus, x is in both A and B or in both A and C. In either case x A. Also x is in either B or C; thusx B C
Union and Intersection We must show thatA (B C) (A B) (A C) Let x (A B) (A C) Then either x (A B) or x (A C) So x is in both A and in B C ; that is x A ( B C).
Set Difference • The set difference of sets A and B (A\ B), is the set of those elements of A that are not in B. • The complement of a set A is the set Ac = U \ A, where U is some universal set made clear by the context.
Examples: Set Difference • {a, b, } \ {} = {a, b, } • If A is the set {Monday, Tuesday, Wednesday, Thursday, Friday}, so • Ac = {Saturday, Sunday}
Examples: Set Difference • A \ B = A Bc and (Ac)c= A Example (suppose U = Z): If A = {x Z | x2 > 0}, then Ac ={0} (Ac)c = {0}c = {x Z | x ≠ 0} = A
Interval Notation • If a and b are real numbers with a < b, then • [a, b] = {x R | a ≤ x ≤ b} closed • (a, b) = {x R | a < x < b} open
Interval Notation • If a and b are real numbers with a < b, then • (a, b] = {x R | a < x ≤ b} half open • [a, b) = {x R | a ≤ x < b} half open