mat 181 discrete mathematics page 1 sections 1.2 and 6.1 (epp … · 2017. 3. 12. · mat 181 –...

29
MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e) Page 1 [email protected] kradermath.jimdo.com 03/2017 Sets A set is a well-defined collection of objects. “Well-defined” means you can clearly tell whether or not an object is included in the set. The objects in the set are called the elements or members of the set. Set Notation and Set Names There are several ways to describe sets. One of the easiest ways is called roster notation, where you list the elements of the set between braces, separated by commas. EXAMPLE: Roster Notation Days of the week: {Sun, Mon, Tue, Wed, Thu, Fri, Sat, Sun} 13 Original US States: {NH, MA, RI, CT, NY, NJ, DE, PA, MD, VA, NC, SC, GA} Natural Numbers: {1, 2, 3, 4, …} Natural Numbers less than 100: {1, 2, 3, 4, …, 99} A NOTE ON SECTIONS 1.2 AND 6.1 Sections 1.2 and 6.1 provide an introduction to sets, one of the most fundamental concepts in mathematics and a topic we have already touched upon in this course. We will cover almost all of Sections 1.2 and 6.1, as well as a few topics in Sections 6.2 and 6.3. Some of the topics will not be covered in the same order as in the textbook, and some topics may be covered a little differently than in the textbook. For example, the textbook assumes that readers of Chapter 6 are familiar with formal proofs (Chapter 4), which we will not cover in this course. Because some of the material will be covered differently than in the textbook, I have attempted to provide more explanatory text in these handouts than usual. As always, if you have any questions, please be sure to ask. Geoff Krader MAT 181 Instructor

Upload: others

Post on 08-Feb-2021

0 views

Category:

Documents


0 download

