SlideShare uma empresa Scribd logo
1 de 13
Baixar para ler offline
Sets - 01                                                                CSC1001 Discrete Mathematics            1

 CHAPTER
                                                               เซต
       1                                                      (Sets)

   1        Introduction to Sets
1. Definition of Sets
    Sets are used to group objects together. Often, but not always, the objects in a set have similar properties.
In computer science, sets are basic data structures which are represented by one dimensional array and
linked list.
  Definition 1
  A set is an unordered collection of objects, called elements or members of the set. A set is said to contain
  its elements. We write a  A to denote that a is an element of the set A. The notation a  A denotes that
  a is not an element of the set A.

1) Sets symbol
    Sets are denoted by using uppercase letters for example A, B, C, D.
    Elements of sets are denoted by using lowercase letters for example a, b, c, d or 1, 2, 3, 4.
    Groups of sets are denoted by using bracket "{" and "}", for example { … }, { … }.
    Each elements of sets is separated by using comma ",", for example { 1, 2, 3, 4 } … .
2) Example of sets A = { 1, 2, 3, 4 } or B = { a, b, c, d, e }

Example 1 (2 points) Write set V which is represented all vowels in the English alphabet.



Example 2 (2 points) Write set O which is represented odd positive integers less than 10.



Example 3 (2 points) Write set E which is represented even negative integers greater than -10.



Example 4 (2 points) Write set Z which is represented positive integers less than or equal 100.



มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
2       CSC1001 Discrete Mathematics                                                                   01 - Sets


    Another way to describe a set is to use set builder notation. We characterize all those elements in the
set by stating the property or properties they must have to be members. For instance, the set O of all odd
positive integers less than 10 can be written as
     O = { x | x is an odd positive integer less than 10 }
        or, specifying the universe as the set of positive integers, as
                     +
     O = { x  Z | x is odd and x < 10 }
        (In computer science we can donated by O = { x  Z+ | x % 2 = 0 and x < 10 })
    These sets, each denoted using a boldface letter, play an important role in discrete mathematics:
     N = { 0, 1, 2, 3, … }, the set of natural numbers (counting number)
     Z = { …, -2, -1, 0, 1, 2, … }, the set of integers
          +
     Z = { 1, 2, 3, … }, the set of positive integers
          -
     Z = { -1, -2, -3, … }, the set of negative integers
     Q = { p/q | p  Z, q  Z, and q  0 }, the set of rational numbers
     R, the set of real numbers
           +
     R , the set of positive real numbers
           -
     R , the set of negative real numbers
     C, the set of complex numbers.

Example 5 (2 points) Write set A which is represented complex numbers.



Example 6 (2 points) Write set B which is represented negative real numbers but not equal -50.0.



Example 7 (2 points) Write set C which is represented positive integers less than or equal 1000.



Example 8 (2 points) Write set D which is represented even negative integers greater than -50.



Example 9 (2 points) Write set E which is represented rational numbers p/q, p is member of real numbers, q
is member of odd negative integers, and q is not equal 0.



มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                              เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Sets - 01                                                                 CSC1001 Discrete Mathematics             3
2. Equality of Sets
    Because many mathematical statements assert that two differently specified collections of objects are really
the same set, we need to understand what it means for two sets to be equal.
  Definition 2
  Two sets are equal if and only if they have the same elements. Therefore, if A and B are sets, then A and
  B are equal if and only if  x (x  A  x  B). We write A = B if A and B are equal sets.

Example 10 (2 points) The sets {1, 3, 5} and {3, 5, 1} are equal or not equal, why?



Example 11 (2 points) The sets {1, 3, 3, 3, 5, 5, 5, 5} and {1, 3, 5} are equal or not equal, why?



Example 12 (2 points) The sets {1, 3, 5, 7} and {7, 5, 3, 3} are equal or not equal, why?



The empty set There is a special set that has no elements. This set is called the empty set, or null set, and
is denoted by . The empty set can also be denoted by { }. Often, a set of elements with certain properties
turns out to be the null set.
Example 13 (2 points) Write set A which is represented negative integers greater than 0.



Example 14 (2 points) How many members are there in set A form Example 13?



3. Venn Diagrams
    Sets can be represented graphically using Venn diagrams, named after the English mathematician John
Venn, who introduced their use in 1881. In Venn diagrams the universal set U, which contains all the objects
under consideration, is represented by a rectangle. (Note that the universal set varies depending on which
objects are of interest.) Inside this rectangle, circles or other geometrical figures are used to represent sets.
Sometimes points are used to represent the particular elements of the set. Venn diagrams are often used to
indicate the relationships between sets. We show how a Venn diagram can be used in an example.
มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                  เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
4         CSC1001 Discrete Mathematics                                                                            01 - Sets


Example of Venn diagrams
                                                  U                                                           U
                         1                                                       1
                                    11                                                        11
                   2          6          10                                2           6            10
                        4                                Or                     4
                   3          7           9                                3           7             9
                         5          8                                           5              8


                                   Figure: Venn Diagram of Set {1, 2, 3, … , 11}
Example 15 (2 points) Draw a Venn diagram that                Example 16 (2 points) Draw a Venn diagram that
represents V, the set of vowels in the English                represents Z, the set of odd positive integers less
alphabet.                                                     than 10.




4. Subsets
    It is common to encounter situations where the elements of one set are also the elements of a second
set. We now introduce some terminology and notation to express such relationships between sets.
    Definition 3
    The set A is a subset of B if and only if every element of A is also an element of B. We use the notation
    A  B to indicate that A is a subset of the set B.

    We see that A  B if and only if the quantification  x(x  A  x  B) is true. Note that to show that A
is not a subset of B we need only find one element x  A with x  B. Such an x is a counterexample to the
claim that x  A implies x  B. We have these useful rules for determining whether one set is a subset of
another:
     Showing that A is a Subset of B To show that A  B, show that if x belongs to A then x also
        belongs to B.
     Showing that A is Not a Subset of B To show that A  B, find a single x  A such that x  B.

มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                       เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Sets - 01                                                                  CSC1001 Discrete Mathematics            5
  Theorem 1
  Every nonempty set S is guaranteed to have at least two subsets, the empty set and the set S itself, that
  is,   S and S  S.




                             Figure Venn Diagram Showing that A Is a Subset of B
Example 17 (10 points) Is it true () or false ()?
1)          The set of all odd positive integers less than 10 is a subset of the set of all positive integers less
            than 10
2)          The set of rational numbers is a subset of the set of real numbers
3)          The set of natural number (counting number) is a subset of positive integers
4)          The set of positive integers is a subset of natural number (counting number)
5)          The set of all student in computer science majors at your school is a subset of the set of all
            students in mathematics major at your school
6)          The set of all computer science majors at your school is a subset of the set of all students at
            your school
7)          The set of all people in China is a subset of the set of all people in China (it is a subset of itself)
8)          The set of positive integers less than 100 is not a subset of the set of negative integers
9)          The set of people who have taken calculus course at your school is not a subset of the set of all
            computer science majors at your school
10)         The set of students who got “A” in discrete mathematics at your school is a subset of students
            who got “A” in calculus at your school
Example 17 (2 points) Let A be a set of {1, 2, 3} find all subset of A?




Example 18 (2 points) Let B be a set of {0, {1}, {1,2}} find all subset of B?




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                  เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
6         CSC1001 Discrete Mathematics                                                                     01 - Sets


5. Size of Set (Cardinality of Set)
    Definition 4

    Let S be a set. If there are exactly n distinct elements in S where n is a nonnegative integer, we say that S
    is a finite set and that n is the cardinality of S. The cardinality of S is denoted by |S|

Example 19 (5 points) Find a cardinality of set
1) Let A be the set of odd positive integers less than 10. ……………………...………………………………………
2) Let B be the set of letters in the English alphabet. …………………………..………………………………………
3) Let C be the empty set. ………………………………………………………….………………………………………
4) Let D = {x | x  Z+ and x < 1000}. ……………………………………………..………………………………………
5) Let E = {x | x  R, x  1 and x  2}. ……………………………………..….………………………………………
6. Power Sets
    Definition 5

    Given a set S, the power set of S is the set of all subsets of the set S. The power set of S is denoted by
    P(S). (Note that empty set is a subset of any set)

Example 20 (2 points) Find the power set of the set {0, 1, 2}




Example 21 (2 points) Find the power set of the set {-3, -1, 1, 3}




Example 22 (2 points) Find the power set of the set {{0}, {1}}




Example 23 (2 points) Find the power set of the empty set or { }




Example 24 (2 points) Find the power set of the set of empty set or {{ }}




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                  เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Sets - 01                                                                    CSC1001 Discrete Mathematics              7
  Definition 6

  If a set has n elements, then its power set has 2n elements. We will demonstrate this fact in several ways
  in subsequent sections of the text.

Example 25 (5 points) Find an element of power set
1) Let A be the set of {0, 1, 2}. …………………………………………………..…………………………………………
2) Let B be the empty set. ………………………………………………………………………………………………….
3) Let C be the set of odd positive integers less than 10. ………………….…..………………………………………
4) Let D be the set of positive integers less than or equals 10. ……………………………………………………….
5) Let E be the set of {0, 1, { }, {1}, {2}, {1,2}, {1,2,3}}. …………………………………………………………………
7. Cartesian Products
  Definition 7

  The ordered n-tuple, which represented by (a1, a2, . . . , an), is the ordered collection that has a1 as its first
  element, a2 as its second element, . . . , and an as its nth element.

  Definition 8
  Let A and B be sets. The Cartesian product of A and B, denoted by A  B, is the set of all ordered pairs or
  ordered 2-tuple (a, b), where a  A and b  B. Hence,
  A  B = {(a, b) | a  A  b  B}

Example 26 (2 points) Find the Cartesian product of A  B if given A = {1, 2} and B = {a, b, c}




Example 27 (2 points) Find the Cartesian product of B  A if given A = {1, 2} and B = {a, b, c}




Example 28 (2 points) Find the Cartesian product of A  B if given A = {1, 2, 3} and B = {4, 5, 6}




Example 29 (2 points) Find the Cartesian product of A  B if given A = {0, 2, 4, 8} and B = {-1, -2, -3}




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                    เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
8         CSC1001 Discrete Mathematics                                                                  01 - Sets

    Definition 9
    The Cartesian product of the sets A1, A2, … , An, denoted by A1  A2  …  An, is the set of ordered n-
    tuples (a1, a2, … , an), where ai belongs to Ai for i = 1, 2, … , n. In other words,
    An = A1  A2  …  An = {( a1, a2, … , an) | ai  Ai for i = 1, 2, … , n}

Example 30 (2 points) Find the Cartesian product of A3 if given A = {1, 2}




Example 31 (2 points) Find the Cartesian product of A2  B if given A = {2, 4, 8} and B = {a, b}




Example 32 (2 points) Find the Cartesian product of A  B  C if given A = {0, 1}, B = {1, 0} and C = {1, 1}




    2       Set Operations
1. Operations of Sets
    Two, or more, sets can be combined in many different ways. For example, union of the sets, intersection
of the sets, difference of the sets and complement of the set
    Definition 1
    Let A and B be sets. The union of the sets A and B, denoted by A  B, is the set that contains those ele-
    ments that are either in A or in B, or in both.




                                 Figure: Venn Diagram of the Union of A and B

มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                               เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Sets - 01                                                                   CSC1001 Discrete Mathematics             9
Example 33 (2 points) Find the union of the sets {1, 3, 5} and {1, 2, 3}




