Discrete Structure Chapter 1 SetTheory 30

download Discrete Structure Chapter 1 SetTheory 30

of 31

Transcript of Discrete Structure Chapter 1 SetTheory 30

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    1/31

    Chapter 1

    Set Theory

    1

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    2/31

    2

    Set Theory

    1.1 Sets and Subsets

    A set is a well-definedcollection of objects

    f inite sets, inf ini te sets, cardinali ty of a set, subset

    A={1,3,5,7,9}

    B={x|xis odd integer} = {x|x integer ganjil}

    C={1,3,5,7,9,...}

    cardinality ofA=5, no of elements= n(A)=5Ais a proper subset ofB.

    Cis a subset ofB.

    1 1 1 A B C, ,

    A B

    C B

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    3/31

    3

    Set Theory

    1.1 Sets and Subsets

    Elements of a setdefined as members of a set.

    Capital letters A , B , , Z - to represent sets.

    Lowercase letters a , b , c ,, z to represent elements.

    Equal settwo sets are equal if and only if they have the same

    elements.

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    4/31

    4

    Set Theory

    1.1 Sets and Subsets

    Eg: Elements of a set

    A={1,3,5,7,9}

    1A , 3 A

    2 A

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    5/31

    5

    Set Theory

    1.1 Sets and Subsets

    Def: Subset

    If C , D are sets from a universe U , we say that C is a subset of D and we

    write C D or D C , if every element of C is an element of D.In addition, D contains an elements that is not in C , then C is called a

    proper subset of D , and this is denoted by C D or DC.

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    6/31

    6

    Set Theory

    1.1 Sets and Subsets

    Eg: Let A = { 1 , 2 , 3 , 4 , 5} , C = {1 , 2} , D = {1 , 2}

    C is a subset of D - C D or D C

    But C is not a proper subset of D -- C D.

    C is a proper subset of A --- C A

    D is a proper subset of A --- D A

    C is equal to D --- C = D

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    7/31

    7

    Set Theory

    1.1 Sets and Subsets

    Eg:Negatex [ x Ax B ]

    Soln:x [ x Ax B ]

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    8/31

    8

    Set Theory

    1.1 Sets and Subsets

    If A = B then AB B A

    If A B then [AB B A]

    [AB B A]

    (AB) (B A)

    (AB) (B A)

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    9/31

    9

    Set Theory1.1 Sets and Subsets

    set equality

    C D C D D C ( ) ( )

    subsets

    A B x x A x B [ ]A B x x A x B

    x x A x B

    x x A x B

    [ ]

    [ ( ) )]

    [ ]

    C D C D D C

    C D D C

    ( )

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    10/31

    10

    Set Theory

    1.1 Sets and Subsets

    null set or empty set : { } ,

    universal set, universe: U

    power set of A: the set of all subsets ofA

    Eg. B={1,2}, thenP(B)={{ }, {1}, {2}, {1,2}}

    If n(A)=n, then n(P(A)) = 2n.

    Eg. C={1,2,3}, thenP(C)={{ }, {1},{2},{3},{1,2},{1,3},{2,3},{1,2,3}}

    Eg. A={1}, thenP(A)={{ }, {1}}

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    11/31

    11

    Set Theory

    1.1 Sets and Subsets

    Eg:Let U = { 1 , 2 , 3 , 4 , 5 , 6 , x , y ,{1,2},{1,2,3},{1,2,3,4}}

    And n(U) = 11.

    If A = {1,2,3,4} then n(A) = 4. The following statements are TRUE :

    a) AU b) {A} U c) AU

    d) {A} U e) AU f) {A} U

    If B ={5 , 6 , x , y, A} ={5 , 6 , x , y, {1,2,3,4}} then n(B) = 5.

    The following statements are TRUE :

    a) AB b) {A} B c) {A} B

    d) {A}B e) AB f) AB

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    12/31

    12

    Set Theory

    1.1 Sets and Subsets common notations

    (a) Z=the set of integers={0,1,-1,2,-1,3,-3,...}

    (b)N=the set of nonnegative integers or natural numbers

    (c) Z+=the set of positive integers(d) Q=the set of rational numbers={a/b| a,bis integer, bnot zero}

    (e) Q+=the set of positive rational numbers

    (f) Q*=the set of nonzero rational numbers

    (g) R=the set of real numbers

    (h) R+=the set of positive real numbers(i) R*=the set of nonzero real numbers

    (j) C=the set of complex numbers

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    13/31

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    14/31

    14

    Set Theory

    1.1 Sets and Subsets

    Eg: Let U= {1,2,3,4,5,6,7,8,9,10} , A = {1,2,3,4,5} , B = {3,4,5,6,7}, C = {7,8,9}

    Find the elements of the following sets:

    a) AB b) AB c) B C

    d) AC e) A B f) A C

    Soln:

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    15/31

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    16/31

    16

    Set Theory

    1.2 Set Operations and the Laws of Set Theory

    Theorem: Let A , B, C U

    a)If AB and B C, then AC

    b) If AB and B C, then AC

    c) If AB and B C, then AC

    d) If AB and B C, then AC

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    17/31

    17

    Set Theory

    1.2 Set Operations and the Laws of Set Theory

    Theorem:For any universe Uand any setA,Bin U, the

    following statements are equivalent:

    A B

    A B B

    A B A

    B A

    a)

    b)

    c)

    d)

    reasoning process

    (a) (b), (b) (c),

    (c) (d), and (d) (a)

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    18/31

    18

    Set Theory

    1.2 Set Operations and the Laws of Set TheoryThe Laws of Set Theory

    )()()(

    Laws)()()((5)

    )()(

    Laws)()((4)

    Laws(3)

    Laws'(2)

    ofLaw)1(

    CABACBA

    veDistributiCABACBA

    CBACBA

    eAssociativCBACBA

    ABBA

    eCommutativABBA

    BABA

    sDemorganBABA

    ComplementDoubleAA

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    19/31

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    20/31

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    21/31

    21

    Set Theory

    1.2 Set Operations and the Laws of Set Theory

    BABA

    BABABAAB

    BBAABABABA

    BABABABABA

    BABABABA

    BAxBAxxBA

    BA

    )()()()(

    ])[(])[()()(

    )()()(

    )()()()(

    }|{

    .Negate:Ex

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    22/31

    22

    Set Theory

    1.2 Set Operations and the Laws of Set Theory

    Def :

    i Ii i

    i I

    i i

    A x x A i I

    A x x A i I

    { | }

    { | }

    for at least one , and

    for every

    I: index set

    Theorem:Generalized DeMorgan's Laws

    i I

    i

    i I

    i

    i Ii

    i Ii

    A A

    A A

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    23/31

    23

    Set Theory

    1.2 Set Operations and the Laws of Set Theory

    Eg:For each n+, let An={123,, n-1,n}. Determine

    a) An b)An c)An d)Ann=1 n=1 n=1 n=1

    7 11 m m

    Soln:

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    24/31

    24

    Set Theory

    1.2 Set Operations and the Laws of Set Theory

    Membership table to establish set equality:

    A B AB AB

    0

    0

    11

    0

    1

    01

    0

    0

    01

    0

    1

    11

    A A

    0

    1

    1

    0

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    25/31

    25

    Set Theory

    1.2 Set Operations and the Laws of Set Theory

    Eg: Use membership table to establish each of the following

    a) AB = AB b) AA = A

    c) A(AB) = A d) (AB) (AC) = (A B) (AC)

    Soln:

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    26/31

    26

    Set Theory

    1.2 Set Operations and the Laws of Set Theory

    Eg: Simplify the expression(AB) C B

    Soln:

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    27/31

    27

    Set Theory

    1.2 Set Operations and the Laws of Set Theory

    Eg: Express AB in terms of and

    Soln:

    A-B = {X|x A and xB} = A B

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    28/31

    28

    Set Theory

    1.3 Counting and Venn Diagrams

    Ex:In a class of 50 college freshmen, 30 are studying

    BASIC, 25 studying PASCAL, and 10 are studying both. How

    many freshmen are studying either computer language?

    U A B

    10 1520

    5

    | | | | | | | |A B A B A B

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    29/31

    29

    Set Theory

    1.3 Counting and Venn Diagrams

    Given 100 samples

    setA: with D1

    setB: with D2set C: with D3

    Ex: Defect types of an AND gate:

    D1: first input stuck at 0

    D2: second input stuck at 0

    D3: output stuck at 1

    with |A|=23, |B|=26, |C|=30,

    | | , | | , | | ,

    | |

    A B A C B C

    A B C

    7 8 10

    3 , how many samples have defects?

    A

    B

    C

    11 4

    35

    7

    12

    15

    43

    Ans:57

    | | | | | | | | | |

    | | | | | |

    A B C A B C A B

    A C B C A B C

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    30/31

    30

    Set Theory

    1.3 Counting and Venn Diagrams

    Ex:There are 3 games. In how many ways can one play one game each

    day so that one can play each of the three at least once during 5 days?

    setA: without playing game 1

    setB: without playing game 2

    set C: without playing game 3

    | | | | | |

    | | | | | |

    | |

    | |

    A B C

    A B B C C A

    A B C

    A B C

    Ans

    2

    1

    0

    3 2 3 1 0 93

    3 93 150

    5

    5

    5 5

    5

    balls containers

    1

    2

    34

    5

    g1

    g2

    g3

  • 8/10/2019 Discrete Structure Chapter 1 SetTheory 30

    31/31

    End Chapter 1 set theory

    31