7th topic b.pptx

download 7th topic b.pptx

of 15

Transcript of 7th topic b.pptx

  • 8/14/2019 7th topic b.pptx

    1/15

    KS091201 MATEMATIKA DISKRIT W.07.b1

    KS091201 MATEMATIKA DISKRIT (DISCRETE MATHEMATICS)

    Week 0.7b

    Discrete Basic Structure:Set (b)

    11/10/2013

  • 8/14/2019 7th topic b.pptx

    2/15

    outline

    2

    Set operations: Union Set operations: Intersection

    Set operations: Disjoint

    Set operations: Complement

    Set operations: Difference Set operations: Complements

    Set Identity

    Proof By Identity

    KS091201 MATEMATIKA DISKRIT W.07.b 11/10/2013

  • 8/14/2019 7th topic b.pptx

    3/15

    KS091201 MATEMATIKADISKRIT W.07.b

    Recap A set is an unordered collection of objects

    aS

    N, Z, Z+, Q, R

    U: Universal set, = { }

    S T if x (x S x T)

    S = T if S T and T S.

    |A|: the number of elements in a set A.

    Power Set: P(S) = {T | T S} A x B = { (a,b) | a A and b B }

    11/10/20133

  • 8/14/2019 7th topic b.pptx

    4/15

    Refreshment Questions

    1. What is the cardinality of :

    a) {a}

    b) {{a,a}}

    c) {a, {a}}d) {a, {a}, {a, {a}} }

    2. How many different elements doesA x B

    have ifAhas m elements and Bhas n

    element

    KS091201 MATEMATIKA DISKRIT W.07.b4 11/10/2013

  • 8/14/2019 7th topic b.pptx

    5/15

    Refreshment Quiz

    1. What is the cardinality of :

    a) 1

    b) 1

    c) 2

    d) 3

    2. mn elements.

    KS091201 MATEMATIKA DISKRIT W.07.b5 11/10/2013

  • 8/14/2019 7th topic b.pptx

    6/15

    Set operations: Union

    Formal definition for the union of two sets:A UB = {x|xA orxB }

    Further examples {1, 2, 3} U{3, 4, 5} = {1, 2, 3, 4, 5}

    {a, b} U{3, 4} = {a, b, 3, 4}

    {1, 2} U= {1, 2}

    Properties of the union operation

    A U= A Identity law A UU= U Domination law

    A UA = A Idempotent law

    A UB = B UA Commutative law

    A U(B UC) = (A UB) UC Associative law

    6 KS091201 MATEMATIKA DISKRIT W.07.b 11/10/2013

  • 8/14/2019 7th topic b.pptx

    7/15

    Set operations: Intersection

    Formal definition for the intersection of two sets:A B = {x|xA andxB }

    Examples

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

    {a, b} {3, 4} =

    {1, 2} =

    Properties of the intersection operation

    A U = A Identity law A = Domination law

    A A = A Idempotent law

    A B = B A Commutative law

    A (B C) = (A B) C Associative law

    7 KS091201 MATEMATIKA DISKRIT W.07.b 11/10/2013

  • 8/14/2019 7th topic b.pptx

    8/15

    Disjoint sets

    Formal definition for disjoint sets: two sets are disjoint iftheir intersection is the empty set

    Further examples {1, 2, 3} and {3, 4, 5} are not disjoint

    {a, b} and {3, 4} are disjoint

    {1, 2} and are disjoint Their intersection is the empty set

    and are disjoint! Their intersection is the empty set

    8 KS091201 MATEMATIKA DISKRIT W.07.b 11/10/2013

  • 8/14/2019 7th topic b.pptx

    9/15

    Formal definition for the difference of two sets:A - B = {x|xA andxB }

    Further examples {1, 2, 3} - {3, 4, 5} = {1, 2}

    {a, b} - {3, 4} = {a, b}

    {1, 2} - = {1, 2} The difference of any set S with the empty set will be the set S

    Set operations: Difference

    9 KS091201 MATEMATIKA DISKRIT W.07.b 11/10/2013

  • 8/14/2019 7th topic b.pptx

    10/15

    Complement sets

    Formal definition for the complement of a set:A ={x|xA } = Ac Or UA, where Uis the universal set

    Further examples (assuming U= Z) {1, 2, 3}c= { , -2, -1, 0, 4, 5, 6, }

    {a, b}c= Z

    Properties of complement sets (Ac)c = A Complementation law

    A U Ac= U Complement law

    A Ac= Complement law

    10 KS091201 MATEMATIKA DISKRIT W.07.b 11/10/2013

  • 8/14/2019 7th topic b.pptx

    11/15

    Set identities

    A= AAU = A

    Identity Law AU = UA=

    Domination law

    AA = A

    AA = AIdempotent Law (Ac)c= A Complement Law

    AB = BAAB = BA

    CommutativeLaw

    (AB)c= AcBc(AB)c= AcBc

    De Morgans Law

    A(BC)

    = (AB)C

    A(BC)= (AB)C

    Associative Law

    A(BC) =

    (AB)(AC)

    A(BC) =(AB)(AC)

    Distributive Law

    A(AB) = A

    A(AB) = AAbsorption Law

    AAc= U

    AAc=Complement Law

    11 KS091201 MATEMATIKA DISKRIT W.07.b 11/10/2013

  • 8/14/2019 7th topic b.pptx

    12/15

    How to prove a set identity

    For example: AB=B-(B-A)

    Four methods:

    Use the basic set identities

    Use membership tables

    Prove each set is a subset of each other

    Use set builder notation and logical equivalences

    12 KS091201 MATEMATIKA DISKRIT W.07.b 11/10/2013

  • 8/14/2019 7th topic b.pptx

    13/15

    What we are going to prove

    AB=A-(A-B)

    A B

    ABA-B

    13 KS091201 MATEMATIKA DISKRIT W.07.b 11/10/2013

  • 8/14/2019 7th topic b.pptx

    14/15

    Proof by Set Identities

    AB = A - (A - B)

    Proof) A - (A - B) = A - (ABc)

    = A(ABc)c

    = A(Ac

    B) De Morgans Law= (A Ac) (AB) Distributive Law

    = (AB) Complement Law

    = AB Identity Law

    14 KS091201 MATEMATIKA DISKRIT W.07.b 11/10/2013

  • 8/14/2019 7th topic b.pptx

    15/15

    11/10/2013KS091201 MATEMATIKA DISKRIT W.07.b15

    AB = B - (B - A)

    Proof) B - (B - A) = B - (B Ac)

    = B (B Ac)c

    = B (Bc

    A)= (B Bc) (B A)

    = (B A)

    = AB commutative law