Example 34 (2 points) Find the union of the sets {a, b, c, d, e, f} and {a, c, e, g, h, k, m, n}




  Definition 2
  Let A and B be sets. The intersection of the sets A and B, denoted by A          B, is the set containing those
  elements in both A and B.




                               Figure: Venn Diagram of the Intersection of A and B
Example 35 (2 points) Find the intersection of the sets {1, 3, 5} and {1, 2, 3}




Example 36 (2 points) Find the intersection of the sets {a, b, c, d, e, f} and {a, c, e, g, h, k, m, n}




  Theorem 1
  Two sets are called disjoint if their intersection is the empty set.
  Let A = {1, 3, 5, 7, 9} and B = {2, 4, 6, 8, 10}. Because A  B = , A and B are disjoint. When A and B are
  disjoint set, the result of |A  B| = |A| + |B|

Example 37 (2 points) Let A = {-1, 1, 11, 21, 31} and B = {-2, 0, 2, 10, 12, 22, 32}. Find |A  B|




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                    เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
10      CSC1001 Discrete Mathematics                                                                          01 - Sets


  Definition 3
 Let A and B be sets. The difference of A and B, denoted by A – B, is the set containing those elements that
 are in A but not in B. The difference of A and B is also called the complement of B with respect to A.




                               Figure: Venn Diagram for the Difference of A and B
Example 38 (2 points) Find the difference of the sets {1, 3, 5} and {1, 2, 3}




Example 39 (2 points) Find the difference of the sets {a, b, c, d, e, f} and {a, c, e, g, h, k, m, n}




  Definition 4
 Let U be the universal set. The complement of the set A, denoted by             A,   is the complement of A with
 respect to U. Therefore, the complement of the set A is U – A.




                             Figure: Venn Diagram for the Complement of the set A
Example 40 (2 points) Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} and A = {1, 3, 5, 7, 9, 11, 13}.
Find the complement of the set A




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                     เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Sets - 01                                                                  CSC1001 Discrete Mathematics          11
Example 41 (2 points) Let A = {a, e, i, o, u}, where the universal set is the set of letters of the English alpha-
bet. Find the complement of the set A.




Example 42 (2 points) Let A be the set of positive integers greater than 10, which is the universal set the set
of all positive integers. Find the complement of the set A.




2. Appying Set Operations
Example 43 (15 points) Let U = {Z}, A = {1, 3, 5, 7, 9, 11, 13, 15, 17}, B = {-2, -1, 0, 1, 2, 3, 4}, C = {-4, 0, 4}
and D = {2, 6, 10, 14, 18, 22, 26, 30, 34, 38}, find the operation of the sets
1) ( A  B)  (C  D)




2)   AC  B




3)   A  (B  C)  D




4)   A B C  D




5)   A  ( B  D)  C




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                   เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
12      CSC1001 Discrete Mathematics                                                                  01 - Sets


3. Set Identities

                       Identity                                             Name / Laws
 A  U = A Identity laws
                                                       Identity laws
 A =A
 A  U=U
                                                       Domination laws
 A =
 A  A=A
                                                       Idempotent laws
 A  A=A
 ( A) = A                                              Complementation laws
 A  B=B  A
                                                       Commutative laws
 A  B=B  A
 A  (B  C) = (A  B)  C
                                                       Associative laws
 A  (B  C) = (A  B)  C
 A  (B  C) = (A  B)  (A  C)
                                                       Distributive laws
 A  (B  C) = (A  B)  (A  C)
 A B=A  B
                                                       De Morgan’s laws
 A B=A  B
 A  (A  B) = A
                                                       Absorption laws
 A  (A  B) = A
 A  A=U
                                                       Complement laws
 A  A=

Example 44 (10 points) Let A, B, and C be sets. Prove that   B  A  A B




Example 45 (10 points) Let A, B, and C be sets. Prove that   A  ( B  A)  C  A  C




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                             เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Sets - 01                                                               CSC1001 Discrete Mathematics         13
Example 46 (10 points) Let A, B, and C be sets. Prove that   ( A  B)  ( A  C )  (C  B )  A




Example 47 (10 points) Let A, B, and C be sets. Prove that   ( A  B)  C  (C  A)  B




Example 48 (10 points) Let A, B, and C be sets. Prove that   A  ( B  C )  (C  B )  A




Example 49 (10 points) Let A, B, and C be sets. Prove that   ( B  A)  (C  A)  A  ( B  C )




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                               เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี

Mais conteúdo relacionado

Mais procurados

Module 4 exponential and logarithmic functions
Module 4   exponential and logarithmic functionsModule 4   exponential and logarithmic functions
Module 4 exponential and logarithmic functionsAya Chavez
 
Discrete mathematic
Discrete mathematicDiscrete mathematic
Discrete mathematicNaralaswapna
 
Functions And Relations
Functions And RelationsFunctions And Relations
Functions And Relationsandrewhickson
 
Introduction to Real Analysis 4th Edition Bartle Solutions Manual
Introduction to Real Analysis 4th Edition Bartle Solutions ManualIntroduction to Real Analysis 4th Edition Bartle Solutions Manual
Introduction to Real Analysis 4th Edition Bartle Solutions ManualDawsonVeronica
 
Maths 12 supporting material by cbse
Maths 12 supporting material by cbseMaths 12 supporting material by cbse
Maths 12 supporting material by cbsenitishguptamaps
 
Introductory maths analysis chapter 11 official
Introductory maths analysis   chapter 11 officialIntroductory maths analysis   chapter 11 official
Introductory maths analysis chapter 11 officialEvert Sandye Taasiringan
 
Class 11 maths support material
Class 11 maths support materialClass 11 maths support material
Class 11 maths support materialnitishguptamaps
 
Probabilistic Systems Analysis Homework Help
Probabilistic Systems Analysis Homework Help Probabilistic Systems Analysis Homework Help
Probabilistic Systems Analysis Homework Help Excel Homework Help
 
