1 / 136

Foundations of Discrete Mathematics

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.

Download Presentation

Foundations of Discrete Mathematics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Foundations of Discrete Mathematics Chapter 2 By Dr. Dalia M. Gil, Ph.D.

  2. 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.

  3. 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.

  4. 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

  5. Describing a Set with a Builder Notation { x|x has certain properties } such that We read: “The set of x such that x has certain properties.”

  6. 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

  7. Describing a Set with a Builder Notation Example: the set of odd natural numbers. {2k – 1 | k = 1, 2, 3, …} or {2k – 1 | k  N} K belongs to N

  8. Describing a Set with a Builder Notation • The symboldenoting set membership m  Z  m is an integer • negates the meaning of 0  N

  9. 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)

  10. 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

  11. 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}

  12. Describing a Set with a Builder Notation • A set can be an element of another set {{a, b}, c}  is a set with two elements, {a, b} and c.

  13. 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}

  14. 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.

  15. 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 ≠

  16. Subsets • A  B  A is contained in B  A is a subset of B • B  A  B is superset of A

  17. 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}

  18. 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}}

  19. 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.

  20. 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.

  21. 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  

  22. 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.

  23. 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.

  24. 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}

  25. 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}}

  26. 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.

  27. 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  {} = 

  28. Examples: Union and Intersection • For any set A, A   = A and A   = 

  29. 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.

  30. 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

  31. 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

  32. 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}

  33. 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}

  34. Union and Intersection A  (B  C)= {2, 3, 4} (A  B)  C= {2, 3, 4, 5, 7} A  (B  C) ≠ (A  B)  C

  35. 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)

  36. 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

  37. 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

  38. 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

  39. Union and Intersection We have shown that either x  A  Borx  A  C By definition of union, x  (A  B)  (A  C)

  40. 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

  41. 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).

  42. 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.

  43. Examples: Set Difference • {a, b, c} \ {a, b} = {c} • {a, b, c} \ {a, x} = {b, c} • {a, b, } \  = {a, b}

  44. Examples: Set Difference • {a, b, } \ {} = {a, b, } • If A is the set {Monday, Tuesday, Wednesday, Thursday, Friday}, so • Ac = {Saturday, Sunday}

  45. 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

  46. 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

  47. 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

  48. The Laws of De Morgan • (A  B)c = Ac  Bc • (A  B)c = Ac Bc

  49. Prove that (A  B)c = Ac  Bcfor any set A, B, and C. • Let A be the statement “x  A” and B be the statement “x  B” x  (A  B)c  ¬(x  A  B)

  50. Prove that (A  B)c = Ac  Bc for any set A, B, and C. x  (A  B)c  ¬(x  A  B)  ¬(A or B) Definition of union  ¬A and ¬B Rule for negating “or”  x  Ac and x  Bc  x  Ac  Bc Definition of intersection

More Related