TRANSCRIPT

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 1

    [email protected] kradermath.jimdo.com 03/2017

    Sets A set is a well-defined collection of objects.

    “Well-defined” means you can clearly tell whether or not an object is included in the set.

    The objects in the set are called the elements or members of the set. Set Notation and Set Names There are several ways to describe sets. One of the easiest ways is called roster notation, where you list the elements of the set between braces, separated by commas. EXAMPLE: Roster Notation

    Days of the week: {Sun, Mon, Tue, Wed, Thu, Fri, Sat, Sun}

    13 Original US States:

    {NH, MA, RI, CT, NY, NJ, DE, PA, MD, VA, NC, SC, GA} Natural Numbers:

    {1, 2, 3, 4, …}

    Natural Numbers less than 100: {1, 2, 3, 4, …, 99}

    A NOTE ON SECTIONS 1.2 AND 6.1 Sections 1.2 and 6.1 provide an introduction to sets, one of the most fundamental concepts in mathematics and a topic we have already touched upon in this course. We will cover almost all of Sections 1.2 and 6.1, as well as a few topics in Sections 6.2 and 6.3. Some of the topics will not be covered in the same order as in the textbook, and some topics may be covered a little differently than in the textbook. For example, the textbook assumes that readers of Chapter 6 are familiar with formal proofs (Chapter 4), which we will not cover in this course. Because some of the material will be covered differently than in the textbook, I have attempted to provide more explanatory text in these handouts than usual. As always, if you have any questions, please be sure to ask.

    Geoff Krader MAT 181 Instructor

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 2

    [email protected] kradermath.jimdo.com 03/2017

    Set Notation and Set Names (cont’d) Note that each of the sets above is well-defined, i.e., you can clearly tell whether or not an object is a member of the set. Look at the following table to see what it means for something not to be well-defined.

    Not-Well Defined (and therefore not a set)

    Well-Defined

    Set of large US states. Set of US states whose population is greater than 10 million.

    Set of tall people. Set of people who are 6’2” or taller.

    We usually use capital letters to name sets, e.g.:

    D={Sun, Mon, Tue, Wed, Thu, Fri, Sat, Sun} Some letters are reserved as names for commonly used sets of numbers: N = Set of natural (or counting) numbers = {1, 2, 3, 4, …}

    W = Set of whole numbers = {0, 1, 2, 3, 4, …} Z = Set of integers = {…, 3, 2, 1, 0, 1, 2, 3, …} Q = Set of rational numbers (all numbers that can be written as the ratio or quotient of two integers) R = Set of real numbers (all numbers on the number line)

    The Symbols and Because sets are well-defined, any object is clearly a member or not a member of a set.

    3 N means “3 is an element of N” o In other words, 3 is a natural number.

    0 N means “0 is NOT an element of N.” o In other words, 0 is not a natural number.

    2.5 N means “2.5 is NOT an element of N.” o In other words, 2.5 is not a natural number.

    Natural or Counting Numbers (N)

    1,2,3,4,...

    Whole Numbers (W)

    0,

    Integers (Z)

    ..., 4, 3, 2, 1

    Rational Numbers (Q)

    3 23 6.32 24.951 24.9515151...

    8 4

    Irrational Numbers

    3 3 13 7

    Real Numbers (R)

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 3

    [email protected] kradermath.jimdo.com 03/2017

    Set Builder Notation Set-builder notation is another way to describe sets. Set-builder notation is particularly useful when it is inconvenient or impossible to list all of the elements using roster notation.

    Set builder notation shows a typical element of the set and a membership property or rule for determining which elements are members (or not members) of the set. For example, the set described above consists of integers x (a typical element of the set) that are between 1 and 5, inclusive (the membership rule). EXAMPLE: Set Builder Notation Describe the set above in English. Describe the set above using roster notation.

    Slide 6

    Set builder notation

    { |1 5}x x Z

    The set of such thatall elements x

    x is between 1 and 5, inclusive.

    Membership property or rule P(x):

    If x makes P(x) true, then x is a member of the set.

    If x makes P(x) false, then x is not a member of the set.

    in Z

    NOTE: Z is the set of integers

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 4

    [email protected] kradermath.jimdo.com 03/2017

    EXAMPLE: Set Builder Notation Describe each of the following sets in English. If possible, describe the set using roster notation.

    { | is a US State begins with the letter "O"}x x x

    { | }1 5x x R NOTE: One of the reasons we use set builder notation is that some sets cannot be written in roster notation!

    for some integers and where 0

    and and 0

    px x p q q

    q

    pp q q

    q

    R

    Z Z

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 5

    [email protected] kradermath.jimdo.com 03/2017

    The Importance of the Braces { } The braces { } indicate the presence of a set. If there are no braces, there is no set! Notice how the braces or lack of braces changes the meaning in the examples below:

    Think of the set as a box. The contents of the box are the elements of the set. Notice

    in the third example above that one of the elements of the set {5,{5}} is itself a set!

    The set {5,{5}} has two elements. Notice that the set {5, 5} only has one element, the number 5:

    It does not matter how many times you list an element (although normally there is no reason to list an element more than once).

    Slide 9

    The importance of the braces { }

    {5} A set that contains one element, namely, the number 5.

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

    {5, {5}} A set that contains two elements: the number 5, and

    a set that contains the number 5.

    5 Just the number 5 (not a set).

    Slide 10

    How many elements are in this set?{5, 5}

    {5, 5} A set that contains one element, namely, the number 5.

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

    There are only three US states whose names begin with “O” no matter how many times you list the states:

    {OH, OK, OR}

    {OH, OK, OK, OH, OR, OK, OR}Each set has three elements!

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 6

    [email protected] kradermath.jimdo.com 03/2017

    The Empty Set (or Null Set) The empty set (also called the null set) is a set that contains no elements.

    or { } are used to represent the empty set. ( is more common). NOTE: Neither {} nor {0} is an empty set (see figure below):

    EXAMPLES: Empty Sets The following sets are empty sets:

    The set of months with 40 days. The set of US states whose names begin with Q.

    The Cardinal Number of a Set The cardinal number of set A, written N(A), is the number of elements in A. EXAMPLE: Cardinal Number Let D ={Sun, Mon, Tue, Wed, Thu, Fri, Sat, Sun}. Find N(D). EXAMPLE: Cardinal Number Find the cardinal number of each of the following sets.

    {1,7,14,23,90}A

    {1,7,14,23,90,23}B

    {0}C

    { }D

    {1,{1}}E

    {1,{7,14,23,90}}F

    Slide 13

    The empty set (or null set)

    The empty set (also called the null set) is a set that contains no elements.

    or { } are used to represent the empty set.

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

    or { }The empty set (a set

    that contains no elements)

    {}A set that contains one

    element (that element is the empty set)

    These are NOT

    empty sets!

    {0}A set that contains one

    element (that element is the number 0)

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 7

    [email protected] kradermath.jimdo.com 03/2017

    EXAMPLE: Cardinal Number Find the cardinal number of each of the following sets.

    { |3 8}G x x Z

    { |3 8}H x x R

    { | 8}K x x Z

    { |1 2}L x x Z

    Equal (and Unequal) Sets Sets that are composed of the same elements are equal.

    It does not matter how the elements are described (e.g., elements may be listed in a different order) or whether some of the elements are listed more than once!

    EXAMPLE: {1, 3, 5} = {3, 1, 5} = {1, 3, 1, 5, 3} If A=B, then N(A)=N(B).

    If two sets are equal, then they have the same number of elements. Is the converse true? If it is not true, find a counterexample.

    Converse: Is the inverse true? If it is not true, find a counterexample.

    Inverse: Is the contrapositive true? If it is not true, find a counterexample.

    Contrapositive:

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 8

    [email protected] kradermath.jimdo.com 03/2017

    Equal (and Unequal) Sets (cont’d) Notice that the contrapositive is true, i.e., if N(A)N(B), then AB. In other words, if two sets do not have the same number of elements, then the sets do not have the same elements and therefore are not equal!

    Subsets Set A is a subset of set B if and only if every element of A is also an element of B.

    A B means A is a subset of B.

    B A means A is a subset of B.

    A B means A is not a subset of B. It follows from the definition that A is not a subset of B if and only if there is at least one element of A that is not an element of B. EXAMPLES: Subsets Which of the following are subsets of A?

    {1,2,3,4,5}A

    {1,3,5}B

    {0,1,3,5}C

    {1}D

    {{1,2},3,4}E

    {5,4,3,2,1}F

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 9

    [email protected] kradermath.jimdo.com 03/2017

    Subsets (cont’d) The previous example teaches us that:

    Every set is a subset of itself, i.e., for any set A:

    A A

    The empty set is a subset of every set, i.e., for any set A:

    A

    Two sets are equal if and only if each is a subset of the other, i.e., for any sets A and B:

    A B if and only if A B and B A . Distinction Between and

    x A means that x is an element of A. o You may think of elements as the objects that appear between the

    commas in roster notation.

    A B means that A is a subset of B. o Subsets are collections of elements.

    EXAMPLE: Distinction Between Elements and Subsets

    Let {1,2,3,4,5,6}A .

    Determine whether each of the following is an element of A, a subset of A, or neither.

    Remember: If there are no braces, then there is no set!

    Element of A? Subset of A?

    1

    3

    {3}

    {2,3}

    {4,5,6}

    Remember: An element is not the same as a (sub)set!

    For example, 3 is not the same as {3}.

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 10

    [email protected] kradermath.jimdo.com 03/2017

    Distinction Between and (cont’d) EXAMPLE: Distinction Between Elements and Subsets

    Let {{1},{2,3},{4,5,6}}B .

    Does A=B, i.e., does {1,2,3,4,5,6} {{1},{2,3},{4,5,6}} ?

    Determine whether each of the following is an element of B, a subset of B, or neither.

    Element of B? Subset of B?

    1

    {1}

    3

    {3}

    {2,3}

    {4,5,6}

    EXAMPLE: Distinction Between Elements and Subsets

    Let {1,2,3,4,5,6}A and {{1},{2,3},{4,5,6}}B .

    Determine which of the following are elements of A, elements of B, subsets of A or subsets of B, or none of these.

    Element of A?

    Subset of A?

    Element of B?

    Subset of B?

    {2,3,4,5}

    {2,3,4,5,6}

    {{2,3},{4,5,6}}

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 11

    [email protected] kradermath.jimdo.com 03/2017

    Proper Subsets A is a proper subset of B if and only if:

    A is a subset of B (i.e., A B), and A is not equal to B (i.e., A B).

    A B means A is a proper subset of B. B A means A is a proper subset of B.

    It follows from the definition that:

    If A is a proper subset of B, then at least one element of B will be missing from A.

    All subsets of B – except for B itself – are proper subsets of B. In other words, the only subset of B that is not a proper subset of B is B itself.

    All proper subsets of B are also subsets of B. In other words, if A B, then A B. (The converse is not true.)

    The relationship between the and symbols is similar to the relationship between the < and symbols.

    x y means x is less than y or x is equal to y.

    A B means A is a proper subset of B or A is equal to B.

    x y means x is less than y but not equal to y.

    A B means A is a proper subset of B but not equal to B.

    EXAMPLE: Subsets and Proper Subsets Each of the following is a subset of A. Which are also proper subsets of A?

    {1,2,3,4,5,6}A

    {1,3,5}B

    {1}D

    {6,5,4,3,2,1}F

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 12

    [email protected] kradermath.jimdo.com 03/2017

    THIS PAGE IS INTENTIONALLY LEFT BLANK

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 13

    [email protected] kradermath.jimdo.com 03/2017

    Set Operations We can perform operations with sets, just as we perform operations with real numbers or logical statements.

    Cartesian Product The Cartesian Product of two sets A and B (written AB and read “A cross B”) is the set of all possible ordered pairs of the form (a,b) where aA and bB.

    AB = {(a,b) | a A and b B} The Cartesian Product is named for the French mathematician/philosopher René Descartes (1596-1650). EXAMPLE: Cartesian Products C = {H, T} = Set of outcomes from tossing a coin. D = {1, 2, 3, 4, 5, 6} = Set of outcomes from rolling a die

    Describe C D , i.e., list the elements and describe the set in English.

    Describe D C , i.e., list the elements and describe the set in English.

    Slide 18

    Set operations

    We can perform operations with sets, just as we perform operations with real numbers or logical statements.

    Domain Sample operations Result of operations

    Real numbers +, , x, , etc. Real numbers

    Logical statements ~, , , , etc. Logical statements

    Sets Cartesian Product,Union, Intersection,

    Complement, Difference

    Sets

    GHK 04/2012MAT 181 (Epp 4e) – 1.2, 6.1-6.2

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 14

    [email protected] kradermath.jimdo.com 03/2017

    Cartesian Product (cont’d) EXAMPLE: Cartesian Products

    Does C D = D C? A convenient way of constructing a Cartesian Product involving two sets is to make a table such as the one below. Be sure that the items in each ordered pair are arranged in the same order as the sets in the Cartesian Product. For example, the table below shows C D; notice that in each ordered pair the element from C appears first.

    EXAMPLE: Cartesian Products A = {1, 2, 3}, B={T, F}

    Find A B.

    Find B B and describe the set in English. Cardinal Number of a Cartesian Product The Cardinal Number of a Cartesian Product may be calculated as follows:

    N(A B) = N(A) N(B)

    Slide 27

    Cartesian Product of two sets

    C = {H, T}Set of outcomes from tossing a coin

    D = {1, 2, 3, 4, 5, 6}

    Set of outcomes from rolling a die

    CD = {(H,1), (H,2), (H,3), (H,4), (H,5), (H,6),

    (T,1), (T,2), (T,3), (T,4), (T,5), (T,6)}Set of outcomes from tossing a coin then rolling a die.

    1 2 3 4 5 6

    H (H,1) (H,2) (H,3) (H,4) (H,5) (H,6)

    T (T,1) (T,2) (T,3) (T,4) (T,5) (T,6)

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 15

    [email protected] kradermath.jimdo.com 03/2017

    Universal Set The universal set U is the set that contains all the elements of any specific discussion.

    The universal set may vary from one discussion to another. The universal set provides a context for every other set in the discussion. Often the universal set is obvious. If the universal set is not obvious, it will

    be specified. EXAMPLE: Universal Set

    Sample Sets Universal Set US states whose names begin with “O”

    US states with a population greater than 10 million

    US states that Barack Obama carried in 2012.

    Rational numbers

    Irrational numbers

    Integers

    Venn Diagrams Venn Diagrams show the relationship between sets (and subsets). Sets are represented by circles, drawn within a rectangle that represents the universal set. (NOTE: The textbook draws some Venn Diagrams without a rectangle; however, you should always include the rectangle to represent the universal set.) This Venn Diagram shows that A B:

    Do not read anything else into the diagram, e.g., do not assume that:

    A is a proper subset of B A is small relative to B B is small relative to the universal set U.

    In fact, it is even possible that A=B=U.

    NOTE: Set B is represented by everything within the larger circle, not just the “doughnut” shaped area that surrounds the smaller circle.

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 16

    [email protected] kradermath.jimdo.com 03/2017

    Venn Diagrams (cont’d) Some Venn Diagrams show the elements in the appropriate regions of the diagram. Notice that some regions of the diagram may be empty. EXAMPLE: Venn Diagrams All three diagrams show that A B. Only after we place the elements inside the appropriate regions of the diagram can we can also see that:

    In the first diagram, A is a proper subset of B. In the second diagram, A =B. In the third diagram, A =B=U.

    U = {1, 2, 3, 4, 5, 6, 7, 8} A = {1, 2, 3, 4} B = {1, 2, 3, 4, 5, 6} Notice that B includes all of the elements inside the larger circle, and U includes all of the elements inside the rectangle.

    U = {1, 2, 3, 4, 5, 6, 7, 8} A = {1, 2, 3, 4} B = {1, 2, 3, 4} Because A = B, we could have also reversed the labels for A and B.

    U = {1, 2, 3, 4, 5, 6, 7, 8} A = {1, 2, 3, 4, 5, 6, 7, 8} B = {1, 2, 3, 4, 5, 6, 7, 8}

    Slide 34

    Venn Diagrams

    A B

    U

    A

    B

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

    1,2,3,4

    U

    A

    B

    5,6

    7,8

    1,2,3,4

    5,6,7,8

    Slide 34

    Venn Diagrams

    A B

    U

    A

    B

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

    1,2,3,4

    U

    A

    B

    5,6

    7,8

    1,2,3,4

    5,6,7,8

    U

    A

    B

    1,2,3,4,

    5,6,7,8

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 17

    [email protected] kradermath.jimdo.com 03/2017

    EXAMPLE: Venn Diagrams (cont’d)

    If we know that two sets are equal, we can use one circle to represent both sets. For example, in this diagram:

    A = B

    This Venn Diagram shows

    Z+ Z Q. Z+ represents the set of positive integers. (The universal set is R, the set of real numbers)

    Venn Diagrams can be a useful aid in understanding the remaining set operations we will study.

    Slide 35

    Venn Diagrams

    U

    A

    B

    A= B

    U

    A B

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

    Slide 28

    Venn Diagrams

    U

    A

    B

    Z+ Z Q

    The universal set is R

    U

    Q Z

    Z+

    GHK 04/2012MAT 181 (Epp 4e) – 1.2, 6.1-6.2

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 18

    [email protected] kradermath.jimdo.com 03/2017

    Union The union of two sets A and B (written A B) is the set of all elements that are in A or B (or both). In other words, the union is the set of all elements that are in at least one of the two sets.

    A B = {x U | x A or x B}

    To form A B, combine the two sets. NOTE: An element x is in the union if and only if x makes the following disjunction true: x A or x B

    Intersection The intersection of two sets A and B (written A B) is the set of all elements that are common to both A and B.

    A B = {x U | x A and x B}

    NOTE: An element x is in the intersection if and only if x makes the following conjunction true: x A and x B

    Complement The complement of set A (written Ac) is the set of elements in the universal set that are not in set A. In other words, Ac is everything in the universal set that is outside of A.

    Ac = {x U | x A}

    NOTE: An element x is in the complement if and only if x makes the following negation true: ~(x A) (which is another way of writing x A). .

    Slide 37

    Union

    The union of two sets A and B(written AB) is the set of all elements that are in A or B (or both). In other words, the union is the set of all elements that are in at least one of the two sets.

    AB = {x U | x A or x B}

    To form AB, combine the two sets.

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

    U

    Slide 38

    Intersection

    The intersection of two sets Aand B (written AB) is the set of all elements that are common to both A and B.

    AB = {x U | x A and x B}

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

    U

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 19

    [email protected] kradermath.jimdo.com 03/2017

    EXAMPLES: Complement

    What is the complement of the empty set? c

    What is the complement of the universal set? cU

    What is the complement of the complement? c

    cA

    Shade cA

    NOTE: A Venn Diagram with two sets will have four distinct regions. There is no standard numbering scheme for the regions of a Venn Diagram. In this class, we shall use the numbering scheme shown here to facilitate discussion. The numbers are not meant to indicate elements in any of the sets.

    Difference The difference (or relative complement) of A minus B (written A – B) is the set of all elements that belong to set A but not to set B.

    A – B = {x U | x A and x B}

    NOTE: A – B = A Bc

    Slide 40

    Complement

    A B

    U

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

    Where is Ac?

    41 2 3

    Slide 42

    Difference

    The difference (or relative complement) of A minus B(written AB) is the set of all elements that belong to set Abut not to set B.

    A B = {x U | x A and x B}

    A – B = A Bc

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

    U

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 20

    [email protected] kradermath.jimdo.com 03/2017

    EXAMPLE: Set Operations Let: U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}

    A = {0, 1, 2, 3, 4, 5} B = {1, 2, 3, 4, 5} C = {1, 3, 5} D = {4, 5, 6, 7, 8} E = {6, 7, 8, 9}

    Find the following:

    1. B D

    2. B C

    3. B D

    4. B C

    5. A E

    6. cD

    7. cA D

    8. c

    A D

    9. c cA D

    10. A B

    11. A D

    Do any of the set operations above yield identical results?

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 21

    [email protected] kradermath.jimdo.com 03/2017

    DeMorgan’s Laws

    For Symbolic Logic For Set Operations ~( ) ~ ~

    ~( ) ~ ~

    p q p q

    p q p q

    ( )

    ( )

    c c c

    c c c

    A B A B

    A B A B

    EXAMPLE: Set Operations with Intervals Describe the results of each of the given set operations, below. Let U = entire number line (i.e., R).

    A = 4,3 , B = 1,3

    B = 1,3 , C = 5,10

    12. A B

    15. B C

    13. A B

    16. B C

    14. A B

    17. CB

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 22

    [email protected] kradermath.jimdo.com 03/2017

    EXAMPLE: Set Operations with Intervals (cont’d) Describe the results of each of the given set operations, below. Let U = entire number line (i.e., R).

    C = 5,10 , D= 3,7

    E = ,12 , F = 1,

    18. C D

    20. E F

    19. C D

    21. CE

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 23

    [email protected] kradermath.jimdo.com 03/2017

    Describing the Result of Set Operations in English Set operations are defined using words that are familiar from symbolic logic:

    Union uses or: A B = {x U | x A or x B} Intersection uses and: A B = {x U | x A and x B} Complement uses not: Ac = {x U | x A}

    We can also use these words to describe the result of set operations in English: EXAMPLE: Describing the Result of Set Operations in English Define the following sets:

    Let U = The 50 US States. Let F = US States with more than one NFL team

    F = {CA, FL, MD, NJ, OH, PA, TX} Let H = US States with more than one NHL team

    H = {CA, FL, NY, PA}

    Describe the following sets in English:

    22. F H

    23. F H

    24. FC

    NOTE: Do not describe F H as follows:

    “The set of US states with more than one NFL team and the set of US states with more than one NHL team.”

    This intersection F H is a single set whose elements (i.e., states) meet the membership conditions for both set F and set H. The description immediately above sounds like two sets.

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 24

    [email protected] kradermath.jimdo.com 03/2017

    Venn Diagrams for Three Sets Venn Diagrams can also be used to show relationships among three sets. We generally draw Venn Diagrams to show all possible intersections.

    NOTE: A Venn Diagram with three sets will have eight distinct regions. There is no standard numbering scheme for the regions of a Venn Diagram. In this class, we shall use the numbering scheme shown here to facilitate discussion. The numbers are not meant to indicate elements in any of the sets.

    EXAMPLE: Venn Diagrams Shade the Venn Diagrams to describe each of the following sets:

    25. cA

    26. A B

    27. c

    A B

    28. cA B

    Slide 45

    Venn Diagram for three setsshows all possible intersections

    A B

    C

    U

    1 2 3

    4

    5

    6

    7

    8

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

    U

    A BN

    C

    U

    A BN

    C

    U

    A BN

    C

    U

    A BN

    C

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 25

    [email protected] kradermath.jimdo.com 03/2017

    EXAMPLE: Venn Diagrams (cont’d) Shade the Venn Diagrams to describe each of the following sets:

    29. A B C

    30. A B A C

    31. c

    A B C

    When drawing Venn Diagrams, notice that:

    Intersections lie within the intersecting sets, i.e., the area representing AB must lie completely within A and completely within B.

    Unions must include all of the sets in the union, i.e., the area representing AB must include all of set A and all of set B.

    Are any of the diagrams identical?

    U

    A BN

    C

    U

    A BN

    C

    U

    A BN

    C

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 26

    [email protected] kradermath.jimdo.com 03/2017

    Some of the diagrams above illustrate “set identities” that can be used to rewrite (and simplify) set operations, just as we rewrite and simplify algebraic expressions. DeMorgan’s Laws are an example of set identities. Here is another example. Distributive Property for Sets

    A B C A B A C Page 355 of the textbook describes additional set identities.

    NOTE: You will not need to memorize any set identities other than DeMorgan’s Law. We will use Venn Diagrams – not set identities – to determine whether the results of two set operations are equal.

    Venn Diagrams for Four or More Sets (From Text, p. 354)

    It is impossible to draw a symmetric Venn Diagram for four sets (or any non-prime number of sets) that shows all possible intersections.

    In 2002, two computer scientists and an undergraduate student proved that you can draw a symmetric Venn Diagram for any prime number of sets that shows all possible intersections.

    o However, Venn Diagrams with more than five sets are very complicated and, therefore, not very useful.

    Venn Diagram for 5 Sets

    52 32 distinct regions

    Venn Diagram for 7 Sets

    72 128 distinct regions

    Slide 54

    Venn Diagram for five sets

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

    Slide 56

    Venn Diagram for seven sets

    GHK 03/2016MAT 181 (Epp 4e) – 1.2, 6.1

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 27

    [email protected] kradermath.jimdo.com 03/2017

    Disjoint Sets, Mutually Disjoint Sets and Partitions Two sets are disjoint if and only if they have no elements in common, i.e., A and B are disjoint if and only if A B = .

    Sets A1, A2, … , An are said to be mutually disjoint (or pairwise disjoint or nonoverlapping) if and only if the intersection of any pair of these sets is empty, i.e., i, j {1, 2, 3, 4, 5, …}

    Ai Aj = whenever ij.

    A collection of non-empty sets {A1, A2, … , An} is called a partition of set A if and only if:

    A = A1 A2 … An and

    A1, A2, … , An are mutually disjoint. EXAMPLE: Partition If A={0, 1, 2, 3, … , 9}, which of the following is a partition of A? (If the sets do not form a partition, then explain why not.)

    {0, 1, 2, 3} {4, 5} {6} {7, 8, 9}

    {0, 1, 2, 3, 4} {4, 5, 6} {7, 8, 9}

    {1, 2, 3, 4} {5, 6, 7} {8, 9}

    GHK 03/2011MAT 1815.1-5.2 - Slide 35

    Mutually disjoint sets

    Sets A1, A2, …, An are said to be mutually disjoint (or pairwise disjoint or nonoverlapping) if and only if the intersection of any pair of these sets is empty, i.e., for i, j = 1, 2, … , n,

    Ai Aj = whenever ij.

    A1

    A2

    A3

    A4

    A5

    U

    A B

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 28

    [email protected] kradermath.jimdo.com 03/2017

    Counting the Number of Subsets in a Set A set with n elements has 2n subsets (n=0, 1, 2, 3, …).

    EXAMPLE: Number of Subsets Find the number of subsets for each of the following sets:

    The set of Great Lakes = {Huron, Michigan, Superior, Erie, Ontario}

    The set of days of the week

    The empty set

    How many proper subsets are there if a set has n elements?

    How many non-empty subsets are there if a set has n elements?

    Slide 41

    Counting the number of subsets

    ©2003, Pearson Education, Inc.

    {7,8} has 22 subsets {a,b,c} has 23 subsets

    GHK 04/2012MAT 181 (Epp 4e) – 1.2, 6.1-6.2

  • MAT 181 – Discrete Mathematics Sections 1.2 and 6.1 (Epp 4e)

    Page 29

    [email protected] kradermath.jimdo.com 03/2017

    Power Set Given a set A, the power set of A, written P(A), is the set of all subsets of A. If A has n elements, then P(A) has 2n elements. EXAMPLE: Power Sets Find the power set for each of the following sets:

    S = {7, 8}

    T={a, b, c}