Linear ineqns. and statistics
Linear ineqns. and statisticsLinear ineqns. and statistics
Linear ineqns. and statisticsindu psthakur
 
Linear equation in 2 variable class 10
Linear equation in 2 variable class 10Linear equation in 2 variable class 10
Linear equation in 2 variable class 10AadhiSXA
 
Introductory maths analysis chapter 09 official
Introductory maths analysis   chapter 09 officialIntroductory maths analysis   chapter 09 official
Introductory maths analysis chapter 09 officialEvert Sandye Taasiringan
 
Discrete maths questions
Discrete maths questionsDiscrete maths questions
Discrete maths questionsDIT University
 
Mathematical Statistics Homework Help
Mathematical Statistics Homework HelpMathematical Statistics Homework Help
Mathematical Statistics Homework HelpExcel Homework Help
 

Mais procurados (19)

Module 4 exponential and logarithmic functions
Module 4   exponential and logarithmic functionsModule 4   exponential and logarithmic functions
Module 4 exponential and logarithmic functions
 
Discrete mathematic
Discrete mathematicDiscrete mathematic
Discrete mathematic
 
Functions And Relations
Functions And RelationsFunctions And Relations
Functions And Relations
 
Blackbox task 2
Blackbox task 2Blackbox task 2
Blackbox task 2
 
Task 4
Task 4Task 4
Task 4
 
Math task 3
Math task 3Math task 3
Math task 3
 
Iq3514961502
Iq3514961502Iq3514961502
Iq3514961502
 
Introduction to Real Analysis 4th Edition Bartle Solutions Manual
Introduction to Real Analysis 4th Edition Bartle Solutions ManualIntroduction to Real Analysis 4th Edition Bartle Solutions Manual
Introduction to Real Analysis 4th Edition Bartle Solutions Manual
 
Aieee mathematics- 2010
Aieee mathematics- 2010Aieee mathematics- 2010
Aieee mathematics- 2010
 
Maths 12 supporting material by cbse
Maths 12 supporting material by cbseMaths 12 supporting material by cbse
Maths 12 supporting material by cbse
 
Introductory maths analysis chapter 11 official
Introductory maths analysis   chapter 11 officialIntroductory maths analysis   chapter 11 official
Introductory maths analysis chapter 11 official
 
Class 11 maths support material
Class 11 maths support materialClass 11 maths support material
Class 11 maths support material
 
Probabilistic Systems Analysis Homework Help
Probabilistic Systems Analysis Homework Help Probabilistic Systems Analysis Homework Help
Probabilistic Systems Analysis Homework Help
 
Daily test mathematics grade 7 sets part 1
Daily test mathematics grade 7 sets part 1Daily test mathematics grade 7 sets part 1
Daily test mathematics grade 7 sets part 1
 
Linear ineqns. and statistics
Linear ineqns. and statisticsLinear ineqns. and statistics
Linear ineqns. and statistics
 
Linear equation in 2 variable class 10
Linear equation in 2 variable class 10Linear equation in 2 variable class 10
Linear equation in 2 variable class 10
 
Introductory maths analysis chapter 09 official
Introductory maths analysis   chapter 09 officialIntroductory maths analysis   chapter 09 official
Introductory maths analysis chapter 09 official
 
Discrete maths questions
Discrete maths questionsDiscrete maths questions
Discrete maths questions
 
Mathematical Statistics Homework Help
Mathematical Statistics Homework HelpMathematical Statistics Homework Help
Mathematical Statistics Homework Help
 

Destaque

Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IWongyos Keardsri
 
Introduction to management
Introduction to managementIntroduction to management
Introduction to managementBilal Amjad
 
Discrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesDiscrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesWongyos Keardsri
 
Discrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesDiscrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesWongyos Keardsri
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIWongyos Keardsri
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsWongyos Keardsri
 
Discrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsDiscrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsWongyos Keardsri
 
Tenerife airport disaster klm flight 4805 and pan
Tenerife airport disaster klm flight 4805 and panTenerife airport disaster klm flight 4805 and pan
Tenerife airport disaster klm flight 4805 and panReefear Ajang
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsWongyos Keardsri
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statementsguestd166eb5
 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1 Ali Usman
 
Bab 3 Tamadun Melayu Baru
Bab 3  Tamadun Melayu BaruBab 3  Tamadun Melayu Baru
Bab 3 Tamadun Melayu Baruwan arizwnb
 

Destaque (20)

Set Operations
Set OperationsSet Operations
Set Operations
 
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part I
 
Introduction to management
Introduction to managementIntroduction to management
Introduction to management
 
Discrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesDiscrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and Sequences
 
Discrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesDiscrete-Chapter 03 Matrices
Discrete-Chapter 03 Matrices
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part II
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 Relations
 
Discrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsDiscrete-Chapter 09 Algorithms
Discrete-Chapter 09 Algorithms
 
Tenerife airport disaster klm flight 4805 and pan
Tenerife airport disaster klm flight 4805 and panTenerife airport disaster klm flight 4805 and pan
Tenerife airport disaster klm flight 4805 and pan
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and Proofs
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statements
 
Set Theory Presentation
Set Theory PresentationSet Theory Presentation
Set Theory Presentation
 
Bab 5
Bab 5Bab 5
Bab 5
 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1
 
Bab 3
Bab 3Bab 3
Bab 3
 
Bab 3 Tamadun Melayu Baru
Bab 3  Tamadun Melayu BaruBab 3  Tamadun Melayu Baru
Bab 3 Tamadun Melayu Baru
 
Bab 4
Bab 4Bab 4
Bab 4
 
Bab 2
Bab 2Bab 2
Bab 2
 
Konsep Tamadun islam
Konsep Tamadun islamKonsep Tamadun islam
Konsep Tamadun islam
 
