discrete mathematics set

14
Discrete Mathematics Set

Upload: bennett-allison

Post on 06-Jan-2018

213 views

Category:

Documents


1 download

DESCRIPTION

Sets Set = a collection of distinct unordered objects Members of a set are called elements How to determine a set Listing: Example: A = {1,3,5,7} Description Example: B = {x | x = 2k + 1, 0 < k < 3}

TRANSCRIPT

Page 1: Discrete Mathematics Set

Discrete Mathematics

Set

Page 2: Discrete Mathematics Set

Sets

Set = a collection of distinct unordered objects

Members of a set are called elements How to determine a set

Listing: Example: A = {1,3,5,7}

Description Example: B = {x | x = 2k + 1, 0 < k < 3}

Page 3: Discrete Mathematics Set

Finite and infinite sets Finite sets

Examples: A = {1, 2, 3, 4} B = {x | x is an integer, 1 < x < 4}

Infinite sets Examples:

Z = {integers} = {…, -3, -2, -1, 0, 1, 2, 3,…} S={x| x is a real number and 1 < x < 4} = [0, 4]

Page 4: Discrete Mathematics Set

Some important sets

The empty set has no elements. Also called null set or void set. Universal set: the set of all elements about

which we make assertions. Examples:

U = {all natural numbers} U = {all real numbers} U = {x| x is a natural number and 1< x<10}

Page 5: Discrete Mathematics Set

Cardinality Cardinality of a set A (in symbols |A|) is the

number of elements in A Examples:

If A = {1, 2, 3} then |A| = 3If B = {x | x is a natural number and 1< x< 9} then |B| = 9

Infinite cardinality Countable (e.g., natural numbers, integers) Uncountable (e.g., real numbers)

Page 6: Discrete Mathematics Set

Subsets X is a subset of Y if every element of

X is also contained in Y (in symbols X Y) Equality: X = Y if X Y and Y X

X is a proper subset of Y if X Y but Y X Observation: is a subset of every set

Page 7: Discrete Mathematics Set

Power set The power set of X is the set of all subsets of X,

in symbols P(X), i.e. P(X)= {A | A X} Example: if X = {1, 2, 3},

then P(X) = {, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}}

If |X| = n, then |P(X)| = 2n.

Page 8: Discrete Mathematics Set

Set operations:Union and Intersection

Given two sets X and Y The union of X and Y is defined as the set X Y = { x | x X or x Y}

The intersection of X and Y is defined as the set X Y = { x | x X and x Y}

Two sets X and Y are disjoint if X Y =

Page 9: Discrete Mathematics Set

Complement and Difference The difference of two sets X – Y = { x | x X and x Y}

The difference is also called the relative complement of Y in X

Symmetric difference X Δ Y = (X – Y) (Y – X)

The complement of a set A contained in a universal set U is the set Ac = U – A In symbols Ac = U - A

Page 10: Discrete Mathematics Set

Venn diagrams

A Venn diagram provides a graphic view of sets

Set union, intersection, difference, symmetric difference and complements can be identified

Page 11: Discrete Mathematics Set

Properties of set operations (1)

Theorem 2.1.10: Let U be a universal set, and A, B and C subsets of U. The following properties hold:

a) Associativity: (A B) C = A (B C) (A B) C = A (B C)b) Commutativity: A B = B A A B = B A

Page 12: Discrete Mathematics Set

Properties of set operations (2)

c) Distributive laws: A(BC) = (AB)(AC) A(BC) = (AB)(AC)d) Identity laws: AU=A A = Ae) Complement laws: AAc = U AAc =

Page 13: Discrete Mathematics Set

Properties of set operations (3)

f) Idempotent laws: AA = A AA = Ag) Bound laws: AU = U A = h) Absorption laws:

A(AB) = A A(AB) = A

Page 14: Discrete Mathematics Set

Properties of set operations (4)

i) Involution law: (Ac)c = A

j) 0/1 laws: c = U Uc = k) De Morgan’s laws for sets: (AB)c = AcBc

(AB)c = AcBc