Bab 6
Bab 6Bab 6
Bab 6
 

Semelhante a Discrete-Chapter 01 Sets

Set theory- Introduction, symbols with its meaning
Set theory- Introduction, symbols with its meaningSet theory- Introduction, symbols with its meaning
Set theory- Introduction, symbols with its meaningDipakMahurkar1
 
Digital text sets pdf
Digital text sets  pdfDigital text sets  pdf
Digital text sets pdfstephy1234
 
Chapter 2 Mathematical Language and Symbols.pdf
Chapter 2 Mathematical Language and Symbols.pdfChapter 2 Mathematical Language and Symbols.pdf
Chapter 2 Mathematical Language and Symbols.pdfRaRaRamirez
 
Sets functions-sequences-exercises
Sets functions-sequences-exercisesSets functions-sequences-exercises
Sets functions-sequences-exercisesRoshayu Mohamad
 
Explore the foundational concepts of sets in discrete mathematics
Explore the foundational concepts of sets in discrete mathematicsExplore the foundational concepts of sets in discrete mathematics
Explore the foundational concepts of sets in discrete mathematicsDr Chetan Bawankar
 
02 Representing Sets and Types of Sets.pptx
02 Representing Sets and Types of Sets.pptx02 Representing Sets and Types of Sets.pptx
02 Representing Sets and Types of Sets.pptxMerrykrisIgnacio
 
Sets and Functions By Saleh ElShehabey
Sets and Functions By Saleh ElShehabeySets and Functions By Saleh ElShehabey
Sets and Functions By Saleh ElShehabeyravingeek
 
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...LouelaDePaz
 
SETS in Discrete Structure
SETS in Discrete StructureSETS in Discrete Structure
SETS in Discrete StructureNANDINI SHARMA
 
1. Real Numbers and Integer Exponent.pptx
1. Real Numbers and Integer Exponent.pptx1. Real Numbers and Integer Exponent.pptx
1. Real Numbers and Integer Exponent.pptxmxian444
 
functions and sets.pdf
functions and sets.pdffunctions and sets.pdf
functions and sets.pdfpetermulei3
 
functions and sets.pdf
functions and sets.pdffunctions and sets.pdf
functions and sets.pdfpetermulei3
 
Set, Relations and Functions
Set, Relations and FunctionsSet, Relations and Functions
Set, Relations and Functionssuthi
 
Digital text book sets
Digital text book   setsDigital text book   sets
Digital text book setslibinkalappila
 

Semelhante a Discrete-Chapter 01 Sets (20)

4898850.ppt
4898850.ppt4898850.ppt
4898850.ppt
 
Set theory- Introduction, symbols with its meaning
Set theory- Introduction, symbols with its meaningSet theory- Introduction, symbols with its meaning
Set theory- Introduction, symbols with its meaning
 
Digital text sets pdf
Digital text sets  pdfDigital text sets  pdf
Digital text sets pdf
 
Chapter 2 Mathematical Language and Symbols.pdf
Chapter 2 Mathematical Language and Symbols.pdfChapter 2 Mathematical Language and Symbols.pdf
Chapter 2 Mathematical Language and Symbols.pdf
 
Sets functions-sequences-exercises
Sets functions-sequences-exercisesSets functions-sequences-exercises
Sets functions-sequences-exercises
 
Explore the foundational concepts of sets in discrete mathematics
Explore the foundational concepts of sets in discrete mathematicsExplore the foundational concepts of sets in discrete mathematics
Explore the foundational concepts of sets in discrete mathematics
 
02 Representing Sets and Types of Sets.pptx
02 Representing Sets and Types of Sets.pptx02 Representing Sets and Types of Sets.pptx
02 Representing Sets and Types of Sets.pptx
 
7-Sets-1.ppt
7-Sets-1.ppt7-Sets-1.ppt
7-Sets-1.ppt
 
Veena vtext
Veena vtextVeena vtext
Veena vtext
 
Veena vtext
Veena vtextVeena vtext
Veena vtext
 
Sets and Functions By Saleh ElShehabey
Sets and Functions By Saleh ElShehabeySets and Functions By Saleh ElShehabey
Sets and Functions By Saleh ElShehabey
 
Theory of computation
Theory of computationTheory of computation
Theory of computation
 
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
 
SETS in Discrete Structure
SETS in Discrete StructureSETS in Discrete Structure
SETS in Discrete Structure
 
1. Real Numbers and Integer Exponent.pptx
1. Real Numbers and Integer Exponent.pptx1. Real Numbers and Integer Exponent.pptx
1. Real Numbers and Integer Exponent.pptx
 
functions and sets.pdf
functions and sets.pdffunctions and sets.pdf
functions and sets.pdf
 
functions and sets.pdf
functions and sets.pdffunctions and sets.pdf
functions and sets.pdf
 
discrete maths notes.ppt
discrete maths notes.pptdiscrete maths notes.ppt
discrete maths notes.ppt
 
Set, Relations and Functions
Set, Relations and FunctionsSet, Relations and Functions
Set, Relations and Functions
 
Digital text book sets
Digital text book   setsDigital text book   sets
Digital text book sets
 

Mais de Wongyos Keardsri

How to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramHow to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramWongyos Keardsri
 
The next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsThe next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsWongyos Keardsri
 
SysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script ProgrammingSysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script ProgrammingWongyos Keardsri
 
SysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating SystemSysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating SystemWongyos Keardsri
 
SysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageSysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIDiscrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IDiscrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IWongyos Keardsri
 
Java-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowJava-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowWongyos Keardsri
 
Java-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and ObjectsJava-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and ObjectsWongyos Keardsri
 
Java-Chapter 11 Recursions
Java-Chapter 11 RecursionsJava-Chapter 11 Recursions
Java-Chapter 11 RecursionsWongyos Keardsri
 
Java-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional ArraysJava-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional ArraysWongyos Keardsri
 
Java-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and ApplicationsJava-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and ApplicationsWongyos Keardsri
 
Java-Chapter 07 One Dimensional Arrays
Java-Chapter 07 One Dimensional ArraysJava-Chapter 07 One Dimensional Arrays
Java-Chapter 07 One Dimensional ArraysWongyos Keardsri
 
Java-Chapter 06 File Operations
Java-Chapter 06 File OperationsJava-Chapter 06 File Operations
Java-Chapter 06 File OperationsWongyos Keardsri
 
Java-Chapter 05 String Operations
Java-Chapter 05 String OperationsJava-Chapter 05 String Operations
Java-Chapter 05 String OperationsWongyos Keardsri
 
Java-Chapter 04 Iteration Statements
Java-Chapter 04 Iteration StatementsJava-Chapter 04 Iteration Statements
Java-Chapter 04 Iteration StatementsWongyos Keardsri
 

Mais de Wongyos Keardsri (20)

How to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramHow to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master Program
 
The next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsThe next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applications
 
IP address anonymization
IP address anonymizationIP address anonymization
IP address anonymization
 
SysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script ProgrammingSysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script Programming
 
SysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating SystemSysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating System
 
SysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageSysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming Language
 
Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part III
 
Discrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIDiscrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part II
 
Discrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IDiscrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part I
 
Discrete-Chapter 10 Trees
Discrete-Chapter 10 TreesDiscrete-Chapter 10 Trees
Discrete-Chapter 10 Trees
 
Java-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowJava-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindow
 
Java-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and ObjectsJava-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and Objects
 
Java-Chapter 11 Recursions
Java-Chapter 11 RecursionsJava-Chapter 11 Recursions
Java-Chapter 11 Recursions
 
Java-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional ArraysJava-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional Arrays
 
Java-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and ApplicationsJava-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and Applications
 
Java-Chapter 08 Methods
Java-Chapter 08 MethodsJava-Chapter 08 Methods
Java-Chapter 08 Methods
 
Java-Chapter 07 One Dimensional Arrays
Java-Chapter 07 One Dimensional ArraysJava-Chapter 07 One Dimensional Arrays
Java-Chapter 07 One Dimensional Arrays
 
Java-Chapter 06 File Operations
Java-Chapter 06 File OperationsJava-Chapter 06 File Operations
Java-Chapter 06 File Operations
 
Java-Chapter 05 String Operations
Java-Chapter 05 String OperationsJava-Chapter 05 String Operations
Java-Chapter 05 String Operations
 
Java-Chapter 04 Iteration Statements
Java-Chapter 04 Iteration StatementsJava-Chapter 04 Iteration Statements
Java-Chapter 04 Iteration Statements
 

Discrete-Chapter 01 Sets

  • 1. Sets - 01 CSC1001 Discrete Mathematics 1 CHAPTER เซต 1 (Sets) 1 Introduction to Sets 1. Definition of Sets Sets are used to group objects together. Often, but not always, the objects in a set have similar properties. In computer science, sets are basic data structures which are represented by one dimensional array and linked list. Definition 1 A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a  A to denote that a is an element of the set A. The notation a  A denotes that a is not an element of the set A. 1) Sets symbol  Sets are denoted by using uppercase letters for example A, B, C, D.  Elements of sets are denoted by using lowercase letters for example a, b, c, d or 1, 2, 3, 4.  Groups of sets are denoted by using bracket "{" and "}", for example { … }, { … }.  Each elements of sets is separated by using comma ",", for example { 1, 2, 3, 4 } … . 2) Example of sets A = { 1, 2, 3, 4 } or B = { a, b, c, d, e } Example 1 (2 points) Write set V which is represented all vowels in the English alphabet. Example 2 (2 points) Write set O which is represented odd positive integers less than 10. Example 3 (2 points) Write set E which is represented even negative integers greater than -10. Example 4 (2 points) Write set Z which is represented positive integers less than or equal 100. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 2. 2 CSC1001 Discrete Mathematics 01 - Sets Another way to describe a set is to use set builder notation. We characterize all those elements in the set by stating the property or properties they must have to be members. For instance, the set O of all odd positive integers less than 10 can be written as  O = { x | x is an odd positive integer less than 10 } or, specifying the universe as the set of positive integers, as +  O = { x  Z | x is odd and x < 10 } (In computer science we can donated by O = { x  Z+ | x % 2 = 0 and x < 10 }) These sets, each denoted using a boldface letter, play an important role in discrete mathematics:  N = { 0, 1, 2, 3, … }, the set of natural numbers (counting number)  Z = { …, -2, -1, 0, 1, 2, … }, the set of integers +  Z = { 1, 2, 3, … }, the set of positive integers -  Z = { -1, -2, -3, … }, the set of negative integers  Q = { p/q | p  Z, q  Z, and q  0 }, the set of rational numbers  R, the set of real numbers +  R , the set of positive real numbers -  R , the set of negative real numbers  C, the set of complex numbers. Example 5 (2 points) Write set A which is represented complex numbers. Example 6 (2 points) Write set B which is represented negative real numbers but not equal -50.0. Example 7 (2 points) Write set C which is represented positive integers less than or equal 1000. Example 8 (2 points) Write set D which is represented even negative integers greater than -50. Example 9 (2 points) Write set E which is represented rational numbers p/q, p is member of real numbers, q is member of odd negative integers, and q is not equal 0. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 3. Sets - 01 CSC1001 Discrete Mathematics 3 2. Equality of Sets Because many mathematical statements assert that two differently specified collections of objects are really the same set, we need to understand what it means for two sets to be equal. Definition 2 Two sets are equal if and only if they have the same elements. Therefore, if A and B are sets, then A and B are equal if and only if  x (x  A  x  B). We write A = B if A and B are equal sets. Example 10 (2 points) The sets {1, 3, 5} and {3, 5, 1} are equal or not equal, why? Example 11 (2 points) The sets {1, 3, 3, 3, 5, 5, 5, 5} and {1, 3, 5} are equal or not equal, why? Example 12 (2 points) The sets {1, 3, 5, 7} and {7, 5, 3, 3} are equal or not equal, why? The empty set There is a special set that has no elements. This set is called the empty set, or null set, and is denoted by . The empty set can also be denoted by { }. Often, a set of elements with certain properties turns out to be the null set. Example 13 (2 points) Write set A which is represented negative integers greater than 0. Example 14 (2 points) How many members are there in set A form Example 13? 3. Venn Diagrams Sets can be represented graphically using Venn diagrams, named after the English mathematician John Venn, who introduced their use in 1881. In Venn diagrams the universal set U, which contains all the objects under consideration, is represented by a rectangle. (Note that the universal set varies depending on which objects are of interest.) Inside this rectangle, circles or other geometrical figures are used to represent sets. Sometimes points are used to represent the particular elements of the set. Venn diagrams are often used to indicate the relationships between sets. We show how a Venn diagram can be used in an example. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 4. 4 CSC1001 Discrete Mathematics 01 - Sets Example of Venn diagrams U U 1 1 11 11 2 6 10 2 6 10 4 Or 4 3 7 9 3 7 9 5 8 5 8 Figure: Venn Diagram of Set {1, 2, 3, … , 11} Example 15 (2 points) Draw a Venn diagram that Example 16 (2 points) Draw a Venn diagram that represents V, the set of vowels in the English represents Z, the set of odd positive integers less alphabet. than 10. 4. Subsets It is common to encounter situations where the elements of one set are also the elements of a second set. We now introduce some terminology and notation to express such relationships between sets. Definition 3 The set A is a subset of B if and only if every element of A is also an element of B. We use the notation A  B to indicate that A is a subset of the set B. We see that A  B if and only if the quantification  x(x  A  x  B) is true. Note that to show that A is not a subset of B we need only find one element x  A with x  B. Such an x is a counterexample to the claim that x  A implies x  B. We have these useful rules for determining whether one set is a subset of another:  Showing that A is a Subset of B To show that A  B, show that if x belongs to A then x also belongs to B.  Showing that A is Not a Subset of B To show that A  B, find a single x  A such that x  B. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 5. Sets - 01 CSC1001 Discrete Mathematics 5 Theorem 1 Every nonempty set S is guaranteed to have at least two subsets, the empty set and the set S itself, that is,   S and S  S. Figure Venn Diagram Showing that A Is a Subset of B Example 17 (10 points) Is it true () or false ()? 1) The set of all odd positive integers less than 10 is a subset of the set of all positive integers less than 10 2) The set of rational numbers is a subset of the set of real numbers 3) The set of natural number (counting number) is a subset of positive integers 4) The set of positive integers is a subset of natural number (counting number) 5) The set of all student in computer science majors at your school is a subset of the set of all students in mathematics major at your school 6) The set of all computer science majors at your school is a subset of the set of all students at your school 7) The set of all people in China is a subset of the set of all people in China (it is a subset of itself) 8) The set of positive integers less than 100 is not a subset of the set of negative integers 9) The set of people who have taken calculus course at your school is not a subset of the set of all computer science majors at your school 10) The set of students who got “A” in discrete mathematics at your school is a subset of students who got “A” in calculus at your school Example 17 (2 points) Let A be a set of {1, 2, 3} find all subset of A? Example 18 (2 points) Let B be a set of {0, {1}, {1,2}} find all subset of B? มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 6. 6 CSC1001 Discrete Mathematics 01 - Sets 5. Size of Set (Cardinality of Set) Definition 4 Let S be a set. If there are exactly n distinct elements in S where n is a nonnegative integer, we say that S is a finite set and that n is the cardinality of S. The cardinality of S is denoted by |S| Example 19 (5 points) Find a cardinality of set 1) Let A be the set of odd positive integers less than 10. ……………………...……………………………………… 2) Let B be the set of letters in the English alphabet. …………………………..……………………………………… 3) Let C be the empty set. ………………………………………………………….……………………………………… 4) Let D = {x | x  Z+ and x < 1000}. ……………………………………………..……………………………………… 5) Let E = {x | x  R, x  1 and x  2}. ……………………………………..….……………………………………… 6. Power Sets Definition 5 Given a set S, the power set of S is the set of all subsets of the set S. The power set of S is denoted by P(S). (Note that empty set is a subset of any set) Example 20 (2 points) Find the power set of the set {0, 1, 2} Example 21 (2 points) Find the power set of the set {-3, -1, 1, 3} Example 22 (2 points) Find the power set of the set {{0}, {1}} Example 23 (2 points) Find the power set of the empty set or { } Example 24 (2 points) Find the power set of the set of empty set or {{ }} มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 7. Sets - 01 CSC1001 Discrete Mathematics 7 Definition 6 If a set has n elements, then its power set has 2n elements. We will demonstrate this fact in several ways in subsequent sections of the text. Example 25 (5 points) Find an element of power set 1) Let A be the set of {0, 1, 2}. …………………………………………………..………………………………………… 2) Let B be the empty set. …………………………………………………………………………………………………. 3) Let C be the set of odd positive integers less than 10. ………………….…..……………………………………… 4) Let D be the set of positive integers less than or equals 10. ………………………………………………………. 5) Let E be the set of {0, 1, { }, {1}, {2}, {1,2}, {1,2,3}}. ………………………………………………………………… 7. Cartesian Products Definition 7 The ordered n-tuple, which represented by (a1, a2, . . . , an), is the ordered collection that has a1 as its first element, a2 as its second element, . . . , and an as its nth element. Definition 8 Let A and B be sets. The Cartesian product of A and B, denoted by A  B, is the set of all ordered pairs or ordered 2-tuple (a, b), where a  A and b  B. Hence, A  B = {(a, b) | a  A  b  B} Example 26 (2 points) Find the Cartesian product of A  B if given A = {1, 2} and B = {a, b, c} Example 27 (2 points) Find the Cartesian product of B  A if given A = {1, 2} and B = {a, b, c} Example 28 (2 points) Find the Cartesian product of A  B if given A = {1, 2, 3} and B = {4, 5, 6} Example 29 (2 points) Find the Cartesian product of A  B if given A = {0, 2, 4, 8} and B = {-1, -2, -3} มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 8. 8 CSC1001 Discrete Mathematics 01 - Sets Definition 9 The Cartesian product of the sets A1, A2, … , An, denoted by A1  A2  …  An, is the set of ordered n- tuples (a1, a2, … , an), where ai belongs to Ai for i = 1, 2, … , n. In other words, An = A1  A2  …  An = {( a1, a2, … , an) | ai  Ai for i = 1, 2, … , n} Example 30 (2 points) Find the Cartesian product of A3 if given A = {1, 2} Example 31 (2 points) Find the Cartesian product of A2  B if given A = {2, 4, 8} and B = {a, b} Example 32 (2 points) Find the Cartesian product of A  B  C if given A = {0, 1}, B = {1, 0} and C = {1, 1} 2 Set Operations 1. Operations of Sets Two, or more, sets can be combined in many different ways. For example, union of the sets, intersection of the sets, difference of the sets and complement of the set Definition 1 Let A and B be sets. The union of the sets A and B, denoted by A  B, is the set that contains those ele- ments that are either in A or in B, or in both. Figure: Venn Diagram of the Union of A and B มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 9. Sets - 01 CSC1001 Discrete Mathematics 9 Example 33 (2 points) Find the union of the sets {1, 3, 5} and {1, 2, 3} Example 34 (2 points) Find the union of the sets {a, b, c, d, e, f} and {a, c, e, g, h, k, m, n} Definition 2 Let A and B be sets. The intersection of the sets A and B, denoted by A  B, is the set containing those elements in both A and B. Figure: Venn Diagram of the Intersection of A and B Example 35 (2 points) Find the intersection of the sets {1, 3, 5} and {1, 2, 3} Example 36 (2 points) Find the intersection of the sets {a, b, c, d, e, f} and {a, c, e, g, h, k, m, n} Theorem 1 Two sets are called disjoint if their intersection is the empty set. Let A = {1, 3, 5, 7, 9} and B = {2, 4, 6, 8, 10}. Because A  B = , A and B are disjoint. When A and B are disjoint set, the result of |A  B| = |A| + |B| Example 37 (2 points) Let A = {-1, 1, 11, 21, 31} and B = {-2, 0, 2, 10, 12, 22, 32}. Find |A  B| มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 10. 10 CSC1001 Discrete Mathematics 01 - Sets Definition 3 Let A and B be sets. The difference of A and B, denoted by A – B, is the set containing those elements that are in A but not in B. The difference of A and B is also called the complement of B with respect to A. Figure: Venn Diagram for the Difference of A and B Example 38 (2 points) Find the difference of the sets {1, 3, 5} and {1, 2, 3} Example 39 (2 points) Find the difference of the sets {a, b, c, d, e, f} and {a, c, e, g, h, k, m, n} Definition 4 Let U be the universal set. The complement of the set A, denoted by A, is the complement of A with respect to U. Therefore, the complement of the set A is U – A. Figure: Venn Diagram for the Complement of the set A Example 40 (2 points) Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} and A = {1, 3, 5, 7, 9, 11, 13}. Find the complement of the set A มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 11. Sets - 01 CSC1001 Discrete Mathematics 11 Example 41 (2 points) Let A = {a, e, i, o, u}, where the universal set is the set of letters of the English alpha- bet. Find the complement of the set A. Example 42 (2 points) Let A be the set of positive integers greater than 10, which is the universal set the set of all positive integers. Find the complement of the set A. 2. Appying Set Operations Example 43 (15 points) Let U = {Z}, A = {1, 3, 5, 7, 9, 11, 13, 15, 17}, B = {-2, -1, 0, 1, 2, 3, 4}, C = {-4, 0, 4} and D = {2, 6, 10, 14, 18, 22, 26, 30, 34, 38}, find the operation of the sets 1) ( A  B)  (C  D) 2) AC  B 3) A  (B  C)  D 4) A B C  D 5) A  ( B  D)  C มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 12. 12 CSC1001 Discrete Mathematics 01 - Sets 3. Set Identities Identity Name / Laws A  U = A Identity laws Identity laws A =A A  U=U Domination laws A = A  A=A Idempotent laws A  A=A ( A) = A Complementation laws A  B=B  A Commutative laws A  B=B  A A  (B  C) = (A  B)  C Associative laws A  (B  C) = (A  B)  C A  (B  C) = (A  B)  (A  C) Distributive laws A  (B  C) = (A  B)  (A  C) A B=A  B De Morgan’s laws A B=A  B A  (A  B) = A Absorption laws A  (A  B) = A A  A=U Complement laws A  A= Example 44 (10 points) Let A, B, and C be sets. Prove that B  A  A B Example 45 (10 points) Let A, B, and C be sets. Prove that A  ( B  A)  C  A  C มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 13. Sets - 01 CSC1001 Discrete Mathematics 13 Example 46 (10 points) Let A, B, and C be sets. Prove that ( A  B)  ( A  C )  (C  B )  A Example 47 (10 points) Let A, B, and C be sets. Prove that ( A  B)  C  (C  A)  B Example 48 (10 points) Let A, B, and C be sets. Prove that A  ( B  C )  (C  B )  A Example 49 (10 points) Let A, B, and C be sets. Prove that ( B  A)  (C  A)  A  ( B  C ) มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี